firestore.pb.cc 479 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004
  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/v1beta1/firestore.proto
  18. #include "google/firestore/v1beta1/firestore.pb.h"
  19. #include <algorithm>
  20. #include <google/protobuf/stubs/common.h>
  21. #include <google/protobuf/stubs/port.h>
  22. #include <google/protobuf/stubs/once.h>
  23. #include <google/protobuf/io/coded_stream.h>
  24. #include <google/protobuf/wire_format_lite_inl.h>
  25. #include <google/protobuf/descriptor.h>
  26. #include <google/protobuf/generated_message_reflection.h>
  27. #include <google/protobuf/reflection_ops.h>
  28. #include <google/protobuf/wire_format.h>
  29. // This is a temporary google only hack
  30. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  31. #include "third_party/protobuf/version.h"
  32. #endif
  33. // @@protoc_insertion_point(includes)
  34. namespace google {
  35. namespace firestore {
  36. namespace v1beta1 {
  37. class GetDocumentRequestDefaultTypeInternal {
  38. public:
  39. ::google::protobuf::internal::ExplicitlyConstructed<GetDocumentRequest>
  40. _instance;
  41. ::google::protobuf::internal::ArenaStringPtr transaction_;
  42. const ::google::protobuf::Timestamp* read_time_;
  43. } _GetDocumentRequest_default_instance_;
  44. class ListDocumentsRequestDefaultTypeInternal {
  45. public:
  46. ::google::protobuf::internal::ExplicitlyConstructed<ListDocumentsRequest>
  47. _instance;
  48. ::google::protobuf::internal::ArenaStringPtr transaction_;
  49. const ::google::protobuf::Timestamp* read_time_;
  50. } _ListDocumentsRequest_default_instance_;
  51. class ListDocumentsResponseDefaultTypeInternal {
  52. public:
  53. ::google::protobuf::internal::ExplicitlyConstructed<ListDocumentsResponse>
  54. _instance;
  55. } _ListDocumentsResponse_default_instance_;
  56. class CreateDocumentRequestDefaultTypeInternal {
  57. public:
  58. ::google::protobuf::internal::ExplicitlyConstructed<CreateDocumentRequest>
  59. _instance;
  60. } _CreateDocumentRequest_default_instance_;
  61. class UpdateDocumentRequestDefaultTypeInternal {
  62. public:
  63. ::google::protobuf::internal::ExplicitlyConstructed<UpdateDocumentRequest>
  64. _instance;
  65. } _UpdateDocumentRequest_default_instance_;
  66. class DeleteDocumentRequestDefaultTypeInternal {
  67. public:
  68. ::google::protobuf::internal::ExplicitlyConstructed<DeleteDocumentRequest>
  69. _instance;
  70. } _DeleteDocumentRequest_default_instance_;
  71. class BatchGetDocumentsRequestDefaultTypeInternal {
  72. public:
  73. ::google::protobuf::internal::ExplicitlyConstructed<BatchGetDocumentsRequest>
  74. _instance;
  75. ::google::protobuf::internal::ArenaStringPtr transaction_;
  76. const ::google::firestore::v1beta1::TransactionOptions* new_transaction_;
  77. const ::google::protobuf::Timestamp* read_time_;
  78. } _BatchGetDocumentsRequest_default_instance_;
  79. class BatchGetDocumentsResponseDefaultTypeInternal {
  80. public:
  81. ::google::protobuf::internal::ExplicitlyConstructed<BatchGetDocumentsResponse>
  82. _instance;
  83. const ::google::firestore::v1beta1::Document* found_;
  84. ::google::protobuf::internal::ArenaStringPtr missing_;
  85. } _BatchGetDocumentsResponse_default_instance_;
  86. class BeginTransactionRequestDefaultTypeInternal {
  87. public:
  88. ::google::protobuf::internal::ExplicitlyConstructed<BeginTransactionRequest>
  89. _instance;
  90. } _BeginTransactionRequest_default_instance_;
  91. class BeginTransactionResponseDefaultTypeInternal {
  92. public:
  93. ::google::protobuf::internal::ExplicitlyConstructed<BeginTransactionResponse>
  94. _instance;
  95. } _BeginTransactionResponse_default_instance_;
  96. class CommitRequestDefaultTypeInternal {
  97. public:
  98. ::google::protobuf::internal::ExplicitlyConstructed<CommitRequest>
  99. _instance;
  100. } _CommitRequest_default_instance_;
  101. class CommitResponseDefaultTypeInternal {
  102. public:
  103. ::google::protobuf::internal::ExplicitlyConstructed<CommitResponse>
  104. _instance;
  105. } _CommitResponse_default_instance_;
  106. class RollbackRequestDefaultTypeInternal {
  107. public:
  108. ::google::protobuf::internal::ExplicitlyConstructed<RollbackRequest>
  109. _instance;
  110. } _RollbackRequest_default_instance_;
  111. class RunQueryRequestDefaultTypeInternal {
  112. public:
  113. ::google::protobuf::internal::ExplicitlyConstructed<RunQueryRequest>
  114. _instance;
  115. const ::google::firestore::v1beta1::StructuredQuery* structured_query_;
  116. ::google::protobuf::internal::ArenaStringPtr transaction_;
  117. const ::google::firestore::v1beta1::TransactionOptions* new_transaction_;
  118. const ::google::protobuf::Timestamp* read_time_;
  119. } _RunQueryRequest_default_instance_;
  120. class RunQueryResponseDefaultTypeInternal {
  121. public:
  122. ::google::protobuf::internal::ExplicitlyConstructed<RunQueryResponse>
  123. _instance;
  124. } _RunQueryResponse_default_instance_;
  125. class WriteRequest_LabelsEntry_DoNotUseDefaultTypeInternal {
  126. public:
  127. ::google::protobuf::internal::ExplicitlyConstructed<WriteRequest_LabelsEntry_DoNotUse>
  128. _instance;
  129. } _WriteRequest_LabelsEntry_DoNotUse_default_instance_;
  130. class WriteRequestDefaultTypeInternal {
  131. public:
  132. ::google::protobuf::internal::ExplicitlyConstructed<WriteRequest>
  133. _instance;
  134. } _WriteRequest_default_instance_;
  135. class WriteResponseDefaultTypeInternal {
  136. public:
  137. ::google::protobuf::internal::ExplicitlyConstructed<WriteResponse>
  138. _instance;
  139. } _WriteResponse_default_instance_;
  140. class ListenRequest_LabelsEntry_DoNotUseDefaultTypeInternal {
  141. public:
  142. ::google::protobuf::internal::ExplicitlyConstructed<ListenRequest_LabelsEntry_DoNotUse>
  143. _instance;
  144. } _ListenRequest_LabelsEntry_DoNotUse_default_instance_;
  145. class ListenRequestDefaultTypeInternal {
  146. public:
  147. ::google::protobuf::internal::ExplicitlyConstructed<ListenRequest>
  148. _instance;
  149. const ::google::firestore::v1beta1::Target* add_target_;
  150. ::google::protobuf::int32 remove_target_;
  151. } _ListenRequest_default_instance_;
  152. class ListenResponseDefaultTypeInternal {
  153. public:
  154. ::google::protobuf::internal::ExplicitlyConstructed<ListenResponse>
  155. _instance;
  156. const ::google::firestore::v1beta1::TargetChange* target_change_;
  157. const ::google::firestore::v1beta1::DocumentChange* document_change_;
  158. const ::google::firestore::v1beta1::DocumentDelete* document_delete_;
  159. const ::google::firestore::v1beta1::DocumentRemove* document_remove_;
  160. const ::google::firestore::v1beta1::ExistenceFilter* filter_;
  161. } _ListenResponse_default_instance_;
  162. class Target_DocumentsTargetDefaultTypeInternal {
  163. public:
  164. ::google::protobuf::internal::ExplicitlyConstructed<Target_DocumentsTarget>
  165. _instance;
  166. } _Target_DocumentsTarget_default_instance_;
  167. class Target_QueryTargetDefaultTypeInternal {
  168. public:
  169. ::google::protobuf::internal::ExplicitlyConstructed<Target_QueryTarget>
  170. _instance;
  171. const ::google::firestore::v1beta1::StructuredQuery* structured_query_;
  172. } _Target_QueryTarget_default_instance_;
  173. class TargetDefaultTypeInternal {
  174. public:
  175. ::google::protobuf::internal::ExplicitlyConstructed<Target>
  176. _instance;
  177. const ::google::firestore::v1beta1::Target_QueryTarget* query_;
  178. const ::google::firestore::v1beta1::Target_DocumentsTarget* documents_;
  179. ::google::protobuf::internal::ArenaStringPtr resume_token_;
  180. const ::google::protobuf::Timestamp* read_time_;
  181. } _Target_default_instance_;
  182. class TargetChangeDefaultTypeInternal {
  183. public:
  184. ::google::protobuf::internal::ExplicitlyConstructed<TargetChange>
  185. _instance;
  186. } _TargetChange_default_instance_;
  187. class ListCollectionIdsRequestDefaultTypeInternal {
  188. public:
  189. ::google::protobuf::internal::ExplicitlyConstructed<ListCollectionIdsRequest>
  190. _instance;
  191. } _ListCollectionIdsRequest_default_instance_;
  192. class ListCollectionIdsResponseDefaultTypeInternal {
  193. public:
  194. ::google::protobuf::internal::ExplicitlyConstructed<ListCollectionIdsResponse>
  195. _instance;
  196. } _ListCollectionIdsResponse_default_instance_;
  197. } // namespace v1beta1
  198. } // namespace firestore
  199. } // namespace google
  200. namespace protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto {
  201. void InitDefaultsGetDocumentRequestImpl() {
  202. GOOGLE_PROTOBUF_VERIFY_VERSION;
  203. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  204. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  205. #else
  206. ::google::protobuf::internal::InitProtobufDefaults();
  207. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  208. protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsDocumentMask();
  209. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  210. {
  211. void* ptr = &::google::firestore::v1beta1::_GetDocumentRequest_default_instance_;
  212. new (ptr) ::google::firestore::v1beta1::GetDocumentRequest();
  213. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  214. }
  215. ::google::firestore::v1beta1::GetDocumentRequest::InitAsDefaultInstance();
  216. }
  217. void InitDefaultsGetDocumentRequest() {
  218. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  219. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsGetDocumentRequestImpl);
  220. }
  221. void InitDefaultsListDocumentsRequestImpl() {
  222. GOOGLE_PROTOBUF_VERIFY_VERSION;
  223. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  224. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  225. #else
  226. ::google::protobuf::internal::InitProtobufDefaults();
  227. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  228. protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsDocumentMask();
  229. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  230. {
  231. void* ptr = &::google::firestore::v1beta1::_ListDocumentsRequest_default_instance_;
  232. new (ptr) ::google::firestore::v1beta1::ListDocumentsRequest();
  233. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  234. }
  235. ::google::firestore::v1beta1::ListDocumentsRequest::InitAsDefaultInstance();
  236. }
  237. void InitDefaultsListDocumentsRequest() {
  238. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  239. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsListDocumentsRequestImpl);
  240. }
  241. void InitDefaultsListDocumentsResponseImpl() {
  242. GOOGLE_PROTOBUF_VERIFY_VERSION;
  243. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  244. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  245. #else
  246. ::google::protobuf::internal::InitProtobufDefaults();
  247. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  248. protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsDocument();
  249. {
  250. void* ptr = &::google::firestore::v1beta1::_ListDocumentsResponse_default_instance_;
  251. new (ptr) ::google::firestore::v1beta1::ListDocumentsResponse();
  252. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  253. }
  254. ::google::firestore::v1beta1::ListDocumentsResponse::InitAsDefaultInstance();
  255. }
  256. void InitDefaultsListDocumentsResponse() {
  257. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  258. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsListDocumentsResponseImpl);
  259. }
  260. void InitDefaultsCreateDocumentRequestImpl() {
  261. GOOGLE_PROTOBUF_VERIFY_VERSION;
  262. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  263. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  264. #else
  265. ::google::protobuf::internal::InitProtobufDefaults();
  266. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  267. protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsDocument();
  268. protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsDocumentMask();
  269. {
  270. void* ptr = &::google::firestore::v1beta1::_CreateDocumentRequest_default_instance_;
  271. new (ptr) ::google::firestore::v1beta1::CreateDocumentRequest();
  272. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  273. }
  274. ::google::firestore::v1beta1::CreateDocumentRequest::InitAsDefaultInstance();
  275. }
  276. void InitDefaultsCreateDocumentRequest() {
  277. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  278. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsCreateDocumentRequestImpl);
  279. }
  280. void InitDefaultsUpdateDocumentRequestImpl() {
  281. GOOGLE_PROTOBUF_VERIFY_VERSION;
  282. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  283. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  284. #else
  285. ::google::protobuf::internal::InitProtobufDefaults();
  286. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  287. protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsDocument();
  288. protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsDocumentMask();
  289. protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsPrecondition();
  290. {
  291. void* ptr = &::google::firestore::v1beta1::_UpdateDocumentRequest_default_instance_;
  292. new (ptr) ::google::firestore::v1beta1::UpdateDocumentRequest();
  293. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  294. }
  295. ::google::firestore::v1beta1::UpdateDocumentRequest::InitAsDefaultInstance();
  296. }
  297. void InitDefaultsUpdateDocumentRequest() {
  298. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  299. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsUpdateDocumentRequestImpl);
  300. }
  301. void InitDefaultsDeleteDocumentRequestImpl() {
  302. GOOGLE_PROTOBUF_VERIFY_VERSION;
  303. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  304. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  305. #else
  306. ::google::protobuf::internal::InitProtobufDefaults();
  307. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  308. protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsPrecondition();
  309. {
  310. void* ptr = &::google::firestore::v1beta1::_DeleteDocumentRequest_default_instance_;
  311. new (ptr) ::google::firestore::v1beta1::DeleteDocumentRequest();
  312. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  313. }
  314. ::google::firestore::v1beta1::DeleteDocumentRequest::InitAsDefaultInstance();
  315. }
  316. void InitDefaultsDeleteDocumentRequest() {
  317. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  318. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsDeleteDocumentRequestImpl);
  319. }
  320. void InitDefaultsBatchGetDocumentsRequestImpl() {
  321. GOOGLE_PROTOBUF_VERIFY_VERSION;
  322. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  323. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  324. #else
  325. ::google::protobuf::internal::InitProtobufDefaults();
  326. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  327. protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsDocumentMask();
  328. protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsTransactionOptions();
  329. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  330. {
  331. void* ptr = &::google::firestore::v1beta1::_BatchGetDocumentsRequest_default_instance_;
  332. new (ptr) ::google::firestore::v1beta1::BatchGetDocumentsRequest();
  333. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  334. }
  335. ::google::firestore::v1beta1::BatchGetDocumentsRequest::InitAsDefaultInstance();
  336. }
  337. void InitDefaultsBatchGetDocumentsRequest() {
  338. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  339. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsBatchGetDocumentsRequestImpl);
  340. }
  341. void InitDefaultsBatchGetDocumentsResponseImpl() {
  342. GOOGLE_PROTOBUF_VERIFY_VERSION;
  343. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  344. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  345. #else
  346. ::google::protobuf::internal::InitProtobufDefaults();
  347. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  348. protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsDocument();
  349. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  350. {
  351. void* ptr = &::google::firestore::v1beta1::_BatchGetDocumentsResponse_default_instance_;
  352. new (ptr) ::google::firestore::v1beta1::BatchGetDocumentsResponse();
  353. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  354. }
  355. ::google::firestore::v1beta1::BatchGetDocumentsResponse::InitAsDefaultInstance();
  356. }
  357. void InitDefaultsBatchGetDocumentsResponse() {
  358. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  359. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsBatchGetDocumentsResponseImpl);
  360. }
  361. void InitDefaultsBeginTransactionRequestImpl() {
  362. GOOGLE_PROTOBUF_VERIFY_VERSION;
  363. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  364. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  365. #else
  366. ::google::protobuf::internal::InitProtobufDefaults();
  367. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  368. protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsTransactionOptions();
  369. {
  370. void* ptr = &::google::firestore::v1beta1::_BeginTransactionRequest_default_instance_;
  371. new (ptr) ::google::firestore::v1beta1::BeginTransactionRequest();
  372. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  373. }
  374. ::google::firestore::v1beta1::BeginTransactionRequest::InitAsDefaultInstance();
  375. }
  376. void InitDefaultsBeginTransactionRequest() {
  377. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  378. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsBeginTransactionRequestImpl);
  379. }
  380. void InitDefaultsBeginTransactionResponseImpl() {
  381. GOOGLE_PROTOBUF_VERIFY_VERSION;
  382. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  383. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  384. #else
  385. ::google::protobuf::internal::InitProtobufDefaults();
  386. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  387. {
  388. void* ptr = &::google::firestore::v1beta1::_BeginTransactionResponse_default_instance_;
  389. new (ptr) ::google::firestore::v1beta1::BeginTransactionResponse();
  390. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  391. }
  392. ::google::firestore::v1beta1::BeginTransactionResponse::InitAsDefaultInstance();
  393. }
  394. void InitDefaultsBeginTransactionResponse() {
  395. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  396. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsBeginTransactionResponseImpl);
  397. }
  398. void InitDefaultsCommitRequestImpl() {
  399. GOOGLE_PROTOBUF_VERIFY_VERSION;
  400. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  401. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  402. #else
  403. ::google::protobuf::internal::InitProtobufDefaults();
  404. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  405. protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsWrite();
  406. {
  407. void* ptr = &::google::firestore::v1beta1::_CommitRequest_default_instance_;
  408. new (ptr) ::google::firestore::v1beta1::CommitRequest();
  409. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  410. }
  411. ::google::firestore::v1beta1::CommitRequest::InitAsDefaultInstance();
  412. }
  413. void InitDefaultsCommitRequest() {
  414. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  415. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsCommitRequestImpl);
  416. }
  417. void InitDefaultsCommitResponseImpl() {
  418. GOOGLE_PROTOBUF_VERIFY_VERSION;
  419. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  420. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  421. #else
  422. ::google::protobuf::internal::InitProtobufDefaults();
  423. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  424. protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsWriteResult();
  425. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  426. {
  427. void* ptr = &::google::firestore::v1beta1::_CommitResponse_default_instance_;
  428. new (ptr) ::google::firestore::v1beta1::CommitResponse();
  429. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  430. }
  431. ::google::firestore::v1beta1::CommitResponse::InitAsDefaultInstance();
  432. }
  433. void InitDefaultsCommitResponse() {
  434. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  435. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsCommitResponseImpl);
  436. }
  437. void InitDefaultsRollbackRequestImpl() {
  438. GOOGLE_PROTOBUF_VERIFY_VERSION;
  439. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  440. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  441. #else
  442. ::google::protobuf::internal::InitProtobufDefaults();
  443. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  444. {
  445. void* ptr = &::google::firestore::v1beta1::_RollbackRequest_default_instance_;
  446. new (ptr) ::google::firestore::v1beta1::RollbackRequest();
  447. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  448. }
  449. ::google::firestore::v1beta1::RollbackRequest::InitAsDefaultInstance();
  450. }
  451. void InitDefaultsRollbackRequest() {
  452. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  453. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsRollbackRequestImpl);
  454. }
  455. void InitDefaultsRunQueryRequestImpl() {
  456. GOOGLE_PROTOBUF_VERIFY_VERSION;
  457. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  458. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  459. #else
  460. ::google::protobuf::internal::InitProtobufDefaults();
  461. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  462. protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery();
  463. protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsTransactionOptions();
  464. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  465. {
  466. void* ptr = &::google::firestore::v1beta1::_RunQueryRequest_default_instance_;
  467. new (ptr) ::google::firestore::v1beta1::RunQueryRequest();
  468. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  469. }
  470. ::google::firestore::v1beta1::RunQueryRequest::InitAsDefaultInstance();
  471. }
  472. void InitDefaultsRunQueryRequest() {
  473. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  474. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsRunQueryRequestImpl);
  475. }
  476. void InitDefaultsRunQueryResponseImpl() {
  477. GOOGLE_PROTOBUF_VERIFY_VERSION;
  478. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  479. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  480. #else
  481. ::google::protobuf::internal::InitProtobufDefaults();
  482. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  483. protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsDocument();
  484. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  485. {
  486. void* ptr = &::google::firestore::v1beta1::_RunQueryResponse_default_instance_;
  487. new (ptr) ::google::firestore::v1beta1::RunQueryResponse();
  488. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  489. }
  490. ::google::firestore::v1beta1::RunQueryResponse::InitAsDefaultInstance();
  491. }
  492. void InitDefaultsRunQueryResponse() {
  493. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  494. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsRunQueryResponseImpl);
  495. }
  496. void InitDefaultsWriteRequest_LabelsEntry_DoNotUseImpl() {
  497. GOOGLE_PROTOBUF_VERIFY_VERSION;
  498. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  499. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  500. #else
  501. ::google::protobuf::internal::InitProtobufDefaults();
  502. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  503. {
  504. void* ptr = &::google::firestore::v1beta1::_WriteRequest_LabelsEntry_DoNotUse_default_instance_;
  505. new (ptr) ::google::firestore::v1beta1::WriteRequest_LabelsEntry_DoNotUse();
  506. }
  507. ::google::firestore::v1beta1::WriteRequest_LabelsEntry_DoNotUse::InitAsDefaultInstance();
  508. }
  509. void InitDefaultsWriteRequest_LabelsEntry_DoNotUse() {
  510. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  511. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsWriteRequest_LabelsEntry_DoNotUseImpl);
  512. }
  513. void InitDefaultsWriteRequestImpl() {
  514. GOOGLE_PROTOBUF_VERIFY_VERSION;
  515. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  516. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  517. #else
  518. ::google::protobuf::internal::InitProtobufDefaults();
  519. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  520. protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsWrite();
  521. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsWriteRequest_LabelsEntry_DoNotUse();
  522. {
  523. void* ptr = &::google::firestore::v1beta1::_WriteRequest_default_instance_;
  524. new (ptr) ::google::firestore::v1beta1::WriteRequest();
  525. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  526. }
  527. ::google::firestore::v1beta1::WriteRequest::InitAsDefaultInstance();
  528. }
  529. void InitDefaultsWriteRequest() {
  530. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  531. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsWriteRequestImpl);
  532. }
  533. void InitDefaultsWriteResponseImpl() {
  534. GOOGLE_PROTOBUF_VERIFY_VERSION;
  535. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  536. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  537. #else
  538. ::google::protobuf::internal::InitProtobufDefaults();
  539. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  540. protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsWriteResult();
  541. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  542. {
  543. void* ptr = &::google::firestore::v1beta1::_WriteResponse_default_instance_;
  544. new (ptr) ::google::firestore::v1beta1::WriteResponse();
  545. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  546. }
  547. ::google::firestore::v1beta1::WriteResponse::InitAsDefaultInstance();
  548. }
  549. void InitDefaultsWriteResponse() {
  550. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  551. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsWriteResponseImpl);
  552. }
  553. void InitDefaultsListenRequest_LabelsEntry_DoNotUseImpl() {
  554. GOOGLE_PROTOBUF_VERIFY_VERSION;
  555. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  556. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  557. #else
  558. ::google::protobuf::internal::InitProtobufDefaults();
  559. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  560. {
  561. void* ptr = &::google::firestore::v1beta1::_ListenRequest_LabelsEntry_DoNotUse_default_instance_;
  562. new (ptr) ::google::firestore::v1beta1::ListenRequest_LabelsEntry_DoNotUse();
  563. }
  564. ::google::firestore::v1beta1::ListenRequest_LabelsEntry_DoNotUse::InitAsDefaultInstance();
  565. }
  566. void InitDefaultsListenRequest_LabelsEntry_DoNotUse() {
  567. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  568. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsListenRequest_LabelsEntry_DoNotUseImpl);
  569. }
  570. void InitDefaultsListenRequestImpl() {
  571. GOOGLE_PROTOBUF_VERIFY_VERSION;
  572. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  573. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  574. #else
  575. ::google::protobuf::internal::InitProtobufDefaults();
  576. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  577. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget();
  578. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListenRequest_LabelsEntry_DoNotUse();
  579. {
  580. void* ptr = &::google::firestore::v1beta1::_ListenRequest_default_instance_;
  581. new (ptr) ::google::firestore::v1beta1::ListenRequest();
  582. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  583. }
  584. ::google::firestore::v1beta1::ListenRequest::InitAsDefaultInstance();
  585. }
  586. void InitDefaultsListenRequest() {
  587. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  588. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsListenRequestImpl);
  589. }
  590. void InitDefaultsListenResponseImpl() {
  591. GOOGLE_PROTOBUF_VERIFY_VERSION;
  592. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  593. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  594. #else
  595. ::google::protobuf::internal::InitProtobufDefaults();
  596. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  597. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTargetChange();
  598. protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentChange();
  599. protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentDelete();
  600. protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentRemove();
  601. protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsExistenceFilter();
  602. {
  603. void* ptr = &::google::firestore::v1beta1::_ListenResponse_default_instance_;
  604. new (ptr) ::google::firestore::v1beta1::ListenResponse();
  605. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  606. }
  607. ::google::firestore::v1beta1::ListenResponse::InitAsDefaultInstance();
  608. }
  609. void InitDefaultsListenResponse() {
  610. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  611. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsListenResponseImpl);
  612. }
  613. void InitDefaultsTarget_DocumentsTargetImpl() {
  614. GOOGLE_PROTOBUF_VERIFY_VERSION;
  615. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  616. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  617. #else
  618. ::google::protobuf::internal::InitProtobufDefaults();
  619. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  620. {
  621. void* ptr = &::google::firestore::v1beta1::_Target_DocumentsTarget_default_instance_;
  622. new (ptr) ::google::firestore::v1beta1::Target_DocumentsTarget();
  623. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  624. }
  625. ::google::firestore::v1beta1::Target_DocumentsTarget::InitAsDefaultInstance();
  626. }
  627. void InitDefaultsTarget_DocumentsTarget() {
  628. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  629. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTarget_DocumentsTargetImpl);
  630. }
  631. void InitDefaultsTarget_QueryTargetImpl() {
  632. GOOGLE_PROTOBUF_VERIFY_VERSION;
  633. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  634. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  635. #else
  636. ::google::protobuf::internal::InitProtobufDefaults();
  637. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  638. protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery();
  639. {
  640. void* ptr = &::google::firestore::v1beta1::_Target_QueryTarget_default_instance_;
  641. new (ptr) ::google::firestore::v1beta1::Target_QueryTarget();
  642. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  643. }
  644. ::google::firestore::v1beta1::Target_QueryTarget::InitAsDefaultInstance();
  645. }
  646. void InitDefaultsTarget_QueryTarget() {
  647. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  648. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTarget_QueryTargetImpl);
  649. }
  650. void InitDefaultsTargetImpl() {
  651. GOOGLE_PROTOBUF_VERIFY_VERSION;
  652. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  653. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  654. #else
  655. ::google::protobuf::internal::InitProtobufDefaults();
  656. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  657. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget_QueryTarget();
  658. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget_DocumentsTarget();
  659. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  660. {
  661. void* ptr = &::google::firestore::v1beta1::_Target_default_instance_;
  662. new (ptr) ::google::firestore::v1beta1::Target();
  663. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  664. }
  665. ::google::firestore::v1beta1::Target::InitAsDefaultInstance();
  666. }
  667. void InitDefaultsTarget() {
  668. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  669. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTargetImpl);
  670. }
  671. void InitDefaultsTargetChangeImpl() {
  672. GOOGLE_PROTOBUF_VERIFY_VERSION;
  673. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  674. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  675. #else
  676. ::google::protobuf::internal::InitProtobufDefaults();
  677. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  678. protobuf_google_2frpc_2fstatus_2eproto::InitDefaultsStatus();
  679. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  680. {
  681. void* ptr = &::google::firestore::v1beta1::_TargetChange_default_instance_;
  682. new (ptr) ::google::firestore::v1beta1::TargetChange();
  683. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  684. }
  685. ::google::firestore::v1beta1::TargetChange::InitAsDefaultInstance();
  686. }
  687. void InitDefaultsTargetChange() {
  688. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  689. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTargetChangeImpl);
  690. }
  691. void InitDefaultsListCollectionIdsRequestImpl() {
  692. GOOGLE_PROTOBUF_VERIFY_VERSION;
  693. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  694. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  695. #else
  696. ::google::protobuf::internal::InitProtobufDefaults();
  697. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  698. {
  699. void* ptr = &::google::firestore::v1beta1::_ListCollectionIdsRequest_default_instance_;
  700. new (ptr) ::google::firestore::v1beta1::ListCollectionIdsRequest();
  701. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  702. }
  703. ::google::firestore::v1beta1::ListCollectionIdsRequest::InitAsDefaultInstance();
  704. }
  705. void InitDefaultsListCollectionIdsRequest() {
  706. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  707. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsListCollectionIdsRequestImpl);
  708. }
  709. void InitDefaultsListCollectionIdsResponseImpl() {
  710. GOOGLE_PROTOBUF_VERIFY_VERSION;
  711. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  712. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  713. #else
  714. ::google::protobuf::internal::InitProtobufDefaults();
  715. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  716. {
  717. void* ptr = &::google::firestore::v1beta1::_ListCollectionIdsResponse_default_instance_;
  718. new (ptr) ::google::firestore::v1beta1::ListCollectionIdsResponse();
  719. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  720. }
  721. ::google::firestore::v1beta1::ListCollectionIdsResponse::InitAsDefaultInstance();
  722. }
  723. void InitDefaultsListCollectionIdsResponse() {
  724. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  725. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsListCollectionIdsResponseImpl);
  726. }
  727. ::google::protobuf::Metadata file_level_metadata[27];
  728. const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1];
  729. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  730. ~0u, // no _has_bits_
  731. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::GetDocumentRequest, _internal_metadata_),
  732. ~0u, // no _extensions_
  733. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::GetDocumentRequest, _oneof_case_[0]),
  734. ~0u, // no _weak_field_map_
  735. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::GetDocumentRequest, name_),
  736. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::GetDocumentRequest, mask_),
  737. offsetof(::google::firestore::v1beta1::GetDocumentRequestDefaultTypeInternal, transaction_),
  738. offsetof(::google::firestore::v1beta1::GetDocumentRequestDefaultTypeInternal, read_time_),
  739. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::GetDocumentRequest, consistency_selector_),
  740. ~0u, // no _has_bits_
  741. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, _internal_metadata_),
  742. ~0u, // no _extensions_
  743. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, _oneof_case_[0]),
  744. ~0u, // no _weak_field_map_
  745. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, parent_),
  746. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, collection_id_),
  747. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, page_size_),
  748. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, page_token_),
  749. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, order_by_),
  750. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, mask_),
  751. offsetof(::google::firestore::v1beta1::ListDocumentsRequestDefaultTypeInternal, transaction_),
  752. offsetof(::google::firestore::v1beta1::ListDocumentsRequestDefaultTypeInternal, read_time_),
  753. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, show_missing_),
  754. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, consistency_selector_),
  755. ~0u, // no _has_bits_
  756. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsResponse, _internal_metadata_),
  757. ~0u, // no _extensions_
  758. ~0u, // no _oneof_case_
  759. ~0u, // no _weak_field_map_
  760. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsResponse, documents_),
  761. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsResponse, next_page_token_),
  762. ~0u, // no _has_bits_
  763. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CreateDocumentRequest, _internal_metadata_),
  764. ~0u, // no _extensions_
  765. ~0u, // no _oneof_case_
  766. ~0u, // no _weak_field_map_
  767. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CreateDocumentRequest, parent_),
  768. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CreateDocumentRequest, collection_id_),
  769. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CreateDocumentRequest, document_id_),
  770. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CreateDocumentRequest, document_),
  771. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CreateDocumentRequest, mask_),
  772. ~0u, // no _has_bits_
  773. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::UpdateDocumentRequest, _internal_metadata_),
  774. ~0u, // no _extensions_
  775. ~0u, // no _oneof_case_
  776. ~0u, // no _weak_field_map_
  777. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::UpdateDocumentRequest, document_),
  778. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::UpdateDocumentRequest, update_mask_),
  779. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::UpdateDocumentRequest, mask_),
  780. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::UpdateDocumentRequest, current_document_),
  781. ~0u, // no _has_bits_
  782. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DeleteDocumentRequest, _internal_metadata_),
  783. ~0u, // no _extensions_
  784. ~0u, // no _oneof_case_
  785. ~0u, // no _weak_field_map_
  786. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DeleteDocumentRequest, name_),
  787. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DeleteDocumentRequest, current_document_),
  788. ~0u, // no _has_bits_
  789. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsRequest, _internal_metadata_),
  790. ~0u, // no _extensions_
  791. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsRequest, _oneof_case_[0]),
  792. ~0u, // no _weak_field_map_
  793. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsRequest, database_),
  794. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsRequest, documents_),
  795. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsRequest, mask_),
  796. offsetof(::google::firestore::v1beta1::BatchGetDocumentsRequestDefaultTypeInternal, transaction_),
  797. offsetof(::google::firestore::v1beta1::BatchGetDocumentsRequestDefaultTypeInternal, new_transaction_),
  798. offsetof(::google::firestore::v1beta1::BatchGetDocumentsRequestDefaultTypeInternal, read_time_),
  799. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsRequest, consistency_selector_),
  800. ~0u, // no _has_bits_
  801. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsResponse, _internal_metadata_),
  802. ~0u, // no _extensions_
  803. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsResponse, _oneof_case_[0]),
  804. ~0u, // no _weak_field_map_
  805. offsetof(::google::firestore::v1beta1::BatchGetDocumentsResponseDefaultTypeInternal, found_),
  806. offsetof(::google::firestore::v1beta1::BatchGetDocumentsResponseDefaultTypeInternal, missing_),
  807. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsResponse, transaction_),
  808. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsResponse, read_time_),
  809. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsResponse, result_),
  810. ~0u, // no _has_bits_
  811. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BeginTransactionRequest, _internal_metadata_),
  812. ~0u, // no _extensions_
  813. ~0u, // no _oneof_case_
  814. ~0u, // no _weak_field_map_
  815. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BeginTransactionRequest, database_),
  816. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BeginTransactionRequest, options_),
  817. ~0u, // no _has_bits_
  818. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BeginTransactionResponse, _internal_metadata_),
  819. ~0u, // no _extensions_
  820. ~0u, // no _oneof_case_
  821. ~0u, // no _weak_field_map_
  822. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BeginTransactionResponse, transaction_),
  823. ~0u, // no _has_bits_
  824. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CommitRequest, _internal_metadata_),
  825. ~0u, // no _extensions_
  826. ~0u, // no _oneof_case_
  827. ~0u, // no _weak_field_map_
  828. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CommitRequest, database_),
  829. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CommitRequest, writes_),
  830. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CommitRequest, transaction_),
  831. ~0u, // no _has_bits_
  832. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CommitResponse, _internal_metadata_),
  833. ~0u, // no _extensions_
  834. ~0u, // no _oneof_case_
  835. ~0u, // no _weak_field_map_
  836. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CommitResponse, write_results_),
  837. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CommitResponse, commit_time_),
  838. ~0u, // no _has_bits_
  839. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RollbackRequest, _internal_metadata_),
  840. ~0u, // no _extensions_
  841. ~0u, // no _oneof_case_
  842. ~0u, // no _weak_field_map_
  843. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RollbackRequest, database_),
  844. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RollbackRequest, transaction_),
  845. ~0u, // no _has_bits_
  846. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryRequest, _internal_metadata_),
  847. ~0u, // no _extensions_
  848. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryRequest, _oneof_case_[0]),
  849. ~0u, // no _weak_field_map_
  850. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryRequest, parent_),
  851. offsetof(::google::firestore::v1beta1::RunQueryRequestDefaultTypeInternal, structured_query_),
  852. offsetof(::google::firestore::v1beta1::RunQueryRequestDefaultTypeInternal, transaction_),
  853. offsetof(::google::firestore::v1beta1::RunQueryRequestDefaultTypeInternal, new_transaction_),
  854. offsetof(::google::firestore::v1beta1::RunQueryRequestDefaultTypeInternal, read_time_),
  855. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryRequest, query_type_),
  856. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryRequest, consistency_selector_),
  857. ~0u, // no _has_bits_
  858. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryResponse, _internal_metadata_),
  859. ~0u, // no _extensions_
  860. ~0u, // no _oneof_case_
  861. ~0u, // no _weak_field_map_
  862. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryResponse, transaction_),
  863. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryResponse, document_),
  864. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryResponse, read_time_),
  865. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryResponse, skipped_results_),
  866. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest_LabelsEntry_DoNotUse, _has_bits_),
  867. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest_LabelsEntry_DoNotUse, _internal_metadata_),
  868. ~0u, // no _extensions_
  869. ~0u, // no _oneof_case_
  870. ~0u, // no _weak_field_map_
  871. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest_LabelsEntry_DoNotUse, key_),
  872. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest_LabelsEntry_DoNotUse, value_),
  873. 0,
  874. 1,
  875. ~0u, // no _has_bits_
  876. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest, _internal_metadata_),
  877. ~0u, // no _extensions_
  878. ~0u, // no _oneof_case_
  879. ~0u, // no _weak_field_map_
  880. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest, database_),
  881. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest, stream_id_),
  882. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest, writes_),
  883. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest, stream_token_),
  884. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest, labels_),
  885. ~0u, // no _has_bits_
  886. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteResponse, _internal_metadata_),
  887. ~0u, // no _extensions_
  888. ~0u, // no _oneof_case_
  889. ~0u, // no _weak_field_map_
  890. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteResponse, stream_id_),
  891. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteResponse, stream_token_),
  892. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteResponse, write_results_),
  893. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteResponse, commit_time_),
  894. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenRequest_LabelsEntry_DoNotUse, _has_bits_),
  895. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenRequest_LabelsEntry_DoNotUse, _internal_metadata_),
  896. ~0u, // no _extensions_
  897. ~0u, // no _oneof_case_
  898. ~0u, // no _weak_field_map_
  899. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenRequest_LabelsEntry_DoNotUse, key_),
  900. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenRequest_LabelsEntry_DoNotUse, value_),
  901. 0,
  902. 1,
  903. ~0u, // no _has_bits_
  904. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenRequest, _internal_metadata_),
  905. ~0u, // no _extensions_
  906. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenRequest, _oneof_case_[0]),
  907. ~0u, // no _weak_field_map_
  908. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenRequest, database_),
  909. offsetof(::google::firestore::v1beta1::ListenRequestDefaultTypeInternal, add_target_),
  910. offsetof(::google::firestore::v1beta1::ListenRequestDefaultTypeInternal, remove_target_),
  911. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenRequest, labels_),
  912. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenRequest, target_change_),
  913. ~0u, // no _has_bits_
  914. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenResponse, _internal_metadata_),
  915. ~0u, // no _extensions_
  916. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenResponse, _oneof_case_[0]),
  917. ~0u, // no _weak_field_map_
  918. offsetof(::google::firestore::v1beta1::ListenResponseDefaultTypeInternal, target_change_),
  919. offsetof(::google::firestore::v1beta1::ListenResponseDefaultTypeInternal, document_change_),
  920. offsetof(::google::firestore::v1beta1::ListenResponseDefaultTypeInternal, document_delete_),
  921. offsetof(::google::firestore::v1beta1::ListenResponseDefaultTypeInternal, document_remove_),
  922. offsetof(::google::firestore::v1beta1::ListenResponseDefaultTypeInternal, filter_),
  923. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenResponse, response_type_),
  924. ~0u, // no _has_bits_
  925. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target_DocumentsTarget, _internal_metadata_),
  926. ~0u, // no _extensions_
  927. ~0u, // no _oneof_case_
  928. ~0u, // no _weak_field_map_
  929. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target_DocumentsTarget, documents_),
  930. ~0u, // no _has_bits_
  931. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target_QueryTarget, _internal_metadata_),
  932. ~0u, // no _extensions_
  933. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target_QueryTarget, _oneof_case_[0]),
  934. ~0u, // no _weak_field_map_
  935. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target_QueryTarget, parent_),
  936. offsetof(::google::firestore::v1beta1::Target_QueryTargetDefaultTypeInternal, structured_query_),
  937. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target_QueryTarget, query_type_),
  938. ~0u, // no _has_bits_
  939. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target, _internal_metadata_),
  940. ~0u, // no _extensions_
  941. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target, _oneof_case_[0]),
  942. ~0u, // no _weak_field_map_
  943. offsetof(::google::firestore::v1beta1::TargetDefaultTypeInternal, query_),
  944. offsetof(::google::firestore::v1beta1::TargetDefaultTypeInternal, documents_),
  945. offsetof(::google::firestore::v1beta1::TargetDefaultTypeInternal, resume_token_),
  946. offsetof(::google::firestore::v1beta1::TargetDefaultTypeInternal, read_time_),
  947. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target, target_id_),
  948. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target, once_),
  949. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target, target_type_),
  950. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target, resume_type_),
  951. ~0u, // no _has_bits_
  952. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::TargetChange, _internal_metadata_),
  953. ~0u, // no _extensions_
  954. ~0u, // no _oneof_case_
  955. ~0u, // no _weak_field_map_
  956. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::TargetChange, target_change_type_),
  957. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::TargetChange, target_ids_),
  958. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::TargetChange, cause_),
  959. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::TargetChange, resume_token_),
  960. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::TargetChange, read_time_),
  961. ~0u, // no _has_bits_
  962. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListCollectionIdsRequest, _internal_metadata_),
  963. ~0u, // no _extensions_
  964. ~0u, // no _oneof_case_
  965. ~0u, // no _weak_field_map_
  966. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListCollectionIdsRequest, parent_),
  967. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListCollectionIdsRequest, page_size_),
  968. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListCollectionIdsRequest, page_token_),
  969. ~0u, // no _has_bits_
  970. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListCollectionIdsResponse, _internal_metadata_),
  971. ~0u, // no _extensions_
  972. ~0u, // no _oneof_case_
  973. ~0u, // no _weak_field_map_
  974. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListCollectionIdsResponse, collection_ids_),
  975. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListCollectionIdsResponse, next_page_token_),
  976. };
  977. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  978. { 0, -1, sizeof(::google::firestore::v1beta1::GetDocumentRequest)},
  979. { 10, -1, sizeof(::google::firestore::v1beta1::ListDocumentsRequest)},
  980. { 25, -1, sizeof(::google::firestore::v1beta1::ListDocumentsResponse)},
  981. { 32, -1, sizeof(::google::firestore::v1beta1::CreateDocumentRequest)},
  982. { 42, -1, sizeof(::google::firestore::v1beta1::UpdateDocumentRequest)},
  983. { 51, -1, sizeof(::google::firestore::v1beta1::DeleteDocumentRequest)},
  984. { 58, -1, sizeof(::google::firestore::v1beta1::BatchGetDocumentsRequest)},
  985. { 70, -1, sizeof(::google::firestore::v1beta1::BatchGetDocumentsResponse)},
  986. { 80, -1, sizeof(::google::firestore::v1beta1::BeginTransactionRequest)},
  987. { 87, -1, sizeof(::google::firestore::v1beta1::BeginTransactionResponse)},
  988. { 93, -1, sizeof(::google::firestore::v1beta1::CommitRequest)},
  989. { 101, -1, sizeof(::google::firestore::v1beta1::CommitResponse)},
  990. { 108, -1, sizeof(::google::firestore::v1beta1::RollbackRequest)},
  991. { 115, -1, sizeof(::google::firestore::v1beta1::RunQueryRequest)},
  992. { 127, -1, sizeof(::google::firestore::v1beta1::RunQueryResponse)},
  993. { 136, 143, sizeof(::google::firestore::v1beta1::WriteRequest_LabelsEntry_DoNotUse)},
  994. { 145, -1, sizeof(::google::firestore::v1beta1::WriteRequest)},
  995. { 155, -1, sizeof(::google::firestore::v1beta1::WriteResponse)},
  996. { 164, 171, sizeof(::google::firestore::v1beta1::ListenRequest_LabelsEntry_DoNotUse)},
  997. { 173, -1, sizeof(::google::firestore::v1beta1::ListenRequest)},
  998. { 183, -1, sizeof(::google::firestore::v1beta1::ListenResponse)},
  999. { 194, -1, sizeof(::google::firestore::v1beta1::Target_DocumentsTarget)},
  1000. { 200, -1, sizeof(::google::firestore::v1beta1::Target_QueryTarget)},
  1001. { 208, -1, sizeof(::google::firestore::v1beta1::Target)},
  1002. { 221, -1, sizeof(::google::firestore::v1beta1::TargetChange)},
  1003. { 231, -1, sizeof(::google::firestore::v1beta1::ListCollectionIdsRequest)},
  1004. { 239, -1, sizeof(::google::firestore::v1beta1::ListCollectionIdsResponse)},
  1005. };
  1006. static ::google::protobuf::Message const * const file_default_instances[] = {
  1007. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_GetDocumentRequest_default_instance_),
  1008. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_ListDocumentsRequest_default_instance_),
  1009. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_ListDocumentsResponse_default_instance_),
  1010. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_CreateDocumentRequest_default_instance_),
  1011. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_UpdateDocumentRequest_default_instance_),
  1012. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_DeleteDocumentRequest_default_instance_),
  1013. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_BatchGetDocumentsRequest_default_instance_),
  1014. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_BatchGetDocumentsResponse_default_instance_),
  1015. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_BeginTransactionRequest_default_instance_),
  1016. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_BeginTransactionResponse_default_instance_),
  1017. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_CommitRequest_default_instance_),
  1018. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_CommitResponse_default_instance_),
  1019. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_RollbackRequest_default_instance_),
  1020. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_RunQueryRequest_default_instance_),
  1021. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_RunQueryResponse_default_instance_),
  1022. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_WriteRequest_LabelsEntry_DoNotUse_default_instance_),
  1023. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_WriteRequest_default_instance_),
  1024. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_WriteResponse_default_instance_),
  1025. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_ListenRequest_LabelsEntry_DoNotUse_default_instance_),
  1026. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_ListenRequest_default_instance_),
  1027. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_ListenResponse_default_instance_),
  1028. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_Target_DocumentsTarget_default_instance_),
  1029. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_Target_QueryTarget_default_instance_),
  1030. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_Target_default_instance_),
  1031. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_TargetChange_default_instance_),
  1032. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_ListCollectionIdsRequest_default_instance_),
  1033. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1beta1::_ListCollectionIdsResponse_default_instance_),
  1034. };
  1035. void protobuf_AssignDescriptors() {
  1036. AddDescriptors();
  1037. ::google::protobuf::MessageFactory* factory = NULL;
  1038. AssignDescriptors(
  1039. "google/firestore/v1beta1/firestore.proto", schemas, file_default_instances, TableStruct::offsets, factory,
  1040. file_level_metadata, file_level_enum_descriptors, NULL);
  1041. }
  1042. void protobuf_AssignDescriptorsOnce() {
  1043. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  1044. ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
  1045. }
  1046. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  1047. void protobuf_RegisterTypes(const ::std::string&) {
  1048. protobuf_AssignDescriptorsOnce();
  1049. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 27);
  1050. }
  1051. void AddDescriptorsImpl() {
  1052. InitDefaults();
  1053. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  1054. "\n(google/firestore/v1beta1/firestore.pro"
  1055. "to\022\030google.firestore.v1beta1\032\034google/api"
  1056. "/annotations.proto\032%google/firestore/v1b"
  1057. "eta1/common.proto\032\'google/firestore/v1be"
  1058. "ta1/document.proto\032$google/firestore/v1b"
  1059. "eta1/query.proto\032$google/firestore/v1bet"
  1060. "a1/write.proto\032\033google/protobuf/empty.pr"
  1061. "oto\032\037google/protobuf/timestamp.proto\032\027go"
  1062. "ogle/rpc/status.proto\"\270\001\n\022GetDocumentReq"
  1063. "uest\022\014\n\004name\030\001 \001(\t\0224\n\004mask\030\002 \001(\0132&.googl"
  1064. "e.firestore.v1beta1.DocumentMask\022\025\n\013tran"
  1065. "saction\030\003 \001(\014H\000\022/\n\tread_time\030\005 \001(\0132\032.goo"
  1066. "gle.protobuf.TimestampH\000B\026\n\024consistency_"
  1067. "selector\"\242\002\n\024ListDocumentsRequest\022\016\n\006par"
  1068. "ent\030\001 \001(\t\022\025\n\rcollection_id\030\002 \001(\t\022\021\n\tpage"
  1069. "_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022\020\n\010order"
  1070. "_by\030\006 \001(\t\0224\n\004mask\030\007 \001(\0132&.google.firesto"
  1071. "re.v1beta1.DocumentMask\022\025\n\013transaction\030\010"
  1072. " \001(\014H\000\022/\n\tread_time\030\n \001(\0132\032.google.proto"
  1073. "buf.TimestampH\000\022\024\n\014show_missing\030\014 \001(\010B\026\n"
  1074. "\024consistency_selector\"g\n\025ListDocumentsRe"
  1075. "sponse\0225\n\tdocuments\030\001 \003(\0132\".google.fires"
  1076. "tore.v1beta1.Document\022\027\n\017next_page_token"
  1077. "\030\002 \001(\t\"\277\001\n\025CreateDocumentRequest\022\016\n\006pare"
  1078. "nt\030\001 \001(\t\022\025\n\rcollection_id\030\002 \001(\t\022\023\n\013docum"
  1079. "ent_id\030\003 \001(\t\0224\n\010document\030\004 \001(\0132\".google."
  1080. "firestore.v1beta1.Document\0224\n\004mask\030\005 \001(\013"
  1081. "2&.google.firestore.v1beta1.DocumentMask"
  1082. "\"\202\002\n\025UpdateDocumentRequest\0224\n\010document\030\001"
  1083. " \001(\0132\".google.firestore.v1beta1.Document"
  1084. "\022;\n\013update_mask\030\002 \001(\0132&.google.firestore"
  1085. ".v1beta1.DocumentMask\0224\n\004mask\030\003 \001(\0132&.go"
  1086. "ogle.firestore.v1beta1.DocumentMask\022@\n\020c"
  1087. "urrent_document\030\004 \001(\0132&.google.firestore"
  1088. ".v1beta1.Precondition\"g\n\025DeleteDocumentR"
  1089. "equest\022\014\n\004name\030\001 \001(\t\022@\n\020current_document"
  1090. "\030\002 \001(\0132&.google.firestore.v1beta1.Precon"
  1091. "dition\"\236\002\n\030BatchGetDocumentsRequest\022\020\n\010d"
  1092. "atabase\030\001 \001(\t\022\021\n\tdocuments\030\002 \003(\t\0224\n\004mask"
  1093. "\030\003 \001(\0132&.google.firestore.v1beta1.Docume"
  1094. "ntMask\022\025\n\013transaction\030\004 \001(\014H\000\022G\n\017new_tra"
  1095. "nsaction\030\005 \001(\0132,.google.firestore.v1beta"
  1096. "1.TransactionOptionsH\000\022/\n\tread_time\030\007 \001("
  1097. "\0132\032.google.protobuf.TimestampH\000B\026\n\024consi"
  1098. "stency_selector\"\261\001\n\031BatchGetDocumentsRes"
  1099. "ponse\0223\n\005found\030\001 \001(\0132\".google.firestore."
  1100. "v1beta1.DocumentH\000\022\021\n\007missing\030\002 \001(\tH\000\022\023\n"
  1101. "\013transaction\030\003 \001(\014\022-\n\tread_time\030\004 \001(\0132\032."
  1102. "google.protobuf.TimestampB\010\n\006result\"j\n\027B"
  1103. "eginTransactionRequest\022\020\n\010database\030\001 \001(\t"
  1104. "\022=\n\007options\030\002 \001(\0132,.google.firestore.v1b"
  1105. "eta1.TransactionOptions\"/\n\030BeginTransact"
  1106. "ionResponse\022\023\n\013transaction\030\001 \001(\014\"g\n\rComm"
  1107. "itRequest\022\020\n\010database\030\001 \001(\t\022/\n\006writes\030\002 "
  1108. "\003(\0132\037.google.firestore.v1beta1.Write\022\023\n\013"
  1109. "transaction\030\003 \001(\014\"\177\n\016CommitResponse\022<\n\rw"
  1110. "rite_results\030\001 \003(\0132%.google.firestore.v1"
  1111. "beta1.WriteResult\022/\n\013commit_time\030\002 \001(\0132\032"
  1112. ".google.protobuf.Timestamp\"8\n\017RollbackRe"
  1113. "quest\022\020\n\010database\030\001 \001(\t\022\023\n\013transaction\030\002"
  1114. " \001(\014\"\237\002\n\017RunQueryRequest\022\016\n\006parent\030\001 \001(\t"
  1115. "\022E\n\020structured_query\030\002 \001(\0132).google.fire"
  1116. "store.v1beta1.StructuredQueryH\000\022\025\n\013trans"
  1117. "action\030\005 \001(\014H\001\022G\n\017new_transaction\030\006 \001(\0132"
  1118. ",.google.firestore.v1beta1.TransactionOp"
  1119. "tionsH\001\022/\n\tread_time\030\007 \001(\0132\032.google.prot"
  1120. "obuf.TimestampH\001B\014\n\nquery_typeB\026\n\024consis"
  1121. "tency_selector\"\245\001\n\020RunQueryResponse\022\023\n\013t"
  1122. "ransaction\030\002 \001(\014\0224\n\010document\030\001 \001(\0132\".goo"
  1123. "gle.firestore.v1beta1.Document\022-\n\tread_t"
  1124. "ime\030\003 \001(\0132\032.google.protobuf.Timestamp\022\027\n"
  1125. "\017skipped_results\030\004 \001(\005\"\355\001\n\014WriteRequest\022"
  1126. "\020\n\010database\030\001 \001(\t\022\021\n\tstream_id\030\002 \001(\t\022/\n\006"
  1127. "writes\030\003 \003(\0132\037.google.firestore.v1beta1."
  1128. "Write\022\024\n\014stream_token\030\004 \001(\014\022B\n\006labels\030\005 "
  1129. "\003(\01322.google.firestore.v1beta1.WriteRequ"
  1130. "est.LabelsEntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 "
  1131. "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\247\001\n\rWriteResponse"
  1132. "\022\021\n\tstream_id\030\001 \001(\t\022\024\n\014stream_token\030\002 \001("
  1133. "\014\022<\n\rwrite_results\030\003 \003(\0132%.google.firest"
  1134. "ore.v1beta1.WriteResult\022/\n\013commit_time\030\004"
  1135. " \001(\0132\032.google.protobuf.Timestamp\"\367\001\n\rLis"
  1136. "tenRequest\022\020\n\010database\030\001 \001(\t\0226\n\nadd_targ"
  1137. "et\030\002 \001(\0132 .google.firestore.v1beta1.Targ"
  1138. "etH\000\022\027\n\rremove_target\030\003 \001(\005H\000\022C\n\006labels\030"
  1139. "\004 \003(\01323.google.firestore.v1beta1.ListenR"
  1140. "equest.LabelsEntry\032-\n\013LabelsEntry\022\013\n\003key"
  1141. "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\017\n\rtarget_chan"
  1142. "ge\"\356\002\n\016ListenResponse\022\?\n\rtarget_change\030\002"
  1143. " \001(\0132&.google.firestore.v1beta1.TargetCh"
  1144. "angeH\000\022C\n\017document_change\030\003 \001(\0132(.google"
  1145. ".firestore.v1beta1.DocumentChangeH\000\022C\n\017d"
  1146. "ocument_delete\030\004 \001(\0132(.google.firestore."
  1147. "v1beta1.DocumentDeleteH\000\022C\n\017document_rem"
  1148. "ove\030\006 \001(\0132(.google.firestore.v1beta1.Doc"
  1149. "umentRemoveH\000\022;\n\006filter\030\005 \001(\0132).google.f"
  1150. "irestore.v1beta1.ExistenceFilterH\000B\017\n\rre"
  1151. "sponse_type\"\260\003\n\006Target\022=\n\005query\030\002 \001(\0132,."
  1152. "google.firestore.v1beta1.Target.QueryTar"
  1153. "getH\000\022E\n\tdocuments\030\003 \001(\01320.google.firest"
  1154. "ore.v1beta1.Target.DocumentsTargetH\000\022\026\n\014"
  1155. "resume_token\030\004 \001(\014H\001\022/\n\tread_time\030\013 \001(\0132"
  1156. "\032.google.protobuf.TimestampH\001\022\021\n\ttarget_"
  1157. "id\030\005 \001(\005\022\014\n\004once\030\006 \001(\010\032$\n\017DocumentsTarge"
  1158. "t\022\021\n\tdocuments\030\002 \003(\t\032r\n\013QueryTarget\022\016\n\006p"
  1159. "arent\030\001 \001(\t\022E\n\020structured_query\030\002 \001(\0132)."
  1160. "google.firestore.v1beta1.StructuredQuery"
  1161. "H\000B\014\n\nquery_typeB\r\n\013target_typeB\r\n\013resum"
  1162. "e_type\"\257\002\n\014TargetChange\022S\n\022target_change"
  1163. "_type\030\001 \001(\01627.google.firestore.v1beta1.T"
  1164. "argetChange.TargetChangeType\022\022\n\ntarget_i"
  1165. "ds\030\002 \003(\005\022!\n\005cause\030\003 \001(\0132\022.google.rpc.Sta"
  1166. "tus\022\024\n\014resume_token\030\004 \001(\014\022-\n\tread_time\030\006"
  1167. " \001(\0132\032.google.protobuf.Timestamp\"N\n\020Targ"
  1168. "etChangeType\022\r\n\tNO_CHANGE\020\000\022\007\n\003ADD\020\001\022\n\n\006"
  1169. "REMOVE\020\002\022\013\n\007CURRENT\020\003\022\t\n\005RESET\020\004\"Q\n\030List"
  1170. "CollectionIdsRequest\022\016\n\006parent\030\001 \001(\t\022\021\n\t"
  1171. "page_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"L\n\031L"
  1172. "istCollectionIdsResponse\022\026\n\016collection_i"
  1173. "ds\030\001 \003(\t\022\027\n\017next_page_token\030\002 \001(\t2\255\022\n\tFi"
  1174. "restore\022\236\001\n\013GetDocument\022,.google.firesto"
  1175. "re.v1beta1.GetDocumentRequest\032\".google.f"
  1176. "irestore.v1beta1.Document\"=\202\323\344\223\0027\0225/v1be"
  1177. "ta1/{name=projects/*/databases/*/documen"
  1178. "ts/*/**}\022\301\001\n\rListDocuments\022..google.fire"
  1179. "store.v1beta1.ListDocumentsRequest\032/.goo"
  1180. "gle.firestore.v1beta1.ListDocumentsRespo"
  1181. "nse\"O\202\323\344\223\002I\022G/v1beta1/{parent=projects/*"
  1182. "/databases/*/documents/*/**}/{collection"
  1183. "_id}\022\276\001\n\016CreateDocument\022/.google.firesto"
  1184. "re.v1beta1.CreateDocumentRequest\032\".googl"
  1185. "e.firestore.v1beta1.Document\"W\202\323\344\223\002Q\"E/v"
  1186. "1beta1/{parent=projects/*/databases/*/do"
  1187. "cuments/**}/{collection_id}:\010document\022\267\001"
  1188. "\n\016UpdateDocument\022/.google.firestore.v1be"
  1189. "ta1.UpdateDocumentRequest\032\".google.fires"
  1190. "tore.v1beta1.Document\"P\202\323\344\223\002J2>/v1beta1/"
  1191. "{document.name=projects/*/databases/*/do"
  1192. "cuments/*/**}:\010document\022\230\001\n\016DeleteDocume"
  1193. "nt\022/.google.firestore.v1beta1.DeleteDocu"
  1194. "mentRequest\032\026.google.protobuf.Empty\"=\202\323\344"
  1195. "\223\0027*5/v1beta1/{name=projects/*/databases"
  1196. "/*/documents/*/**}\022\310\001\n\021BatchGetDocuments"
  1197. "\0222.google.firestore.v1beta1.BatchGetDocu"
  1198. "mentsRequest\0323.google.firestore.v1beta1."
  1199. "BatchGetDocumentsResponse\"H\202\323\344\223\002B\"=/v1be"
  1200. "ta1/{database=projects/*/databases/*}/do"
  1201. "cuments:batchGet:\001*0\001\022\313\001\n\020BeginTransacti"
  1202. "on\0221.google.firestore.v1beta1.BeginTrans"
  1203. "actionRequest\0322.google.firestore.v1beta1"
  1204. ".BeginTransactionResponse\"P\202\323\344\223\002J\"E/v1be"
  1205. "ta1/{database=projects/*/databases/*}/do"
  1206. "cuments:beginTransaction:\001*\022\243\001\n\006Commit\022\'"
  1207. ".google.firestore.v1beta1.CommitRequest\032"
  1208. "(.google.firestore.v1beta1.CommitRespons"
  1209. "e\"F\202\323\344\223\002@\";/v1beta1/{database=projects/*"
  1210. "/databases/*}/documents:commit:\001*\022\227\001\n\010Ro"
  1211. "llback\022).google.firestore.v1beta1.Rollba"
  1212. "ckRequest\032\026.google.protobuf.Empty\"H\202\323\344\223\002"
  1213. "B\"=/v1beta1/{database=projects/*/databas"
  1214. "es/*}/documents:rollback:\001*\022\253\001\n\010RunQuery"
  1215. "\022).google.firestore.v1beta1.RunQueryRequ"
  1216. "est\032*.google.firestore.v1beta1.RunQueryR"
  1217. "esponse\"F\202\323\344\223\002@\";/v1beta1/{parent=projec"
  1218. "ts/*/databases/*/documents}:runQuery:\001*0"
  1219. "\001\022\243\001\n\005Write\022&.google.firestore.v1beta1.W"
  1220. "riteRequest\032\'.google.firestore.v1beta1.W"
  1221. "riteResponse\"E\202\323\344\223\002\?\":/v1beta1/{database"
  1222. "=projects/*/databases/*}/documents:write"
  1223. ":\001*(\0010\001\022\247\001\n\006Listen\022\'.google.firestore.v1"
  1224. "beta1.ListenRequest\032(.google.firestore.v"
  1225. "1beta1.ListenResponse\"F\202\323\344\223\002@\";/v1beta1/"
  1226. "{database=projects/*/databases/*}/docume"
  1227. "nts:listen:\001*(\0010\001\022\315\001\n\021ListCollectionIds\022"
  1228. "2.google.firestore.v1beta1.ListCollectio"
  1229. "nIdsRequest\0323.google.firestore.v1beta1.L"
  1230. "istCollectionIdsResponse\"O\202\323\344\223\002I\"D/v1bet"
  1231. "a1/{parent=projects/*/databases/*/docume"
  1232. "nts}:listCollectionIds:\001*B\233\001\n\034com.google"
  1233. ".firestore.v1beta1B\016FirestoreProtoP\001ZAgo"
  1234. "ogle.golang.org/genproto/googleapis/fire"
  1235. "store/v1beta1;firestore\242\002\004GCFS\252\002\036Google."
  1236. "Cloud.Firestore.V1Beta1b\006proto3"
  1237. };
  1238. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  1239. descriptor, 7311);
  1240. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  1241. "google/firestore/v1beta1/firestore.proto", &protobuf_RegisterTypes);
  1242. ::protobuf_google_2fapi_2fannotations_2eproto::AddDescriptors();
  1243. ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::AddDescriptors();
  1244. ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::AddDescriptors();
  1245. ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::AddDescriptors();
  1246. ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::AddDescriptors();
  1247. ::protobuf_google_2fprotobuf_2fempty_2eproto::AddDescriptors();
  1248. ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::AddDescriptors();
  1249. ::protobuf_google_2frpc_2fstatus_2eproto::AddDescriptors();
  1250. }
  1251. void AddDescriptors() {
  1252. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  1253. ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
  1254. }
  1255. // Force AddDescriptors() to be called at dynamic initialization time.
  1256. struct StaticDescriptorInitializer {
  1257. StaticDescriptorInitializer() {
  1258. AddDescriptors();
  1259. }
  1260. } static_descriptor_initializer;
  1261. } // namespace protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto
  1262. namespace google {
  1263. namespace firestore {
  1264. namespace v1beta1 {
  1265. const ::google::protobuf::EnumDescriptor* TargetChange_TargetChangeType_descriptor() {
  1266. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  1267. return protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_enum_descriptors[0];
  1268. }
  1269. bool TargetChange_TargetChangeType_IsValid(int value) {
  1270. switch (value) {
  1271. case 0:
  1272. case 1:
  1273. case 2:
  1274. case 3:
  1275. case 4:
  1276. return true;
  1277. default:
  1278. return false;
  1279. }
  1280. }
  1281. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1282. const TargetChange_TargetChangeType TargetChange::NO_CHANGE;
  1283. const TargetChange_TargetChangeType TargetChange::ADD;
  1284. const TargetChange_TargetChangeType TargetChange::REMOVE;
  1285. const TargetChange_TargetChangeType TargetChange::CURRENT;
  1286. const TargetChange_TargetChangeType TargetChange::RESET;
  1287. const TargetChange_TargetChangeType TargetChange::TargetChangeType_MIN;
  1288. const TargetChange_TargetChangeType TargetChange::TargetChangeType_MAX;
  1289. const int TargetChange::TargetChangeType_ARRAYSIZE;
  1290. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1291. // ===================================================================
  1292. void GetDocumentRequest::InitAsDefaultInstance() {
  1293. ::google::firestore::v1beta1::_GetDocumentRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1beta1::DocumentMask*>(
  1294. ::google::firestore::v1beta1::DocumentMask::internal_default_instance());
  1295. ::google::firestore::v1beta1::_GetDocumentRequest_default_instance_.transaction_.UnsafeSetDefault(
  1296. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1297. ::google::firestore::v1beta1::_GetDocumentRequest_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>(
  1298. ::google::protobuf::Timestamp::internal_default_instance());
  1299. }
  1300. void GetDocumentRequest::clear_mask() {
  1301. if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
  1302. delete mask_;
  1303. }
  1304. mask_ = NULL;
  1305. }
  1306. void GetDocumentRequest::set_allocated_read_time(::google::protobuf::Timestamp* read_time) {
  1307. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  1308. clear_consistency_selector();
  1309. if (read_time) {
  1310. ::google::protobuf::Arena* submessage_arena =
  1311. reinterpret_cast< ::google::protobuf::MessageLite*>(read_time)->GetArena();
  1312. if (message_arena != submessage_arena) {
  1313. read_time = ::google::protobuf::internal::GetOwnedMessage(
  1314. message_arena, read_time, submessage_arena);
  1315. }
  1316. set_has_read_time();
  1317. consistency_selector_.read_time_ = read_time;
  1318. }
  1319. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.GetDocumentRequest.read_time)
  1320. }
  1321. void GetDocumentRequest::clear_read_time() {
  1322. if (has_read_time()) {
  1323. delete consistency_selector_.read_time_;
  1324. clear_has_consistency_selector();
  1325. }
  1326. }
  1327. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1328. const int GetDocumentRequest::kNameFieldNumber;
  1329. const int GetDocumentRequest::kMaskFieldNumber;
  1330. const int GetDocumentRequest::kTransactionFieldNumber;
  1331. const int GetDocumentRequest::kReadTimeFieldNumber;
  1332. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1333. GetDocumentRequest::GetDocumentRequest()
  1334. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1335. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  1336. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsGetDocumentRequest();
  1337. }
  1338. SharedCtor();
  1339. // @@protoc_insertion_point(constructor:google.firestore.v1beta1.GetDocumentRequest)
  1340. }
  1341. GetDocumentRequest::GetDocumentRequest(const GetDocumentRequest& from)
  1342. : ::google::protobuf::Message(),
  1343. _internal_metadata_(NULL),
  1344. _cached_size_(0) {
  1345. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1346. name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1347. if (from.name().size() > 0) {
  1348. name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  1349. }
  1350. if (from.has_mask()) {
  1351. mask_ = new ::google::firestore::v1beta1::DocumentMask(*from.mask_);
  1352. } else {
  1353. mask_ = NULL;
  1354. }
  1355. clear_has_consistency_selector();
  1356. switch (from.consistency_selector_case()) {
  1357. case kTransaction: {
  1358. set_transaction(from.transaction());
  1359. break;
  1360. }
  1361. case kReadTime: {
  1362. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  1363. break;
  1364. }
  1365. case CONSISTENCY_SELECTOR_NOT_SET: {
  1366. break;
  1367. }
  1368. }
  1369. // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.GetDocumentRequest)
  1370. }
  1371. void GetDocumentRequest::SharedCtor() {
  1372. name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1373. mask_ = NULL;
  1374. clear_has_consistency_selector();
  1375. _cached_size_ = 0;
  1376. }
  1377. GetDocumentRequest::~GetDocumentRequest() {
  1378. // @@protoc_insertion_point(destructor:google.firestore.v1beta1.GetDocumentRequest)
  1379. SharedDtor();
  1380. }
  1381. void GetDocumentRequest::SharedDtor() {
  1382. name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1383. if (this != internal_default_instance()) delete mask_;
  1384. if (has_consistency_selector()) {
  1385. clear_consistency_selector();
  1386. }
  1387. }
  1388. void GetDocumentRequest::SetCachedSize(int size) const {
  1389. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1390. _cached_size_ = size;
  1391. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1392. }
  1393. const ::google::protobuf::Descriptor* GetDocumentRequest::descriptor() {
  1394. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  1395. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1396. }
  1397. const GetDocumentRequest& GetDocumentRequest::default_instance() {
  1398. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsGetDocumentRequest();
  1399. return *internal_default_instance();
  1400. }
  1401. GetDocumentRequest* GetDocumentRequest::New(::google::protobuf::Arena* arena) const {
  1402. GetDocumentRequest* n = new GetDocumentRequest;
  1403. if (arena != NULL) {
  1404. arena->Own(n);
  1405. }
  1406. return n;
  1407. }
  1408. void GetDocumentRequest::clear_consistency_selector() {
  1409. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.GetDocumentRequest)
  1410. switch (consistency_selector_case()) {
  1411. case kTransaction: {
  1412. consistency_selector_.transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1413. break;
  1414. }
  1415. case kReadTime: {
  1416. delete consistency_selector_.read_time_;
  1417. break;
  1418. }
  1419. case CONSISTENCY_SELECTOR_NOT_SET: {
  1420. break;
  1421. }
  1422. }
  1423. _oneof_case_[0] = CONSISTENCY_SELECTOR_NOT_SET;
  1424. }
  1425. void GetDocumentRequest::Clear() {
  1426. // @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.GetDocumentRequest)
  1427. ::google::protobuf::uint32 cached_has_bits = 0;
  1428. // Prevent compiler warnings about cached_has_bits being unused
  1429. (void) cached_has_bits;
  1430. name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1431. if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
  1432. delete mask_;
  1433. }
  1434. mask_ = NULL;
  1435. clear_consistency_selector();
  1436. _internal_metadata_.Clear();
  1437. }
  1438. bool GetDocumentRequest::MergePartialFromCodedStream(
  1439. ::google::protobuf::io::CodedInputStream* input) {
  1440. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1441. ::google::protobuf::uint32 tag;
  1442. // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.GetDocumentRequest)
  1443. for (;;) {
  1444. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1445. tag = p.first;
  1446. if (!p.second) goto handle_unusual;
  1447. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1448. // string name = 1;
  1449. case 1: {
  1450. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1451. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1452. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1453. input, this->mutable_name()));
  1454. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1455. this->name().data(), static_cast<int>(this->name().length()),
  1456. ::google::protobuf::internal::WireFormatLite::PARSE,
  1457. "google.firestore.v1beta1.GetDocumentRequest.name"));
  1458. } else {
  1459. goto handle_unusual;
  1460. }
  1461. break;
  1462. }
  1463. // .google.firestore.v1beta1.DocumentMask mask = 2;
  1464. case 2: {
  1465. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1466. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  1467. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1468. input, mutable_mask()));
  1469. } else {
  1470. goto handle_unusual;
  1471. }
  1472. break;
  1473. }
  1474. // bytes transaction = 3;
  1475. case 3: {
  1476. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1477. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  1478. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  1479. input, this->mutable_transaction()));
  1480. } else {
  1481. goto handle_unusual;
  1482. }
  1483. break;
  1484. }
  1485. // .google.protobuf.Timestamp read_time = 5;
  1486. case 5: {
  1487. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1488. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  1489. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1490. input, mutable_read_time()));
  1491. } else {
  1492. goto handle_unusual;
  1493. }
  1494. break;
  1495. }
  1496. default: {
  1497. handle_unusual:
  1498. if (tag == 0) {
  1499. goto success;
  1500. }
  1501. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1502. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1503. break;
  1504. }
  1505. }
  1506. }
  1507. success:
  1508. // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.GetDocumentRequest)
  1509. return true;
  1510. failure:
  1511. // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.GetDocumentRequest)
  1512. return false;
  1513. #undef DO_
  1514. }
  1515. void GetDocumentRequest::SerializeWithCachedSizes(
  1516. ::google::protobuf::io::CodedOutputStream* output) const {
  1517. // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.GetDocumentRequest)
  1518. ::google::protobuf::uint32 cached_has_bits = 0;
  1519. (void) cached_has_bits;
  1520. // string name = 1;
  1521. if (this->name().size() > 0) {
  1522. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1523. this->name().data(), static_cast<int>(this->name().length()),
  1524. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1525. "google.firestore.v1beta1.GetDocumentRequest.name");
  1526. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  1527. 1, this->name(), output);
  1528. }
  1529. // .google.firestore.v1beta1.DocumentMask mask = 2;
  1530. if (this->has_mask()) {
  1531. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1532. 2, *this->mask_, output);
  1533. }
  1534. // bytes transaction = 3;
  1535. if (has_transaction()) {
  1536. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  1537. 3, this->transaction(), output);
  1538. }
  1539. // .google.protobuf.Timestamp read_time = 5;
  1540. if (has_read_time()) {
  1541. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1542. 5, *consistency_selector_.read_time_, output);
  1543. }
  1544. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1545. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1546. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1547. }
  1548. // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.GetDocumentRequest)
  1549. }
  1550. ::google::protobuf::uint8* GetDocumentRequest::InternalSerializeWithCachedSizesToArray(
  1551. bool deterministic, ::google::protobuf::uint8* target) const {
  1552. (void)deterministic; // Unused
  1553. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.GetDocumentRequest)
  1554. ::google::protobuf::uint32 cached_has_bits = 0;
  1555. (void) cached_has_bits;
  1556. // string name = 1;
  1557. if (this->name().size() > 0) {
  1558. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1559. this->name().data(), static_cast<int>(this->name().length()),
  1560. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1561. "google.firestore.v1beta1.GetDocumentRequest.name");
  1562. target =
  1563. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  1564. 1, this->name(), target);
  1565. }
  1566. // .google.firestore.v1beta1.DocumentMask mask = 2;
  1567. if (this->has_mask()) {
  1568. target = ::google::protobuf::internal::WireFormatLite::
  1569. InternalWriteMessageToArray(
  1570. 2, *this->mask_, deterministic, target);
  1571. }
  1572. // bytes transaction = 3;
  1573. if (has_transaction()) {
  1574. target =
  1575. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  1576. 3, this->transaction(), target);
  1577. }
  1578. // .google.protobuf.Timestamp read_time = 5;
  1579. if (has_read_time()) {
  1580. target = ::google::protobuf::internal::WireFormatLite::
  1581. InternalWriteMessageToArray(
  1582. 5, *consistency_selector_.read_time_, deterministic, target);
  1583. }
  1584. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1585. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1586. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1587. }
  1588. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.GetDocumentRequest)
  1589. return target;
  1590. }
  1591. size_t GetDocumentRequest::ByteSizeLong() const {
  1592. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.GetDocumentRequest)
  1593. size_t total_size = 0;
  1594. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1595. total_size +=
  1596. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1597. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1598. }
  1599. // string name = 1;
  1600. if (this->name().size() > 0) {
  1601. total_size += 1 +
  1602. ::google::protobuf::internal::WireFormatLite::StringSize(
  1603. this->name());
  1604. }
  1605. // .google.firestore.v1beta1.DocumentMask mask = 2;
  1606. if (this->has_mask()) {
  1607. total_size += 1 +
  1608. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1609. *this->mask_);
  1610. }
  1611. switch (consistency_selector_case()) {
  1612. // bytes transaction = 3;
  1613. case kTransaction: {
  1614. total_size += 1 +
  1615. ::google::protobuf::internal::WireFormatLite::BytesSize(
  1616. this->transaction());
  1617. break;
  1618. }
  1619. // .google.protobuf.Timestamp read_time = 5;
  1620. case kReadTime: {
  1621. total_size += 1 +
  1622. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1623. *consistency_selector_.read_time_);
  1624. break;
  1625. }
  1626. case CONSISTENCY_SELECTOR_NOT_SET: {
  1627. break;
  1628. }
  1629. }
  1630. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1631. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1632. _cached_size_ = cached_size;
  1633. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1634. return total_size;
  1635. }
  1636. void GetDocumentRequest::MergeFrom(const ::google::protobuf::Message& from) {
  1637. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.GetDocumentRequest)
  1638. GOOGLE_DCHECK_NE(&from, this);
  1639. const GetDocumentRequest* source =
  1640. ::google::protobuf::internal::DynamicCastToGenerated<const GetDocumentRequest>(
  1641. &from);
  1642. if (source == NULL) {
  1643. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.GetDocumentRequest)
  1644. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1645. } else {
  1646. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.GetDocumentRequest)
  1647. MergeFrom(*source);
  1648. }
  1649. }
  1650. void GetDocumentRequest::MergeFrom(const GetDocumentRequest& from) {
  1651. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.GetDocumentRequest)
  1652. GOOGLE_DCHECK_NE(&from, this);
  1653. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1654. ::google::protobuf::uint32 cached_has_bits = 0;
  1655. (void) cached_has_bits;
  1656. if (from.name().size() > 0) {
  1657. name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  1658. }
  1659. if (from.has_mask()) {
  1660. mutable_mask()->::google::firestore::v1beta1::DocumentMask::MergeFrom(from.mask());
  1661. }
  1662. switch (from.consistency_selector_case()) {
  1663. case kTransaction: {
  1664. set_transaction(from.transaction());
  1665. break;
  1666. }
  1667. case kReadTime: {
  1668. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  1669. break;
  1670. }
  1671. case CONSISTENCY_SELECTOR_NOT_SET: {
  1672. break;
  1673. }
  1674. }
  1675. }
  1676. void GetDocumentRequest::CopyFrom(const ::google::protobuf::Message& from) {
  1677. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.GetDocumentRequest)
  1678. if (&from == this) return;
  1679. Clear();
  1680. MergeFrom(from);
  1681. }
  1682. void GetDocumentRequest::CopyFrom(const GetDocumentRequest& from) {
  1683. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.GetDocumentRequest)
  1684. if (&from == this) return;
  1685. Clear();
  1686. MergeFrom(from);
  1687. }
  1688. bool GetDocumentRequest::IsInitialized() const {
  1689. return true;
  1690. }
  1691. void GetDocumentRequest::Swap(GetDocumentRequest* other) {
  1692. if (other == this) return;
  1693. InternalSwap(other);
  1694. }
  1695. void GetDocumentRequest::InternalSwap(GetDocumentRequest* other) {
  1696. using std::swap;
  1697. name_.Swap(&other->name_);
  1698. swap(mask_, other->mask_);
  1699. swap(consistency_selector_, other->consistency_selector_);
  1700. swap(_oneof_case_[0], other->_oneof_case_[0]);
  1701. _internal_metadata_.Swap(&other->_internal_metadata_);
  1702. swap(_cached_size_, other->_cached_size_);
  1703. }
  1704. ::google::protobuf::Metadata GetDocumentRequest::GetMetadata() const {
  1705. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  1706. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  1707. }
  1708. // ===================================================================
  1709. void ListDocumentsRequest::InitAsDefaultInstance() {
  1710. ::google::firestore::v1beta1::_ListDocumentsRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1beta1::DocumentMask*>(
  1711. ::google::firestore::v1beta1::DocumentMask::internal_default_instance());
  1712. ::google::firestore::v1beta1::_ListDocumentsRequest_default_instance_.transaction_.UnsafeSetDefault(
  1713. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1714. ::google::firestore::v1beta1::_ListDocumentsRequest_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>(
  1715. ::google::protobuf::Timestamp::internal_default_instance());
  1716. }
  1717. void ListDocumentsRequest::clear_mask() {
  1718. if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
  1719. delete mask_;
  1720. }
  1721. mask_ = NULL;
  1722. }
  1723. void ListDocumentsRequest::set_allocated_read_time(::google::protobuf::Timestamp* read_time) {
  1724. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  1725. clear_consistency_selector();
  1726. if (read_time) {
  1727. ::google::protobuf::Arena* submessage_arena =
  1728. reinterpret_cast< ::google::protobuf::MessageLite*>(read_time)->GetArena();
  1729. if (message_arena != submessage_arena) {
  1730. read_time = ::google::protobuf::internal::GetOwnedMessage(
  1731. message_arena, read_time, submessage_arena);
  1732. }
  1733. set_has_read_time();
  1734. consistency_selector_.read_time_ = read_time;
  1735. }
  1736. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListDocumentsRequest.read_time)
  1737. }
  1738. void ListDocumentsRequest::clear_read_time() {
  1739. if (has_read_time()) {
  1740. delete consistency_selector_.read_time_;
  1741. clear_has_consistency_selector();
  1742. }
  1743. }
  1744. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1745. const int ListDocumentsRequest::kParentFieldNumber;
  1746. const int ListDocumentsRequest::kCollectionIdFieldNumber;
  1747. const int ListDocumentsRequest::kPageSizeFieldNumber;
  1748. const int ListDocumentsRequest::kPageTokenFieldNumber;
  1749. const int ListDocumentsRequest::kOrderByFieldNumber;
  1750. const int ListDocumentsRequest::kMaskFieldNumber;
  1751. const int ListDocumentsRequest::kTransactionFieldNumber;
  1752. const int ListDocumentsRequest::kReadTimeFieldNumber;
  1753. const int ListDocumentsRequest::kShowMissingFieldNumber;
  1754. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1755. ListDocumentsRequest::ListDocumentsRequest()
  1756. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1757. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  1758. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListDocumentsRequest();
  1759. }
  1760. SharedCtor();
  1761. // @@protoc_insertion_point(constructor:google.firestore.v1beta1.ListDocumentsRequest)
  1762. }
  1763. ListDocumentsRequest::ListDocumentsRequest(const ListDocumentsRequest& from)
  1764. : ::google::protobuf::Message(),
  1765. _internal_metadata_(NULL),
  1766. _cached_size_(0) {
  1767. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1768. parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1769. if (from.parent().size() > 0) {
  1770. parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  1771. }
  1772. collection_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1773. if (from.collection_id().size() > 0) {
  1774. collection_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.collection_id_);
  1775. }
  1776. page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1777. if (from.page_token().size() > 0) {
  1778. page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.page_token_);
  1779. }
  1780. order_by_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1781. if (from.order_by().size() > 0) {
  1782. order_by_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.order_by_);
  1783. }
  1784. if (from.has_mask()) {
  1785. mask_ = new ::google::firestore::v1beta1::DocumentMask(*from.mask_);
  1786. } else {
  1787. mask_ = NULL;
  1788. }
  1789. ::memcpy(&page_size_, &from.page_size_,
  1790. static_cast<size_t>(reinterpret_cast<char*>(&show_missing_) -
  1791. reinterpret_cast<char*>(&page_size_)) + sizeof(show_missing_));
  1792. clear_has_consistency_selector();
  1793. switch (from.consistency_selector_case()) {
  1794. case kTransaction: {
  1795. set_transaction(from.transaction());
  1796. break;
  1797. }
  1798. case kReadTime: {
  1799. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  1800. break;
  1801. }
  1802. case CONSISTENCY_SELECTOR_NOT_SET: {
  1803. break;
  1804. }
  1805. }
  1806. // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.ListDocumentsRequest)
  1807. }
  1808. void ListDocumentsRequest::SharedCtor() {
  1809. parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1810. collection_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1811. page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1812. order_by_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1813. ::memset(&mask_, 0, static_cast<size_t>(
  1814. reinterpret_cast<char*>(&show_missing_) -
  1815. reinterpret_cast<char*>(&mask_)) + sizeof(show_missing_));
  1816. clear_has_consistency_selector();
  1817. _cached_size_ = 0;
  1818. }
  1819. ListDocumentsRequest::~ListDocumentsRequest() {
  1820. // @@protoc_insertion_point(destructor:google.firestore.v1beta1.ListDocumentsRequest)
  1821. SharedDtor();
  1822. }
  1823. void ListDocumentsRequest::SharedDtor() {
  1824. parent_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1825. collection_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1826. page_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1827. order_by_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1828. if (this != internal_default_instance()) delete mask_;
  1829. if (has_consistency_selector()) {
  1830. clear_consistency_selector();
  1831. }
  1832. }
  1833. void ListDocumentsRequest::SetCachedSize(int size) const {
  1834. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1835. _cached_size_ = size;
  1836. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1837. }
  1838. const ::google::protobuf::Descriptor* ListDocumentsRequest::descriptor() {
  1839. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  1840. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1841. }
  1842. const ListDocumentsRequest& ListDocumentsRequest::default_instance() {
  1843. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListDocumentsRequest();
  1844. return *internal_default_instance();
  1845. }
  1846. ListDocumentsRequest* ListDocumentsRequest::New(::google::protobuf::Arena* arena) const {
  1847. ListDocumentsRequest* n = new ListDocumentsRequest;
  1848. if (arena != NULL) {
  1849. arena->Own(n);
  1850. }
  1851. return n;
  1852. }
  1853. void ListDocumentsRequest::clear_consistency_selector() {
  1854. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.ListDocumentsRequest)
  1855. switch (consistency_selector_case()) {
  1856. case kTransaction: {
  1857. consistency_selector_.transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1858. break;
  1859. }
  1860. case kReadTime: {
  1861. delete consistency_selector_.read_time_;
  1862. break;
  1863. }
  1864. case CONSISTENCY_SELECTOR_NOT_SET: {
  1865. break;
  1866. }
  1867. }
  1868. _oneof_case_[0] = CONSISTENCY_SELECTOR_NOT_SET;
  1869. }
  1870. void ListDocumentsRequest::Clear() {
  1871. // @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.ListDocumentsRequest)
  1872. ::google::protobuf::uint32 cached_has_bits = 0;
  1873. // Prevent compiler warnings about cached_has_bits being unused
  1874. (void) cached_has_bits;
  1875. parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1876. collection_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1877. page_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1878. order_by_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1879. if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
  1880. delete mask_;
  1881. }
  1882. mask_ = NULL;
  1883. ::memset(&page_size_, 0, static_cast<size_t>(
  1884. reinterpret_cast<char*>(&show_missing_) -
  1885. reinterpret_cast<char*>(&page_size_)) + sizeof(show_missing_));
  1886. clear_consistency_selector();
  1887. _internal_metadata_.Clear();
  1888. }
  1889. bool ListDocumentsRequest::MergePartialFromCodedStream(
  1890. ::google::protobuf::io::CodedInputStream* input) {
  1891. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1892. ::google::protobuf::uint32 tag;
  1893. // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.ListDocumentsRequest)
  1894. for (;;) {
  1895. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1896. tag = p.first;
  1897. if (!p.second) goto handle_unusual;
  1898. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1899. // string parent = 1;
  1900. case 1: {
  1901. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1902. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1903. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1904. input, this->mutable_parent()));
  1905. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1906. this->parent().data(), static_cast<int>(this->parent().length()),
  1907. ::google::protobuf::internal::WireFormatLite::PARSE,
  1908. "google.firestore.v1beta1.ListDocumentsRequest.parent"));
  1909. } else {
  1910. goto handle_unusual;
  1911. }
  1912. break;
  1913. }
  1914. // string collection_id = 2;
  1915. case 2: {
  1916. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1917. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  1918. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1919. input, this->mutable_collection_id()));
  1920. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1921. this->collection_id().data(), static_cast<int>(this->collection_id().length()),
  1922. ::google::protobuf::internal::WireFormatLite::PARSE,
  1923. "google.firestore.v1beta1.ListDocumentsRequest.collection_id"));
  1924. } else {
  1925. goto handle_unusual;
  1926. }
  1927. break;
  1928. }
  1929. // int32 page_size = 3;
  1930. case 3: {
  1931. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1932. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  1933. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1934. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  1935. input, &page_size_)));
  1936. } else {
  1937. goto handle_unusual;
  1938. }
  1939. break;
  1940. }
  1941. // string page_token = 4;
  1942. case 4: {
  1943. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1944. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  1945. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1946. input, this->mutable_page_token()));
  1947. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1948. this->page_token().data(), static_cast<int>(this->page_token().length()),
  1949. ::google::protobuf::internal::WireFormatLite::PARSE,
  1950. "google.firestore.v1beta1.ListDocumentsRequest.page_token"));
  1951. } else {
  1952. goto handle_unusual;
  1953. }
  1954. break;
  1955. }
  1956. // string order_by = 6;
  1957. case 6: {
  1958. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1959. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  1960. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1961. input, this->mutable_order_by()));
  1962. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1963. this->order_by().data(), static_cast<int>(this->order_by().length()),
  1964. ::google::protobuf::internal::WireFormatLite::PARSE,
  1965. "google.firestore.v1beta1.ListDocumentsRequest.order_by"));
  1966. } else {
  1967. goto handle_unusual;
  1968. }
  1969. break;
  1970. }
  1971. // .google.firestore.v1beta1.DocumentMask mask = 7;
  1972. case 7: {
  1973. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1974. static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
  1975. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1976. input, mutable_mask()));
  1977. } else {
  1978. goto handle_unusual;
  1979. }
  1980. break;
  1981. }
  1982. // bytes transaction = 8;
  1983. case 8: {
  1984. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1985. static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
  1986. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  1987. input, this->mutable_transaction()));
  1988. } else {
  1989. goto handle_unusual;
  1990. }
  1991. break;
  1992. }
  1993. // .google.protobuf.Timestamp read_time = 10;
  1994. case 10: {
  1995. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1996. static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) {
  1997. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1998. input, mutable_read_time()));
  1999. } else {
  2000. goto handle_unusual;
  2001. }
  2002. break;
  2003. }
  2004. // bool show_missing = 12;
  2005. case 12: {
  2006. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2007. static_cast< ::google::protobuf::uint8>(96u /* 96 & 0xFF */)) {
  2008. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2009. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  2010. input, &show_missing_)));
  2011. } else {
  2012. goto handle_unusual;
  2013. }
  2014. break;
  2015. }
  2016. default: {
  2017. handle_unusual:
  2018. if (tag == 0) {
  2019. goto success;
  2020. }
  2021. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2022. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2023. break;
  2024. }
  2025. }
  2026. }
  2027. success:
  2028. // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.ListDocumentsRequest)
  2029. return true;
  2030. failure:
  2031. // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.ListDocumentsRequest)
  2032. return false;
  2033. #undef DO_
  2034. }
  2035. void ListDocumentsRequest::SerializeWithCachedSizes(
  2036. ::google::protobuf::io::CodedOutputStream* output) const {
  2037. // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.ListDocumentsRequest)
  2038. ::google::protobuf::uint32 cached_has_bits = 0;
  2039. (void) cached_has_bits;
  2040. // string parent = 1;
  2041. if (this->parent().size() > 0) {
  2042. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2043. this->parent().data(), static_cast<int>(this->parent().length()),
  2044. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2045. "google.firestore.v1beta1.ListDocumentsRequest.parent");
  2046. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  2047. 1, this->parent(), output);
  2048. }
  2049. // string collection_id = 2;
  2050. if (this->collection_id().size() > 0) {
  2051. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2052. this->collection_id().data(), static_cast<int>(this->collection_id().length()),
  2053. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2054. "google.firestore.v1beta1.ListDocumentsRequest.collection_id");
  2055. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  2056. 2, this->collection_id(), output);
  2057. }
  2058. // int32 page_size = 3;
  2059. if (this->page_size() != 0) {
  2060. ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->page_size(), output);
  2061. }
  2062. // string page_token = 4;
  2063. if (this->page_token().size() > 0) {
  2064. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2065. this->page_token().data(), static_cast<int>(this->page_token().length()),
  2066. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2067. "google.firestore.v1beta1.ListDocumentsRequest.page_token");
  2068. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  2069. 4, this->page_token(), output);
  2070. }
  2071. // string order_by = 6;
  2072. if (this->order_by().size() > 0) {
  2073. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2074. this->order_by().data(), static_cast<int>(this->order_by().length()),
  2075. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2076. "google.firestore.v1beta1.ListDocumentsRequest.order_by");
  2077. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  2078. 6, this->order_by(), output);
  2079. }
  2080. // .google.firestore.v1beta1.DocumentMask mask = 7;
  2081. if (this->has_mask()) {
  2082. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2083. 7, *this->mask_, output);
  2084. }
  2085. // bytes transaction = 8;
  2086. if (has_transaction()) {
  2087. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  2088. 8, this->transaction(), output);
  2089. }
  2090. // .google.protobuf.Timestamp read_time = 10;
  2091. if (has_read_time()) {
  2092. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2093. 10, *consistency_selector_.read_time_, output);
  2094. }
  2095. // bool show_missing = 12;
  2096. if (this->show_missing() != 0) {
  2097. ::google::protobuf::internal::WireFormatLite::WriteBool(12, this->show_missing(), output);
  2098. }
  2099. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2100. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2101. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2102. }
  2103. // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.ListDocumentsRequest)
  2104. }
  2105. ::google::protobuf::uint8* ListDocumentsRequest::InternalSerializeWithCachedSizesToArray(
  2106. bool deterministic, ::google::protobuf::uint8* target) const {
  2107. (void)deterministic; // Unused
  2108. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.ListDocumentsRequest)
  2109. ::google::protobuf::uint32 cached_has_bits = 0;
  2110. (void) cached_has_bits;
  2111. // string parent = 1;
  2112. if (this->parent().size() > 0) {
  2113. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2114. this->parent().data(), static_cast<int>(this->parent().length()),
  2115. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2116. "google.firestore.v1beta1.ListDocumentsRequest.parent");
  2117. target =
  2118. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  2119. 1, this->parent(), target);
  2120. }
  2121. // string collection_id = 2;
  2122. if (this->collection_id().size() > 0) {
  2123. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2124. this->collection_id().data(), static_cast<int>(this->collection_id().length()),
  2125. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2126. "google.firestore.v1beta1.ListDocumentsRequest.collection_id");
  2127. target =
  2128. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  2129. 2, this->collection_id(), target);
  2130. }
  2131. // int32 page_size = 3;
  2132. if (this->page_size() != 0) {
  2133. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->page_size(), target);
  2134. }
  2135. // string page_token = 4;
  2136. if (this->page_token().size() > 0) {
  2137. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2138. this->page_token().data(), static_cast<int>(this->page_token().length()),
  2139. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2140. "google.firestore.v1beta1.ListDocumentsRequest.page_token");
  2141. target =
  2142. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  2143. 4, this->page_token(), target);
  2144. }
  2145. // string order_by = 6;
  2146. if (this->order_by().size() > 0) {
  2147. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2148. this->order_by().data(), static_cast<int>(this->order_by().length()),
  2149. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2150. "google.firestore.v1beta1.ListDocumentsRequest.order_by");
  2151. target =
  2152. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  2153. 6, this->order_by(), target);
  2154. }
  2155. // .google.firestore.v1beta1.DocumentMask mask = 7;
  2156. if (this->has_mask()) {
  2157. target = ::google::protobuf::internal::WireFormatLite::
  2158. InternalWriteMessageToArray(
  2159. 7, *this->mask_, deterministic, target);
  2160. }
  2161. // bytes transaction = 8;
  2162. if (has_transaction()) {
  2163. target =
  2164. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  2165. 8, this->transaction(), target);
  2166. }
  2167. // .google.protobuf.Timestamp read_time = 10;
  2168. if (has_read_time()) {
  2169. target = ::google::protobuf::internal::WireFormatLite::
  2170. InternalWriteMessageToArray(
  2171. 10, *consistency_selector_.read_time_, deterministic, target);
  2172. }
  2173. // bool show_missing = 12;
  2174. if (this->show_missing() != 0) {
  2175. target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(12, this->show_missing(), target);
  2176. }
  2177. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2178. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2179. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2180. }
  2181. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.ListDocumentsRequest)
  2182. return target;
  2183. }
  2184. size_t ListDocumentsRequest::ByteSizeLong() const {
  2185. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.ListDocumentsRequest)
  2186. size_t total_size = 0;
  2187. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2188. total_size +=
  2189. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2190. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2191. }
  2192. // string parent = 1;
  2193. if (this->parent().size() > 0) {
  2194. total_size += 1 +
  2195. ::google::protobuf::internal::WireFormatLite::StringSize(
  2196. this->parent());
  2197. }
  2198. // string collection_id = 2;
  2199. if (this->collection_id().size() > 0) {
  2200. total_size += 1 +
  2201. ::google::protobuf::internal::WireFormatLite::StringSize(
  2202. this->collection_id());
  2203. }
  2204. // string page_token = 4;
  2205. if (this->page_token().size() > 0) {
  2206. total_size += 1 +
  2207. ::google::protobuf::internal::WireFormatLite::StringSize(
  2208. this->page_token());
  2209. }
  2210. // string order_by = 6;
  2211. if (this->order_by().size() > 0) {
  2212. total_size += 1 +
  2213. ::google::protobuf::internal::WireFormatLite::StringSize(
  2214. this->order_by());
  2215. }
  2216. // .google.firestore.v1beta1.DocumentMask mask = 7;
  2217. if (this->has_mask()) {
  2218. total_size += 1 +
  2219. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2220. *this->mask_);
  2221. }
  2222. // int32 page_size = 3;
  2223. if (this->page_size() != 0) {
  2224. total_size += 1 +
  2225. ::google::protobuf::internal::WireFormatLite::Int32Size(
  2226. this->page_size());
  2227. }
  2228. // bool show_missing = 12;
  2229. if (this->show_missing() != 0) {
  2230. total_size += 1 + 1;
  2231. }
  2232. switch (consistency_selector_case()) {
  2233. // bytes transaction = 8;
  2234. case kTransaction: {
  2235. total_size += 1 +
  2236. ::google::protobuf::internal::WireFormatLite::BytesSize(
  2237. this->transaction());
  2238. break;
  2239. }
  2240. // .google.protobuf.Timestamp read_time = 10;
  2241. case kReadTime: {
  2242. total_size += 1 +
  2243. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2244. *consistency_selector_.read_time_);
  2245. break;
  2246. }
  2247. case CONSISTENCY_SELECTOR_NOT_SET: {
  2248. break;
  2249. }
  2250. }
  2251. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2252. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2253. _cached_size_ = cached_size;
  2254. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2255. return total_size;
  2256. }
  2257. void ListDocumentsRequest::MergeFrom(const ::google::protobuf::Message& from) {
  2258. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.ListDocumentsRequest)
  2259. GOOGLE_DCHECK_NE(&from, this);
  2260. const ListDocumentsRequest* source =
  2261. ::google::protobuf::internal::DynamicCastToGenerated<const ListDocumentsRequest>(
  2262. &from);
  2263. if (source == NULL) {
  2264. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.ListDocumentsRequest)
  2265. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2266. } else {
  2267. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.ListDocumentsRequest)
  2268. MergeFrom(*source);
  2269. }
  2270. }
  2271. void ListDocumentsRequest::MergeFrom(const ListDocumentsRequest& from) {
  2272. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.ListDocumentsRequest)
  2273. GOOGLE_DCHECK_NE(&from, this);
  2274. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2275. ::google::protobuf::uint32 cached_has_bits = 0;
  2276. (void) cached_has_bits;
  2277. if (from.parent().size() > 0) {
  2278. parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  2279. }
  2280. if (from.collection_id().size() > 0) {
  2281. collection_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.collection_id_);
  2282. }
  2283. if (from.page_token().size() > 0) {
  2284. page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.page_token_);
  2285. }
  2286. if (from.order_by().size() > 0) {
  2287. order_by_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.order_by_);
  2288. }
  2289. if (from.has_mask()) {
  2290. mutable_mask()->::google::firestore::v1beta1::DocumentMask::MergeFrom(from.mask());
  2291. }
  2292. if (from.page_size() != 0) {
  2293. set_page_size(from.page_size());
  2294. }
  2295. if (from.show_missing() != 0) {
  2296. set_show_missing(from.show_missing());
  2297. }
  2298. switch (from.consistency_selector_case()) {
  2299. case kTransaction: {
  2300. set_transaction(from.transaction());
  2301. break;
  2302. }
  2303. case kReadTime: {
  2304. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  2305. break;
  2306. }
  2307. case CONSISTENCY_SELECTOR_NOT_SET: {
  2308. break;
  2309. }
  2310. }
  2311. }
  2312. void ListDocumentsRequest::CopyFrom(const ::google::protobuf::Message& from) {
  2313. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.ListDocumentsRequest)
  2314. if (&from == this) return;
  2315. Clear();
  2316. MergeFrom(from);
  2317. }
  2318. void ListDocumentsRequest::CopyFrom(const ListDocumentsRequest& from) {
  2319. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.ListDocumentsRequest)
  2320. if (&from == this) return;
  2321. Clear();
  2322. MergeFrom(from);
  2323. }
  2324. bool ListDocumentsRequest::IsInitialized() const {
  2325. return true;
  2326. }
  2327. void ListDocumentsRequest::Swap(ListDocumentsRequest* other) {
  2328. if (other == this) return;
  2329. InternalSwap(other);
  2330. }
  2331. void ListDocumentsRequest::InternalSwap(ListDocumentsRequest* other) {
  2332. using std::swap;
  2333. parent_.Swap(&other->parent_);
  2334. collection_id_.Swap(&other->collection_id_);
  2335. page_token_.Swap(&other->page_token_);
  2336. order_by_.Swap(&other->order_by_);
  2337. swap(mask_, other->mask_);
  2338. swap(page_size_, other->page_size_);
  2339. swap(show_missing_, other->show_missing_);
  2340. swap(consistency_selector_, other->consistency_selector_);
  2341. swap(_oneof_case_[0], other->_oneof_case_[0]);
  2342. _internal_metadata_.Swap(&other->_internal_metadata_);
  2343. swap(_cached_size_, other->_cached_size_);
  2344. }
  2345. ::google::protobuf::Metadata ListDocumentsRequest::GetMetadata() const {
  2346. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  2347. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  2348. }
  2349. // ===================================================================
  2350. void ListDocumentsResponse::InitAsDefaultInstance() {
  2351. }
  2352. void ListDocumentsResponse::clear_documents() {
  2353. documents_.Clear();
  2354. }
  2355. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2356. const int ListDocumentsResponse::kDocumentsFieldNumber;
  2357. const int ListDocumentsResponse::kNextPageTokenFieldNumber;
  2358. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2359. ListDocumentsResponse::ListDocumentsResponse()
  2360. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2361. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  2362. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListDocumentsResponse();
  2363. }
  2364. SharedCtor();
  2365. // @@protoc_insertion_point(constructor:google.firestore.v1beta1.ListDocumentsResponse)
  2366. }
  2367. ListDocumentsResponse::ListDocumentsResponse(const ListDocumentsResponse& from)
  2368. : ::google::protobuf::Message(),
  2369. _internal_metadata_(NULL),
  2370. documents_(from.documents_),
  2371. _cached_size_(0) {
  2372. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2373. next_page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2374. if (from.next_page_token().size() > 0) {
  2375. next_page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.next_page_token_);
  2376. }
  2377. // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.ListDocumentsResponse)
  2378. }
  2379. void ListDocumentsResponse::SharedCtor() {
  2380. next_page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2381. _cached_size_ = 0;
  2382. }
  2383. ListDocumentsResponse::~ListDocumentsResponse() {
  2384. // @@protoc_insertion_point(destructor:google.firestore.v1beta1.ListDocumentsResponse)
  2385. SharedDtor();
  2386. }
  2387. void ListDocumentsResponse::SharedDtor() {
  2388. next_page_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2389. }
  2390. void ListDocumentsResponse::SetCachedSize(int size) const {
  2391. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2392. _cached_size_ = size;
  2393. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2394. }
  2395. const ::google::protobuf::Descriptor* ListDocumentsResponse::descriptor() {
  2396. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  2397. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2398. }
  2399. const ListDocumentsResponse& ListDocumentsResponse::default_instance() {
  2400. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListDocumentsResponse();
  2401. return *internal_default_instance();
  2402. }
  2403. ListDocumentsResponse* ListDocumentsResponse::New(::google::protobuf::Arena* arena) const {
  2404. ListDocumentsResponse* n = new ListDocumentsResponse;
  2405. if (arena != NULL) {
  2406. arena->Own(n);
  2407. }
  2408. return n;
  2409. }
  2410. void ListDocumentsResponse::Clear() {
  2411. // @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.ListDocumentsResponse)
  2412. ::google::protobuf::uint32 cached_has_bits = 0;
  2413. // Prevent compiler warnings about cached_has_bits being unused
  2414. (void) cached_has_bits;
  2415. documents_.Clear();
  2416. next_page_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2417. _internal_metadata_.Clear();
  2418. }
  2419. bool ListDocumentsResponse::MergePartialFromCodedStream(
  2420. ::google::protobuf::io::CodedInputStream* input) {
  2421. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2422. ::google::protobuf::uint32 tag;
  2423. // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.ListDocumentsResponse)
  2424. for (;;) {
  2425. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2426. tag = p.first;
  2427. if (!p.second) goto handle_unusual;
  2428. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2429. // repeated .google.firestore.v1beta1.Document documents = 1;
  2430. case 1: {
  2431. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2432. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  2433. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_documents()));
  2434. } else {
  2435. goto handle_unusual;
  2436. }
  2437. break;
  2438. }
  2439. // string next_page_token = 2;
  2440. case 2: {
  2441. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2442. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  2443. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  2444. input, this->mutable_next_page_token()));
  2445. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2446. this->next_page_token().data(), static_cast<int>(this->next_page_token().length()),
  2447. ::google::protobuf::internal::WireFormatLite::PARSE,
  2448. "google.firestore.v1beta1.ListDocumentsResponse.next_page_token"));
  2449. } else {
  2450. goto handle_unusual;
  2451. }
  2452. break;
  2453. }
  2454. default: {
  2455. handle_unusual:
  2456. if (tag == 0) {
  2457. goto success;
  2458. }
  2459. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2460. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2461. break;
  2462. }
  2463. }
  2464. }
  2465. success:
  2466. // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.ListDocumentsResponse)
  2467. return true;
  2468. failure:
  2469. // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.ListDocumentsResponse)
  2470. return false;
  2471. #undef DO_
  2472. }
  2473. void ListDocumentsResponse::SerializeWithCachedSizes(
  2474. ::google::protobuf::io::CodedOutputStream* output) const {
  2475. // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.ListDocumentsResponse)
  2476. ::google::protobuf::uint32 cached_has_bits = 0;
  2477. (void) cached_has_bits;
  2478. // repeated .google.firestore.v1beta1.Document documents = 1;
  2479. for (unsigned int i = 0,
  2480. n = static_cast<unsigned int>(this->documents_size()); i < n; i++) {
  2481. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2482. 1, this->documents(static_cast<int>(i)), output);
  2483. }
  2484. // string next_page_token = 2;
  2485. if (this->next_page_token().size() > 0) {
  2486. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2487. this->next_page_token().data(), static_cast<int>(this->next_page_token().length()),
  2488. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2489. "google.firestore.v1beta1.ListDocumentsResponse.next_page_token");
  2490. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  2491. 2, this->next_page_token(), output);
  2492. }
  2493. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2494. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2495. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2496. }
  2497. // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.ListDocumentsResponse)
  2498. }
  2499. ::google::protobuf::uint8* ListDocumentsResponse::InternalSerializeWithCachedSizesToArray(
  2500. bool deterministic, ::google::protobuf::uint8* target) const {
  2501. (void)deterministic; // Unused
  2502. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.ListDocumentsResponse)
  2503. ::google::protobuf::uint32 cached_has_bits = 0;
  2504. (void) cached_has_bits;
  2505. // repeated .google.firestore.v1beta1.Document documents = 1;
  2506. for (unsigned int i = 0,
  2507. n = static_cast<unsigned int>(this->documents_size()); i < n; i++) {
  2508. target = ::google::protobuf::internal::WireFormatLite::
  2509. InternalWriteMessageToArray(
  2510. 1, this->documents(static_cast<int>(i)), deterministic, target);
  2511. }
  2512. // string next_page_token = 2;
  2513. if (this->next_page_token().size() > 0) {
  2514. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2515. this->next_page_token().data(), static_cast<int>(this->next_page_token().length()),
  2516. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2517. "google.firestore.v1beta1.ListDocumentsResponse.next_page_token");
  2518. target =
  2519. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  2520. 2, this->next_page_token(), target);
  2521. }
  2522. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2523. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2524. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2525. }
  2526. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.ListDocumentsResponse)
  2527. return target;
  2528. }
  2529. size_t ListDocumentsResponse::ByteSizeLong() const {
  2530. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.ListDocumentsResponse)
  2531. size_t total_size = 0;
  2532. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2533. total_size +=
  2534. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2535. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2536. }
  2537. // repeated .google.firestore.v1beta1.Document documents = 1;
  2538. {
  2539. unsigned int count = static_cast<unsigned int>(this->documents_size());
  2540. total_size += 1UL * count;
  2541. for (unsigned int i = 0; i < count; i++) {
  2542. total_size +=
  2543. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2544. this->documents(static_cast<int>(i)));
  2545. }
  2546. }
  2547. // string next_page_token = 2;
  2548. if (this->next_page_token().size() > 0) {
  2549. total_size += 1 +
  2550. ::google::protobuf::internal::WireFormatLite::StringSize(
  2551. this->next_page_token());
  2552. }
  2553. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2554. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2555. _cached_size_ = cached_size;
  2556. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2557. return total_size;
  2558. }
  2559. void ListDocumentsResponse::MergeFrom(const ::google::protobuf::Message& from) {
  2560. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.ListDocumentsResponse)
  2561. GOOGLE_DCHECK_NE(&from, this);
  2562. const ListDocumentsResponse* source =
  2563. ::google::protobuf::internal::DynamicCastToGenerated<const ListDocumentsResponse>(
  2564. &from);
  2565. if (source == NULL) {
  2566. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.ListDocumentsResponse)
  2567. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2568. } else {
  2569. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.ListDocumentsResponse)
  2570. MergeFrom(*source);
  2571. }
  2572. }
  2573. void ListDocumentsResponse::MergeFrom(const ListDocumentsResponse& from) {
  2574. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.ListDocumentsResponse)
  2575. GOOGLE_DCHECK_NE(&from, this);
  2576. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2577. ::google::protobuf::uint32 cached_has_bits = 0;
  2578. (void) cached_has_bits;
  2579. documents_.MergeFrom(from.documents_);
  2580. if (from.next_page_token().size() > 0) {
  2581. next_page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.next_page_token_);
  2582. }
  2583. }
  2584. void ListDocumentsResponse::CopyFrom(const ::google::protobuf::Message& from) {
  2585. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.ListDocumentsResponse)
  2586. if (&from == this) return;
  2587. Clear();
  2588. MergeFrom(from);
  2589. }
  2590. void ListDocumentsResponse::CopyFrom(const ListDocumentsResponse& from) {
  2591. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.ListDocumentsResponse)
  2592. if (&from == this) return;
  2593. Clear();
  2594. MergeFrom(from);
  2595. }
  2596. bool ListDocumentsResponse::IsInitialized() const {
  2597. return true;
  2598. }
  2599. void ListDocumentsResponse::Swap(ListDocumentsResponse* other) {
  2600. if (other == this) return;
  2601. InternalSwap(other);
  2602. }
  2603. void ListDocumentsResponse::InternalSwap(ListDocumentsResponse* other) {
  2604. using std::swap;
  2605. documents_.InternalSwap(&other->documents_);
  2606. next_page_token_.Swap(&other->next_page_token_);
  2607. _internal_metadata_.Swap(&other->_internal_metadata_);
  2608. swap(_cached_size_, other->_cached_size_);
  2609. }
  2610. ::google::protobuf::Metadata ListDocumentsResponse::GetMetadata() const {
  2611. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  2612. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  2613. }
  2614. // ===================================================================
  2615. void CreateDocumentRequest::InitAsDefaultInstance() {
  2616. ::google::firestore::v1beta1::_CreateDocumentRequest_default_instance_._instance.get_mutable()->document_ = const_cast< ::google::firestore::v1beta1::Document*>(
  2617. ::google::firestore::v1beta1::Document::internal_default_instance());
  2618. ::google::firestore::v1beta1::_CreateDocumentRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1beta1::DocumentMask*>(
  2619. ::google::firestore::v1beta1::DocumentMask::internal_default_instance());
  2620. }
  2621. void CreateDocumentRequest::clear_document() {
  2622. if (GetArenaNoVirtual() == NULL && document_ != NULL) {
  2623. delete document_;
  2624. }
  2625. document_ = NULL;
  2626. }
  2627. void CreateDocumentRequest::clear_mask() {
  2628. if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
  2629. delete mask_;
  2630. }
  2631. mask_ = NULL;
  2632. }
  2633. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2634. const int CreateDocumentRequest::kParentFieldNumber;
  2635. const int CreateDocumentRequest::kCollectionIdFieldNumber;
  2636. const int CreateDocumentRequest::kDocumentIdFieldNumber;
  2637. const int CreateDocumentRequest::kDocumentFieldNumber;
  2638. const int CreateDocumentRequest::kMaskFieldNumber;
  2639. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2640. CreateDocumentRequest::CreateDocumentRequest()
  2641. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2642. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  2643. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsCreateDocumentRequest();
  2644. }
  2645. SharedCtor();
  2646. // @@protoc_insertion_point(constructor:google.firestore.v1beta1.CreateDocumentRequest)
  2647. }
  2648. CreateDocumentRequest::CreateDocumentRequest(const CreateDocumentRequest& from)
  2649. : ::google::protobuf::Message(),
  2650. _internal_metadata_(NULL),
  2651. _cached_size_(0) {
  2652. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2653. parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2654. if (from.parent().size() > 0) {
  2655. parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  2656. }
  2657. collection_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2658. if (from.collection_id().size() > 0) {
  2659. collection_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.collection_id_);
  2660. }
  2661. document_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2662. if (from.document_id().size() > 0) {
  2663. document_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.document_id_);
  2664. }
  2665. if (from.has_document()) {
  2666. document_ = new ::google::firestore::v1beta1::Document(*from.document_);
  2667. } else {
  2668. document_ = NULL;
  2669. }
  2670. if (from.has_mask()) {
  2671. mask_ = new ::google::firestore::v1beta1::DocumentMask(*from.mask_);
  2672. } else {
  2673. mask_ = NULL;
  2674. }
  2675. // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.CreateDocumentRequest)
  2676. }
  2677. void CreateDocumentRequest::SharedCtor() {
  2678. parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2679. collection_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2680. document_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2681. ::memset(&document_, 0, static_cast<size_t>(
  2682. reinterpret_cast<char*>(&mask_) -
  2683. reinterpret_cast<char*>(&document_)) + sizeof(mask_));
  2684. _cached_size_ = 0;
  2685. }
  2686. CreateDocumentRequest::~CreateDocumentRequest() {
  2687. // @@protoc_insertion_point(destructor:google.firestore.v1beta1.CreateDocumentRequest)
  2688. SharedDtor();
  2689. }
  2690. void CreateDocumentRequest::SharedDtor() {
  2691. parent_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2692. collection_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2693. document_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2694. if (this != internal_default_instance()) delete document_;
  2695. if (this != internal_default_instance()) delete mask_;
  2696. }
  2697. void CreateDocumentRequest::SetCachedSize(int size) const {
  2698. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2699. _cached_size_ = size;
  2700. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2701. }
  2702. const ::google::protobuf::Descriptor* CreateDocumentRequest::descriptor() {
  2703. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  2704. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2705. }
  2706. const CreateDocumentRequest& CreateDocumentRequest::default_instance() {
  2707. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsCreateDocumentRequest();
  2708. return *internal_default_instance();
  2709. }
  2710. CreateDocumentRequest* CreateDocumentRequest::New(::google::protobuf::Arena* arena) const {
  2711. CreateDocumentRequest* n = new CreateDocumentRequest;
  2712. if (arena != NULL) {
  2713. arena->Own(n);
  2714. }
  2715. return n;
  2716. }
  2717. void CreateDocumentRequest::Clear() {
  2718. // @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.CreateDocumentRequest)
  2719. ::google::protobuf::uint32 cached_has_bits = 0;
  2720. // Prevent compiler warnings about cached_has_bits being unused
  2721. (void) cached_has_bits;
  2722. parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2723. collection_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2724. document_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2725. if (GetArenaNoVirtual() == NULL && document_ != NULL) {
  2726. delete document_;
  2727. }
  2728. document_ = NULL;
  2729. if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
  2730. delete mask_;
  2731. }
  2732. mask_ = NULL;
  2733. _internal_metadata_.Clear();
  2734. }
  2735. bool CreateDocumentRequest::MergePartialFromCodedStream(
  2736. ::google::protobuf::io::CodedInputStream* input) {
  2737. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2738. ::google::protobuf::uint32 tag;
  2739. // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.CreateDocumentRequest)
  2740. for (;;) {
  2741. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2742. tag = p.first;
  2743. if (!p.second) goto handle_unusual;
  2744. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2745. // string parent = 1;
  2746. case 1: {
  2747. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2748. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  2749. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  2750. input, this->mutable_parent()));
  2751. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2752. this->parent().data(), static_cast<int>(this->parent().length()),
  2753. ::google::protobuf::internal::WireFormatLite::PARSE,
  2754. "google.firestore.v1beta1.CreateDocumentRequest.parent"));
  2755. } else {
  2756. goto handle_unusual;
  2757. }
  2758. break;
  2759. }
  2760. // string collection_id = 2;
  2761. case 2: {
  2762. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2763. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  2764. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  2765. input, this->mutable_collection_id()));
  2766. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2767. this->collection_id().data(), static_cast<int>(this->collection_id().length()),
  2768. ::google::protobuf::internal::WireFormatLite::PARSE,
  2769. "google.firestore.v1beta1.CreateDocumentRequest.collection_id"));
  2770. } else {
  2771. goto handle_unusual;
  2772. }
  2773. break;
  2774. }
  2775. // string document_id = 3;
  2776. case 3: {
  2777. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2778. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  2779. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  2780. input, this->mutable_document_id()));
  2781. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2782. this->document_id().data(), static_cast<int>(this->document_id().length()),
  2783. ::google::protobuf::internal::WireFormatLite::PARSE,
  2784. "google.firestore.v1beta1.CreateDocumentRequest.document_id"));
  2785. } else {
  2786. goto handle_unusual;
  2787. }
  2788. break;
  2789. }
  2790. // .google.firestore.v1beta1.Document document = 4;
  2791. case 4: {
  2792. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2793. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  2794. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2795. input, mutable_document()));
  2796. } else {
  2797. goto handle_unusual;
  2798. }
  2799. break;
  2800. }
  2801. // .google.firestore.v1beta1.DocumentMask mask = 5;
  2802. case 5: {
  2803. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2804. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  2805. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2806. input, mutable_mask()));
  2807. } else {
  2808. goto handle_unusual;
  2809. }
  2810. break;
  2811. }
  2812. default: {
  2813. handle_unusual:
  2814. if (tag == 0) {
  2815. goto success;
  2816. }
  2817. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2818. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2819. break;
  2820. }
  2821. }
  2822. }
  2823. success:
  2824. // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.CreateDocumentRequest)
  2825. return true;
  2826. failure:
  2827. // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.CreateDocumentRequest)
  2828. return false;
  2829. #undef DO_
  2830. }
  2831. void CreateDocumentRequest::SerializeWithCachedSizes(
  2832. ::google::protobuf::io::CodedOutputStream* output) const {
  2833. // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.CreateDocumentRequest)
  2834. ::google::protobuf::uint32 cached_has_bits = 0;
  2835. (void) cached_has_bits;
  2836. // string parent = 1;
  2837. if (this->parent().size() > 0) {
  2838. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2839. this->parent().data(), static_cast<int>(this->parent().length()),
  2840. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2841. "google.firestore.v1beta1.CreateDocumentRequest.parent");
  2842. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  2843. 1, this->parent(), output);
  2844. }
  2845. // string collection_id = 2;
  2846. if (this->collection_id().size() > 0) {
  2847. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2848. this->collection_id().data(), static_cast<int>(this->collection_id().length()),
  2849. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2850. "google.firestore.v1beta1.CreateDocumentRequest.collection_id");
  2851. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  2852. 2, this->collection_id(), output);
  2853. }
  2854. // string document_id = 3;
  2855. if (this->document_id().size() > 0) {
  2856. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2857. this->document_id().data(), static_cast<int>(this->document_id().length()),
  2858. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2859. "google.firestore.v1beta1.CreateDocumentRequest.document_id");
  2860. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  2861. 3, this->document_id(), output);
  2862. }
  2863. // .google.firestore.v1beta1.Document document = 4;
  2864. if (this->has_document()) {
  2865. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2866. 4, *this->document_, output);
  2867. }
  2868. // .google.firestore.v1beta1.DocumentMask mask = 5;
  2869. if (this->has_mask()) {
  2870. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2871. 5, *this->mask_, output);
  2872. }
  2873. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2874. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2875. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2876. }
  2877. // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.CreateDocumentRequest)
  2878. }
  2879. ::google::protobuf::uint8* CreateDocumentRequest::InternalSerializeWithCachedSizesToArray(
  2880. bool deterministic, ::google::protobuf::uint8* target) const {
  2881. (void)deterministic; // Unused
  2882. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.CreateDocumentRequest)
  2883. ::google::protobuf::uint32 cached_has_bits = 0;
  2884. (void) cached_has_bits;
  2885. // string parent = 1;
  2886. if (this->parent().size() > 0) {
  2887. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2888. this->parent().data(), static_cast<int>(this->parent().length()),
  2889. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2890. "google.firestore.v1beta1.CreateDocumentRequest.parent");
  2891. target =
  2892. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  2893. 1, this->parent(), target);
  2894. }
  2895. // string collection_id = 2;
  2896. if (this->collection_id().size() > 0) {
  2897. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2898. this->collection_id().data(), static_cast<int>(this->collection_id().length()),
  2899. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2900. "google.firestore.v1beta1.CreateDocumentRequest.collection_id");
  2901. target =
  2902. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  2903. 2, this->collection_id(), target);
  2904. }
  2905. // string document_id = 3;
  2906. if (this->document_id().size() > 0) {
  2907. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2908. this->document_id().data(), static_cast<int>(this->document_id().length()),
  2909. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2910. "google.firestore.v1beta1.CreateDocumentRequest.document_id");
  2911. target =
  2912. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  2913. 3, this->document_id(), target);
  2914. }
  2915. // .google.firestore.v1beta1.Document document = 4;
  2916. if (this->has_document()) {
  2917. target = ::google::protobuf::internal::WireFormatLite::
  2918. InternalWriteMessageToArray(
  2919. 4, *this->document_, deterministic, target);
  2920. }
  2921. // .google.firestore.v1beta1.DocumentMask mask = 5;
  2922. if (this->has_mask()) {
  2923. target = ::google::protobuf::internal::WireFormatLite::
  2924. InternalWriteMessageToArray(
  2925. 5, *this->mask_, deterministic, target);
  2926. }
  2927. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2928. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2929. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2930. }
  2931. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.CreateDocumentRequest)
  2932. return target;
  2933. }
  2934. size_t CreateDocumentRequest::ByteSizeLong() const {
  2935. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.CreateDocumentRequest)
  2936. size_t total_size = 0;
  2937. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2938. total_size +=
  2939. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2940. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2941. }
  2942. // string parent = 1;
  2943. if (this->parent().size() > 0) {
  2944. total_size += 1 +
  2945. ::google::protobuf::internal::WireFormatLite::StringSize(
  2946. this->parent());
  2947. }
  2948. // string collection_id = 2;
  2949. if (this->collection_id().size() > 0) {
  2950. total_size += 1 +
  2951. ::google::protobuf::internal::WireFormatLite::StringSize(
  2952. this->collection_id());
  2953. }
  2954. // string document_id = 3;
  2955. if (this->document_id().size() > 0) {
  2956. total_size += 1 +
  2957. ::google::protobuf::internal::WireFormatLite::StringSize(
  2958. this->document_id());
  2959. }
  2960. // .google.firestore.v1beta1.Document document = 4;
  2961. if (this->has_document()) {
  2962. total_size += 1 +
  2963. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2964. *this->document_);
  2965. }
  2966. // .google.firestore.v1beta1.DocumentMask mask = 5;
  2967. if (this->has_mask()) {
  2968. total_size += 1 +
  2969. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2970. *this->mask_);
  2971. }
  2972. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2973. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2974. _cached_size_ = cached_size;
  2975. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2976. return total_size;
  2977. }
  2978. void CreateDocumentRequest::MergeFrom(const ::google::protobuf::Message& from) {
  2979. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.CreateDocumentRequest)
  2980. GOOGLE_DCHECK_NE(&from, this);
  2981. const CreateDocumentRequest* source =
  2982. ::google::protobuf::internal::DynamicCastToGenerated<const CreateDocumentRequest>(
  2983. &from);
  2984. if (source == NULL) {
  2985. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.CreateDocumentRequest)
  2986. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2987. } else {
  2988. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.CreateDocumentRequest)
  2989. MergeFrom(*source);
  2990. }
  2991. }
  2992. void CreateDocumentRequest::MergeFrom(const CreateDocumentRequest& from) {
  2993. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.CreateDocumentRequest)
  2994. GOOGLE_DCHECK_NE(&from, this);
  2995. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2996. ::google::protobuf::uint32 cached_has_bits = 0;
  2997. (void) cached_has_bits;
  2998. if (from.parent().size() > 0) {
  2999. parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  3000. }
  3001. if (from.collection_id().size() > 0) {
  3002. collection_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.collection_id_);
  3003. }
  3004. if (from.document_id().size() > 0) {
  3005. document_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.document_id_);
  3006. }
  3007. if (from.has_document()) {
  3008. mutable_document()->::google::firestore::v1beta1::Document::MergeFrom(from.document());
  3009. }
  3010. if (from.has_mask()) {
  3011. mutable_mask()->::google::firestore::v1beta1::DocumentMask::MergeFrom(from.mask());
  3012. }
  3013. }
  3014. void CreateDocumentRequest::CopyFrom(const ::google::protobuf::Message& from) {
  3015. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.CreateDocumentRequest)
  3016. if (&from == this) return;
  3017. Clear();
  3018. MergeFrom(from);
  3019. }
  3020. void CreateDocumentRequest::CopyFrom(const CreateDocumentRequest& from) {
  3021. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.CreateDocumentRequest)
  3022. if (&from == this) return;
  3023. Clear();
  3024. MergeFrom(from);
  3025. }
  3026. bool CreateDocumentRequest::IsInitialized() const {
  3027. return true;
  3028. }
  3029. void CreateDocumentRequest::Swap(CreateDocumentRequest* other) {
  3030. if (other == this) return;
  3031. InternalSwap(other);
  3032. }
  3033. void CreateDocumentRequest::InternalSwap(CreateDocumentRequest* other) {
  3034. using std::swap;
  3035. parent_.Swap(&other->parent_);
  3036. collection_id_.Swap(&other->collection_id_);
  3037. document_id_.Swap(&other->document_id_);
  3038. swap(document_, other->document_);
  3039. swap(mask_, other->mask_);
  3040. _internal_metadata_.Swap(&other->_internal_metadata_);
  3041. swap(_cached_size_, other->_cached_size_);
  3042. }
  3043. ::google::protobuf::Metadata CreateDocumentRequest::GetMetadata() const {
  3044. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  3045. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  3046. }
  3047. // ===================================================================
  3048. void UpdateDocumentRequest::InitAsDefaultInstance() {
  3049. ::google::firestore::v1beta1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->document_ = const_cast< ::google::firestore::v1beta1::Document*>(
  3050. ::google::firestore::v1beta1::Document::internal_default_instance());
  3051. ::google::firestore::v1beta1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->update_mask_ = const_cast< ::google::firestore::v1beta1::DocumentMask*>(
  3052. ::google::firestore::v1beta1::DocumentMask::internal_default_instance());
  3053. ::google::firestore::v1beta1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1beta1::DocumentMask*>(
  3054. ::google::firestore::v1beta1::DocumentMask::internal_default_instance());
  3055. ::google::firestore::v1beta1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->current_document_ = const_cast< ::google::firestore::v1beta1::Precondition*>(
  3056. ::google::firestore::v1beta1::Precondition::internal_default_instance());
  3057. }
  3058. void UpdateDocumentRequest::clear_document() {
  3059. if (GetArenaNoVirtual() == NULL && document_ != NULL) {
  3060. delete document_;
  3061. }
  3062. document_ = NULL;
  3063. }
  3064. void UpdateDocumentRequest::clear_update_mask() {
  3065. if (GetArenaNoVirtual() == NULL && update_mask_ != NULL) {
  3066. delete update_mask_;
  3067. }
  3068. update_mask_ = NULL;
  3069. }
  3070. void UpdateDocumentRequest::clear_mask() {
  3071. if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
  3072. delete mask_;
  3073. }
  3074. mask_ = NULL;
  3075. }
  3076. void UpdateDocumentRequest::clear_current_document() {
  3077. if (GetArenaNoVirtual() == NULL && current_document_ != NULL) {
  3078. delete current_document_;
  3079. }
  3080. current_document_ = NULL;
  3081. }
  3082. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3083. const int UpdateDocumentRequest::kDocumentFieldNumber;
  3084. const int UpdateDocumentRequest::kUpdateMaskFieldNumber;
  3085. const int UpdateDocumentRequest::kMaskFieldNumber;
  3086. const int UpdateDocumentRequest::kCurrentDocumentFieldNumber;
  3087. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3088. UpdateDocumentRequest::UpdateDocumentRequest()
  3089. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  3090. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  3091. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsUpdateDocumentRequest();
  3092. }
  3093. SharedCtor();
  3094. // @@protoc_insertion_point(constructor:google.firestore.v1beta1.UpdateDocumentRequest)
  3095. }
  3096. UpdateDocumentRequest::UpdateDocumentRequest(const UpdateDocumentRequest& from)
  3097. : ::google::protobuf::Message(),
  3098. _internal_metadata_(NULL),
  3099. _cached_size_(0) {
  3100. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3101. if (from.has_document()) {
  3102. document_ = new ::google::firestore::v1beta1::Document(*from.document_);
  3103. } else {
  3104. document_ = NULL;
  3105. }
  3106. if (from.has_update_mask()) {
  3107. update_mask_ = new ::google::firestore::v1beta1::DocumentMask(*from.update_mask_);
  3108. } else {
  3109. update_mask_ = NULL;
  3110. }
  3111. if (from.has_mask()) {
  3112. mask_ = new ::google::firestore::v1beta1::DocumentMask(*from.mask_);
  3113. } else {
  3114. mask_ = NULL;
  3115. }
  3116. if (from.has_current_document()) {
  3117. current_document_ = new ::google::firestore::v1beta1::Precondition(*from.current_document_);
  3118. } else {
  3119. current_document_ = NULL;
  3120. }
  3121. // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.UpdateDocumentRequest)
  3122. }
  3123. void UpdateDocumentRequest::SharedCtor() {
  3124. ::memset(&document_, 0, static_cast<size_t>(
  3125. reinterpret_cast<char*>(&current_document_) -
  3126. reinterpret_cast<char*>(&document_)) + sizeof(current_document_));
  3127. _cached_size_ = 0;
  3128. }
  3129. UpdateDocumentRequest::~UpdateDocumentRequest() {
  3130. // @@protoc_insertion_point(destructor:google.firestore.v1beta1.UpdateDocumentRequest)
  3131. SharedDtor();
  3132. }
  3133. void UpdateDocumentRequest::SharedDtor() {
  3134. if (this != internal_default_instance()) delete document_;
  3135. if (this != internal_default_instance()) delete update_mask_;
  3136. if (this != internal_default_instance()) delete mask_;
  3137. if (this != internal_default_instance()) delete current_document_;
  3138. }
  3139. void UpdateDocumentRequest::SetCachedSize(int size) const {
  3140. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  3141. _cached_size_ = size;
  3142. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  3143. }
  3144. const ::google::protobuf::Descriptor* UpdateDocumentRequest::descriptor() {
  3145. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  3146. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  3147. }
  3148. const UpdateDocumentRequest& UpdateDocumentRequest::default_instance() {
  3149. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsUpdateDocumentRequest();
  3150. return *internal_default_instance();
  3151. }
  3152. UpdateDocumentRequest* UpdateDocumentRequest::New(::google::protobuf::Arena* arena) const {
  3153. UpdateDocumentRequest* n = new UpdateDocumentRequest;
  3154. if (arena != NULL) {
  3155. arena->Own(n);
  3156. }
  3157. return n;
  3158. }
  3159. void UpdateDocumentRequest::Clear() {
  3160. // @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.UpdateDocumentRequest)
  3161. ::google::protobuf::uint32 cached_has_bits = 0;
  3162. // Prevent compiler warnings about cached_has_bits being unused
  3163. (void) cached_has_bits;
  3164. if (GetArenaNoVirtual() == NULL && document_ != NULL) {
  3165. delete document_;
  3166. }
  3167. document_ = NULL;
  3168. if (GetArenaNoVirtual() == NULL && update_mask_ != NULL) {
  3169. delete update_mask_;
  3170. }
  3171. update_mask_ = NULL;
  3172. if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
  3173. delete mask_;
  3174. }
  3175. mask_ = NULL;
  3176. if (GetArenaNoVirtual() == NULL && current_document_ != NULL) {
  3177. delete current_document_;
  3178. }
  3179. current_document_ = NULL;
  3180. _internal_metadata_.Clear();
  3181. }
  3182. bool UpdateDocumentRequest::MergePartialFromCodedStream(
  3183. ::google::protobuf::io::CodedInputStream* input) {
  3184. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3185. ::google::protobuf::uint32 tag;
  3186. // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.UpdateDocumentRequest)
  3187. for (;;) {
  3188. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3189. tag = p.first;
  3190. if (!p.second) goto handle_unusual;
  3191. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3192. // .google.firestore.v1beta1.Document document = 1;
  3193. case 1: {
  3194. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3195. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  3196. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  3197. input, mutable_document()));
  3198. } else {
  3199. goto handle_unusual;
  3200. }
  3201. break;
  3202. }
  3203. // .google.firestore.v1beta1.DocumentMask update_mask = 2;
  3204. case 2: {
  3205. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3206. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  3207. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  3208. input, mutable_update_mask()));
  3209. } else {
  3210. goto handle_unusual;
  3211. }
  3212. break;
  3213. }
  3214. // .google.firestore.v1beta1.DocumentMask mask = 3;
  3215. case 3: {
  3216. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3217. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  3218. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  3219. input, mutable_mask()));
  3220. } else {
  3221. goto handle_unusual;
  3222. }
  3223. break;
  3224. }
  3225. // .google.firestore.v1beta1.Precondition current_document = 4;
  3226. case 4: {
  3227. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3228. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  3229. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  3230. input, mutable_current_document()));
  3231. } else {
  3232. goto handle_unusual;
  3233. }
  3234. break;
  3235. }
  3236. default: {
  3237. handle_unusual:
  3238. if (tag == 0) {
  3239. goto success;
  3240. }
  3241. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3242. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3243. break;
  3244. }
  3245. }
  3246. }
  3247. success:
  3248. // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.UpdateDocumentRequest)
  3249. return true;
  3250. failure:
  3251. // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.UpdateDocumentRequest)
  3252. return false;
  3253. #undef DO_
  3254. }
  3255. void UpdateDocumentRequest::SerializeWithCachedSizes(
  3256. ::google::protobuf::io::CodedOutputStream* output) const {
  3257. // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.UpdateDocumentRequest)
  3258. ::google::protobuf::uint32 cached_has_bits = 0;
  3259. (void) cached_has_bits;
  3260. // .google.firestore.v1beta1.Document document = 1;
  3261. if (this->has_document()) {
  3262. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3263. 1, *this->document_, output);
  3264. }
  3265. // .google.firestore.v1beta1.DocumentMask update_mask = 2;
  3266. if (this->has_update_mask()) {
  3267. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3268. 2, *this->update_mask_, output);
  3269. }
  3270. // .google.firestore.v1beta1.DocumentMask mask = 3;
  3271. if (this->has_mask()) {
  3272. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3273. 3, *this->mask_, output);
  3274. }
  3275. // .google.firestore.v1beta1.Precondition current_document = 4;
  3276. if (this->has_current_document()) {
  3277. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3278. 4, *this->current_document_, output);
  3279. }
  3280. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3281. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  3282. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  3283. }
  3284. // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.UpdateDocumentRequest)
  3285. }
  3286. ::google::protobuf::uint8* UpdateDocumentRequest::InternalSerializeWithCachedSizesToArray(
  3287. bool deterministic, ::google::protobuf::uint8* target) const {
  3288. (void)deterministic; // Unused
  3289. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.UpdateDocumentRequest)
  3290. ::google::protobuf::uint32 cached_has_bits = 0;
  3291. (void) cached_has_bits;
  3292. // .google.firestore.v1beta1.Document document = 1;
  3293. if (this->has_document()) {
  3294. target = ::google::protobuf::internal::WireFormatLite::
  3295. InternalWriteMessageToArray(
  3296. 1, *this->document_, deterministic, target);
  3297. }
  3298. // .google.firestore.v1beta1.DocumentMask update_mask = 2;
  3299. if (this->has_update_mask()) {
  3300. target = ::google::protobuf::internal::WireFormatLite::
  3301. InternalWriteMessageToArray(
  3302. 2, *this->update_mask_, deterministic, target);
  3303. }
  3304. // .google.firestore.v1beta1.DocumentMask mask = 3;
  3305. if (this->has_mask()) {
  3306. target = ::google::protobuf::internal::WireFormatLite::
  3307. InternalWriteMessageToArray(
  3308. 3, *this->mask_, deterministic, target);
  3309. }
  3310. // .google.firestore.v1beta1.Precondition current_document = 4;
  3311. if (this->has_current_document()) {
  3312. target = ::google::protobuf::internal::WireFormatLite::
  3313. InternalWriteMessageToArray(
  3314. 4, *this->current_document_, deterministic, target);
  3315. }
  3316. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3317. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  3318. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  3319. }
  3320. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.UpdateDocumentRequest)
  3321. return target;
  3322. }
  3323. size_t UpdateDocumentRequest::ByteSizeLong() const {
  3324. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.UpdateDocumentRequest)
  3325. size_t total_size = 0;
  3326. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3327. total_size +=
  3328. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  3329. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  3330. }
  3331. // .google.firestore.v1beta1.Document document = 1;
  3332. if (this->has_document()) {
  3333. total_size += 1 +
  3334. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3335. *this->document_);
  3336. }
  3337. // .google.firestore.v1beta1.DocumentMask update_mask = 2;
  3338. if (this->has_update_mask()) {
  3339. total_size += 1 +
  3340. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3341. *this->update_mask_);
  3342. }
  3343. // .google.firestore.v1beta1.DocumentMask mask = 3;
  3344. if (this->has_mask()) {
  3345. total_size += 1 +
  3346. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3347. *this->mask_);
  3348. }
  3349. // .google.firestore.v1beta1.Precondition current_document = 4;
  3350. if (this->has_current_document()) {
  3351. total_size += 1 +
  3352. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3353. *this->current_document_);
  3354. }
  3355. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  3356. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  3357. _cached_size_ = cached_size;
  3358. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  3359. return total_size;
  3360. }
  3361. void UpdateDocumentRequest::MergeFrom(const ::google::protobuf::Message& from) {
  3362. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.UpdateDocumentRequest)
  3363. GOOGLE_DCHECK_NE(&from, this);
  3364. const UpdateDocumentRequest* source =
  3365. ::google::protobuf::internal::DynamicCastToGenerated<const UpdateDocumentRequest>(
  3366. &from);
  3367. if (source == NULL) {
  3368. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.UpdateDocumentRequest)
  3369. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  3370. } else {
  3371. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.UpdateDocumentRequest)
  3372. MergeFrom(*source);
  3373. }
  3374. }
  3375. void UpdateDocumentRequest::MergeFrom(const UpdateDocumentRequest& from) {
  3376. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.UpdateDocumentRequest)
  3377. GOOGLE_DCHECK_NE(&from, this);
  3378. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3379. ::google::protobuf::uint32 cached_has_bits = 0;
  3380. (void) cached_has_bits;
  3381. if (from.has_document()) {
  3382. mutable_document()->::google::firestore::v1beta1::Document::MergeFrom(from.document());
  3383. }
  3384. if (from.has_update_mask()) {
  3385. mutable_update_mask()->::google::firestore::v1beta1::DocumentMask::MergeFrom(from.update_mask());
  3386. }
  3387. if (from.has_mask()) {
  3388. mutable_mask()->::google::firestore::v1beta1::DocumentMask::MergeFrom(from.mask());
  3389. }
  3390. if (from.has_current_document()) {
  3391. mutable_current_document()->::google::firestore::v1beta1::Precondition::MergeFrom(from.current_document());
  3392. }
  3393. }
  3394. void UpdateDocumentRequest::CopyFrom(const ::google::protobuf::Message& from) {
  3395. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.UpdateDocumentRequest)
  3396. if (&from == this) return;
  3397. Clear();
  3398. MergeFrom(from);
  3399. }
  3400. void UpdateDocumentRequest::CopyFrom(const UpdateDocumentRequest& from) {
  3401. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.UpdateDocumentRequest)
  3402. if (&from == this) return;
  3403. Clear();
  3404. MergeFrom(from);
  3405. }
  3406. bool UpdateDocumentRequest::IsInitialized() const {
  3407. return true;
  3408. }
  3409. void UpdateDocumentRequest::Swap(UpdateDocumentRequest* other) {
  3410. if (other == this) return;
  3411. InternalSwap(other);
  3412. }
  3413. void UpdateDocumentRequest::InternalSwap(UpdateDocumentRequest* other) {
  3414. using std::swap;
  3415. swap(document_, other->document_);
  3416. swap(update_mask_, other->update_mask_);
  3417. swap(mask_, other->mask_);
  3418. swap(current_document_, other->current_document_);
  3419. _internal_metadata_.Swap(&other->_internal_metadata_);
  3420. swap(_cached_size_, other->_cached_size_);
  3421. }
  3422. ::google::protobuf::Metadata UpdateDocumentRequest::GetMetadata() const {
  3423. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  3424. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  3425. }
  3426. // ===================================================================
  3427. void DeleteDocumentRequest::InitAsDefaultInstance() {
  3428. ::google::firestore::v1beta1::_DeleteDocumentRequest_default_instance_._instance.get_mutable()->current_document_ = const_cast< ::google::firestore::v1beta1::Precondition*>(
  3429. ::google::firestore::v1beta1::Precondition::internal_default_instance());
  3430. }
  3431. void DeleteDocumentRequest::clear_current_document() {
  3432. if (GetArenaNoVirtual() == NULL && current_document_ != NULL) {
  3433. delete current_document_;
  3434. }
  3435. current_document_ = NULL;
  3436. }
  3437. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3438. const int DeleteDocumentRequest::kNameFieldNumber;
  3439. const int DeleteDocumentRequest::kCurrentDocumentFieldNumber;
  3440. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3441. DeleteDocumentRequest::DeleteDocumentRequest()
  3442. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  3443. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  3444. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsDeleteDocumentRequest();
  3445. }
  3446. SharedCtor();
  3447. // @@protoc_insertion_point(constructor:google.firestore.v1beta1.DeleteDocumentRequest)
  3448. }
  3449. DeleteDocumentRequest::DeleteDocumentRequest(const DeleteDocumentRequest& from)
  3450. : ::google::protobuf::Message(),
  3451. _internal_metadata_(NULL),
  3452. _cached_size_(0) {
  3453. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3454. name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3455. if (from.name().size() > 0) {
  3456. name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  3457. }
  3458. if (from.has_current_document()) {
  3459. current_document_ = new ::google::firestore::v1beta1::Precondition(*from.current_document_);
  3460. } else {
  3461. current_document_ = NULL;
  3462. }
  3463. // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.DeleteDocumentRequest)
  3464. }
  3465. void DeleteDocumentRequest::SharedCtor() {
  3466. name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3467. current_document_ = NULL;
  3468. _cached_size_ = 0;
  3469. }
  3470. DeleteDocumentRequest::~DeleteDocumentRequest() {
  3471. // @@protoc_insertion_point(destructor:google.firestore.v1beta1.DeleteDocumentRequest)
  3472. SharedDtor();
  3473. }
  3474. void DeleteDocumentRequest::SharedDtor() {
  3475. name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3476. if (this != internal_default_instance()) delete current_document_;
  3477. }
  3478. void DeleteDocumentRequest::SetCachedSize(int size) const {
  3479. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  3480. _cached_size_ = size;
  3481. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  3482. }
  3483. const ::google::protobuf::Descriptor* DeleteDocumentRequest::descriptor() {
  3484. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  3485. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  3486. }
  3487. const DeleteDocumentRequest& DeleteDocumentRequest::default_instance() {
  3488. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsDeleteDocumentRequest();
  3489. return *internal_default_instance();
  3490. }
  3491. DeleteDocumentRequest* DeleteDocumentRequest::New(::google::protobuf::Arena* arena) const {
  3492. DeleteDocumentRequest* n = new DeleteDocumentRequest;
  3493. if (arena != NULL) {
  3494. arena->Own(n);
  3495. }
  3496. return n;
  3497. }
  3498. void DeleteDocumentRequest::Clear() {
  3499. // @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.DeleteDocumentRequest)
  3500. ::google::protobuf::uint32 cached_has_bits = 0;
  3501. // Prevent compiler warnings about cached_has_bits being unused
  3502. (void) cached_has_bits;
  3503. name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3504. if (GetArenaNoVirtual() == NULL && current_document_ != NULL) {
  3505. delete current_document_;
  3506. }
  3507. current_document_ = NULL;
  3508. _internal_metadata_.Clear();
  3509. }
  3510. bool DeleteDocumentRequest::MergePartialFromCodedStream(
  3511. ::google::protobuf::io::CodedInputStream* input) {
  3512. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3513. ::google::protobuf::uint32 tag;
  3514. // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.DeleteDocumentRequest)
  3515. for (;;) {
  3516. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3517. tag = p.first;
  3518. if (!p.second) goto handle_unusual;
  3519. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3520. // string name = 1;
  3521. case 1: {
  3522. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3523. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  3524. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  3525. input, this->mutable_name()));
  3526. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3527. this->name().data(), static_cast<int>(this->name().length()),
  3528. ::google::protobuf::internal::WireFormatLite::PARSE,
  3529. "google.firestore.v1beta1.DeleteDocumentRequest.name"));
  3530. } else {
  3531. goto handle_unusual;
  3532. }
  3533. break;
  3534. }
  3535. // .google.firestore.v1beta1.Precondition current_document = 2;
  3536. case 2: {
  3537. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3538. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  3539. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  3540. input, mutable_current_document()));
  3541. } else {
  3542. goto handle_unusual;
  3543. }
  3544. break;
  3545. }
  3546. default: {
  3547. handle_unusual:
  3548. if (tag == 0) {
  3549. goto success;
  3550. }
  3551. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3552. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3553. break;
  3554. }
  3555. }
  3556. }
  3557. success:
  3558. // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.DeleteDocumentRequest)
  3559. return true;
  3560. failure:
  3561. // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.DeleteDocumentRequest)
  3562. return false;
  3563. #undef DO_
  3564. }
  3565. void DeleteDocumentRequest::SerializeWithCachedSizes(
  3566. ::google::protobuf::io::CodedOutputStream* output) const {
  3567. // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.DeleteDocumentRequest)
  3568. ::google::protobuf::uint32 cached_has_bits = 0;
  3569. (void) cached_has_bits;
  3570. // string name = 1;
  3571. if (this->name().size() > 0) {
  3572. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3573. this->name().data(), static_cast<int>(this->name().length()),
  3574. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  3575. "google.firestore.v1beta1.DeleteDocumentRequest.name");
  3576. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  3577. 1, this->name(), output);
  3578. }
  3579. // .google.firestore.v1beta1.Precondition current_document = 2;
  3580. if (this->has_current_document()) {
  3581. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3582. 2, *this->current_document_, output);
  3583. }
  3584. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3585. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  3586. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  3587. }
  3588. // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.DeleteDocumentRequest)
  3589. }
  3590. ::google::protobuf::uint8* DeleteDocumentRequest::InternalSerializeWithCachedSizesToArray(
  3591. bool deterministic, ::google::protobuf::uint8* target) const {
  3592. (void)deterministic; // Unused
  3593. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.DeleteDocumentRequest)
  3594. ::google::protobuf::uint32 cached_has_bits = 0;
  3595. (void) cached_has_bits;
  3596. // string name = 1;
  3597. if (this->name().size() > 0) {
  3598. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3599. this->name().data(), static_cast<int>(this->name().length()),
  3600. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  3601. "google.firestore.v1beta1.DeleteDocumentRequest.name");
  3602. target =
  3603. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  3604. 1, this->name(), target);
  3605. }
  3606. // .google.firestore.v1beta1.Precondition current_document = 2;
  3607. if (this->has_current_document()) {
  3608. target = ::google::protobuf::internal::WireFormatLite::
  3609. InternalWriteMessageToArray(
  3610. 2, *this->current_document_, deterministic, target);
  3611. }
  3612. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3613. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  3614. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  3615. }
  3616. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.DeleteDocumentRequest)
  3617. return target;
  3618. }
  3619. size_t DeleteDocumentRequest::ByteSizeLong() const {
  3620. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.DeleteDocumentRequest)
  3621. size_t total_size = 0;
  3622. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3623. total_size +=
  3624. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  3625. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  3626. }
  3627. // string name = 1;
  3628. if (this->name().size() > 0) {
  3629. total_size += 1 +
  3630. ::google::protobuf::internal::WireFormatLite::StringSize(
  3631. this->name());
  3632. }
  3633. // .google.firestore.v1beta1.Precondition current_document = 2;
  3634. if (this->has_current_document()) {
  3635. total_size += 1 +
  3636. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3637. *this->current_document_);
  3638. }
  3639. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  3640. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  3641. _cached_size_ = cached_size;
  3642. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  3643. return total_size;
  3644. }
  3645. void DeleteDocumentRequest::MergeFrom(const ::google::protobuf::Message& from) {
  3646. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.DeleteDocumentRequest)
  3647. GOOGLE_DCHECK_NE(&from, this);
  3648. const DeleteDocumentRequest* source =
  3649. ::google::protobuf::internal::DynamicCastToGenerated<const DeleteDocumentRequest>(
  3650. &from);
  3651. if (source == NULL) {
  3652. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.DeleteDocumentRequest)
  3653. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  3654. } else {
  3655. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.DeleteDocumentRequest)
  3656. MergeFrom(*source);
  3657. }
  3658. }
  3659. void DeleteDocumentRequest::MergeFrom(const DeleteDocumentRequest& from) {
  3660. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.DeleteDocumentRequest)
  3661. GOOGLE_DCHECK_NE(&from, this);
  3662. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3663. ::google::protobuf::uint32 cached_has_bits = 0;
  3664. (void) cached_has_bits;
  3665. if (from.name().size() > 0) {
  3666. name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  3667. }
  3668. if (from.has_current_document()) {
  3669. mutable_current_document()->::google::firestore::v1beta1::Precondition::MergeFrom(from.current_document());
  3670. }
  3671. }
  3672. void DeleteDocumentRequest::CopyFrom(const ::google::protobuf::Message& from) {
  3673. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.DeleteDocumentRequest)
  3674. if (&from == this) return;
  3675. Clear();
  3676. MergeFrom(from);
  3677. }
  3678. void DeleteDocumentRequest::CopyFrom(const DeleteDocumentRequest& from) {
  3679. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.DeleteDocumentRequest)
  3680. if (&from == this) return;
  3681. Clear();
  3682. MergeFrom(from);
  3683. }
  3684. bool DeleteDocumentRequest::IsInitialized() const {
  3685. return true;
  3686. }
  3687. void DeleteDocumentRequest::Swap(DeleteDocumentRequest* other) {
  3688. if (other == this) return;
  3689. InternalSwap(other);
  3690. }
  3691. void DeleteDocumentRequest::InternalSwap(DeleteDocumentRequest* other) {
  3692. using std::swap;
  3693. name_.Swap(&other->name_);
  3694. swap(current_document_, other->current_document_);
  3695. _internal_metadata_.Swap(&other->_internal_metadata_);
  3696. swap(_cached_size_, other->_cached_size_);
  3697. }
  3698. ::google::protobuf::Metadata DeleteDocumentRequest::GetMetadata() const {
  3699. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  3700. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  3701. }
  3702. // ===================================================================
  3703. void BatchGetDocumentsRequest::InitAsDefaultInstance() {
  3704. ::google::firestore::v1beta1::_BatchGetDocumentsRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1beta1::DocumentMask*>(
  3705. ::google::firestore::v1beta1::DocumentMask::internal_default_instance());
  3706. ::google::firestore::v1beta1::_BatchGetDocumentsRequest_default_instance_.transaction_.UnsafeSetDefault(
  3707. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3708. ::google::firestore::v1beta1::_BatchGetDocumentsRequest_default_instance_.new_transaction_ = const_cast< ::google::firestore::v1beta1::TransactionOptions*>(
  3709. ::google::firestore::v1beta1::TransactionOptions::internal_default_instance());
  3710. ::google::firestore::v1beta1::_BatchGetDocumentsRequest_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>(
  3711. ::google::protobuf::Timestamp::internal_default_instance());
  3712. }
  3713. void BatchGetDocumentsRequest::clear_mask() {
  3714. if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
  3715. delete mask_;
  3716. }
  3717. mask_ = NULL;
  3718. }
  3719. void BatchGetDocumentsRequest::set_allocated_new_transaction(::google::firestore::v1beta1::TransactionOptions* new_transaction) {
  3720. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  3721. clear_consistency_selector();
  3722. if (new_transaction) {
  3723. ::google::protobuf::Arena* submessage_arena = NULL;
  3724. if (message_arena != submessage_arena) {
  3725. new_transaction = ::google::protobuf::internal::GetOwnedMessage(
  3726. message_arena, new_transaction, submessage_arena);
  3727. }
  3728. set_has_new_transaction();
  3729. consistency_selector_.new_transaction_ = new_transaction;
  3730. }
  3731. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.BatchGetDocumentsRequest.new_transaction)
  3732. }
  3733. void BatchGetDocumentsRequest::clear_new_transaction() {
  3734. if (has_new_transaction()) {
  3735. delete consistency_selector_.new_transaction_;
  3736. clear_has_consistency_selector();
  3737. }
  3738. }
  3739. void BatchGetDocumentsRequest::set_allocated_read_time(::google::protobuf::Timestamp* read_time) {
  3740. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  3741. clear_consistency_selector();
  3742. if (read_time) {
  3743. ::google::protobuf::Arena* submessage_arena =
  3744. reinterpret_cast< ::google::protobuf::MessageLite*>(read_time)->GetArena();
  3745. if (message_arena != submessage_arena) {
  3746. read_time = ::google::protobuf::internal::GetOwnedMessage(
  3747. message_arena, read_time, submessage_arena);
  3748. }
  3749. set_has_read_time();
  3750. consistency_selector_.read_time_ = read_time;
  3751. }
  3752. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.BatchGetDocumentsRequest.read_time)
  3753. }
  3754. void BatchGetDocumentsRequest::clear_read_time() {
  3755. if (has_read_time()) {
  3756. delete consistency_selector_.read_time_;
  3757. clear_has_consistency_selector();
  3758. }
  3759. }
  3760. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3761. const int BatchGetDocumentsRequest::kDatabaseFieldNumber;
  3762. const int BatchGetDocumentsRequest::kDocumentsFieldNumber;
  3763. const int BatchGetDocumentsRequest::kMaskFieldNumber;
  3764. const int BatchGetDocumentsRequest::kTransactionFieldNumber;
  3765. const int BatchGetDocumentsRequest::kNewTransactionFieldNumber;
  3766. const int BatchGetDocumentsRequest::kReadTimeFieldNumber;
  3767. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3768. BatchGetDocumentsRequest::BatchGetDocumentsRequest()
  3769. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  3770. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  3771. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBatchGetDocumentsRequest();
  3772. }
  3773. SharedCtor();
  3774. // @@protoc_insertion_point(constructor:google.firestore.v1beta1.BatchGetDocumentsRequest)
  3775. }
  3776. BatchGetDocumentsRequest::BatchGetDocumentsRequest(const BatchGetDocumentsRequest& from)
  3777. : ::google::protobuf::Message(),
  3778. _internal_metadata_(NULL),
  3779. documents_(from.documents_),
  3780. _cached_size_(0) {
  3781. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3782. database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3783. if (from.database().size() > 0) {
  3784. database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  3785. }
  3786. if (from.has_mask()) {
  3787. mask_ = new ::google::firestore::v1beta1::DocumentMask(*from.mask_);
  3788. } else {
  3789. mask_ = NULL;
  3790. }
  3791. clear_has_consistency_selector();
  3792. switch (from.consistency_selector_case()) {
  3793. case kTransaction: {
  3794. set_transaction(from.transaction());
  3795. break;
  3796. }
  3797. case kNewTransaction: {
  3798. mutable_new_transaction()->::google::firestore::v1beta1::TransactionOptions::MergeFrom(from.new_transaction());
  3799. break;
  3800. }
  3801. case kReadTime: {
  3802. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  3803. break;
  3804. }
  3805. case CONSISTENCY_SELECTOR_NOT_SET: {
  3806. break;
  3807. }
  3808. }
  3809. // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.BatchGetDocumentsRequest)
  3810. }
  3811. void BatchGetDocumentsRequest::SharedCtor() {
  3812. database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3813. mask_ = NULL;
  3814. clear_has_consistency_selector();
  3815. _cached_size_ = 0;
  3816. }
  3817. BatchGetDocumentsRequest::~BatchGetDocumentsRequest() {
  3818. // @@protoc_insertion_point(destructor:google.firestore.v1beta1.BatchGetDocumentsRequest)
  3819. SharedDtor();
  3820. }
  3821. void BatchGetDocumentsRequest::SharedDtor() {
  3822. database_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3823. if (this != internal_default_instance()) delete mask_;
  3824. if (has_consistency_selector()) {
  3825. clear_consistency_selector();
  3826. }
  3827. }
  3828. void BatchGetDocumentsRequest::SetCachedSize(int size) const {
  3829. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  3830. _cached_size_ = size;
  3831. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  3832. }
  3833. const ::google::protobuf::Descriptor* BatchGetDocumentsRequest::descriptor() {
  3834. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  3835. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  3836. }
  3837. const BatchGetDocumentsRequest& BatchGetDocumentsRequest::default_instance() {
  3838. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBatchGetDocumentsRequest();
  3839. return *internal_default_instance();
  3840. }
  3841. BatchGetDocumentsRequest* BatchGetDocumentsRequest::New(::google::protobuf::Arena* arena) const {
  3842. BatchGetDocumentsRequest* n = new BatchGetDocumentsRequest;
  3843. if (arena != NULL) {
  3844. arena->Own(n);
  3845. }
  3846. return n;
  3847. }
  3848. void BatchGetDocumentsRequest::clear_consistency_selector() {
  3849. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.BatchGetDocumentsRequest)
  3850. switch (consistency_selector_case()) {
  3851. case kTransaction: {
  3852. consistency_selector_.transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3853. break;
  3854. }
  3855. case kNewTransaction: {
  3856. delete consistency_selector_.new_transaction_;
  3857. break;
  3858. }
  3859. case kReadTime: {
  3860. delete consistency_selector_.read_time_;
  3861. break;
  3862. }
  3863. case CONSISTENCY_SELECTOR_NOT_SET: {
  3864. break;
  3865. }
  3866. }
  3867. _oneof_case_[0] = CONSISTENCY_SELECTOR_NOT_SET;
  3868. }
  3869. void BatchGetDocumentsRequest::Clear() {
  3870. // @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.BatchGetDocumentsRequest)
  3871. ::google::protobuf::uint32 cached_has_bits = 0;
  3872. // Prevent compiler warnings about cached_has_bits being unused
  3873. (void) cached_has_bits;
  3874. documents_.Clear();
  3875. database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3876. if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
  3877. delete mask_;
  3878. }
  3879. mask_ = NULL;
  3880. clear_consistency_selector();
  3881. _internal_metadata_.Clear();
  3882. }
  3883. bool BatchGetDocumentsRequest::MergePartialFromCodedStream(
  3884. ::google::protobuf::io::CodedInputStream* input) {
  3885. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3886. ::google::protobuf::uint32 tag;
  3887. // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.BatchGetDocumentsRequest)
  3888. for (;;) {
  3889. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3890. tag = p.first;
  3891. if (!p.second) goto handle_unusual;
  3892. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3893. // string database = 1;
  3894. case 1: {
  3895. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3896. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  3897. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  3898. input, this->mutable_database()));
  3899. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3900. this->database().data(), static_cast<int>(this->database().length()),
  3901. ::google::protobuf::internal::WireFormatLite::PARSE,
  3902. "google.firestore.v1beta1.BatchGetDocumentsRequest.database"));
  3903. } else {
  3904. goto handle_unusual;
  3905. }
  3906. break;
  3907. }
  3908. // repeated string documents = 2;
  3909. case 2: {
  3910. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3911. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  3912. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  3913. input, this->add_documents()));
  3914. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3915. this->documents(this->documents_size() - 1).data(),
  3916. static_cast<int>(this->documents(this->documents_size() - 1).length()),
  3917. ::google::protobuf::internal::WireFormatLite::PARSE,
  3918. "google.firestore.v1beta1.BatchGetDocumentsRequest.documents"));
  3919. } else {
  3920. goto handle_unusual;
  3921. }
  3922. break;
  3923. }
  3924. // .google.firestore.v1beta1.DocumentMask mask = 3;
  3925. case 3: {
  3926. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3927. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  3928. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  3929. input, mutable_mask()));
  3930. } else {
  3931. goto handle_unusual;
  3932. }
  3933. break;
  3934. }
  3935. // bytes transaction = 4;
  3936. case 4: {
  3937. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3938. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  3939. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  3940. input, this->mutable_transaction()));
  3941. } else {
  3942. goto handle_unusual;
  3943. }
  3944. break;
  3945. }
  3946. // .google.firestore.v1beta1.TransactionOptions new_transaction = 5;
  3947. case 5: {
  3948. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3949. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  3950. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  3951. input, mutable_new_transaction()));
  3952. } else {
  3953. goto handle_unusual;
  3954. }
  3955. break;
  3956. }
  3957. // .google.protobuf.Timestamp read_time = 7;
  3958. case 7: {
  3959. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3960. static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
  3961. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  3962. input, mutable_read_time()));
  3963. } else {
  3964. goto handle_unusual;
  3965. }
  3966. break;
  3967. }
  3968. default: {
  3969. handle_unusual:
  3970. if (tag == 0) {
  3971. goto success;
  3972. }
  3973. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3974. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3975. break;
  3976. }
  3977. }
  3978. }
  3979. success:
  3980. // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.BatchGetDocumentsRequest)
  3981. return true;
  3982. failure:
  3983. // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.BatchGetDocumentsRequest)
  3984. return false;
  3985. #undef DO_
  3986. }
  3987. void BatchGetDocumentsRequest::SerializeWithCachedSizes(
  3988. ::google::protobuf::io::CodedOutputStream* output) const {
  3989. // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.BatchGetDocumentsRequest)
  3990. ::google::protobuf::uint32 cached_has_bits = 0;
  3991. (void) cached_has_bits;
  3992. // string database = 1;
  3993. if (this->database().size() > 0) {
  3994. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3995. this->database().data(), static_cast<int>(this->database().length()),
  3996. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  3997. "google.firestore.v1beta1.BatchGetDocumentsRequest.database");
  3998. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  3999. 1, this->database(), output);
  4000. }
  4001. // repeated string documents = 2;
  4002. for (int i = 0, n = this->documents_size(); i < n; i++) {
  4003. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4004. this->documents(i).data(), static_cast<int>(this->documents(i).length()),
  4005. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4006. "google.firestore.v1beta1.BatchGetDocumentsRequest.documents");
  4007. ::google::protobuf::internal::WireFormatLite::WriteString(
  4008. 2, this->documents(i), output);
  4009. }
  4010. // .google.firestore.v1beta1.DocumentMask mask = 3;
  4011. if (this->has_mask()) {
  4012. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  4013. 3, *this->mask_, output);
  4014. }
  4015. // bytes transaction = 4;
  4016. if (has_transaction()) {
  4017. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  4018. 4, this->transaction(), output);
  4019. }
  4020. // .google.firestore.v1beta1.TransactionOptions new_transaction = 5;
  4021. if (has_new_transaction()) {
  4022. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  4023. 5, *consistency_selector_.new_transaction_, output);
  4024. }
  4025. // .google.protobuf.Timestamp read_time = 7;
  4026. if (has_read_time()) {
  4027. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  4028. 7, *consistency_selector_.read_time_, output);
  4029. }
  4030. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4031. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  4032. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  4033. }
  4034. // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.BatchGetDocumentsRequest)
  4035. }
  4036. ::google::protobuf::uint8* BatchGetDocumentsRequest::InternalSerializeWithCachedSizesToArray(
  4037. bool deterministic, ::google::protobuf::uint8* target) const {
  4038. (void)deterministic; // Unused
  4039. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.BatchGetDocumentsRequest)
  4040. ::google::protobuf::uint32 cached_has_bits = 0;
  4041. (void) cached_has_bits;
  4042. // string database = 1;
  4043. if (this->database().size() > 0) {
  4044. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4045. this->database().data(), static_cast<int>(this->database().length()),
  4046. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4047. "google.firestore.v1beta1.BatchGetDocumentsRequest.database");
  4048. target =
  4049. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  4050. 1, this->database(), target);
  4051. }
  4052. // repeated string documents = 2;
  4053. for (int i = 0, n = this->documents_size(); i < n; i++) {
  4054. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4055. this->documents(i).data(), static_cast<int>(this->documents(i).length()),
  4056. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4057. "google.firestore.v1beta1.BatchGetDocumentsRequest.documents");
  4058. target = ::google::protobuf::internal::WireFormatLite::
  4059. WriteStringToArray(2, this->documents(i), target);
  4060. }
  4061. // .google.firestore.v1beta1.DocumentMask mask = 3;
  4062. if (this->has_mask()) {
  4063. target = ::google::protobuf::internal::WireFormatLite::
  4064. InternalWriteMessageToArray(
  4065. 3, *this->mask_, deterministic, target);
  4066. }
  4067. // bytes transaction = 4;
  4068. if (has_transaction()) {
  4069. target =
  4070. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  4071. 4, this->transaction(), target);
  4072. }
  4073. // .google.firestore.v1beta1.TransactionOptions new_transaction = 5;
  4074. if (has_new_transaction()) {
  4075. target = ::google::protobuf::internal::WireFormatLite::
  4076. InternalWriteMessageToArray(
  4077. 5, *consistency_selector_.new_transaction_, deterministic, target);
  4078. }
  4079. // .google.protobuf.Timestamp read_time = 7;
  4080. if (has_read_time()) {
  4081. target = ::google::protobuf::internal::WireFormatLite::
  4082. InternalWriteMessageToArray(
  4083. 7, *consistency_selector_.read_time_, deterministic, target);
  4084. }
  4085. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4086. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  4087. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  4088. }
  4089. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.BatchGetDocumentsRequest)
  4090. return target;
  4091. }
  4092. size_t BatchGetDocumentsRequest::ByteSizeLong() const {
  4093. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.BatchGetDocumentsRequest)
  4094. size_t total_size = 0;
  4095. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4096. total_size +=
  4097. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  4098. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  4099. }
  4100. // repeated string documents = 2;
  4101. total_size += 1 *
  4102. ::google::protobuf::internal::FromIntSize(this->documents_size());
  4103. for (int i = 0, n = this->documents_size(); i < n; i++) {
  4104. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  4105. this->documents(i));
  4106. }
  4107. // string database = 1;
  4108. if (this->database().size() > 0) {
  4109. total_size += 1 +
  4110. ::google::protobuf::internal::WireFormatLite::StringSize(
  4111. this->database());
  4112. }
  4113. // .google.firestore.v1beta1.DocumentMask mask = 3;
  4114. if (this->has_mask()) {
  4115. total_size += 1 +
  4116. ::google::protobuf::internal::WireFormatLite::MessageSize(
  4117. *this->mask_);
  4118. }
  4119. switch (consistency_selector_case()) {
  4120. // bytes transaction = 4;
  4121. case kTransaction: {
  4122. total_size += 1 +
  4123. ::google::protobuf::internal::WireFormatLite::BytesSize(
  4124. this->transaction());
  4125. break;
  4126. }
  4127. // .google.firestore.v1beta1.TransactionOptions new_transaction = 5;
  4128. case kNewTransaction: {
  4129. total_size += 1 +
  4130. ::google::protobuf::internal::WireFormatLite::MessageSize(
  4131. *consistency_selector_.new_transaction_);
  4132. break;
  4133. }
  4134. // .google.protobuf.Timestamp read_time = 7;
  4135. case kReadTime: {
  4136. total_size += 1 +
  4137. ::google::protobuf::internal::WireFormatLite::MessageSize(
  4138. *consistency_selector_.read_time_);
  4139. break;
  4140. }
  4141. case CONSISTENCY_SELECTOR_NOT_SET: {
  4142. break;
  4143. }
  4144. }
  4145. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  4146. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4147. _cached_size_ = cached_size;
  4148. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4149. return total_size;
  4150. }
  4151. void BatchGetDocumentsRequest::MergeFrom(const ::google::protobuf::Message& from) {
  4152. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.BatchGetDocumentsRequest)
  4153. GOOGLE_DCHECK_NE(&from, this);
  4154. const BatchGetDocumentsRequest* source =
  4155. ::google::protobuf::internal::DynamicCastToGenerated<const BatchGetDocumentsRequest>(
  4156. &from);
  4157. if (source == NULL) {
  4158. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.BatchGetDocumentsRequest)
  4159. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  4160. } else {
  4161. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.BatchGetDocumentsRequest)
  4162. MergeFrom(*source);
  4163. }
  4164. }
  4165. void BatchGetDocumentsRequest::MergeFrom(const BatchGetDocumentsRequest& from) {
  4166. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.BatchGetDocumentsRequest)
  4167. GOOGLE_DCHECK_NE(&from, this);
  4168. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4169. ::google::protobuf::uint32 cached_has_bits = 0;
  4170. (void) cached_has_bits;
  4171. documents_.MergeFrom(from.documents_);
  4172. if (from.database().size() > 0) {
  4173. database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  4174. }
  4175. if (from.has_mask()) {
  4176. mutable_mask()->::google::firestore::v1beta1::DocumentMask::MergeFrom(from.mask());
  4177. }
  4178. switch (from.consistency_selector_case()) {
  4179. case kTransaction: {
  4180. set_transaction(from.transaction());
  4181. break;
  4182. }
  4183. case kNewTransaction: {
  4184. mutable_new_transaction()->::google::firestore::v1beta1::TransactionOptions::MergeFrom(from.new_transaction());
  4185. break;
  4186. }
  4187. case kReadTime: {
  4188. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  4189. break;
  4190. }
  4191. case CONSISTENCY_SELECTOR_NOT_SET: {
  4192. break;
  4193. }
  4194. }
  4195. }
  4196. void BatchGetDocumentsRequest::CopyFrom(const ::google::protobuf::Message& from) {
  4197. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.BatchGetDocumentsRequest)
  4198. if (&from == this) return;
  4199. Clear();
  4200. MergeFrom(from);
  4201. }
  4202. void BatchGetDocumentsRequest::CopyFrom(const BatchGetDocumentsRequest& from) {
  4203. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.BatchGetDocumentsRequest)
  4204. if (&from == this) return;
  4205. Clear();
  4206. MergeFrom(from);
  4207. }
  4208. bool BatchGetDocumentsRequest::IsInitialized() const {
  4209. return true;
  4210. }
  4211. void BatchGetDocumentsRequest::Swap(BatchGetDocumentsRequest* other) {
  4212. if (other == this) return;
  4213. InternalSwap(other);
  4214. }
  4215. void BatchGetDocumentsRequest::InternalSwap(BatchGetDocumentsRequest* other) {
  4216. using std::swap;
  4217. documents_.InternalSwap(&other->documents_);
  4218. database_.Swap(&other->database_);
  4219. swap(mask_, other->mask_);
  4220. swap(consistency_selector_, other->consistency_selector_);
  4221. swap(_oneof_case_[0], other->_oneof_case_[0]);
  4222. _internal_metadata_.Swap(&other->_internal_metadata_);
  4223. swap(_cached_size_, other->_cached_size_);
  4224. }
  4225. ::google::protobuf::Metadata BatchGetDocumentsRequest::GetMetadata() const {
  4226. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  4227. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  4228. }
  4229. // ===================================================================
  4230. void BatchGetDocumentsResponse::InitAsDefaultInstance() {
  4231. ::google::firestore::v1beta1::_BatchGetDocumentsResponse_default_instance_.found_ = const_cast< ::google::firestore::v1beta1::Document*>(
  4232. ::google::firestore::v1beta1::Document::internal_default_instance());
  4233. ::google::firestore::v1beta1::_BatchGetDocumentsResponse_default_instance_.missing_.UnsafeSetDefault(
  4234. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4235. ::google::firestore::v1beta1::_BatchGetDocumentsResponse_default_instance_._instance.get_mutable()->read_time_ = const_cast< ::google::protobuf::Timestamp*>(
  4236. ::google::protobuf::Timestamp::internal_default_instance());
  4237. }
  4238. void BatchGetDocumentsResponse::set_allocated_found(::google::firestore::v1beta1::Document* found) {
  4239. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  4240. clear_result();
  4241. if (found) {
  4242. ::google::protobuf::Arena* submessage_arena = NULL;
  4243. if (message_arena != submessage_arena) {
  4244. found = ::google::protobuf::internal::GetOwnedMessage(
  4245. message_arena, found, submessage_arena);
  4246. }
  4247. set_has_found();
  4248. result_.found_ = found;
  4249. }
  4250. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.BatchGetDocumentsResponse.found)
  4251. }
  4252. void BatchGetDocumentsResponse::clear_found() {
  4253. if (has_found()) {
  4254. delete result_.found_;
  4255. clear_has_result();
  4256. }
  4257. }
  4258. void BatchGetDocumentsResponse::clear_read_time() {
  4259. if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
  4260. delete read_time_;
  4261. }
  4262. read_time_ = NULL;
  4263. }
  4264. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  4265. const int BatchGetDocumentsResponse::kFoundFieldNumber;
  4266. const int BatchGetDocumentsResponse::kMissingFieldNumber;
  4267. const int BatchGetDocumentsResponse::kTransactionFieldNumber;
  4268. const int BatchGetDocumentsResponse::kReadTimeFieldNumber;
  4269. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  4270. BatchGetDocumentsResponse::BatchGetDocumentsResponse()
  4271. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  4272. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  4273. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBatchGetDocumentsResponse();
  4274. }
  4275. SharedCtor();
  4276. // @@protoc_insertion_point(constructor:google.firestore.v1beta1.BatchGetDocumentsResponse)
  4277. }
  4278. BatchGetDocumentsResponse::BatchGetDocumentsResponse(const BatchGetDocumentsResponse& from)
  4279. : ::google::protobuf::Message(),
  4280. _internal_metadata_(NULL),
  4281. _cached_size_(0) {
  4282. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4283. transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4284. if (from.transaction().size() > 0) {
  4285. transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  4286. }
  4287. if (from.has_read_time()) {
  4288. read_time_ = new ::google::protobuf::Timestamp(*from.read_time_);
  4289. } else {
  4290. read_time_ = NULL;
  4291. }
  4292. clear_has_result();
  4293. switch (from.result_case()) {
  4294. case kFound: {
  4295. mutable_found()->::google::firestore::v1beta1::Document::MergeFrom(from.found());
  4296. break;
  4297. }
  4298. case kMissing: {
  4299. set_missing(from.missing());
  4300. break;
  4301. }
  4302. case RESULT_NOT_SET: {
  4303. break;
  4304. }
  4305. }
  4306. // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.BatchGetDocumentsResponse)
  4307. }
  4308. void BatchGetDocumentsResponse::SharedCtor() {
  4309. transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4310. read_time_ = NULL;
  4311. clear_has_result();
  4312. _cached_size_ = 0;
  4313. }
  4314. BatchGetDocumentsResponse::~BatchGetDocumentsResponse() {
  4315. // @@protoc_insertion_point(destructor:google.firestore.v1beta1.BatchGetDocumentsResponse)
  4316. SharedDtor();
  4317. }
  4318. void BatchGetDocumentsResponse::SharedDtor() {
  4319. transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4320. if (this != internal_default_instance()) delete read_time_;
  4321. if (has_result()) {
  4322. clear_result();
  4323. }
  4324. }
  4325. void BatchGetDocumentsResponse::SetCachedSize(int size) const {
  4326. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4327. _cached_size_ = size;
  4328. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4329. }
  4330. const ::google::protobuf::Descriptor* BatchGetDocumentsResponse::descriptor() {
  4331. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  4332. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  4333. }
  4334. const BatchGetDocumentsResponse& BatchGetDocumentsResponse::default_instance() {
  4335. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBatchGetDocumentsResponse();
  4336. return *internal_default_instance();
  4337. }
  4338. BatchGetDocumentsResponse* BatchGetDocumentsResponse::New(::google::protobuf::Arena* arena) const {
  4339. BatchGetDocumentsResponse* n = new BatchGetDocumentsResponse;
  4340. if (arena != NULL) {
  4341. arena->Own(n);
  4342. }
  4343. return n;
  4344. }
  4345. void BatchGetDocumentsResponse::clear_result() {
  4346. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.BatchGetDocumentsResponse)
  4347. switch (result_case()) {
  4348. case kFound: {
  4349. delete result_.found_;
  4350. break;
  4351. }
  4352. case kMissing: {
  4353. result_.missing_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4354. break;
  4355. }
  4356. case RESULT_NOT_SET: {
  4357. break;
  4358. }
  4359. }
  4360. _oneof_case_[0] = RESULT_NOT_SET;
  4361. }
  4362. void BatchGetDocumentsResponse::Clear() {
  4363. // @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.BatchGetDocumentsResponse)
  4364. ::google::protobuf::uint32 cached_has_bits = 0;
  4365. // Prevent compiler warnings about cached_has_bits being unused
  4366. (void) cached_has_bits;
  4367. transaction_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4368. if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
  4369. delete read_time_;
  4370. }
  4371. read_time_ = NULL;
  4372. clear_result();
  4373. _internal_metadata_.Clear();
  4374. }
  4375. bool BatchGetDocumentsResponse::MergePartialFromCodedStream(
  4376. ::google::protobuf::io::CodedInputStream* input) {
  4377. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  4378. ::google::protobuf::uint32 tag;
  4379. // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.BatchGetDocumentsResponse)
  4380. for (;;) {
  4381. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  4382. tag = p.first;
  4383. if (!p.second) goto handle_unusual;
  4384. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  4385. // .google.firestore.v1beta1.Document found = 1;
  4386. case 1: {
  4387. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4388. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  4389. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  4390. input, mutable_found()));
  4391. } else {
  4392. goto handle_unusual;
  4393. }
  4394. break;
  4395. }
  4396. // string missing = 2;
  4397. case 2: {
  4398. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4399. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  4400. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  4401. input, this->mutable_missing()));
  4402. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4403. this->missing().data(), static_cast<int>(this->missing().length()),
  4404. ::google::protobuf::internal::WireFormatLite::PARSE,
  4405. "google.firestore.v1beta1.BatchGetDocumentsResponse.missing"));
  4406. } else {
  4407. goto handle_unusual;
  4408. }
  4409. break;
  4410. }
  4411. // bytes transaction = 3;
  4412. case 3: {
  4413. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4414. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  4415. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  4416. input, this->mutable_transaction()));
  4417. } else {
  4418. goto handle_unusual;
  4419. }
  4420. break;
  4421. }
  4422. // .google.protobuf.Timestamp read_time = 4;
  4423. case 4: {
  4424. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4425. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  4426. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  4427. input, mutable_read_time()));
  4428. } else {
  4429. goto handle_unusual;
  4430. }
  4431. break;
  4432. }
  4433. default: {
  4434. handle_unusual:
  4435. if (tag == 0) {
  4436. goto success;
  4437. }
  4438. DO_(::google::protobuf::internal::WireFormat::SkipField(
  4439. input, tag, _internal_metadata_.mutable_unknown_fields()));
  4440. break;
  4441. }
  4442. }
  4443. }
  4444. success:
  4445. // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.BatchGetDocumentsResponse)
  4446. return true;
  4447. failure:
  4448. // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.BatchGetDocumentsResponse)
  4449. return false;
  4450. #undef DO_
  4451. }
  4452. void BatchGetDocumentsResponse::SerializeWithCachedSizes(
  4453. ::google::protobuf::io::CodedOutputStream* output) const {
  4454. // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.BatchGetDocumentsResponse)
  4455. ::google::protobuf::uint32 cached_has_bits = 0;
  4456. (void) cached_has_bits;
  4457. // .google.firestore.v1beta1.Document found = 1;
  4458. if (has_found()) {
  4459. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  4460. 1, *result_.found_, output);
  4461. }
  4462. // string missing = 2;
  4463. if (has_missing()) {
  4464. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4465. this->missing().data(), static_cast<int>(this->missing().length()),
  4466. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4467. "google.firestore.v1beta1.BatchGetDocumentsResponse.missing");
  4468. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  4469. 2, this->missing(), output);
  4470. }
  4471. // bytes transaction = 3;
  4472. if (this->transaction().size() > 0) {
  4473. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  4474. 3, this->transaction(), output);
  4475. }
  4476. // .google.protobuf.Timestamp read_time = 4;
  4477. if (this->has_read_time()) {
  4478. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  4479. 4, *this->read_time_, output);
  4480. }
  4481. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4482. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  4483. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  4484. }
  4485. // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.BatchGetDocumentsResponse)
  4486. }
  4487. ::google::protobuf::uint8* BatchGetDocumentsResponse::InternalSerializeWithCachedSizesToArray(
  4488. bool deterministic, ::google::protobuf::uint8* target) const {
  4489. (void)deterministic; // Unused
  4490. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.BatchGetDocumentsResponse)
  4491. ::google::protobuf::uint32 cached_has_bits = 0;
  4492. (void) cached_has_bits;
  4493. // .google.firestore.v1beta1.Document found = 1;
  4494. if (has_found()) {
  4495. target = ::google::protobuf::internal::WireFormatLite::
  4496. InternalWriteMessageToArray(
  4497. 1, *result_.found_, deterministic, target);
  4498. }
  4499. // string missing = 2;
  4500. if (has_missing()) {
  4501. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4502. this->missing().data(), static_cast<int>(this->missing().length()),
  4503. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4504. "google.firestore.v1beta1.BatchGetDocumentsResponse.missing");
  4505. target =
  4506. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  4507. 2, this->missing(), target);
  4508. }
  4509. // bytes transaction = 3;
  4510. if (this->transaction().size() > 0) {
  4511. target =
  4512. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  4513. 3, this->transaction(), target);
  4514. }
  4515. // .google.protobuf.Timestamp read_time = 4;
  4516. if (this->has_read_time()) {
  4517. target = ::google::protobuf::internal::WireFormatLite::
  4518. InternalWriteMessageToArray(
  4519. 4, *this->read_time_, deterministic, target);
  4520. }
  4521. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4522. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  4523. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  4524. }
  4525. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.BatchGetDocumentsResponse)
  4526. return target;
  4527. }
  4528. size_t BatchGetDocumentsResponse::ByteSizeLong() const {
  4529. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.BatchGetDocumentsResponse)
  4530. size_t total_size = 0;
  4531. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4532. total_size +=
  4533. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  4534. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  4535. }
  4536. // bytes transaction = 3;
  4537. if (this->transaction().size() > 0) {
  4538. total_size += 1 +
  4539. ::google::protobuf::internal::WireFormatLite::BytesSize(
  4540. this->transaction());
  4541. }
  4542. // .google.protobuf.Timestamp read_time = 4;
  4543. if (this->has_read_time()) {
  4544. total_size += 1 +
  4545. ::google::protobuf::internal::WireFormatLite::MessageSize(
  4546. *this->read_time_);
  4547. }
  4548. switch (result_case()) {
  4549. // .google.firestore.v1beta1.Document found = 1;
  4550. case kFound: {
  4551. total_size += 1 +
  4552. ::google::protobuf::internal::WireFormatLite::MessageSize(
  4553. *result_.found_);
  4554. break;
  4555. }
  4556. // string missing = 2;
  4557. case kMissing: {
  4558. total_size += 1 +
  4559. ::google::protobuf::internal::WireFormatLite::StringSize(
  4560. this->missing());
  4561. break;
  4562. }
  4563. case RESULT_NOT_SET: {
  4564. break;
  4565. }
  4566. }
  4567. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  4568. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4569. _cached_size_ = cached_size;
  4570. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4571. return total_size;
  4572. }
  4573. void BatchGetDocumentsResponse::MergeFrom(const ::google::protobuf::Message& from) {
  4574. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.BatchGetDocumentsResponse)
  4575. GOOGLE_DCHECK_NE(&from, this);
  4576. const BatchGetDocumentsResponse* source =
  4577. ::google::protobuf::internal::DynamicCastToGenerated<const BatchGetDocumentsResponse>(
  4578. &from);
  4579. if (source == NULL) {
  4580. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.BatchGetDocumentsResponse)
  4581. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  4582. } else {
  4583. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.BatchGetDocumentsResponse)
  4584. MergeFrom(*source);
  4585. }
  4586. }
  4587. void BatchGetDocumentsResponse::MergeFrom(const BatchGetDocumentsResponse& from) {
  4588. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.BatchGetDocumentsResponse)
  4589. GOOGLE_DCHECK_NE(&from, this);
  4590. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4591. ::google::protobuf::uint32 cached_has_bits = 0;
  4592. (void) cached_has_bits;
  4593. if (from.transaction().size() > 0) {
  4594. transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  4595. }
  4596. if (from.has_read_time()) {
  4597. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  4598. }
  4599. switch (from.result_case()) {
  4600. case kFound: {
  4601. mutable_found()->::google::firestore::v1beta1::Document::MergeFrom(from.found());
  4602. break;
  4603. }
  4604. case kMissing: {
  4605. set_missing(from.missing());
  4606. break;
  4607. }
  4608. case RESULT_NOT_SET: {
  4609. break;
  4610. }
  4611. }
  4612. }
  4613. void BatchGetDocumentsResponse::CopyFrom(const ::google::protobuf::Message& from) {
  4614. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.BatchGetDocumentsResponse)
  4615. if (&from == this) return;
  4616. Clear();
  4617. MergeFrom(from);
  4618. }
  4619. void BatchGetDocumentsResponse::CopyFrom(const BatchGetDocumentsResponse& from) {
  4620. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.BatchGetDocumentsResponse)
  4621. if (&from == this) return;
  4622. Clear();
  4623. MergeFrom(from);
  4624. }
  4625. bool BatchGetDocumentsResponse::IsInitialized() const {
  4626. return true;
  4627. }
  4628. void BatchGetDocumentsResponse::Swap(BatchGetDocumentsResponse* other) {
  4629. if (other == this) return;
  4630. InternalSwap(other);
  4631. }
  4632. void BatchGetDocumentsResponse::InternalSwap(BatchGetDocumentsResponse* other) {
  4633. using std::swap;
  4634. transaction_.Swap(&other->transaction_);
  4635. swap(read_time_, other->read_time_);
  4636. swap(result_, other->result_);
  4637. swap(_oneof_case_[0], other->_oneof_case_[0]);
  4638. _internal_metadata_.Swap(&other->_internal_metadata_);
  4639. swap(_cached_size_, other->_cached_size_);
  4640. }
  4641. ::google::protobuf::Metadata BatchGetDocumentsResponse::GetMetadata() const {
  4642. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  4643. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  4644. }
  4645. // ===================================================================
  4646. void BeginTransactionRequest::InitAsDefaultInstance() {
  4647. ::google::firestore::v1beta1::_BeginTransactionRequest_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::firestore::v1beta1::TransactionOptions*>(
  4648. ::google::firestore::v1beta1::TransactionOptions::internal_default_instance());
  4649. }
  4650. void BeginTransactionRequest::clear_options() {
  4651. if (GetArenaNoVirtual() == NULL && options_ != NULL) {
  4652. delete options_;
  4653. }
  4654. options_ = NULL;
  4655. }
  4656. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  4657. const int BeginTransactionRequest::kDatabaseFieldNumber;
  4658. const int BeginTransactionRequest::kOptionsFieldNumber;
  4659. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  4660. BeginTransactionRequest::BeginTransactionRequest()
  4661. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  4662. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  4663. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBeginTransactionRequest();
  4664. }
  4665. SharedCtor();
  4666. // @@protoc_insertion_point(constructor:google.firestore.v1beta1.BeginTransactionRequest)
  4667. }
  4668. BeginTransactionRequest::BeginTransactionRequest(const BeginTransactionRequest& from)
  4669. : ::google::protobuf::Message(),
  4670. _internal_metadata_(NULL),
  4671. _cached_size_(0) {
  4672. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4673. database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4674. if (from.database().size() > 0) {
  4675. database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  4676. }
  4677. if (from.has_options()) {
  4678. options_ = new ::google::firestore::v1beta1::TransactionOptions(*from.options_);
  4679. } else {
  4680. options_ = NULL;
  4681. }
  4682. // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.BeginTransactionRequest)
  4683. }
  4684. void BeginTransactionRequest::SharedCtor() {
  4685. database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4686. options_ = NULL;
  4687. _cached_size_ = 0;
  4688. }
  4689. BeginTransactionRequest::~BeginTransactionRequest() {
  4690. // @@protoc_insertion_point(destructor:google.firestore.v1beta1.BeginTransactionRequest)
  4691. SharedDtor();
  4692. }
  4693. void BeginTransactionRequest::SharedDtor() {
  4694. database_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4695. if (this != internal_default_instance()) delete options_;
  4696. }
  4697. void BeginTransactionRequest::SetCachedSize(int size) const {
  4698. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4699. _cached_size_ = size;
  4700. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4701. }
  4702. const ::google::protobuf::Descriptor* BeginTransactionRequest::descriptor() {
  4703. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  4704. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  4705. }
  4706. const BeginTransactionRequest& BeginTransactionRequest::default_instance() {
  4707. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBeginTransactionRequest();
  4708. return *internal_default_instance();
  4709. }
  4710. BeginTransactionRequest* BeginTransactionRequest::New(::google::protobuf::Arena* arena) const {
  4711. BeginTransactionRequest* n = new BeginTransactionRequest;
  4712. if (arena != NULL) {
  4713. arena->Own(n);
  4714. }
  4715. return n;
  4716. }
  4717. void BeginTransactionRequest::Clear() {
  4718. // @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.BeginTransactionRequest)
  4719. ::google::protobuf::uint32 cached_has_bits = 0;
  4720. // Prevent compiler warnings about cached_has_bits being unused
  4721. (void) cached_has_bits;
  4722. database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4723. if (GetArenaNoVirtual() == NULL && options_ != NULL) {
  4724. delete options_;
  4725. }
  4726. options_ = NULL;
  4727. _internal_metadata_.Clear();
  4728. }
  4729. bool BeginTransactionRequest::MergePartialFromCodedStream(
  4730. ::google::protobuf::io::CodedInputStream* input) {
  4731. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  4732. ::google::protobuf::uint32 tag;
  4733. // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.BeginTransactionRequest)
  4734. for (;;) {
  4735. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  4736. tag = p.first;
  4737. if (!p.second) goto handle_unusual;
  4738. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  4739. // string database = 1;
  4740. case 1: {
  4741. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4742. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  4743. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  4744. input, this->mutable_database()));
  4745. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4746. this->database().data(), static_cast<int>(this->database().length()),
  4747. ::google::protobuf::internal::WireFormatLite::PARSE,
  4748. "google.firestore.v1beta1.BeginTransactionRequest.database"));
  4749. } else {
  4750. goto handle_unusual;
  4751. }
  4752. break;
  4753. }
  4754. // .google.firestore.v1beta1.TransactionOptions options = 2;
  4755. case 2: {
  4756. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4757. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  4758. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  4759. input, mutable_options()));
  4760. } else {
  4761. goto handle_unusual;
  4762. }
  4763. break;
  4764. }
  4765. default: {
  4766. handle_unusual:
  4767. if (tag == 0) {
  4768. goto success;
  4769. }
  4770. DO_(::google::protobuf::internal::WireFormat::SkipField(
  4771. input, tag, _internal_metadata_.mutable_unknown_fields()));
  4772. break;
  4773. }
  4774. }
  4775. }
  4776. success:
  4777. // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.BeginTransactionRequest)
  4778. return true;
  4779. failure:
  4780. // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.BeginTransactionRequest)
  4781. return false;
  4782. #undef DO_
  4783. }
  4784. void BeginTransactionRequest::SerializeWithCachedSizes(
  4785. ::google::protobuf::io::CodedOutputStream* output) const {
  4786. // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.BeginTransactionRequest)
  4787. ::google::protobuf::uint32 cached_has_bits = 0;
  4788. (void) cached_has_bits;
  4789. // string database = 1;
  4790. if (this->database().size() > 0) {
  4791. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4792. this->database().data(), static_cast<int>(this->database().length()),
  4793. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4794. "google.firestore.v1beta1.BeginTransactionRequest.database");
  4795. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  4796. 1, this->database(), output);
  4797. }
  4798. // .google.firestore.v1beta1.TransactionOptions options = 2;
  4799. if (this->has_options()) {
  4800. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  4801. 2, *this->options_, output);
  4802. }
  4803. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4804. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  4805. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  4806. }
  4807. // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.BeginTransactionRequest)
  4808. }
  4809. ::google::protobuf::uint8* BeginTransactionRequest::InternalSerializeWithCachedSizesToArray(
  4810. bool deterministic, ::google::protobuf::uint8* target) const {
  4811. (void)deterministic; // Unused
  4812. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.BeginTransactionRequest)
  4813. ::google::protobuf::uint32 cached_has_bits = 0;
  4814. (void) cached_has_bits;
  4815. // string database = 1;
  4816. if (this->database().size() > 0) {
  4817. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4818. this->database().data(), static_cast<int>(this->database().length()),
  4819. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4820. "google.firestore.v1beta1.BeginTransactionRequest.database");
  4821. target =
  4822. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  4823. 1, this->database(), target);
  4824. }
  4825. // .google.firestore.v1beta1.TransactionOptions options = 2;
  4826. if (this->has_options()) {
  4827. target = ::google::protobuf::internal::WireFormatLite::
  4828. InternalWriteMessageToArray(
  4829. 2, *this->options_, deterministic, target);
  4830. }
  4831. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4832. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  4833. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  4834. }
  4835. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.BeginTransactionRequest)
  4836. return target;
  4837. }
  4838. size_t BeginTransactionRequest::ByteSizeLong() const {
  4839. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.BeginTransactionRequest)
  4840. size_t total_size = 0;
  4841. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4842. total_size +=
  4843. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  4844. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  4845. }
  4846. // string database = 1;
  4847. if (this->database().size() > 0) {
  4848. total_size += 1 +
  4849. ::google::protobuf::internal::WireFormatLite::StringSize(
  4850. this->database());
  4851. }
  4852. // .google.firestore.v1beta1.TransactionOptions options = 2;
  4853. if (this->has_options()) {
  4854. total_size += 1 +
  4855. ::google::protobuf::internal::WireFormatLite::MessageSize(
  4856. *this->options_);
  4857. }
  4858. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  4859. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4860. _cached_size_ = cached_size;
  4861. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4862. return total_size;
  4863. }
  4864. void BeginTransactionRequest::MergeFrom(const ::google::protobuf::Message& from) {
  4865. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.BeginTransactionRequest)
  4866. GOOGLE_DCHECK_NE(&from, this);
  4867. const BeginTransactionRequest* source =
  4868. ::google::protobuf::internal::DynamicCastToGenerated<const BeginTransactionRequest>(
  4869. &from);
  4870. if (source == NULL) {
  4871. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.BeginTransactionRequest)
  4872. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  4873. } else {
  4874. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.BeginTransactionRequest)
  4875. MergeFrom(*source);
  4876. }
  4877. }
  4878. void BeginTransactionRequest::MergeFrom(const BeginTransactionRequest& from) {
  4879. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.BeginTransactionRequest)
  4880. GOOGLE_DCHECK_NE(&from, this);
  4881. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4882. ::google::protobuf::uint32 cached_has_bits = 0;
  4883. (void) cached_has_bits;
  4884. if (from.database().size() > 0) {
  4885. database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  4886. }
  4887. if (from.has_options()) {
  4888. mutable_options()->::google::firestore::v1beta1::TransactionOptions::MergeFrom(from.options());
  4889. }
  4890. }
  4891. void BeginTransactionRequest::CopyFrom(const ::google::protobuf::Message& from) {
  4892. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.BeginTransactionRequest)
  4893. if (&from == this) return;
  4894. Clear();
  4895. MergeFrom(from);
  4896. }
  4897. void BeginTransactionRequest::CopyFrom(const BeginTransactionRequest& from) {
  4898. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.BeginTransactionRequest)
  4899. if (&from == this) return;
  4900. Clear();
  4901. MergeFrom(from);
  4902. }
  4903. bool BeginTransactionRequest::IsInitialized() const {
  4904. return true;
  4905. }
  4906. void BeginTransactionRequest::Swap(BeginTransactionRequest* other) {
  4907. if (other == this) return;
  4908. InternalSwap(other);
  4909. }
  4910. void BeginTransactionRequest::InternalSwap(BeginTransactionRequest* other) {
  4911. using std::swap;
  4912. database_.Swap(&other->database_);
  4913. swap(options_, other->options_);
  4914. _internal_metadata_.Swap(&other->_internal_metadata_);
  4915. swap(_cached_size_, other->_cached_size_);
  4916. }
  4917. ::google::protobuf::Metadata BeginTransactionRequest::GetMetadata() const {
  4918. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  4919. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  4920. }
  4921. // ===================================================================
  4922. void BeginTransactionResponse::InitAsDefaultInstance() {
  4923. }
  4924. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  4925. const int BeginTransactionResponse::kTransactionFieldNumber;
  4926. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  4927. BeginTransactionResponse::BeginTransactionResponse()
  4928. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  4929. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  4930. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBeginTransactionResponse();
  4931. }
  4932. SharedCtor();
  4933. // @@protoc_insertion_point(constructor:google.firestore.v1beta1.BeginTransactionResponse)
  4934. }
  4935. BeginTransactionResponse::BeginTransactionResponse(const BeginTransactionResponse& from)
  4936. : ::google::protobuf::Message(),
  4937. _internal_metadata_(NULL),
  4938. _cached_size_(0) {
  4939. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4940. transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4941. if (from.transaction().size() > 0) {
  4942. transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  4943. }
  4944. // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.BeginTransactionResponse)
  4945. }
  4946. void BeginTransactionResponse::SharedCtor() {
  4947. transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4948. _cached_size_ = 0;
  4949. }
  4950. BeginTransactionResponse::~BeginTransactionResponse() {
  4951. // @@protoc_insertion_point(destructor:google.firestore.v1beta1.BeginTransactionResponse)
  4952. SharedDtor();
  4953. }
  4954. void BeginTransactionResponse::SharedDtor() {
  4955. transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4956. }
  4957. void BeginTransactionResponse::SetCachedSize(int size) const {
  4958. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4959. _cached_size_ = size;
  4960. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4961. }
  4962. const ::google::protobuf::Descriptor* BeginTransactionResponse::descriptor() {
  4963. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  4964. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  4965. }
  4966. const BeginTransactionResponse& BeginTransactionResponse::default_instance() {
  4967. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBeginTransactionResponse();
  4968. return *internal_default_instance();
  4969. }
  4970. BeginTransactionResponse* BeginTransactionResponse::New(::google::protobuf::Arena* arena) const {
  4971. BeginTransactionResponse* n = new BeginTransactionResponse;
  4972. if (arena != NULL) {
  4973. arena->Own(n);
  4974. }
  4975. return n;
  4976. }
  4977. void BeginTransactionResponse::Clear() {
  4978. // @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.BeginTransactionResponse)
  4979. ::google::protobuf::uint32 cached_has_bits = 0;
  4980. // Prevent compiler warnings about cached_has_bits being unused
  4981. (void) cached_has_bits;
  4982. transaction_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4983. _internal_metadata_.Clear();
  4984. }
  4985. bool BeginTransactionResponse::MergePartialFromCodedStream(
  4986. ::google::protobuf::io::CodedInputStream* input) {
  4987. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  4988. ::google::protobuf::uint32 tag;
  4989. // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.BeginTransactionResponse)
  4990. for (;;) {
  4991. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  4992. tag = p.first;
  4993. if (!p.second) goto handle_unusual;
  4994. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  4995. // bytes transaction = 1;
  4996. case 1: {
  4997. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4998. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  4999. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  5000. input, this->mutable_transaction()));
  5001. } else {
  5002. goto handle_unusual;
  5003. }
  5004. break;
  5005. }
  5006. default: {
  5007. handle_unusual:
  5008. if (tag == 0) {
  5009. goto success;
  5010. }
  5011. DO_(::google::protobuf::internal::WireFormat::SkipField(
  5012. input, tag, _internal_metadata_.mutable_unknown_fields()));
  5013. break;
  5014. }
  5015. }
  5016. }
  5017. success:
  5018. // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.BeginTransactionResponse)
  5019. return true;
  5020. failure:
  5021. // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.BeginTransactionResponse)
  5022. return false;
  5023. #undef DO_
  5024. }
  5025. void BeginTransactionResponse::SerializeWithCachedSizes(
  5026. ::google::protobuf::io::CodedOutputStream* output) const {
  5027. // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.BeginTransactionResponse)
  5028. ::google::protobuf::uint32 cached_has_bits = 0;
  5029. (void) cached_has_bits;
  5030. // bytes transaction = 1;
  5031. if (this->transaction().size() > 0) {
  5032. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  5033. 1, this->transaction(), output);
  5034. }
  5035. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5036. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  5037. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  5038. }
  5039. // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.BeginTransactionResponse)
  5040. }
  5041. ::google::protobuf::uint8* BeginTransactionResponse::InternalSerializeWithCachedSizesToArray(
  5042. bool deterministic, ::google::protobuf::uint8* target) const {
  5043. (void)deterministic; // Unused
  5044. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.BeginTransactionResponse)
  5045. ::google::protobuf::uint32 cached_has_bits = 0;
  5046. (void) cached_has_bits;
  5047. // bytes transaction = 1;
  5048. if (this->transaction().size() > 0) {
  5049. target =
  5050. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  5051. 1, this->transaction(), target);
  5052. }
  5053. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5054. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  5055. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  5056. }
  5057. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.BeginTransactionResponse)
  5058. return target;
  5059. }
  5060. size_t BeginTransactionResponse::ByteSizeLong() const {
  5061. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.BeginTransactionResponse)
  5062. size_t total_size = 0;
  5063. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5064. total_size +=
  5065. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  5066. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  5067. }
  5068. // bytes transaction = 1;
  5069. if (this->transaction().size() > 0) {
  5070. total_size += 1 +
  5071. ::google::protobuf::internal::WireFormatLite::BytesSize(
  5072. this->transaction());
  5073. }
  5074. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  5075. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  5076. _cached_size_ = cached_size;
  5077. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  5078. return total_size;
  5079. }
  5080. void BeginTransactionResponse::MergeFrom(const ::google::protobuf::Message& from) {
  5081. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.BeginTransactionResponse)
  5082. GOOGLE_DCHECK_NE(&from, this);
  5083. const BeginTransactionResponse* source =
  5084. ::google::protobuf::internal::DynamicCastToGenerated<const BeginTransactionResponse>(
  5085. &from);
  5086. if (source == NULL) {
  5087. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.BeginTransactionResponse)
  5088. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  5089. } else {
  5090. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.BeginTransactionResponse)
  5091. MergeFrom(*source);
  5092. }
  5093. }
  5094. void BeginTransactionResponse::MergeFrom(const BeginTransactionResponse& from) {
  5095. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.BeginTransactionResponse)
  5096. GOOGLE_DCHECK_NE(&from, this);
  5097. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5098. ::google::protobuf::uint32 cached_has_bits = 0;
  5099. (void) cached_has_bits;
  5100. if (from.transaction().size() > 0) {
  5101. transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  5102. }
  5103. }
  5104. void BeginTransactionResponse::CopyFrom(const ::google::protobuf::Message& from) {
  5105. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.BeginTransactionResponse)
  5106. if (&from == this) return;
  5107. Clear();
  5108. MergeFrom(from);
  5109. }
  5110. void BeginTransactionResponse::CopyFrom(const BeginTransactionResponse& from) {
  5111. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.BeginTransactionResponse)
  5112. if (&from == this) return;
  5113. Clear();
  5114. MergeFrom(from);
  5115. }
  5116. bool BeginTransactionResponse::IsInitialized() const {
  5117. return true;
  5118. }
  5119. void BeginTransactionResponse::Swap(BeginTransactionResponse* other) {
  5120. if (other == this) return;
  5121. InternalSwap(other);
  5122. }
  5123. void BeginTransactionResponse::InternalSwap(BeginTransactionResponse* other) {
  5124. using std::swap;
  5125. transaction_.Swap(&other->transaction_);
  5126. _internal_metadata_.Swap(&other->_internal_metadata_);
  5127. swap(_cached_size_, other->_cached_size_);
  5128. }
  5129. ::google::protobuf::Metadata BeginTransactionResponse::GetMetadata() const {
  5130. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  5131. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  5132. }
  5133. // ===================================================================
  5134. void CommitRequest::InitAsDefaultInstance() {
  5135. }
  5136. void CommitRequest::clear_writes() {
  5137. writes_.Clear();
  5138. }
  5139. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  5140. const int CommitRequest::kDatabaseFieldNumber;
  5141. const int CommitRequest::kWritesFieldNumber;
  5142. const int CommitRequest::kTransactionFieldNumber;
  5143. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  5144. CommitRequest::CommitRequest()
  5145. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  5146. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  5147. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsCommitRequest();
  5148. }
  5149. SharedCtor();
  5150. // @@protoc_insertion_point(constructor:google.firestore.v1beta1.CommitRequest)
  5151. }
  5152. CommitRequest::CommitRequest(const CommitRequest& from)
  5153. : ::google::protobuf::Message(),
  5154. _internal_metadata_(NULL),
  5155. writes_(from.writes_),
  5156. _cached_size_(0) {
  5157. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5158. database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5159. if (from.database().size() > 0) {
  5160. database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  5161. }
  5162. transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5163. if (from.transaction().size() > 0) {
  5164. transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  5165. }
  5166. // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.CommitRequest)
  5167. }
  5168. void CommitRequest::SharedCtor() {
  5169. database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5170. transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5171. _cached_size_ = 0;
  5172. }
  5173. CommitRequest::~CommitRequest() {
  5174. // @@protoc_insertion_point(destructor:google.firestore.v1beta1.CommitRequest)
  5175. SharedDtor();
  5176. }
  5177. void CommitRequest::SharedDtor() {
  5178. database_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5179. transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5180. }
  5181. void CommitRequest::SetCachedSize(int size) const {
  5182. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  5183. _cached_size_ = size;
  5184. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  5185. }
  5186. const ::google::protobuf::Descriptor* CommitRequest::descriptor() {
  5187. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  5188. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  5189. }
  5190. const CommitRequest& CommitRequest::default_instance() {
  5191. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsCommitRequest();
  5192. return *internal_default_instance();
  5193. }
  5194. CommitRequest* CommitRequest::New(::google::protobuf::Arena* arena) const {
  5195. CommitRequest* n = new CommitRequest;
  5196. if (arena != NULL) {
  5197. arena->Own(n);
  5198. }
  5199. return n;
  5200. }
  5201. void CommitRequest::Clear() {
  5202. // @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.CommitRequest)
  5203. ::google::protobuf::uint32 cached_has_bits = 0;
  5204. // Prevent compiler warnings about cached_has_bits being unused
  5205. (void) cached_has_bits;
  5206. writes_.Clear();
  5207. database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5208. transaction_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5209. _internal_metadata_.Clear();
  5210. }
  5211. bool CommitRequest::MergePartialFromCodedStream(
  5212. ::google::protobuf::io::CodedInputStream* input) {
  5213. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  5214. ::google::protobuf::uint32 tag;
  5215. // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.CommitRequest)
  5216. for (;;) {
  5217. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  5218. tag = p.first;
  5219. if (!p.second) goto handle_unusual;
  5220. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  5221. // string database = 1;
  5222. case 1: {
  5223. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5224. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  5225. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  5226. input, this->mutable_database()));
  5227. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5228. this->database().data(), static_cast<int>(this->database().length()),
  5229. ::google::protobuf::internal::WireFormatLite::PARSE,
  5230. "google.firestore.v1beta1.CommitRequest.database"));
  5231. } else {
  5232. goto handle_unusual;
  5233. }
  5234. break;
  5235. }
  5236. // repeated .google.firestore.v1beta1.Write writes = 2;
  5237. case 2: {
  5238. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5239. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  5240. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_writes()));
  5241. } else {
  5242. goto handle_unusual;
  5243. }
  5244. break;
  5245. }
  5246. // bytes transaction = 3;
  5247. case 3: {
  5248. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5249. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  5250. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  5251. input, this->mutable_transaction()));
  5252. } else {
  5253. goto handle_unusual;
  5254. }
  5255. break;
  5256. }
  5257. default: {
  5258. handle_unusual:
  5259. if (tag == 0) {
  5260. goto success;
  5261. }
  5262. DO_(::google::protobuf::internal::WireFormat::SkipField(
  5263. input, tag, _internal_metadata_.mutable_unknown_fields()));
  5264. break;
  5265. }
  5266. }
  5267. }
  5268. success:
  5269. // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.CommitRequest)
  5270. return true;
  5271. failure:
  5272. // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.CommitRequest)
  5273. return false;
  5274. #undef DO_
  5275. }
  5276. void CommitRequest::SerializeWithCachedSizes(
  5277. ::google::protobuf::io::CodedOutputStream* output) const {
  5278. // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.CommitRequest)
  5279. ::google::protobuf::uint32 cached_has_bits = 0;
  5280. (void) cached_has_bits;
  5281. // string database = 1;
  5282. if (this->database().size() > 0) {
  5283. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5284. this->database().data(), static_cast<int>(this->database().length()),
  5285. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5286. "google.firestore.v1beta1.CommitRequest.database");
  5287. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  5288. 1, this->database(), output);
  5289. }
  5290. // repeated .google.firestore.v1beta1.Write writes = 2;
  5291. for (unsigned int i = 0,
  5292. n = static_cast<unsigned int>(this->writes_size()); i < n; i++) {
  5293. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  5294. 2, this->writes(static_cast<int>(i)), output);
  5295. }
  5296. // bytes transaction = 3;
  5297. if (this->transaction().size() > 0) {
  5298. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  5299. 3, this->transaction(), output);
  5300. }
  5301. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5302. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  5303. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  5304. }
  5305. // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.CommitRequest)
  5306. }
  5307. ::google::protobuf::uint8* CommitRequest::InternalSerializeWithCachedSizesToArray(
  5308. bool deterministic, ::google::protobuf::uint8* target) const {
  5309. (void)deterministic; // Unused
  5310. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.CommitRequest)
  5311. ::google::protobuf::uint32 cached_has_bits = 0;
  5312. (void) cached_has_bits;
  5313. // string database = 1;
  5314. if (this->database().size() > 0) {
  5315. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5316. this->database().data(), static_cast<int>(this->database().length()),
  5317. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5318. "google.firestore.v1beta1.CommitRequest.database");
  5319. target =
  5320. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  5321. 1, this->database(), target);
  5322. }
  5323. // repeated .google.firestore.v1beta1.Write writes = 2;
  5324. for (unsigned int i = 0,
  5325. n = static_cast<unsigned int>(this->writes_size()); i < n; i++) {
  5326. target = ::google::protobuf::internal::WireFormatLite::
  5327. InternalWriteMessageToArray(
  5328. 2, this->writes(static_cast<int>(i)), deterministic, target);
  5329. }
  5330. // bytes transaction = 3;
  5331. if (this->transaction().size() > 0) {
  5332. target =
  5333. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  5334. 3, this->transaction(), target);
  5335. }
  5336. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5337. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  5338. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  5339. }
  5340. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.CommitRequest)
  5341. return target;
  5342. }
  5343. size_t CommitRequest::ByteSizeLong() const {
  5344. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.CommitRequest)
  5345. size_t total_size = 0;
  5346. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5347. total_size +=
  5348. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  5349. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  5350. }
  5351. // repeated .google.firestore.v1beta1.Write writes = 2;
  5352. {
  5353. unsigned int count = static_cast<unsigned int>(this->writes_size());
  5354. total_size += 1UL * count;
  5355. for (unsigned int i = 0; i < count; i++) {
  5356. total_size +=
  5357. ::google::protobuf::internal::WireFormatLite::MessageSize(
  5358. this->writes(static_cast<int>(i)));
  5359. }
  5360. }
  5361. // string database = 1;
  5362. if (this->database().size() > 0) {
  5363. total_size += 1 +
  5364. ::google::protobuf::internal::WireFormatLite::StringSize(
  5365. this->database());
  5366. }
  5367. // bytes transaction = 3;
  5368. if (this->transaction().size() > 0) {
  5369. total_size += 1 +
  5370. ::google::protobuf::internal::WireFormatLite::BytesSize(
  5371. this->transaction());
  5372. }
  5373. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  5374. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  5375. _cached_size_ = cached_size;
  5376. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  5377. return total_size;
  5378. }
  5379. void CommitRequest::MergeFrom(const ::google::protobuf::Message& from) {
  5380. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.CommitRequest)
  5381. GOOGLE_DCHECK_NE(&from, this);
  5382. const CommitRequest* source =
  5383. ::google::protobuf::internal::DynamicCastToGenerated<const CommitRequest>(
  5384. &from);
  5385. if (source == NULL) {
  5386. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.CommitRequest)
  5387. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  5388. } else {
  5389. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.CommitRequest)
  5390. MergeFrom(*source);
  5391. }
  5392. }
  5393. void CommitRequest::MergeFrom(const CommitRequest& from) {
  5394. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.CommitRequest)
  5395. GOOGLE_DCHECK_NE(&from, this);
  5396. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5397. ::google::protobuf::uint32 cached_has_bits = 0;
  5398. (void) cached_has_bits;
  5399. writes_.MergeFrom(from.writes_);
  5400. if (from.database().size() > 0) {
  5401. database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  5402. }
  5403. if (from.transaction().size() > 0) {
  5404. transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  5405. }
  5406. }
  5407. void CommitRequest::CopyFrom(const ::google::protobuf::Message& from) {
  5408. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.CommitRequest)
  5409. if (&from == this) return;
  5410. Clear();
  5411. MergeFrom(from);
  5412. }
  5413. void CommitRequest::CopyFrom(const CommitRequest& from) {
  5414. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.CommitRequest)
  5415. if (&from == this) return;
  5416. Clear();
  5417. MergeFrom(from);
  5418. }
  5419. bool CommitRequest::IsInitialized() const {
  5420. return true;
  5421. }
  5422. void CommitRequest::Swap(CommitRequest* other) {
  5423. if (other == this) return;
  5424. InternalSwap(other);
  5425. }
  5426. void CommitRequest::InternalSwap(CommitRequest* other) {
  5427. using std::swap;
  5428. writes_.InternalSwap(&other->writes_);
  5429. database_.Swap(&other->database_);
  5430. transaction_.Swap(&other->transaction_);
  5431. _internal_metadata_.Swap(&other->_internal_metadata_);
  5432. swap(_cached_size_, other->_cached_size_);
  5433. }
  5434. ::google::protobuf::Metadata CommitRequest::GetMetadata() const {
  5435. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  5436. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  5437. }
  5438. // ===================================================================
  5439. void CommitResponse::InitAsDefaultInstance() {
  5440. ::google::firestore::v1beta1::_CommitResponse_default_instance_._instance.get_mutable()->commit_time_ = const_cast< ::google::protobuf::Timestamp*>(
  5441. ::google::protobuf::Timestamp::internal_default_instance());
  5442. }
  5443. void CommitResponse::clear_write_results() {
  5444. write_results_.Clear();
  5445. }
  5446. void CommitResponse::clear_commit_time() {
  5447. if (GetArenaNoVirtual() == NULL && commit_time_ != NULL) {
  5448. delete commit_time_;
  5449. }
  5450. commit_time_ = NULL;
  5451. }
  5452. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  5453. const int CommitResponse::kWriteResultsFieldNumber;
  5454. const int CommitResponse::kCommitTimeFieldNumber;
  5455. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  5456. CommitResponse::CommitResponse()
  5457. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  5458. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  5459. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsCommitResponse();
  5460. }
  5461. SharedCtor();
  5462. // @@protoc_insertion_point(constructor:google.firestore.v1beta1.CommitResponse)
  5463. }
  5464. CommitResponse::CommitResponse(const CommitResponse& from)
  5465. : ::google::protobuf::Message(),
  5466. _internal_metadata_(NULL),
  5467. write_results_(from.write_results_),
  5468. _cached_size_(0) {
  5469. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5470. if (from.has_commit_time()) {
  5471. commit_time_ = new ::google::protobuf::Timestamp(*from.commit_time_);
  5472. } else {
  5473. commit_time_ = NULL;
  5474. }
  5475. // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.CommitResponse)
  5476. }
  5477. void CommitResponse::SharedCtor() {
  5478. commit_time_ = NULL;
  5479. _cached_size_ = 0;
  5480. }
  5481. CommitResponse::~CommitResponse() {
  5482. // @@protoc_insertion_point(destructor:google.firestore.v1beta1.CommitResponse)
  5483. SharedDtor();
  5484. }
  5485. void CommitResponse::SharedDtor() {
  5486. if (this != internal_default_instance()) delete commit_time_;
  5487. }
  5488. void CommitResponse::SetCachedSize(int size) const {
  5489. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  5490. _cached_size_ = size;
  5491. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  5492. }
  5493. const ::google::protobuf::Descriptor* CommitResponse::descriptor() {
  5494. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  5495. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  5496. }
  5497. const CommitResponse& CommitResponse::default_instance() {
  5498. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsCommitResponse();
  5499. return *internal_default_instance();
  5500. }
  5501. CommitResponse* CommitResponse::New(::google::protobuf::Arena* arena) const {
  5502. CommitResponse* n = new CommitResponse;
  5503. if (arena != NULL) {
  5504. arena->Own(n);
  5505. }
  5506. return n;
  5507. }
  5508. void CommitResponse::Clear() {
  5509. // @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.CommitResponse)
  5510. ::google::protobuf::uint32 cached_has_bits = 0;
  5511. // Prevent compiler warnings about cached_has_bits being unused
  5512. (void) cached_has_bits;
  5513. write_results_.Clear();
  5514. if (GetArenaNoVirtual() == NULL && commit_time_ != NULL) {
  5515. delete commit_time_;
  5516. }
  5517. commit_time_ = NULL;
  5518. _internal_metadata_.Clear();
  5519. }
  5520. bool CommitResponse::MergePartialFromCodedStream(
  5521. ::google::protobuf::io::CodedInputStream* input) {
  5522. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  5523. ::google::protobuf::uint32 tag;
  5524. // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.CommitResponse)
  5525. for (;;) {
  5526. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  5527. tag = p.first;
  5528. if (!p.second) goto handle_unusual;
  5529. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  5530. // repeated .google.firestore.v1beta1.WriteResult write_results = 1;
  5531. case 1: {
  5532. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5533. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  5534. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_write_results()));
  5535. } else {
  5536. goto handle_unusual;
  5537. }
  5538. break;
  5539. }
  5540. // .google.protobuf.Timestamp commit_time = 2;
  5541. case 2: {
  5542. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5543. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  5544. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  5545. input, mutable_commit_time()));
  5546. } else {
  5547. goto handle_unusual;
  5548. }
  5549. break;
  5550. }
  5551. default: {
  5552. handle_unusual:
  5553. if (tag == 0) {
  5554. goto success;
  5555. }
  5556. DO_(::google::protobuf::internal::WireFormat::SkipField(
  5557. input, tag, _internal_metadata_.mutable_unknown_fields()));
  5558. break;
  5559. }
  5560. }
  5561. }
  5562. success:
  5563. // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.CommitResponse)
  5564. return true;
  5565. failure:
  5566. // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.CommitResponse)
  5567. return false;
  5568. #undef DO_
  5569. }
  5570. void CommitResponse::SerializeWithCachedSizes(
  5571. ::google::protobuf::io::CodedOutputStream* output) const {
  5572. // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.CommitResponse)
  5573. ::google::protobuf::uint32 cached_has_bits = 0;
  5574. (void) cached_has_bits;
  5575. // repeated .google.firestore.v1beta1.WriteResult write_results = 1;
  5576. for (unsigned int i = 0,
  5577. n = static_cast<unsigned int>(this->write_results_size()); i < n; i++) {
  5578. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  5579. 1, this->write_results(static_cast<int>(i)), output);
  5580. }
  5581. // .google.protobuf.Timestamp commit_time = 2;
  5582. if (this->has_commit_time()) {
  5583. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  5584. 2, *this->commit_time_, output);
  5585. }
  5586. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5587. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  5588. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  5589. }
  5590. // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.CommitResponse)
  5591. }
  5592. ::google::protobuf::uint8* CommitResponse::InternalSerializeWithCachedSizesToArray(
  5593. bool deterministic, ::google::protobuf::uint8* target) const {
  5594. (void)deterministic; // Unused
  5595. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.CommitResponse)
  5596. ::google::protobuf::uint32 cached_has_bits = 0;
  5597. (void) cached_has_bits;
  5598. // repeated .google.firestore.v1beta1.WriteResult write_results = 1;
  5599. for (unsigned int i = 0,
  5600. n = static_cast<unsigned int>(this->write_results_size()); i < n; i++) {
  5601. target = ::google::protobuf::internal::WireFormatLite::
  5602. InternalWriteMessageToArray(
  5603. 1, this->write_results(static_cast<int>(i)), deterministic, target);
  5604. }
  5605. // .google.protobuf.Timestamp commit_time = 2;
  5606. if (this->has_commit_time()) {
  5607. target = ::google::protobuf::internal::WireFormatLite::
  5608. InternalWriteMessageToArray(
  5609. 2, *this->commit_time_, deterministic, target);
  5610. }
  5611. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5612. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  5613. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  5614. }
  5615. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.CommitResponse)
  5616. return target;
  5617. }
  5618. size_t CommitResponse::ByteSizeLong() const {
  5619. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.CommitResponse)
  5620. size_t total_size = 0;
  5621. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5622. total_size +=
  5623. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  5624. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  5625. }
  5626. // repeated .google.firestore.v1beta1.WriteResult write_results = 1;
  5627. {
  5628. unsigned int count = static_cast<unsigned int>(this->write_results_size());
  5629. total_size += 1UL * count;
  5630. for (unsigned int i = 0; i < count; i++) {
  5631. total_size +=
  5632. ::google::protobuf::internal::WireFormatLite::MessageSize(
  5633. this->write_results(static_cast<int>(i)));
  5634. }
  5635. }
  5636. // .google.protobuf.Timestamp commit_time = 2;
  5637. if (this->has_commit_time()) {
  5638. total_size += 1 +
  5639. ::google::protobuf::internal::WireFormatLite::MessageSize(
  5640. *this->commit_time_);
  5641. }
  5642. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  5643. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  5644. _cached_size_ = cached_size;
  5645. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  5646. return total_size;
  5647. }
  5648. void CommitResponse::MergeFrom(const ::google::protobuf::Message& from) {
  5649. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.CommitResponse)
  5650. GOOGLE_DCHECK_NE(&from, this);
  5651. const CommitResponse* source =
  5652. ::google::protobuf::internal::DynamicCastToGenerated<const CommitResponse>(
  5653. &from);
  5654. if (source == NULL) {
  5655. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.CommitResponse)
  5656. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  5657. } else {
  5658. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.CommitResponse)
  5659. MergeFrom(*source);
  5660. }
  5661. }
  5662. void CommitResponse::MergeFrom(const CommitResponse& from) {
  5663. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.CommitResponse)
  5664. GOOGLE_DCHECK_NE(&from, this);
  5665. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5666. ::google::protobuf::uint32 cached_has_bits = 0;
  5667. (void) cached_has_bits;
  5668. write_results_.MergeFrom(from.write_results_);
  5669. if (from.has_commit_time()) {
  5670. mutable_commit_time()->::google::protobuf::Timestamp::MergeFrom(from.commit_time());
  5671. }
  5672. }
  5673. void CommitResponse::CopyFrom(const ::google::protobuf::Message& from) {
  5674. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.CommitResponse)
  5675. if (&from == this) return;
  5676. Clear();
  5677. MergeFrom(from);
  5678. }
  5679. void CommitResponse::CopyFrom(const CommitResponse& from) {
  5680. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.CommitResponse)
  5681. if (&from == this) return;
  5682. Clear();
  5683. MergeFrom(from);
  5684. }
  5685. bool CommitResponse::IsInitialized() const {
  5686. return true;
  5687. }
  5688. void CommitResponse::Swap(CommitResponse* other) {
  5689. if (other == this) return;
  5690. InternalSwap(other);
  5691. }
  5692. void CommitResponse::InternalSwap(CommitResponse* other) {
  5693. using std::swap;
  5694. write_results_.InternalSwap(&other->write_results_);
  5695. swap(commit_time_, other->commit_time_);
  5696. _internal_metadata_.Swap(&other->_internal_metadata_);
  5697. swap(_cached_size_, other->_cached_size_);
  5698. }
  5699. ::google::protobuf::Metadata CommitResponse::GetMetadata() const {
  5700. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  5701. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  5702. }
  5703. // ===================================================================
  5704. void RollbackRequest::InitAsDefaultInstance() {
  5705. }
  5706. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  5707. const int RollbackRequest::kDatabaseFieldNumber;
  5708. const int RollbackRequest::kTransactionFieldNumber;
  5709. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  5710. RollbackRequest::RollbackRequest()
  5711. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  5712. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  5713. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsRollbackRequest();
  5714. }
  5715. SharedCtor();
  5716. // @@protoc_insertion_point(constructor:google.firestore.v1beta1.RollbackRequest)
  5717. }
  5718. RollbackRequest::RollbackRequest(const RollbackRequest& from)
  5719. : ::google::protobuf::Message(),
  5720. _internal_metadata_(NULL),
  5721. _cached_size_(0) {
  5722. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5723. database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5724. if (from.database().size() > 0) {
  5725. database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  5726. }
  5727. transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5728. if (from.transaction().size() > 0) {
  5729. transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  5730. }
  5731. // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.RollbackRequest)
  5732. }
  5733. void RollbackRequest::SharedCtor() {
  5734. database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5735. transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5736. _cached_size_ = 0;
  5737. }
  5738. RollbackRequest::~RollbackRequest() {
  5739. // @@protoc_insertion_point(destructor:google.firestore.v1beta1.RollbackRequest)
  5740. SharedDtor();
  5741. }
  5742. void RollbackRequest::SharedDtor() {
  5743. database_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5744. transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5745. }
  5746. void RollbackRequest::SetCachedSize(int size) const {
  5747. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  5748. _cached_size_ = size;
  5749. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  5750. }
  5751. const ::google::protobuf::Descriptor* RollbackRequest::descriptor() {
  5752. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  5753. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  5754. }
  5755. const RollbackRequest& RollbackRequest::default_instance() {
  5756. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsRollbackRequest();
  5757. return *internal_default_instance();
  5758. }
  5759. RollbackRequest* RollbackRequest::New(::google::protobuf::Arena* arena) const {
  5760. RollbackRequest* n = new RollbackRequest;
  5761. if (arena != NULL) {
  5762. arena->Own(n);
  5763. }
  5764. return n;
  5765. }
  5766. void RollbackRequest::Clear() {
  5767. // @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.RollbackRequest)
  5768. ::google::protobuf::uint32 cached_has_bits = 0;
  5769. // Prevent compiler warnings about cached_has_bits being unused
  5770. (void) cached_has_bits;
  5771. database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5772. transaction_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5773. _internal_metadata_.Clear();
  5774. }
  5775. bool RollbackRequest::MergePartialFromCodedStream(
  5776. ::google::protobuf::io::CodedInputStream* input) {
  5777. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  5778. ::google::protobuf::uint32 tag;
  5779. // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.RollbackRequest)
  5780. for (;;) {
  5781. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  5782. tag = p.first;
  5783. if (!p.second) goto handle_unusual;
  5784. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  5785. // string database = 1;
  5786. case 1: {
  5787. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5788. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  5789. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  5790. input, this->mutable_database()));
  5791. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5792. this->database().data(), static_cast<int>(this->database().length()),
  5793. ::google::protobuf::internal::WireFormatLite::PARSE,
  5794. "google.firestore.v1beta1.RollbackRequest.database"));
  5795. } else {
  5796. goto handle_unusual;
  5797. }
  5798. break;
  5799. }
  5800. // bytes transaction = 2;
  5801. case 2: {
  5802. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5803. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  5804. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  5805. input, this->mutable_transaction()));
  5806. } else {
  5807. goto handle_unusual;
  5808. }
  5809. break;
  5810. }
  5811. default: {
  5812. handle_unusual:
  5813. if (tag == 0) {
  5814. goto success;
  5815. }
  5816. DO_(::google::protobuf::internal::WireFormat::SkipField(
  5817. input, tag, _internal_metadata_.mutable_unknown_fields()));
  5818. break;
  5819. }
  5820. }
  5821. }
  5822. success:
  5823. // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.RollbackRequest)
  5824. return true;
  5825. failure:
  5826. // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.RollbackRequest)
  5827. return false;
  5828. #undef DO_
  5829. }
  5830. void RollbackRequest::SerializeWithCachedSizes(
  5831. ::google::protobuf::io::CodedOutputStream* output) const {
  5832. // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.RollbackRequest)
  5833. ::google::protobuf::uint32 cached_has_bits = 0;
  5834. (void) cached_has_bits;
  5835. // string database = 1;
  5836. if (this->database().size() > 0) {
  5837. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5838. this->database().data(), static_cast<int>(this->database().length()),
  5839. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5840. "google.firestore.v1beta1.RollbackRequest.database");
  5841. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  5842. 1, this->database(), output);
  5843. }
  5844. // bytes transaction = 2;
  5845. if (this->transaction().size() > 0) {
  5846. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  5847. 2, this->transaction(), output);
  5848. }
  5849. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5850. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  5851. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  5852. }
  5853. // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.RollbackRequest)
  5854. }
  5855. ::google::protobuf::uint8* RollbackRequest::InternalSerializeWithCachedSizesToArray(
  5856. bool deterministic, ::google::protobuf::uint8* target) const {
  5857. (void)deterministic; // Unused
  5858. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.RollbackRequest)
  5859. ::google::protobuf::uint32 cached_has_bits = 0;
  5860. (void) cached_has_bits;
  5861. // string database = 1;
  5862. if (this->database().size() > 0) {
  5863. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5864. this->database().data(), static_cast<int>(this->database().length()),
  5865. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5866. "google.firestore.v1beta1.RollbackRequest.database");
  5867. target =
  5868. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  5869. 1, this->database(), target);
  5870. }
  5871. // bytes transaction = 2;
  5872. if (this->transaction().size() > 0) {
  5873. target =
  5874. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  5875. 2, this->transaction(), target);
  5876. }
  5877. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5878. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  5879. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  5880. }
  5881. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.RollbackRequest)
  5882. return target;
  5883. }
  5884. size_t RollbackRequest::ByteSizeLong() const {
  5885. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.RollbackRequest)
  5886. size_t total_size = 0;
  5887. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5888. total_size +=
  5889. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  5890. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  5891. }
  5892. // string database = 1;
  5893. if (this->database().size() > 0) {
  5894. total_size += 1 +
  5895. ::google::protobuf::internal::WireFormatLite::StringSize(
  5896. this->database());
  5897. }
  5898. // bytes transaction = 2;
  5899. if (this->transaction().size() > 0) {
  5900. total_size += 1 +
  5901. ::google::protobuf::internal::WireFormatLite::BytesSize(
  5902. this->transaction());
  5903. }
  5904. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  5905. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  5906. _cached_size_ = cached_size;
  5907. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  5908. return total_size;
  5909. }
  5910. void RollbackRequest::MergeFrom(const ::google::protobuf::Message& from) {
  5911. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.RollbackRequest)
  5912. GOOGLE_DCHECK_NE(&from, this);
  5913. const RollbackRequest* source =
  5914. ::google::protobuf::internal::DynamicCastToGenerated<const RollbackRequest>(
  5915. &from);
  5916. if (source == NULL) {
  5917. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.RollbackRequest)
  5918. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  5919. } else {
  5920. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.RollbackRequest)
  5921. MergeFrom(*source);
  5922. }
  5923. }
  5924. void RollbackRequest::MergeFrom(const RollbackRequest& from) {
  5925. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.RollbackRequest)
  5926. GOOGLE_DCHECK_NE(&from, this);
  5927. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5928. ::google::protobuf::uint32 cached_has_bits = 0;
  5929. (void) cached_has_bits;
  5930. if (from.database().size() > 0) {
  5931. database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  5932. }
  5933. if (from.transaction().size() > 0) {
  5934. transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  5935. }
  5936. }
  5937. void RollbackRequest::CopyFrom(const ::google::protobuf::Message& from) {
  5938. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.RollbackRequest)
  5939. if (&from == this) return;
  5940. Clear();
  5941. MergeFrom(from);
  5942. }
  5943. void RollbackRequest::CopyFrom(const RollbackRequest& from) {
  5944. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.RollbackRequest)
  5945. if (&from == this) return;
  5946. Clear();
  5947. MergeFrom(from);
  5948. }
  5949. bool RollbackRequest::IsInitialized() const {
  5950. return true;
  5951. }
  5952. void RollbackRequest::Swap(RollbackRequest* other) {
  5953. if (other == this) return;
  5954. InternalSwap(other);
  5955. }
  5956. void RollbackRequest::InternalSwap(RollbackRequest* other) {
  5957. using std::swap;
  5958. database_.Swap(&other->database_);
  5959. transaction_.Swap(&other->transaction_);
  5960. _internal_metadata_.Swap(&other->_internal_metadata_);
  5961. swap(_cached_size_, other->_cached_size_);
  5962. }
  5963. ::google::protobuf::Metadata RollbackRequest::GetMetadata() const {
  5964. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  5965. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  5966. }
  5967. // ===================================================================
  5968. void RunQueryRequest::InitAsDefaultInstance() {
  5969. ::google::firestore::v1beta1::_RunQueryRequest_default_instance_.structured_query_ = const_cast< ::google::firestore::v1beta1::StructuredQuery*>(
  5970. ::google::firestore::v1beta1::StructuredQuery::internal_default_instance());
  5971. ::google::firestore::v1beta1::_RunQueryRequest_default_instance_.transaction_.UnsafeSetDefault(
  5972. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5973. ::google::firestore::v1beta1::_RunQueryRequest_default_instance_.new_transaction_ = const_cast< ::google::firestore::v1beta1::TransactionOptions*>(
  5974. ::google::firestore::v1beta1::TransactionOptions::internal_default_instance());
  5975. ::google::firestore::v1beta1::_RunQueryRequest_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>(
  5976. ::google::protobuf::Timestamp::internal_default_instance());
  5977. }
  5978. void RunQueryRequest::set_allocated_structured_query(::google::firestore::v1beta1::StructuredQuery* structured_query) {
  5979. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  5980. clear_query_type();
  5981. if (structured_query) {
  5982. ::google::protobuf::Arena* submessage_arena = NULL;
  5983. if (message_arena != submessage_arena) {
  5984. structured_query = ::google::protobuf::internal::GetOwnedMessage(
  5985. message_arena, structured_query, submessage_arena);
  5986. }
  5987. set_has_structured_query();
  5988. query_type_.structured_query_ = structured_query;
  5989. }
  5990. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.RunQueryRequest.structured_query)
  5991. }
  5992. void RunQueryRequest::clear_structured_query() {
  5993. if (has_structured_query()) {
  5994. delete query_type_.structured_query_;
  5995. clear_has_query_type();
  5996. }
  5997. }
  5998. void RunQueryRequest::set_allocated_new_transaction(::google::firestore::v1beta1::TransactionOptions* new_transaction) {
  5999. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  6000. clear_consistency_selector();
  6001. if (new_transaction) {
  6002. ::google::protobuf::Arena* submessage_arena = NULL;
  6003. if (message_arena != submessage_arena) {
  6004. new_transaction = ::google::protobuf::internal::GetOwnedMessage(
  6005. message_arena, new_transaction, submessage_arena);
  6006. }
  6007. set_has_new_transaction();
  6008. consistency_selector_.new_transaction_ = new_transaction;
  6009. }
  6010. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.RunQueryRequest.new_transaction)
  6011. }
  6012. void RunQueryRequest::clear_new_transaction() {
  6013. if (has_new_transaction()) {
  6014. delete consistency_selector_.new_transaction_;
  6015. clear_has_consistency_selector();
  6016. }
  6017. }
  6018. void RunQueryRequest::set_allocated_read_time(::google::protobuf::Timestamp* read_time) {
  6019. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  6020. clear_consistency_selector();
  6021. if (read_time) {
  6022. ::google::protobuf::Arena* submessage_arena =
  6023. reinterpret_cast< ::google::protobuf::MessageLite*>(read_time)->GetArena();
  6024. if (message_arena != submessage_arena) {
  6025. read_time = ::google::protobuf::internal::GetOwnedMessage(
  6026. message_arena, read_time, submessage_arena);
  6027. }
  6028. set_has_read_time();
  6029. consistency_selector_.read_time_ = read_time;
  6030. }
  6031. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.RunQueryRequest.read_time)
  6032. }
  6033. void RunQueryRequest::clear_read_time() {
  6034. if (has_read_time()) {
  6035. delete consistency_selector_.read_time_;
  6036. clear_has_consistency_selector();
  6037. }
  6038. }
  6039. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  6040. const int RunQueryRequest::kParentFieldNumber;
  6041. const int RunQueryRequest::kStructuredQueryFieldNumber;
  6042. const int RunQueryRequest::kTransactionFieldNumber;
  6043. const int RunQueryRequest::kNewTransactionFieldNumber;
  6044. const int RunQueryRequest::kReadTimeFieldNumber;
  6045. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  6046. RunQueryRequest::RunQueryRequest()
  6047. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  6048. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  6049. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsRunQueryRequest();
  6050. }
  6051. SharedCtor();
  6052. // @@protoc_insertion_point(constructor:google.firestore.v1beta1.RunQueryRequest)
  6053. }
  6054. RunQueryRequest::RunQueryRequest(const RunQueryRequest& from)
  6055. : ::google::protobuf::Message(),
  6056. _internal_metadata_(NULL),
  6057. _cached_size_(0) {
  6058. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6059. parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6060. if (from.parent().size() > 0) {
  6061. parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  6062. }
  6063. clear_has_query_type();
  6064. switch (from.query_type_case()) {
  6065. case kStructuredQuery: {
  6066. mutable_structured_query()->::google::firestore::v1beta1::StructuredQuery::MergeFrom(from.structured_query());
  6067. break;
  6068. }
  6069. case QUERY_TYPE_NOT_SET: {
  6070. break;
  6071. }
  6072. }
  6073. clear_has_consistency_selector();
  6074. switch (from.consistency_selector_case()) {
  6075. case kTransaction: {
  6076. set_transaction(from.transaction());
  6077. break;
  6078. }
  6079. case kNewTransaction: {
  6080. mutable_new_transaction()->::google::firestore::v1beta1::TransactionOptions::MergeFrom(from.new_transaction());
  6081. break;
  6082. }
  6083. case kReadTime: {
  6084. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  6085. break;
  6086. }
  6087. case CONSISTENCY_SELECTOR_NOT_SET: {
  6088. break;
  6089. }
  6090. }
  6091. // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.RunQueryRequest)
  6092. }
  6093. void RunQueryRequest::SharedCtor() {
  6094. parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6095. clear_has_query_type();
  6096. clear_has_consistency_selector();
  6097. _cached_size_ = 0;
  6098. }
  6099. RunQueryRequest::~RunQueryRequest() {
  6100. // @@protoc_insertion_point(destructor:google.firestore.v1beta1.RunQueryRequest)
  6101. SharedDtor();
  6102. }
  6103. void RunQueryRequest::SharedDtor() {
  6104. parent_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6105. if (has_query_type()) {
  6106. clear_query_type();
  6107. }
  6108. if (has_consistency_selector()) {
  6109. clear_consistency_selector();
  6110. }
  6111. }
  6112. void RunQueryRequest::SetCachedSize(int size) const {
  6113. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  6114. _cached_size_ = size;
  6115. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  6116. }
  6117. const ::google::protobuf::Descriptor* RunQueryRequest::descriptor() {
  6118. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  6119. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  6120. }
  6121. const RunQueryRequest& RunQueryRequest::default_instance() {
  6122. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsRunQueryRequest();
  6123. return *internal_default_instance();
  6124. }
  6125. RunQueryRequest* RunQueryRequest::New(::google::protobuf::Arena* arena) const {
  6126. RunQueryRequest* n = new RunQueryRequest;
  6127. if (arena != NULL) {
  6128. arena->Own(n);
  6129. }
  6130. return n;
  6131. }
  6132. void RunQueryRequest::clear_query_type() {
  6133. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.RunQueryRequest)
  6134. switch (query_type_case()) {
  6135. case kStructuredQuery: {
  6136. delete query_type_.structured_query_;
  6137. break;
  6138. }
  6139. case QUERY_TYPE_NOT_SET: {
  6140. break;
  6141. }
  6142. }
  6143. _oneof_case_[0] = QUERY_TYPE_NOT_SET;
  6144. }
  6145. void RunQueryRequest::clear_consistency_selector() {
  6146. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.RunQueryRequest)
  6147. switch (consistency_selector_case()) {
  6148. case kTransaction: {
  6149. consistency_selector_.transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6150. break;
  6151. }
  6152. case kNewTransaction: {
  6153. delete consistency_selector_.new_transaction_;
  6154. break;
  6155. }
  6156. case kReadTime: {
  6157. delete consistency_selector_.read_time_;
  6158. break;
  6159. }
  6160. case CONSISTENCY_SELECTOR_NOT_SET: {
  6161. break;
  6162. }
  6163. }
  6164. _oneof_case_[1] = CONSISTENCY_SELECTOR_NOT_SET;
  6165. }
  6166. void RunQueryRequest::Clear() {
  6167. // @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.RunQueryRequest)
  6168. ::google::protobuf::uint32 cached_has_bits = 0;
  6169. // Prevent compiler warnings about cached_has_bits being unused
  6170. (void) cached_has_bits;
  6171. parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6172. clear_query_type();
  6173. clear_consistency_selector();
  6174. _internal_metadata_.Clear();
  6175. }
  6176. bool RunQueryRequest::MergePartialFromCodedStream(
  6177. ::google::protobuf::io::CodedInputStream* input) {
  6178. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  6179. ::google::protobuf::uint32 tag;
  6180. // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.RunQueryRequest)
  6181. for (;;) {
  6182. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  6183. tag = p.first;
  6184. if (!p.second) goto handle_unusual;
  6185. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  6186. // string parent = 1;
  6187. case 1: {
  6188. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6189. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  6190. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  6191. input, this->mutable_parent()));
  6192. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6193. this->parent().data(), static_cast<int>(this->parent().length()),
  6194. ::google::protobuf::internal::WireFormatLite::PARSE,
  6195. "google.firestore.v1beta1.RunQueryRequest.parent"));
  6196. } else {
  6197. goto handle_unusual;
  6198. }
  6199. break;
  6200. }
  6201. // .google.firestore.v1beta1.StructuredQuery structured_query = 2;
  6202. case 2: {
  6203. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6204. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  6205. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  6206. input, mutable_structured_query()));
  6207. } else {
  6208. goto handle_unusual;
  6209. }
  6210. break;
  6211. }
  6212. // bytes transaction = 5;
  6213. case 5: {
  6214. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6215. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  6216. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  6217. input, this->mutable_transaction()));
  6218. } else {
  6219. goto handle_unusual;
  6220. }
  6221. break;
  6222. }
  6223. // .google.firestore.v1beta1.TransactionOptions new_transaction = 6;
  6224. case 6: {
  6225. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6226. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  6227. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  6228. input, mutable_new_transaction()));
  6229. } else {
  6230. goto handle_unusual;
  6231. }
  6232. break;
  6233. }
  6234. // .google.protobuf.Timestamp read_time = 7;
  6235. case 7: {
  6236. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6237. static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
  6238. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  6239. input, mutable_read_time()));
  6240. } else {
  6241. goto handle_unusual;
  6242. }
  6243. break;
  6244. }
  6245. default: {
  6246. handle_unusual:
  6247. if (tag == 0) {
  6248. goto success;
  6249. }
  6250. DO_(::google::protobuf::internal::WireFormat::SkipField(
  6251. input, tag, _internal_metadata_.mutable_unknown_fields()));
  6252. break;
  6253. }
  6254. }
  6255. }
  6256. success:
  6257. // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.RunQueryRequest)
  6258. return true;
  6259. failure:
  6260. // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.RunQueryRequest)
  6261. return false;
  6262. #undef DO_
  6263. }
  6264. void RunQueryRequest::SerializeWithCachedSizes(
  6265. ::google::protobuf::io::CodedOutputStream* output) const {
  6266. // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.RunQueryRequest)
  6267. ::google::protobuf::uint32 cached_has_bits = 0;
  6268. (void) cached_has_bits;
  6269. // string parent = 1;
  6270. if (this->parent().size() > 0) {
  6271. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6272. this->parent().data(), static_cast<int>(this->parent().length()),
  6273. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  6274. "google.firestore.v1beta1.RunQueryRequest.parent");
  6275. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  6276. 1, this->parent(), output);
  6277. }
  6278. // .google.firestore.v1beta1.StructuredQuery structured_query = 2;
  6279. if (has_structured_query()) {
  6280. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6281. 2, *query_type_.structured_query_, output);
  6282. }
  6283. // bytes transaction = 5;
  6284. if (has_transaction()) {
  6285. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  6286. 5, this->transaction(), output);
  6287. }
  6288. // .google.firestore.v1beta1.TransactionOptions new_transaction = 6;
  6289. if (has_new_transaction()) {
  6290. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6291. 6, *consistency_selector_.new_transaction_, output);
  6292. }
  6293. // .google.protobuf.Timestamp read_time = 7;
  6294. if (has_read_time()) {
  6295. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6296. 7, *consistency_selector_.read_time_, output);
  6297. }
  6298. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6299. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  6300. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  6301. }
  6302. // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.RunQueryRequest)
  6303. }
  6304. ::google::protobuf::uint8* RunQueryRequest::InternalSerializeWithCachedSizesToArray(
  6305. bool deterministic, ::google::protobuf::uint8* target) const {
  6306. (void)deterministic; // Unused
  6307. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.RunQueryRequest)
  6308. ::google::protobuf::uint32 cached_has_bits = 0;
  6309. (void) cached_has_bits;
  6310. // string parent = 1;
  6311. if (this->parent().size() > 0) {
  6312. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6313. this->parent().data(), static_cast<int>(this->parent().length()),
  6314. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  6315. "google.firestore.v1beta1.RunQueryRequest.parent");
  6316. target =
  6317. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  6318. 1, this->parent(), target);
  6319. }
  6320. // .google.firestore.v1beta1.StructuredQuery structured_query = 2;
  6321. if (has_structured_query()) {
  6322. target = ::google::protobuf::internal::WireFormatLite::
  6323. InternalWriteMessageToArray(
  6324. 2, *query_type_.structured_query_, deterministic, target);
  6325. }
  6326. // bytes transaction = 5;
  6327. if (has_transaction()) {
  6328. target =
  6329. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  6330. 5, this->transaction(), target);
  6331. }
  6332. // .google.firestore.v1beta1.TransactionOptions new_transaction = 6;
  6333. if (has_new_transaction()) {
  6334. target = ::google::protobuf::internal::WireFormatLite::
  6335. InternalWriteMessageToArray(
  6336. 6, *consistency_selector_.new_transaction_, deterministic, target);
  6337. }
  6338. // .google.protobuf.Timestamp read_time = 7;
  6339. if (has_read_time()) {
  6340. target = ::google::protobuf::internal::WireFormatLite::
  6341. InternalWriteMessageToArray(
  6342. 7, *consistency_selector_.read_time_, deterministic, target);
  6343. }
  6344. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6345. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  6346. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  6347. }
  6348. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.RunQueryRequest)
  6349. return target;
  6350. }
  6351. size_t RunQueryRequest::ByteSizeLong() const {
  6352. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.RunQueryRequest)
  6353. size_t total_size = 0;
  6354. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6355. total_size +=
  6356. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  6357. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  6358. }
  6359. // string parent = 1;
  6360. if (this->parent().size() > 0) {
  6361. total_size += 1 +
  6362. ::google::protobuf::internal::WireFormatLite::StringSize(
  6363. this->parent());
  6364. }
  6365. switch (query_type_case()) {
  6366. // .google.firestore.v1beta1.StructuredQuery structured_query = 2;
  6367. case kStructuredQuery: {
  6368. total_size += 1 +
  6369. ::google::protobuf::internal::WireFormatLite::MessageSize(
  6370. *query_type_.structured_query_);
  6371. break;
  6372. }
  6373. case QUERY_TYPE_NOT_SET: {
  6374. break;
  6375. }
  6376. }
  6377. switch (consistency_selector_case()) {
  6378. // bytes transaction = 5;
  6379. case kTransaction: {
  6380. total_size += 1 +
  6381. ::google::protobuf::internal::WireFormatLite::BytesSize(
  6382. this->transaction());
  6383. break;
  6384. }
  6385. // .google.firestore.v1beta1.TransactionOptions new_transaction = 6;
  6386. case kNewTransaction: {
  6387. total_size += 1 +
  6388. ::google::protobuf::internal::WireFormatLite::MessageSize(
  6389. *consistency_selector_.new_transaction_);
  6390. break;
  6391. }
  6392. // .google.protobuf.Timestamp read_time = 7;
  6393. case kReadTime: {
  6394. total_size += 1 +
  6395. ::google::protobuf::internal::WireFormatLite::MessageSize(
  6396. *consistency_selector_.read_time_);
  6397. break;
  6398. }
  6399. case CONSISTENCY_SELECTOR_NOT_SET: {
  6400. break;
  6401. }
  6402. }
  6403. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  6404. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  6405. _cached_size_ = cached_size;
  6406. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  6407. return total_size;
  6408. }
  6409. void RunQueryRequest::MergeFrom(const ::google::protobuf::Message& from) {
  6410. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.RunQueryRequest)
  6411. GOOGLE_DCHECK_NE(&from, this);
  6412. const RunQueryRequest* source =
  6413. ::google::protobuf::internal::DynamicCastToGenerated<const RunQueryRequest>(
  6414. &from);
  6415. if (source == NULL) {
  6416. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.RunQueryRequest)
  6417. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  6418. } else {
  6419. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.RunQueryRequest)
  6420. MergeFrom(*source);
  6421. }
  6422. }
  6423. void RunQueryRequest::MergeFrom(const RunQueryRequest& from) {
  6424. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.RunQueryRequest)
  6425. GOOGLE_DCHECK_NE(&from, this);
  6426. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6427. ::google::protobuf::uint32 cached_has_bits = 0;
  6428. (void) cached_has_bits;
  6429. if (from.parent().size() > 0) {
  6430. parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  6431. }
  6432. switch (from.query_type_case()) {
  6433. case kStructuredQuery: {
  6434. mutable_structured_query()->::google::firestore::v1beta1::StructuredQuery::MergeFrom(from.structured_query());
  6435. break;
  6436. }
  6437. case QUERY_TYPE_NOT_SET: {
  6438. break;
  6439. }
  6440. }
  6441. switch (from.consistency_selector_case()) {
  6442. case kTransaction: {
  6443. set_transaction(from.transaction());
  6444. break;
  6445. }
  6446. case kNewTransaction: {
  6447. mutable_new_transaction()->::google::firestore::v1beta1::TransactionOptions::MergeFrom(from.new_transaction());
  6448. break;
  6449. }
  6450. case kReadTime: {
  6451. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  6452. break;
  6453. }
  6454. case CONSISTENCY_SELECTOR_NOT_SET: {
  6455. break;
  6456. }
  6457. }
  6458. }
  6459. void RunQueryRequest::CopyFrom(const ::google::protobuf::Message& from) {
  6460. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.RunQueryRequest)
  6461. if (&from == this) return;
  6462. Clear();
  6463. MergeFrom(from);
  6464. }
  6465. void RunQueryRequest::CopyFrom(const RunQueryRequest& from) {
  6466. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.RunQueryRequest)
  6467. if (&from == this) return;
  6468. Clear();
  6469. MergeFrom(from);
  6470. }
  6471. bool RunQueryRequest::IsInitialized() const {
  6472. return true;
  6473. }
  6474. void RunQueryRequest::Swap(RunQueryRequest* other) {
  6475. if (other == this) return;
  6476. InternalSwap(other);
  6477. }
  6478. void RunQueryRequest::InternalSwap(RunQueryRequest* other) {
  6479. using std::swap;
  6480. parent_.Swap(&other->parent_);
  6481. swap(query_type_, other->query_type_);
  6482. swap(_oneof_case_[0], other->_oneof_case_[0]);
  6483. swap(consistency_selector_, other->consistency_selector_);
  6484. swap(_oneof_case_[1], other->_oneof_case_[1]);
  6485. _internal_metadata_.Swap(&other->_internal_metadata_);
  6486. swap(_cached_size_, other->_cached_size_);
  6487. }
  6488. ::google::protobuf::Metadata RunQueryRequest::GetMetadata() const {
  6489. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  6490. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  6491. }
  6492. // ===================================================================
  6493. void RunQueryResponse::InitAsDefaultInstance() {
  6494. ::google::firestore::v1beta1::_RunQueryResponse_default_instance_._instance.get_mutable()->document_ = const_cast< ::google::firestore::v1beta1::Document*>(
  6495. ::google::firestore::v1beta1::Document::internal_default_instance());
  6496. ::google::firestore::v1beta1::_RunQueryResponse_default_instance_._instance.get_mutable()->read_time_ = const_cast< ::google::protobuf::Timestamp*>(
  6497. ::google::protobuf::Timestamp::internal_default_instance());
  6498. }
  6499. void RunQueryResponse::clear_document() {
  6500. if (GetArenaNoVirtual() == NULL && document_ != NULL) {
  6501. delete document_;
  6502. }
  6503. document_ = NULL;
  6504. }
  6505. void RunQueryResponse::clear_read_time() {
  6506. if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
  6507. delete read_time_;
  6508. }
  6509. read_time_ = NULL;
  6510. }
  6511. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  6512. const int RunQueryResponse::kTransactionFieldNumber;
  6513. const int RunQueryResponse::kDocumentFieldNumber;
  6514. const int RunQueryResponse::kReadTimeFieldNumber;
  6515. const int RunQueryResponse::kSkippedResultsFieldNumber;
  6516. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  6517. RunQueryResponse::RunQueryResponse()
  6518. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  6519. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  6520. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsRunQueryResponse();
  6521. }
  6522. SharedCtor();
  6523. // @@protoc_insertion_point(constructor:google.firestore.v1beta1.RunQueryResponse)
  6524. }
  6525. RunQueryResponse::RunQueryResponse(const RunQueryResponse& from)
  6526. : ::google::protobuf::Message(),
  6527. _internal_metadata_(NULL),
  6528. _cached_size_(0) {
  6529. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6530. transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6531. if (from.transaction().size() > 0) {
  6532. transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  6533. }
  6534. if (from.has_document()) {
  6535. document_ = new ::google::firestore::v1beta1::Document(*from.document_);
  6536. } else {
  6537. document_ = NULL;
  6538. }
  6539. if (from.has_read_time()) {
  6540. read_time_ = new ::google::protobuf::Timestamp(*from.read_time_);
  6541. } else {
  6542. read_time_ = NULL;
  6543. }
  6544. skipped_results_ = from.skipped_results_;
  6545. // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.RunQueryResponse)
  6546. }
  6547. void RunQueryResponse::SharedCtor() {
  6548. transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6549. ::memset(&document_, 0, static_cast<size_t>(
  6550. reinterpret_cast<char*>(&skipped_results_) -
  6551. reinterpret_cast<char*>(&document_)) + sizeof(skipped_results_));
  6552. _cached_size_ = 0;
  6553. }
  6554. RunQueryResponse::~RunQueryResponse() {
  6555. // @@protoc_insertion_point(destructor:google.firestore.v1beta1.RunQueryResponse)
  6556. SharedDtor();
  6557. }
  6558. void RunQueryResponse::SharedDtor() {
  6559. transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6560. if (this != internal_default_instance()) delete document_;
  6561. if (this != internal_default_instance()) delete read_time_;
  6562. }
  6563. void RunQueryResponse::SetCachedSize(int size) const {
  6564. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  6565. _cached_size_ = size;
  6566. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  6567. }
  6568. const ::google::protobuf::Descriptor* RunQueryResponse::descriptor() {
  6569. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  6570. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  6571. }
  6572. const RunQueryResponse& RunQueryResponse::default_instance() {
  6573. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsRunQueryResponse();
  6574. return *internal_default_instance();
  6575. }
  6576. RunQueryResponse* RunQueryResponse::New(::google::protobuf::Arena* arena) const {
  6577. RunQueryResponse* n = new RunQueryResponse;
  6578. if (arena != NULL) {
  6579. arena->Own(n);
  6580. }
  6581. return n;
  6582. }
  6583. void RunQueryResponse::Clear() {
  6584. // @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.RunQueryResponse)
  6585. ::google::protobuf::uint32 cached_has_bits = 0;
  6586. // Prevent compiler warnings about cached_has_bits being unused
  6587. (void) cached_has_bits;
  6588. transaction_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6589. if (GetArenaNoVirtual() == NULL && document_ != NULL) {
  6590. delete document_;
  6591. }
  6592. document_ = NULL;
  6593. if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
  6594. delete read_time_;
  6595. }
  6596. read_time_ = NULL;
  6597. skipped_results_ = 0;
  6598. _internal_metadata_.Clear();
  6599. }
  6600. bool RunQueryResponse::MergePartialFromCodedStream(
  6601. ::google::protobuf::io::CodedInputStream* input) {
  6602. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  6603. ::google::protobuf::uint32 tag;
  6604. // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.RunQueryResponse)
  6605. for (;;) {
  6606. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  6607. tag = p.first;
  6608. if (!p.second) goto handle_unusual;
  6609. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  6610. // .google.firestore.v1beta1.Document document = 1;
  6611. case 1: {
  6612. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6613. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  6614. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  6615. input, mutable_document()));
  6616. } else {
  6617. goto handle_unusual;
  6618. }
  6619. break;
  6620. }
  6621. // bytes transaction = 2;
  6622. case 2: {
  6623. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6624. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  6625. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  6626. input, this->mutable_transaction()));
  6627. } else {
  6628. goto handle_unusual;
  6629. }
  6630. break;
  6631. }
  6632. // .google.protobuf.Timestamp read_time = 3;
  6633. case 3: {
  6634. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6635. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  6636. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  6637. input, mutable_read_time()));
  6638. } else {
  6639. goto handle_unusual;
  6640. }
  6641. break;
  6642. }
  6643. // int32 skipped_results = 4;
  6644. case 4: {
  6645. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6646. static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
  6647. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  6648. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  6649. input, &skipped_results_)));
  6650. } else {
  6651. goto handle_unusual;
  6652. }
  6653. break;
  6654. }
  6655. default: {
  6656. handle_unusual:
  6657. if (tag == 0) {
  6658. goto success;
  6659. }
  6660. DO_(::google::protobuf::internal::WireFormat::SkipField(
  6661. input, tag, _internal_metadata_.mutable_unknown_fields()));
  6662. break;
  6663. }
  6664. }
  6665. }
  6666. success:
  6667. // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.RunQueryResponse)
  6668. return true;
  6669. failure:
  6670. // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.RunQueryResponse)
  6671. return false;
  6672. #undef DO_
  6673. }
  6674. void RunQueryResponse::SerializeWithCachedSizes(
  6675. ::google::protobuf::io::CodedOutputStream* output) const {
  6676. // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.RunQueryResponse)
  6677. ::google::protobuf::uint32 cached_has_bits = 0;
  6678. (void) cached_has_bits;
  6679. // .google.firestore.v1beta1.Document document = 1;
  6680. if (this->has_document()) {
  6681. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6682. 1, *this->document_, output);
  6683. }
  6684. // bytes transaction = 2;
  6685. if (this->transaction().size() > 0) {
  6686. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  6687. 2, this->transaction(), output);
  6688. }
  6689. // .google.protobuf.Timestamp read_time = 3;
  6690. if (this->has_read_time()) {
  6691. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6692. 3, *this->read_time_, output);
  6693. }
  6694. // int32 skipped_results = 4;
  6695. if (this->skipped_results() != 0) {
  6696. ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->skipped_results(), output);
  6697. }
  6698. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6699. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  6700. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  6701. }
  6702. // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.RunQueryResponse)
  6703. }
  6704. ::google::protobuf::uint8* RunQueryResponse::InternalSerializeWithCachedSizesToArray(
  6705. bool deterministic, ::google::protobuf::uint8* target) const {
  6706. (void)deterministic; // Unused
  6707. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.RunQueryResponse)
  6708. ::google::protobuf::uint32 cached_has_bits = 0;
  6709. (void) cached_has_bits;
  6710. // .google.firestore.v1beta1.Document document = 1;
  6711. if (this->has_document()) {
  6712. target = ::google::protobuf::internal::WireFormatLite::
  6713. InternalWriteMessageToArray(
  6714. 1, *this->document_, deterministic, target);
  6715. }
  6716. // bytes transaction = 2;
  6717. if (this->transaction().size() > 0) {
  6718. target =
  6719. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  6720. 2, this->transaction(), target);
  6721. }
  6722. // .google.protobuf.Timestamp read_time = 3;
  6723. if (this->has_read_time()) {
  6724. target = ::google::protobuf::internal::WireFormatLite::
  6725. InternalWriteMessageToArray(
  6726. 3, *this->read_time_, deterministic, target);
  6727. }
  6728. // int32 skipped_results = 4;
  6729. if (this->skipped_results() != 0) {
  6730. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->skipped_results(), target);
  6731. }
  6732. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6733. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  6734. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  6735. }
  6736. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.RunQueryResponse)
  6737. return target;
  6738. }
  6739. size_t RunQueryResponse::ByteSizeLong() const {
  6740. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.RunQueryResponse)
  6741. size_t total_size = 0;
  6742. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6743. total_size +=
  6744. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  6745. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  6746. }
  6747. // bytes transaction = 2;
  6748. if (this->transaction().size() > 0) {
  6749. total_size += 1 +
  6750. ::google::protobuf::internal::WireFormatLite::BytesSize(
  6751. this->transaction());
  6752. }
  6753. // .google.firestore.v1beta1.Document document = 1;
  6754. if (this->has_document()) {
  6755. total_size += 1 +
  6756. ::google::protobuf::internal::WireFormatLite::MessageSize(
  6757. *this->document_);
  6758. }
  6759. // .google.protobuf.Timestamp read_time = 3;
  6760. if (this->has_read_time()) {
  6761. total_size += 1 +
  6762. ::google::protobuf::internal::WireFormatLite::MessageSize(
  6763. *this->read_time_);
  6764. }
  6765. // int32 skipped_results = 4;
  6766. if (this->skipped_results() != 0) {
  6767. total_size += 1 +
  6768. ::google::protobuf::internal::WireFormatLite::Int32Size(
  6769. this->skipped_results());
  6770. }
  6771. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  6772. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  6773. _cached_size_ = cached_size;
  6774. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  6775. return total_size;
  6776. }
  6777. void RunQueryResponse::MergeFrom(const ::google::protobuf::Message& from) {
  6778. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.RunQueryResponse)
  6779. GOOGLE_DCHECK_NE(&from, this);
  6780. const RunQueryResponse* source =
  6781. ::google::protobuf::internal::DynamicCastToGenerated<const RunQueryResponse>(
  6782. &from);
  6783. if (source == NULL) {
  6784. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.RunQueryResponse)
  6785. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  6786. } else {
  6787. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.RunQueryResponse)
  6788. MergeFrom(*source);
  6789. }
  6790. }
  6791. void RunQueryResponse::MergeFrom(const RunQueryResponse& from) {
  6792. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.RunQueryResponse)
  6793. GOOGLE_DCHECK_NE(&from, this);
  6794. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6795. ::google::protobuf::uint32 cached_has_bits = 0;
  6796. (void) cached_has_bits;
  6797. if (from.transaction().size() > 0) {
  6798. transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  6799. }
  6800. if (from.has_document()) {
  6801. mutable_document()->::google::firestore::v1beta1::Document::MergeFrom(from.document());
  6802. }
  6803. if (from.has_read_time()) {
  6804. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  6805. }
  6806. if (from.skipped_results() != 0) {
  6807. set_skipped_results(from.skipped_results());
  6808. }
  6809. }
  6810. void RunQueryResponse::CopyFrom(const ::google::protobuf::Message& from) {
  6811. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.RunQueryResponse)
  6812. if (&from == this) return;
  6813. Clear();
  6814. MergeFrom(from);
  6815. }
  6816. void RunQueryResponse::CopyFrom(const RunQueryResponse& from) {
  6817. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.RunQueryResponse)
  6818. if (&from == this) return;
  6819. Clear();
  6820. MergeFrom(from);
  6821. }
  6822. bool RunQueryResponse::IsInitialized() const {
  6823. return true;
  6824. }
  6825. void RunQueryResponse::Swap(RunQueryResponse* other) {
  6826. if (other == this) return;
  6827. InternalSwap(other);
  6828. }
  6829. void RunQueryResponse::InternalSwap(RunQueryResponse* other) {
  6830. using std::swap;
  6831. transaction_.Swap(&other->transaction_);
  6832. swap(document_, other->document_);
  6833. swap(read_time_, other->read_time_);
  6834. swap(skipped_results_, other->skipped_results_);
  6835. _internal_metadata_.Swap(&other->_internal_metadata_);
  6836. swap(_cached_size_, other->_cached_size_);
  6837. }
  6838. ::google::protobuf::Metadata RunQueryResponse::GetMetadata() const {
  6839. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  6840. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  6841. }
  6842. // ===================================================================
  6843. WriteRequest_LabelsEntry_DoNotUse::WriteRequest_LabelsEntry_DoNotUse() {}
  6844. WriteRequest_LabelsEntry_DoNotUse::WriteRequest_LabelsEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  6845. void WriteRequest_LabelsEntry_DoNotUse::MergeFrom(const WriteRequest_LabelsEntry_DoNotUse& other) {
  6846. MergeFromInternal(other);
  6847. }
  6848. ::google::protobuf::Metadata WriteRequest_LabelsEntry_DoNotUse::GetMetadata() const {
  6849. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  6850. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[15];
  6851. }
  6852. void WriteRequest_LabelsEntry_DoNotUse::MergeFrom(
  6853. const ::google::protobuf::Message& other) {
  6854. ::google::protobuf::Message::MergeFrom(other);
  6855. }
  6856. // ===================================================================
  6857. void WriteRequest::InitAsDefaultInstance() {
  6858. }
  6859. void WriteRequest::clear_writes() {
  6860. writes_.Clear();
  6861. }
  6862. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  6863. const int WriteRequest::kDatabaseFieldNumber;
  6864. const int WriteRequest::kStreamIdFieldNumber;
  6865. const int WriteRequest::kWritesFieldNumber;
  6866. const int WriteRequest::kStreamTokenFieldNumber;
  6867. const int WriteRequest::kLabelsFieldNumber;
  6868. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  6869. WriteRequest::WriteRequest()
  6870. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  6871. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  6872. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsWriteRequest();
  6873. }
  6874. SharedCtor();
  6875. // @@protoc_insertion_point(constructor:google.firestore.v1beta1.WriteRequest)
  6876. }
  6877. WriteRequest::WriteRequest(const WriteRequest& from)
  6878. : ::google::protobuf::Message(),
  6879. _internal_metadata_(NULL),
  6880. writes_(from.writes_),
  6881. _cached_size_(0) {
  6882. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6883. labels_.MergeFrom(from.labels_);
  6884. database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6885. if (from.database().size() > 0) {
  6886. database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  6887. }
  6888. stream_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6889. if (from.stream_id().size() > 0) {
  6890. stream_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stream_id_);
  6891. }
  6892. stream_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6893. if (from.stream_token().size() > 0) {
  6894. stream_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stream_token_);
  6895. }
  6896. // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.WriteRequest)
  6897. }
  6898. void WriteRequest::SharedCtor() {
  6899. database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6900. stream_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6901. stream_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6902. _cached_size_ = 0;
  6903. }
  6904. WriteRequest::~WriteRequest() {
  6905. // @@protoc_insertion_point(destructor:google.firestore.v1beta1.WriteRequest)
  6906. SharedDtor();
  6907. }
  6908. void WriteRequest::SharedDtor() {
  6909. database_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6910. stream_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6911. stream_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6912. }
  6913. void WriteRequest::SetCachedSize(int size) const {
  6914. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  6915. _cached_size_ = size;
  6916. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  6917. }
  6918. const ::google::protobuf::Descriptor* WriteRequest::descriptor() {
  6919. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  6920. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  6921. }
  6922. const WriteRequest& WriteRequest::default_instance() {
  6923. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsWriteRequest();
  6924. return *internal_default_instance();
  6925. }
  6926. WriteRequest* WriteRequest::New(::google::protobuf::Arena* arena) const {
  6927. WriteRequest* n = new WriteRequest;
  6928. if (arena != NULL) {
  6929. arena->Own(n);
  6930. }
  6931. return n;
  6932. }
  6933. void WriteRequest::Clear() {
  6934. // @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.WriteRequest)
  6935. ::google::protobuf::uint32 cached_has_bits = 0;
  6936. // Prevent compiler warnings about cached_has_bits being unused
  6937. (void) cached_has_bits;
  6938. writes_.Clear();
  6939. labels_.Clear();
  6940. database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6941. stream_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6942. stream_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6943. _internal_metadata_.Clear();
  6944. }
  6945. bool WriteRequest::MergePartialFromCodedStream(
  6946. ::google::protobuf::io::CodedInputStream* input) {
  6947. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  6948. ::google::protobuf::uint32 tag;
  6949. // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.WriteRequest)
  6950. for (;;) {
  6951. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  6952. tag = p.first;
  6953. if (!p.second) goto handle_unusual;
  6954. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  6955. // string database = 1;
  6956. case 1: {
  6957. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6958. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  6959. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  6960. input, this->mutable_database()));
  6961. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6962. this->database().data(), static_cast<int>(this->database().length()),
  6963. ::google::protobuf::internal::WireFormatLite::PARSE,
  6964. "google.firestore.v1beta1.WriteRequest.database"));
  6965. } else {
  6966. goto handle_unusual;
  6967. }
  6968. break;
  6969. }
  6970. // string stream_id = 2;
  6971. case 2: {
  6972. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6973. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  6974. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  6975. input, this->mutable_stream_id()));
  6976. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6977. this->stream_id().data(), static_cast<int>(this->stream_id().length()),
  6978. ::google::protobuf::internal::WireFormatLite::PARSE,
  6979. "google.firestore.v1beta1.WriteRequest.stream_id"));
  6980. } else {
  6981. goto handle_unusual;
  6982. }
  6983. break;
  6984. }
  6985. // repeated .google.firestore.v1beta1.Write writes = 3;
  6986. case 3: {
  6987. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6988. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  6989. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_writes()));
  6990. } else {
  6991. goto handle_unusual;
  6992. }
  6993. break;
  6994. }
  6995. // bytes stream_token = 4;
  6996. case 4: {
  6997. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6998. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  6999. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  7000. input, this->mutable_stream_token()));
  7001. } else {
  7002. goto handle_unusual;
  7003. }
  7004. break;
  7005. }
  7006. // map<string, string> labels = 5;
  7007. case 5: {
  7008. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7009. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  7010. WriteRequest_LabelsEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  7011. WriteRequest_LabelsEntry_DoNotUse,
  7012. ::std::string, ::std::string,
  7013. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  7014. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  7015. 0 >,
  7016. ::google::protobuf::Map< ::std::string, ::std::string > > parser(&labels_);
  7017. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  7018. input, &parser));
  7019. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7020. parser.key().data(), static_cast<int>(parser.key().length()),
  7021. ::google::protobuf::internal::WireFormatLite::PARSE,
  7022. "google.firestore.v1beta1.WriteRequest.LabelsEntry.key"));
  7023. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7024. parser.value().data(), static_cast<int>(parser.value().length()),
  7025. ::google::protobuf::internal::WireFormatLite::PARSE,
  7026. "google.firestore.v1beta1.WriteRequest.LabelsEntry.value"));
  7027. } else {
  7028. goto handle_unusual;
  7029. }
  7030. break;
  7031. }
  7032. default: {
  7033. handle_unusual:
  7034. if (tag == 0) {
  7035. goto success;
  7036. }
  7037. DO_(::google::protobuf::internal::WireFormat::SkipField(
  7038. input, tag, _internal_metadata_.mutable_unknown_fields()));
  7039. break;
  7040. }
  7041. }
  7042. }
  7043. success:
  7044. // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.WriteRequest)
  7045. return true;
  7046. failure:
  7047. // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.WriteRequest)
  7048. return false;
  7049. #undef DO_
  7050. }
  7051. void WriteRequest::SerializeWithCachedSizes(
  7052. ::google::protobuf::io::CodedOutputStream* output) const {
  7053. // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.WriteRequest)
  7054. ::google::protobuf::uint32 cached_has_bits = 0;
  7055. (void) cached_has_bits;
  7056. // string database = 1;
  7057. if (this->database().size() > 0) {
  7058. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7059. this->database().data(), static_cast<int>(this->database().length()),
  7060. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7061. "google.firestore.v1beta1.WriteRequest.database");
  7062. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  7063. 1, this->database(), output);
  7064. }
  7065. // string stream_id = 2;
  7066. if (this->stream_id().size() > 0) {
  7067. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7068. this->stream_id().data(), static_cast<int>(this->stream_id().length()),
  7069. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7070. "google.firestore.v1beta1.WriteRequest.stream_id");
  7071. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  7072. 2, this->stream_id(), output);
  7073. }
  7074. // repeated .google.firestore.v1beta1.Write writes = 3;
  7075. for (unsigned int i = 0,
  7076. n = static_cast<unsigned int>(this->writes_size()); i < n; i++) {
  7077. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  7078. 3, this->writes(static_cast<int>(i)), output);
  7079. }
  7080. // bytes stream_token = 4;
  7081. if (this->stream_token().size() > 0) {
  7082. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  7083. 4, this->stream_token(), output);
  7084. }
  7085. // map<string, string> labels = 5;
  7086. if (!this->labels().empty()) {
  7087. typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
  7088. ConstPtr;
  7089. typedef ConstPtr SortItem;
  7090. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  7091. struct Utf8Check {
  7092. static void Check(ConstPtr p) {
  7093. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7094. p->first.data(), static_cast<int>(p->first.length()),
  7095. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7096. "google.firestore.v1beta1.WriteRequest.LabelsEntry.key");
  7097. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7098. p->second.data(), static_cast<int>(p->second.length()),
  7099. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7100. "google.firestore.v1beta1.WriteRequest.LabelsEntry.value");
  7101. }
  7102. };
  7103. if (output->IsSerializationDeterministic() &&
  7104. this->labels().size() > 1) {
  7105. ::google::protobuf::scoped_array<SortItem> items(
  7106. new SortItem[this->labels().size()]);
  7107. typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
  7108. size_type n = 0;
  7109. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  7110. it = this->labels().begin();
  7111. it != this->labels().end(); ++it, ++n) {
  7112. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  7113. }
  7114. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  7115. ::google::protobuf::scoped_ptr<WriteRequest_LabelsEntry_DoNotUse> entry;
  7116. for (size_type i = 0; i < n; i++) {
  7117. entry.reset(labels_.NewEntryWrapper(
  7118. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  7119. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  7120. 5, *entry, output);
  7121. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  7122. }
  7123. } else {
  7124. ::google::protobuf::scoped_ptr<WriteRequest_LabelsEntry_DoNotUse> entry;
  7125. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  7126. it = this->labels().begin();
  7127. it != this->labels().end(); ++it) {
  7128. entry.reset(labels_.NewEntryWrapper(
  7129. it->first, it->second));
  7130. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  7131. 5, *entry, output);
  7132. Utf8Check::Check(&*it);
  7133. }
  7134. }
  7135. }
  7136. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  7137. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  7138. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  7139. }
  7140. // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.WriteRequest)
  7141. }
  7142. ::google::protobuf::uint8* WriteRequest::InternalSerializeWithCachedSizesToArray(
  7143. bool deterministic, ::google::protobuf::uint8* target) const {
  7144. (void)deterministic; // Unused
  7145. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.WriteRequest)
  7146. ::google::protobuf::uint32 cached_has_bits = 0;
  7147. (void) cached_has_bits;
  7148. // string database = 1;
  7149. if (this->database().size() > 0) {
  7150. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7151. this->database().data(), static_cast<int>(this->database().length()),
  7152. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7153. "google.firestore.v1beta1.WriteRequest.database");
  7154. target =
  7155. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  7156. 1, this->database(), target);
  7157. }
  7158. // string stream_id = 2;
  7159. if (this->stream_id().size() > 0) {
  7160. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7161. this->stream_id().data(), static_cast<int>(this->stream_id().length()),
  7162. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7163. "google.firestore.v1beta1.WriteRequest.stream_id");
  7164. target =
  7165. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  7166. 2, this->stream_id(), target);
  7167. }
  7168. // repeated .google.firestore.v1beta1.Write writes = 3;
  7169. for (unsigned int i = 0,
  7170. n = static_cast<unsigned int>(this->writes_size()); i < n; i++) {
  7171. target = ::google::protobuf::internal::WireFormatLite::
  7172. InternalWriteMessageToArray(
  7173. 3, this->writes(static_cast<int>(i)), deterministic, target);
  7174. }
  7175. // bytes stream_token = 4;
  7176. if (this->stream_token().size() > 0) {
  7177. target =
  7178. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  7179. 4, this->stream_token(), target);
  7180. }
  7181. // map<string, string> labels = 5;
  7182. if (!this->labels().empty()) {
  7183. typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
  7184. ConstPtr;
  7185. typedef ConstPtr SortItem;
  7186. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  7187. struct Utf8Check {
  7188. static void Check(ConstPtr p) {
  7189. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7190. p->first.data(), static_cast<int>(p->first.length()),
  7191. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7192. "google.firestore.v1beta1.WriteRequest.LabelsEntry.key");
  7193. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7194. p->second.data(), static_cast<int>(p->second.length()),
  7195. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7196. "google.firestore.v1beta1.WriteRequest.LabelsEntry.value");
  7197. }
  7198. };
  7199. if (deterministic &&
  7200. this->labels().size() > 1) {
  7201. ::google::protobuf::scoped_array<SortItem> items(
  7202. new SortItem[this->labels().size()]);
  7203. typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
  7204. size_type n = 0;
  7205. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  7206. it = this->labels().begin();
  7207. it != this->labels().end(); ++it, ++n) {
  7208. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  7209. }
  7210. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  7211. ::google::protobuf::scoped_ptr<WriteRequest_LabelsEntry_DoNotUse> entry;
  7212. for (size_type i = 0; i < n; i++) {
  7213. entry.reset(labels_.NewEntryWrapper(
  7214. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  7215. target = ::google::protobuf::internal::WireFormatLite::
  7216. InternalWriteMessageNoVirtualToArray(
  7217. 5, *entry, deterministic, target);
  7218. ;
  7219. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  7220. }
  7221. } else {
  7222. ::google::protobuf::scoped_ptr<WriteRequest_LabelsEntry_DoNotUse> entry;
  7223. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  7224. it = this->labels().begin();
  7225. it != this->labels().end(); ++it) {
  7226. entry.reset(labels_.NewEntryWrapper(
  7227. it->first, it->second));
  7228. target = ::google::protobuf::internal::WireFormatLite::
  7229. InternalWriteMessageNoVirtualToArray(
  7230. 5, *entry, deterministic, target);
  7231. ;
  7232. Utf8Check::Check(&*it);
  7233. }
  7234. }
  7235. }
  7236. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  7237. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  7238. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  7239. }
  7240. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.WriteRequest)
  7241. return target;
  7242. }
  7243. size_t WriteRequest::ByteSizeLong() const {
  7244. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.WriteRequest)
  7245. size_t total_size = 0;
  7246. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  7247. total_size +=
  7248. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  7249. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  7250. }
  7251. // repeated .google.firestore.v1beta1.Write writes = 3;
  7252. {
  7253. unsigned int count = static_cast<unsigned int>(this->writes_size());
  7254. total_size += 1UL * count;
  7255. for (unsigned int i = 0; i < count; i++) {
  7256. total_size +=
  7257. ::google::protobuf::internal::WireFormatLite::MessageSize(
  7258. this->writes(static_cast<int>(i)));
  7259. }
  7260. }
  7261. // map<string, string> labels = 5;
  7262. total_size += 1 *
  7263. ::google::protobuf::internal::FromIntSize(this->labels_size());
  7264. {
  7265. ::google::protobuf::scoped_ptr<WriteRequest_LabelsEntry_DoNotUse> entry;
  7266. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  7267. it = this->labels().begin();
  7268. it != this->labels().end(); ++it) {
  7269. entry.reset(labels_.NewEntryWrapper(it->first, it->second));
  7270. total_size += ::google::protobuf::internal::WireFormatLite::
  7271. MessageSizeNoVirtual(*entry);
  7272. }
  7273. }
  7274. // string database = 1;
  7275. if (this->database().size() > 0) {
  7276. total_size += 1 +
  7277. ::google::protobuf::internal::WireFormatLite::StringSize(
  7278. this->database());
  7279. }
  7280. // string stream_id = 2;
  7281. if (this->stream_id().size() > 0) {
  7282. total_size += 1 +
  7283. ::google::protobuf::internal::WireFormatLite::StringSize(
  7284. this->stream_id());
  7285. }
  7286. // bytes stream_token = 4;
  7287. if (this->stream_token().size() > 0) {
  7288. total_size += 1 +
  7289. ::google::protobuf::internal::WireFormatLite::BytesSize(
  7290. this->stream_token());
  7291. }
  7292. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  7293. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  7294. _cached_size_ = cached_size;
  7295. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  7296. return total_size;
  7297. }
  7298. void WriteRequest::MergeFrom(const ::google::protobuf::Message& from) {
  7299. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.WriteRequest)
  7300. GOOGLE_DCHECK_NE(&from, this);
  7301. const WriteRequest* source =
  7302. ::google::protobuf::internal::DynamicCastToGenerated<const WriteRequest>(
  7303. &from);
  7304. if (source == NULL) {
  7305. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.WriteRequest)
  7306. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  7307. } else {
  7308. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.WriteRequest)
  7309. MergeFrom(*source);
  7310. }
  7311. }
  7312. void WriteRequest::MergeFrom(const WriteRequest& from) {
  7313. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.WriteRequest)
  7314. GOOGLE_DCHECK_NE(&from, this);
  7315. _internal_metadata_.MergeFrom(from._internal_metadata_);
  7316. ::google::protobuf::uint32 cached_has_bits = 0;
  7317. (void) cached_has_bits;
  7318. writes_.MergeFrom(from.writes_);
  7319. labels_.MergeFrom(from.labels_);
  7320. if (from.database().size() > 0) {
  7321. database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  7322. }
  7323. if (from.stream_id().size() > 0) {
  7324. stream_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stream_id_);
  7325. }
  7326. if (from.stream_token().size() > 0) {
  7327. stream_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stream_token_);
  7328. }
  7329. }
  7330. void WriteRequest::CopyFrom(const ::google::protobuf::Message& from) {
  7331. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.WriteRequest)
  7332. if (&from == this) return;
  7333. Clear();
  7334. MergeFrom(from);
  7335. }
  7336. void WriteRequest::CopyFrom(const WriteRequest& from) {
  7337. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.WriteRequest)
  7338. if (&from == this) return;
  7339. Clear();
  7340. MergeFrom(from);
  7341. }
  7342. bool WriteRequest::IsInitialized() const {
  7343. return true;
  7344. }
  7345. void WriteRequest::Swap(WriteRequest* other) {
  7346. if (other == this) return;
  7347. InternalSwap(other);
  7348. }
  7349. void WriteRequest::InternalSwap(WriteRequest* other) {
  7350. using std::swap;
  7351. writes_.InternalSwap(&other->writes_);
  7352. labels_.Swap(&other->labels_);
  7353. database_.Swap(&other->database_);
  7354. stream_id_.Swap(&other->stream_id_);
  7355. stream_token_.Swap(&other->stream_token_);
  7356. _internal_metadata_.Swap(&other->_internal_metadata_);
  7357. swap(_cached_size_, other->_cached_size_);
  7358. }
  7359. ::google::protobuf::Metadata WriteRequest::GetMetadata() const {
  7360. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  7361. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  7362. }
  7363. // ===================================================================
  7364. void WriteResponse::InitAsDefaultInstance() {
  7365. ::google::firestore::v1beta1::_WriteResponse_default_instance_._instance.get_mutable()->commit_time_ = const_cast< ::google::protobuf::Timestamp*>(
  7366. ::google::protobuf::Timestamp::internal_default_instance());
  7367. }
  7368. void WriteResponse::clear_write_results() {
  7369. write_results_.Clear();
  7370. }
  7371. void WriteResponse::clear_commit_time() {
  7372. if (GetArenaNoVirtual() == NULL && commit_time_ != NULL) {
  7373. delete commit_time_;
  7374. }
  7375. commit_time_ = NULL;
  7376. }
  7377. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  7378. const int WriteResponse::kStreamIdFieldNumber;
  7379. const int WriteResponse::kStreamTokenFieldNumber;
  7380. const int WriteResponse::kWriteResultsFieldNumber;
  7381. const int WriteResponse::kCommitTimeFieldNumber;
  7382. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  7383. WriteResponse::WriteResponse()
  7384. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  7385. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  7386. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsWriteResponse();
  7387. }
  7388. SharedCtor();
  7389. // @@protoc_insertion_point(constructor:google.firestore.v1beta1.WriteResponse)
  7390. }
  7391. WriteResponse::WriteResponse(const WriteResponse& from)
  7392. : ::google::protobuf::Message(),
  7393. _internal_metadata_(NULL),
  7394. write_results_(from.write_results_),
  7395. _cached_size_(0) {
  7396. _internal_metadata_.MergeFrom(from._internal_metadata_);
  7397. stream_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  7398. if (from.stream_id().size() > 0) {
  7399. stream_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stream_id_);
  7400. }
  7401. stream_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  7402. if (from.stream_token().size() > 0) {
  7403. stream_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stream_token_);
  7404. }
  7405. if (from.has_commit_time()) {
  7406. commit_time_ = new ::google::protobuf::Timestamp(*from.commit_time_);
  7407. } else {
  7408. commit_time_ = NULL;
  7409. }
  7410. // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.WriteResponse)
  7411. }
  7412. void WriteResponse::SharedCtor() {
  7413. stream_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  7414. stream_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  7415. commit_time_ = NULL;
  7416. _cached_size_ = 0;
  7417. }
  7418. WriteResponse::~WriteResponse() {
  7419. // @@protoc_insertion_point(destructor:google.firestore.v1beta1.WriteResponse)
  7420. SharedDtor();
  7421. }
  7422. void WriteResponse::SharedDtor() {
  7423. stream_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  7424. stream_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  7425. if (this != internal_default_instance()) delete commit_time_;
  7426. }
  7427. void WriteResponse::SetCachedSize(int size) const {
  7428. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  7429. _cached_size_ = size;
  7430. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  7431. }
  7432. const ::google::protobuf::Descriptor* WriteResponse::descriptor() {
  7433. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  7434. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  7435. }
  7436. const WriteResponse& WriteResponse::default_instance() {
  7437. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsWriteResponse();
  7438. return *internal_default_instance();
  7439. }
  7440. WriteResponse* WriteResponse::New(::google::protobuf::Arena* arena) const {
  7441. WriteResponse* n = new WriteResponse;
  7442. if (arena != NULL) {
  7443. arena->Own(n);
  7444. }
  7445. return n;
  7446. }
  7447. void WriteResponse::Clear() {
  7448. // @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.WriteResponse)
  7449. ::google::protobuf::uint32 cached_has_bits = 0;
  7450. // Prevent compiler warnings about cached_has_bits being unused
  7451. (void) cached_has_bits;
  7452. write_results_.Clear();
  7453. stream_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  7454. stream_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  7455. if (GetArenaNoVirtual() == NULL && commit_time_ != NULL) {
  7456. delete commit_time_;
  7457. }
  7458. commit_time_ = NULL;
  7459. _internal_metadata_.Clear();
  7460. }
  7461. bool WriteResponse::MergePartialFromCodedStream(
  7462. ::google::protobuf::io::CodedInputStream* input) {
  7463. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  7464. ::google::protobuf::uint32 tag;
  7465. // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.WriteResponse)
  7466. for (;;) {
  7467. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  7468. tag = p.first;
  7469. if (!p.second) goto handle_unusual;
  7470. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  7471. // string stream_id = 1;
  7472. case 1: {
  7473. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7474. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  7475. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  7476. input, this->mutable_stream_id()));
  7477. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7478. this->stream_id().data(), static_cast<int>(this->stream_id().length()),
  7479. ::google::protobuf::internal::WireFormatLite::PARSE,
  7480. "google.firestore.v1beta1.WriteResponse.stream_id"));
  7481. } else {
  7482. goto handle_unusual;
  7483. }
  7484. break;
  7485. }
  7486. // bytes stream_token = 2;
  7487. case 2: {
  7488. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7489. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  7490. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  7491. input, this->mutable_stream_token()));
  7492. } else {
  7493. goto handle_unusual;
  7494. }
  7495. break;
  7496. }
  7497. // repeated .google.firestore.v1beta1.WriteResult write_results = 3;
  7498. case 3: {
  7499. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7500. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  7501. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_write_results()));
  7502. } else {
  7503. goto handle_unusual;
  7504. }
  7505. break;
  7506. }
  7507. // .google.protobuf.Timestamp commit_time = 4;
  7508. case 4: {
  7509. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7510. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  7511. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  7512. input, mutable_commit_time()));
  7513. } else {
  7514. goto handle_unusual;
  7515. }
  7516. break;
  7517. }
  7518. default: {
  7519. handle_unusual:
  7520. if (tag == 0) {
  7521. goto success;
  7522. }
  7523. DO_(::google::protobuf::internal::WireFormat::SkipField(
  7524. input, tag, _internal_metadata_.mutable_unknown_fields()));
  7525. break;
  7526. }
  7527. }
  7528. }
  7529. success:
  7530. // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.WriteResponse)
  7531. return true;
  7532. failure:
  7533. // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.WriteResponse)
  7534. return false;
  7535. #undef DO_
  7536. }
  7537. void WriteResponse::SerializeWithCachedSizes(
  7538. ::google::protobuf::io::CodedOutputStream* output) const {
  7539. // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.WriteResponse)
  7540. ::google::protobuf::uint32 cached_has_bits = 0;
  7541. (void) cached_has_bits;
  7542. // string stream_id = 1;
  7543. if (this->stream_id().size() > 0) {
  7544. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7545. this->stream_id().data(), static_cast<int>(this->stream_id().length()),
  7546. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7547. "google.firestore.v1beta1.WriteResponse.stream_id");
  7548. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  7549. 1, this->stream_id(), output);
  7550. }
  7551. // bytes stream_token = 2;
  7552. if (this->stream_token().size() > 0) {
  7553. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  7554. 2, this->stream_token(), output);
  7555. }
  7556. // repeated .google.firestore.v1beta1.WriteResult write_results = 3;
  7557. for (unsigned int i = 0,
  7558. n = static_cast<unsigned int>(this->write_results_size()); i < n; i++) {
  7559. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  7560. 3, this->write_results(static_cast<int>(i)), output);
  7561. }
  7562. // .google.protobuf.Timestamp commit_time = 4;
  7563. if (this->has_commit_time()) {
  7564. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  7565. 4, *this->commit_time_, output);
  7566. }
  7567. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  7568. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  7569. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  7570. }
  7571. // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.WriteResponse)
  7572. }
  7573. ::google::protobuf::uint8* WriteResponse::InternalSerializeWithCachedSizesToArray(
  7574. bool deterministic, ::google::protobuf::uint8* target) const {
  7575. (void)deterministic; // Unused
  7576. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.WriteResponse)
  7577. ::google::protobuf::uint32 cached_has_bits = 0;
  7578. (void) cached_has_bits;
  7579. // string stream_id = 1;
  7580. if (this->stream_id().size() > 0) {
  7581. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7582. this->stream_id().data(), static_cast<int>(this->stream_id().length()),
  7583. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7584. "google.firestore.v1beta1.WriteResponse.stream_id");
  7585. target =
  7586. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  7587. 1, this->stream_id(), target);
  7588. }
  7589. // bytes stream_token = 2;
  7590. if (this->stream_token().size() > 0) {
  7591. target =
  7592. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  7593. 2, this->stream_token(), target);
  7594. }
  7595. // repeated .google.firestore.v1beta1.WriteResult write_results = 3;
  7596. for (unsigned int i = 0,
  7597. n = static_cast<unsigned int>(this->write_results_size()); i < n; i++) {
  7598. target = ::google::protobuf::internal::WireFormatLite::
  7599. InternalWriteMessageToArray(
  7600. 3, this->write_results(static_cast<int>(i)), deterministic, target);
  7601. }
  7602. // .google.protobuf.Timestamp commit_time = 4;
  7603. if (this->has_commit_time()) {
  7604. target = ::google::protobuf::internal::WireFormatLite::
  7605. InternalWriteMessageToArray(
  7606. 4, *this->commit_time_, deterministic, target);
  7607. }
  7608. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  7609. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  7610. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  7611. }
  7612. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.WriteResponse)
  7613. return target;
  7614. }
  7615. size_t WriteResponse::ByteSizeLong() const {
  7616. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.WriteResponse)
  7617. size_t total_size = 0;
  7618. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  7619. total_size +=
  7620. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  7621. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  7622. }
  7623. // repeated .google.firestore.v1beta1.WriteResult write_results = 3;
  7624. {
  7625. unsigned int count = static_cast<unsigned int>(this->write_results_size());
  7626. total_size += 1UL * count;
  7627. for (unsigned int i = 0; i < count; i++) {
  7628. total_size +=
  7629. ::google::protobuf::internal::WireFormatLite::MessageSize(
  7630. this->write_results(static_cast<int>(i)));
  7631. }
  7632. }
  7633. // string stream_id = 1;
  7634. if (this->stream_id().size() > 0) {
  7635. total_size += 1 +
  7636. ::google::protobuf::internal::WireFormatLite::StringSize(
  7637. this->stream_id());
  7638. }
  7639. // bytes stream_token = 2;
  7640. if (this->stream_token().size() > 0) {
  7641. total_size += 1 +
  7642. ::google::protobuf::internal::WireFormatLite::BytesSize(
  7643. this->stream_token());
  7644. }
  7645. // .google.protobuf.Timestamp commit_time = 4;
  7646. if (this->has_commit_time()) {
  7647. total_size += 1 +
  7648. ::google::protobuf::internal::WireFormatLite::MessageSize(
  7649. *this->commit_time_);
  7650. }
  7651. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  7652. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  7653. _cached_size_ = cached_size;
  7654. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  7655. return total_size;
  7656. }
  7657. void WriteResponse::MergeFrom(const ::google::protobuf::Message& from) {
  7658. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.WriteResponse)
  7659. GOOGLE_DCHECK_NE(&from, this);
  7660. const WriteResponse* source =
  7661. ::google::protobuf::internal::DynamicCastToGenerated<const WriteResponse>(
  7662. &from);
  7663. if (source == NULL) {
  7664. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.WriteResponse)
  7665. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  7666. } else {
  7667. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.WriteResponse)
  7668. MergeFrom(*source);
  7669. }
  7670. }
  7671. void WriteResponse::MergeFrom(const WriteResponse& from) {
  7672. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.WriteResponse)
  7673. GOOGLE_DCHECK_NE(&from, this);
  7674. _internal_metadata_.MergeFrom(from._internal_metadata_);
  7675. ::google::protobuf::uint32 cached_has_bits = 0;
  7676. (void) cached_has_bits;
  7677. write_results_.MergeFrom(from.write_results_);
  7678. if (from.stream_id().size() > 0) {
  7679. stream_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stream_id_);
  7680. }
  7681. if (from.stream_token().size() > 0) {
  7682. stream_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stream_token_);
  7683. }
  7684. if (from.has_commit_time()) {
  7685. mutable_commit_time()->::google::protobuf::Timestamp::MergeFrom(from.commit_time());
  7686. }
  7687. }
  7688. void WriteResponse::CopyFrom(const ::google::protobuf::Message& from) {
  7689. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.WriteResponse)
  7690. if (&from == this) return;
  7691. Clear();
  7692. MergeFrom(from);
  7693. }
  7694. void WriteResponse::CopyFrom(const WriteResponse& from) {
  7695. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.WriteResponse)
  7696. if (&from == this) return;
  7697. Clear();
  7698. MergeFrom(from);
  7699. }
  7700. bool WriteResponse::IsInitialized() const {
  7701. return true;
  7702. }
  7703. void WriteResponse::Swap(WriteResponse* other) {
  7704. if (other == this) return;
  7705. InternalSwap(other);
  7706. }
  7707. void WriteResponse::InternalSwap(WriteResponse* other) {
  7708. using std::swap;
  7709. write_results_.InternalSwap(&other->write_results_);
  7710. stream_id_.Swap(&other->stream_id_);
  7711. stream_token_.Swap(&other->stream_token_);
  7712. swap(commit_time_, other->commit_time_);
  7713. _internal_metadata_.Swap(&other->_internal_metadata_);
  7714. swap(_cached_size_, other->_cached_size_);
  7715. }
  7716. ::google::protobuf::Metadata WriteResponse::GetMetadata() const {
  7717. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  7718. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  7719. }
  7720. // ===================================================================
  7721. ListenRequest_LabelsEntry_DoNotUse::ListenRequest_LabelsEntry_DoNotUse() {}
  7722. ListenRequest_LabelsEntry_DoNotUse::ListenRequest_LabelsEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  7723. void ListenRequest_LabelsEntry_DoNotUse::MergeFrom(const ListenRequest_LabelsEntry_DoNotUse& other) {
  7724. MergeFromInternal(other);
  7725. }
  7726. ::google::protobuf::Metadata ListenRequest_LabelsEntry_DoNotUse::GetMetadata() const {
  7727. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  7728. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[18];
  7729. }
  7730. void ListenRequest_LabelsEntry_DoNotUse::MergeFrom(
  7731. const ::google::protobuf::Message& other) {
  7732. ::google::protobuf::Message::MergeFrom(other);
  7733. }
  7734. // ===================================================================
  7735. void ListenRequest::InitAsDefaultInstance() {
  7736. ::google::firestore::v1beta1::_ListenRequest_default_instance_.add_target_ = const_cast< ::google::firestore::v1beta1::Target*>(
  7737. ::google::firestore::v1beta1::Target::internal_default_instance());
  7738. ::google::firestore::v1beta1::_ListenRequest_default_instance_.remove_target_ = 0;
  7739. }
  7740. void ListenRequest::set_allocated_add_target(::google::firestore::v1beta1::Target* add_target) {
  7741. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  7742. clear_target_change();
  7743. if (add_target) {
  7744. ::google::protobuf::Arena* submessage_arena = NULL;
  7745. if (message_arena != submessage_arena) {
  7746. add_target = ::google::protobuf::internal::GetOwnedMessage(
  7747. message_arena, add_target, submessage_arena);
  7748. }
  7749. set_has_add_target();
  7750. target_change_.add_target_ = add_target;
  7751. }
  7752. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListenRequest.add_target)
  7753. }
  7754. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  7755. const int ListenRequest::kDatabaseFieldNumber;
  7756. const int ListenRequest::kAddTargetFieldNumber;
  7757. const int ListenRequest::kRemoveTargetFieldNumber;
  7758. const int ListenRequest::kLabelsFieldNumber;
  7759. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  7760. ListenRequest::ListenRequest()
  7761. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  7762. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  7763. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListenRequest();
  7764. }
  7765. SharedCtor();
  7766. // @@protoc_insertion_point(constructor:google.firestore.v1beta1.ListenRequest)
  7767. }
  7768. ListenRequest::ListenRequest(const ListenRequest& from)
  7769. : ::google::protobuf::Message(),
  7770. _internal_metadata_(NULL),
  7771. _cached_size_(0) {
  7772. _internal_metadata_.MergeFrom(from._internal_metadata_);
  7773. labels_.MergeFrom(from.labels_);
  7774. database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  7775. if (from.database().size() > 0) {
  7776. database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  7777. }
  7778. clear_has_target_change();
  7779. switch (from.target_change_case()) {
  7780. case kAddTarget: {
  7781. mutable_add_target()->::google::firestore::v1beta1::Target::MergeFrom(from.add_target());
  7782. break;
  7783. }
  7784. case kRemoveTarget: {
  7785. set_remove_target(from.remove_target());
  7786. break;
  7787. }
  7788. case TARGET_CHANGE_NOT_SET: {
  7789. break;
  7790. }
  7791. }
  7792. // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.ListenRequest)
  7793. }
  7794. void ListenRequest::SharedCtor() {
  7795. database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  7796. clear_has_target_change();
  7797. _cached_size_ = 0;
  7798. }
  7799. ListenRequest::~ListenRequest() {
  7800. // @@protoc_insertion_point(destructor:google.firestore.v1beta1.ListenRequest)
  7801. SharedDtor();
  7802. }
  7803. void ListenRequest::SharedDtor() {
  7804. database_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  7805. if (has_target_change()) {
  7806. clear_target_change();
  7807. }
  7808. }
  7809. void ListenRequest::SetCachedSize(int size) const {
  7810. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  7811. _cached_size_ = size;
  7812. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  7813. }
  7814. const ::google::protobuf::Descriptor* ListenRequest::descriptor() {
  7815. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  7816. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  7817. }
  7818. const ListenRequest& ListenRequest::default_instance() {
  7819. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListenRequest();
  7820. return *internal_default_instance();
  7821. }
  7822. ListenRequest* ListenRequest::New(::google::protobuf::Arena* arena) const {
  7823. ListenRequest* n = new ListenRequest;
  7824. if (arena != NULL) {
  7825. arena->Own(n);
  7826. }
  7827. return n;
  7828. }
  7829. void ListenRequest::clear_target_change() {
  7830. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.ListenRequest)
  7831. switch (target_change_case()) {
  7832. case kAddTarget: {
  7833. delete target_change_.add_target_;
  7834. break;
  7835. }
  7836. case kRemoveTarget: {
  7837. // No need to clear
  7838. break;
  7839. }
  7840. case TARGET_CHANGE_NOT_SET: {
  7841. break;
  7842. }
  7843. }
  7844. _oneof_case_[0] = TARGET_CHANGE_NOT_SET;
  7845. }
  7846. void ListenRequest::Clear() {
  7847. // @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.ListenRequest)
  7848. ::google::protobuf::uint32 cached_has_bits = 0;
  7849. // Prevent compiler warnings about cached_has_bits being unused
  7850. (void) cached_has_bits;
  7851. labels_.Clear();
  7852. database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  7853. clear_target_change();
  7854. _internal_metadata_.Clear();
  7855. }
  7856. bool ListenRequest::MergePartialFromCodedStream(
  7857. ::google::protobuf::io::CodedInputStream* input) {
  7858. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  7859. ::google::protobuf::uint32 tag;
  7860. // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.ListenRequest)
  7861. for (;;) {
  7862. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  7863. tag = p.first;
  7864. if (!p.second) goto handle_unusual;
  7865. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  7866. // string database = 1;
  7867. case 1: {
  7868. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7869. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  7870. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  7871. input, this->mutable_database()));
  7872. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7873. this->database().data(), static_cast<int>(this->database().length()),
  7874. ::google::protobuf::internal::WireFormatLite::PARSE,
  7875. "google.firestore.v1beta1.ListenRequest.database"));
  7876. } else {
  7877. goto handle_unusual;
  7878. }
  7879. break;
  7880. }
  7881. // .google.firestore.v1beta1.Target add_target = 2;
  7882. case 2: {
  7883. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7884. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  7885. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  7886. input, mutable_add_target()));
  7887. } else {
  7888. goto handle_unusual;
  7889. }
  7890. break;
  7891. }
  7892. // int32 remove_target = 3;
  7893. case 3: {
  7894. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7895. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  7896. clear_target_change();
  7897. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  7898. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  7899. input, &target_change_.remove_target_)));
  7900. set_has_remove_target();
  7901. } else {
  7902. goto handle_unusual;
  7903. }
  7904. break;
  7905. }
  7906. // map<string, string> labels = 4;
  7907. case 4: {
  7908. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7909. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  7910. ListenRequest_LabelsEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  7911. ListenRequest_LabelsEntry_DoNotUse,
  7912. ::std::string, ::std::string,
  7913. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  7914. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  7915. 0 >,
  7916. ::google::protobuf::Map< ::std::string, ::std::string > > parser(&labels_);
  7917. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  7918. input, &parser));
  7919. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7920. parser.key().data(), static_cast<int>(parser.key().length()),
  7921. ::google::protobuf::internal::WireFormatLite::PARSE,
  7922. "google.firestore.v1beta1.ListenRequest.LabelsEntry.key"));
  7923. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7924. parser.value().data(), static_cast<int>(parser.value().length()),
  7925. ::google::protobuf::internal::WireFormatLite::PARSE,
  7926. "google.firestore.v1beta1.ListenRequest.LabelsEntry.value"));
  7927. } else {
  7928. goto handle_unusual;
  7929. }
  7930. break;
  7931. }
  7932. default: {
  7933. handle_unusual:
  7934. if (tag == 0) {
  7935. goto success;
  7936. }
  7937. DO_(::google::protobuf::internal::WireFormat::SkipField(
  7938. input, tag, _internal_metadata_.mutable_unknown_fields()));
  7939. break;
  7940. }
  7941. }
  7942. }
  7943. success:
  7944. // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.ListenRequest)
  7945. return true;
  7946. failure:
  7947. // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.ListenRequest)
  7948. return false;
  7949. #undef DO_
  7950. }
  7951. void ListenRequest::SerializeWithCachedSizes(
  7952. ::google::protobuf::io::CodedOutputStream* output) const {
  7953. // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.ListenRequest)
  7954. ::google::protobuf::uint32 cached_has_bits = 0;
  7955. (void) cached_has_bits;
  7956. // string database = 1;
  7957. if (this->database().size() > 0) {
  7958. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7959. this->database().data(), static_cast<int>(this->database().length()),
  7960. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7961. "google.firestore.v1beta1.ListenRequest.database");
  7962. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  7963. 1, this->database(), output);
  7964. }
  7965. // .google.firestore.v1beta1.Target add_target = 2;
  7966. if (has_add_target()) {
  7967. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  7968. 2, *target_change_.add_target_, output);
  7969. }
  7970. // int32 remove_target = 3;
  7971. if (has_remove_target()) {
  7972. ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->remove_target(), output);
  7973. }
  7974. // map<string, string> labels = 4;
  7975. if (!this->labels().empty()) {
  7976. typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
  7977. ConstPtr;
  7978. typedef ConstPtr SortItem;
  7979. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  7980. struct Utf8Check {
  7981. static void Check(ConstPtr p) {
  7982. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7983. p->first.data(), static_cast<int>(p->first.length()),
  7984. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7985. "google.firestore.v1beta1.ListenRequest.LabelsEntry.key");
  7986. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7987. p->second.data(), static_cast<int>(p->second.length()),
  7988. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7989. "google.firestore.v1beta1.ListenRequest.LabelsEntry.value");
  7990. }
  7991. };
  7992. if (output->IsSerializationDeterministic() &&
  7993. this->labels().size() > 1) {
  7994. ::google::protobuf::scoped_array<SortItem> items(
  7995. new SortItem[this->labels().size()]);
  7996. typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
  7997. size_type n = 0;
  7998. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  7999. it = this->labels().begin();
  8000. it != this->labels().end(); ++it, ++n) {
  8001. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  8002. }
  8003. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  8004. ::google::protobuf::scoped_ptr<ListenRequest_LabelsEntry_DoNotUse> entry;
  8005. for (size_type i = 0; i < n; i++) {
  8006. entry.reset(labels_.NewEntryWrapper(
  8007. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  8008. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  8009. 4, *entry, output);
  8010. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  8011. }
  8012. } else {
  8013. ::google::protobuf::scoped_ptr<ListenRequest_LabelsEntry_DoNotUse> entry;
  8014. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  8015. it = this->labels().begin();
  8016. it != this->labels().end(); ++it) {
  8017. entry.reset(labels_.NewEntryWrapper(
  8018. it->first, it->second));
  8019. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  8020. 4, *entry, output);
  8021. Utf8Check::Check(&*it);
  8022. }
  8023. }
  8024. }
  8025. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  8026. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  8027. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  8028. }
  8029. // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.ListenRequest)
  8030. }
  8031. ::google::protobuf::uint8* ListenRequest::InternalSerializeWithCachedSizesToArray(
  8032. bool deterministic, ::google::protobuf::uint8* target) const {
  8033. (void)deterministic; // Unused
  8034. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.ListenRequest)
  8035. ::google::protobuf::uint32 cached_has_bits = 0;
  8036. (void) cached_has_bits;
  8037. // string database = 1;
  8038. if (this->database().size() > 0) {
  8039. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  8040. this->database().data(), static_cast<int>(this->database().length()),
  8041. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  8042. "google.firestore.v1beta1.ListenRequest.database");
  8043. target =
  8044. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  8045. 1, this->database(), target);
  8046. }
  8047. // .google.firestore.v1beta1.Target add_target = 2;
  8048. if (has_add_target()) {
  8049. target = ::google::protobuf::internal::WireFormatLite::
  8050. InternalWriteMessageToArray(
  8051. 2, *target_change_.add_target_, deterministic, target);
  8052. }
  8053. // int32 remove_target = 3;
  8054. if (has_remove_target()) {
  8055. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->remove_target(), target);
  8056. }
  8057. // map<string, string> labels = 4;
  8058. if (!this->labels().empty()) {
  8059. typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
  8060. ConstPtr;
  8061. typedef ConstPtr SortItem;
  8062. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  8063. struct Utf8Check {
  8064. static void Check(ConstPtr p) {
  8065. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  8066. p->first.data(), static_cast<int>(p->first.length()),
  8067. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  8068. "google.firestore.v1beta1.ListenRequest.LabelsEntry.key");
  8069. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  8070. p->second.data(), static_cast<int>(p->second.length()),
  8071. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  8072. "google.firestore.v1beta1.ListenRequest.LabelsEntry.value");
  8073. }
  8074. };
  8075. if (deterministic &&
  8076. this->labels().size() > 1) {
  8077. ::google::protobuf::scoped_array<SortItem> items(
  8078. new SortItem[this->labels().size()]);
  8079. typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
  8080. size_type n = 0;
  8081. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  8082. it = this->labels().begin();
  8083. it != this->labels().end(); ++it, ++n) {
  8084. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  8085. }
  8086. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  8087. ::google::protobuf::scoped_ptr<ListenRequest_LabelsEntry_DoNotUse> entry;
  8088. for (size_type i = 0; i < n; i++) {
  8089. entry.reset(labels_.NewEntryWrapper(
  8090. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  8091. target = ::google::protobuf::internal::WireFormatLite::
  8092. InternalWriteMessageNoVirtualToArray(
  8093. 4, *entry, deterministic, target);
  8094. ;
  8095. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  8096. }
  8097. } else {
  8098. ::google::protobuf::scoped_ptr<ListenRequest_LabelsEntry_DoNotUse> entry;
  8099. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  8100. it = this->labels().begin();
  8101. it != this->labels().end(); ++it) {
  8102. entry.reset(labels_.NewEntryWrapper(
  8103. it->first, it->second));
  8104. target = ::google::protobuf::internal::WireFormatLite::
  8105. InternalWriteMessageNoVirtualToArray(
  8106. 4, *entry, deterministic, target);
  8107. ;
  8108. Utf8Check::Check(&*it);
  8109. }
  8110. }
  8111. }
  8112. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  8113. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  8114. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  8115. }
  8116. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.ListenRequest)
  8117. return target;
  8118. }
  8119. size_t ListenRequest::ByteSizeLong() const {
  8120. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.ListenRequest)
  8121. size_t total_size = 0;
  8122. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  8123. total_size +=
  8124. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  8125. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  8126. }
  8127. // map<string, string> labels = 4;
  8128. total_size += 1 *
  8129. ::google::protobuf::internal::FromIntSize(this->labels_size());
  8130. {
  8131. ::google::protobuf::scoped_ptr<ListenRequest_LabelsEntry_DoNotUse> entry;
  8132. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  8133. it = this->labels().begin();
  8134. it != this->labels().end(); ++it) {
  8135. entry.reset(labels_.NewEntryWrapper(it->first, it->second));
  8136. total_size += ::google::protobuf::internal::WireFormatLite::
  8137. MessageSizeNoVirtual(*entry);
  8138. }
  8139. }
  8140. // string database = 1;
  8141. if (this->database().size() > 0) {
  8142. total_size += 1 +
  8143. ::google::protobuf::internal::WireFormatLite::StringSize(
  8144. this->database());
  8145. }
  8146. switch (target_change_case()) {
  8147. // .google.firestore.v1beta1.Target add_target = 2;
  8148. case kAddTarget: {
  8149. total_size += 1 +
  8150. ::google::protobuf::internal::WireFormatLite::MessageSize(
  8151. *target_change_.add_target_);
  8152. break;
  8153. }
  8154. // int32 remove_target = 3;
  8155. case kRemoveTarget: {
  8156. total_size += 1 +
  8157. ::google::protobuf::internal::WireFormatLite::Int32Size(
  8158. this->remove_target());
  8159. break;
  8160. }
  8161. case TARGET_CHANGE_NOT_SET: {
  8162. break;
  8163. }
  8164. }
  8165. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  8166. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  8167. _cached_size_ = cached_size;
  8168. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  8169. return total_size;
  8170. }
  8171. void ListenRequest::MergeFrom(const ::google::protobuf::Message& from) {
  8172. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.ListenRequest)
  8173. GOOGLE_DCHECK_NE(&from, this);
  8174. const ListenRequest* source =
  8175. ::google::protobuf::internal::DynamicCastToGenerated<const ListenRequest>(
  8176. &from);
  8177. if (source == NULL) {
  8178. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.ListenRequest)
  8179. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  8180. } else {
  8181. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.ListenRequest)
  8182. MergeFrom(*source);
  8183. }
  8184. }
  8185. void ListenRequest::MergeFrom(const ListenRequest& from) {
  8186. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.ListenRequest)
  8187. GOOGLE_DCHECK_NE(&from, this);
  8188. _internal_metadata_.MergeFrom(from._internal_metadata_);
  8189. ::google::protobuf::uint32 cached_has_bits = 0;
  8190. (void) cached_has_bits;
  8191. labels_.MergeFrom(from.labels_);
  8192. if (from.database().size() > 0) {
  8193. database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  8194. }
  8195. switch (from.target_change_case()) {
  8196. case kAddTarget: {
  8197. mutable_add_target()->::google::firestore::v1beta1::Target::MergeFrom(from.add_target());
  8198. break;
  8199. }
  8200. case kRemoveTarget: {
  8201. set_remove_target(from.remove_target());
  8202. break;
  8203. }
  8204. case TARGET_CHANGE_NOT_SET: {
  8205. break;
  8206. }
  8207. }
  8208. }
  8209. void ListenRequest::CopyFrom(const ::google::protobuf::Message& from) {
  8210. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.ListenRequest)
  8211. if (&from == this) return;
  8212. Clear();
  8213. MergeFrom(from);
  8214. }
  8215. void ListenRequest::CopyFrom(const ListenRequest& from) {
  8216. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.ListenRequest)
  8217. if (&from == this) return;
  8218. Clear();
  8219. MergeFrom(from);
  8220. }
  8221. bool ListenRequest::IsInitialized() const {
  8222. return true;
  8223. }
  8224. void ListenRequest::Swap(ListenRequest* other) {
  8225. if (other == this) return;
  8226. InternalSwap(other);
  8227. }
  8228. void ListenRequest::InternalSwap(ListenRequest* other) {
  8229. using std::swap;
  8230. labels_.Swap(&other->labels_);
  8231. database_.Swap(&other->database_);
  8232. swap(target_change_, other->target_change_);
  8233. swap(_oneof_case_[0], other->_oneof_case_[0]);
  8234. _internal_metadata_.Swap(&other->_internal_metadata_);
  8235. swap(_cached_size_, other->_cached_size_);
  8236. }
  8237. ::google::protobuf::Metadata ListenRequest::GetMetadata() const {
  8238. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  8239. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  8240. }
  8241. // ===================================================================
  8242. void ListenResponse::InitAsDefaultInstance() {
  8243. ::google::firestore::v1beta1::_ListenResponse_default_instance_.target_change_ = const_cast< ::google::firestore::v1beta1::TargetChange*>(
  8244. ::google::firestore::v1beta1::TargetChange::internal_default_instance());
  8245. ::google::firestore::v1beta1::_ListenResponse_default_instance_.document_change_ = const_cast< ::google::firestore::v1beta1::DocumentChange*>(
  8246. ::google::firestore::v1beta1::DocumentChange::internal_default_instance());
  8247. ::google::firestore::v1beta1::_ListenResponse_default_instance_.document_delete_ = const_cast< ::google::firestore::v1beta1::DocumentDelete*>(
  8248. ::google::firestore::v1beta1::DocumentDelete::internal_default_instance());
  8249. ::google::firestore::v1beta1::_ListenResponse_default_instance_.document_remove_ = const_cast< ::google::firestore::v1beta1::DocumentRemove*>(
  8250. ::google::firestore::v1beta1::DocumentRemove::internal_default_instance());
  8251. ::google::firestore::v1beta1::_ListenResponse_default_instance_.filter_ = const_cast< ::google::firestore::v1beta1::ExistenceFilter*>(
  8252. ::google::firestore::v1beta1::ExistenceFilter::internal_default_instance());
  8253. }
  8254. void ListenResponse::set_allocated_target_change(::google::firestore::v1beta1::TargetChange* target_change) {
  8255. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  8256. clear_response_type();
  8257. if (target_change) {
  8258. ::google::protobuf::Arena* submessage_arena = NULL;
  8259. if (message_arena != submessage_arena) {
  8260. target_change = ::google::protobuf::internal::GetOwnedMessage(
  8261. message_arena, target_change, submessage_arena);
  8262. }
  8263. set_has_target_change();
  8264. response_type_.target_change_ = target_change;
  8265. }
  8266. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListenResponse.target_change)
  8267. }
  8268. void ListenResponse::set_allocated_document_change(::google::firestore::v1beta1::DocumentChange* document_change) {
  8269. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  8270. clear_response_type();
  8271. if (document_change) {
  8272. ::google::protobuf::Arena* submessage_arena = NULL;
  8273. if (message_arena != submessage_arena) {
  8274. document_change = ::google::protobuf::internal::GetOwnedMessage(
  8275. message_arena, document_change, submessage_arena);
  8276. }
  8277. set_has_document_change();
  8278. response_type_.document_change_ = document_change;
  8279. }
  8280. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListenResponse.document_change)
  8281. }
  8282. void ListenResponse::clear_document_change() {
  8283. if (has_document_change()) {
  8284. delete response_type_.document_change_;
  8285. clear_has_response_type();
  8286. }
  8287. }
  8288. void ListenResponse::set_allocated_document_delete(::google::firestore::v1beta1::DocumentDelete* document_delete) {
  8289. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  8290. clear_response_type();
  8291. if (document_delete) {
  8292. ::google::protobuf::Arena* submessage_arena = NULL;
  8293. if (message_arena != submessage_arena) {
  8294. document_delete = ::google::protobuf::internal::GetOwnedMessage(
  8295. message_arena, document_delete, submessage_arena);
  8296. }
  8297. set_has_document_delete();
  8298. response_type_.document_delete_ = document_delete;
  8299. }
  8300. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListenResponse.document_delete)
  8301. }
  8302. void ListenResponse::clear_document_delete() {
  8303. if (has_document_delete()) {
  8304. delete response_type_.document_delete_;
  8305. clear_has_response_type();
  8306. }
  8307. }
  8308. void ListenResponse::set_allocated_document_remove(::google::firestore::v1beta1::DocumentRemove* document_remove) {
  8309. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  8310. clear_response_type();
  8311. if (document_remove) {
  8312. ::google::protobuf::Arena* submessage_arena = NULL;
  8313. if (message_arena != submessage_arena) {
  8314. document_remove = ::google::protobuf::internal::GetOwnedMessage(
  8315. message_arena, document_remove, submessage_arena);
  8316. }
  8317. set_has_document_remove();
  8318. response_type_.document_remove_ = document_remove;
  8319. }
  8320. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListenResponse.document_remove)
  8321. }
  8322. void ListenResponse::clear_document_remove() {
  8323. if (has_document_remove()) {
  8324. delete response_type_.document_remove_;
  8325. clear_has_response_type();
  8326. }
  8327. }
  8328. void ListenResponse::set_allocated_filter(::google::firestore::v1beta1::ExistenceFilter* filter) {
  8329. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  8330. clear_response_type();
  8331. if (filter) {
  8332. ::google::protobuf::Arena* submessage_arena = NULL;
  8333. if (message_arena != submessage_arena) {
  8334. filter = ::google::protobuf::internal::GetOwnedMessage(
  8335. message_arena, filter, submessage_arena);
  8336. }
  8337. set_has_filter();
  8338. response_type_.filter_ = filter;
  8339. }
  8340. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListenResponse.filter)
  8341. }
  8342. void ListenResponse::clear_filter() {
  8343. if (has_filter()) {
  8344. delete response_type_.filter_;
  8345. clear_has_response_type();
  8346. }
  8347. }
  8348. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  8349. const int ListenResponse::kTargetChangeFieldNumber;
  8350. const int ListenResponse::kDocumentChangeFieldNumber;
  8351. const int ListenResponse::kDocumentDeleteFieldNumber;
  8352. const int ListenResponse::kDocumentRemoveFieldNumber;
  8353. const int ListenResponse::kFilterFieldNumber;
  8354. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  8355. ListenResponse::ListenResponse()
  8356. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  8357. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  8358. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListenResponse();
  8359. }
  8360. SharedCtor();
  8361. // @@protoc_insertion_point(constructor:google.firestore.v1beta1.ListenResponse)
  8362. }
  8363. ListenResponse::ListenResponse(const ListenResponse& from)
  8364. : ::google::protobuf::Message(),
  8365. _internal_metadata_(NULL),
  8366. _cached_size_(0) {
  8367. _internal_metadata_.MergeFrom(from._internal_metadata_);
  8368. clear_has_response_type();
  8369. switch (from.response_type_case()) {
  8370. case kTargetChange: {
  8371. mutable_target_change()->::google::firestore::v1beta1::TargetChange::MergeFrom(from.target_change());
  8372. break;
  8373. }
  8374. case kDocumentChange: {
  8375. mutable_document_change()->::google::firestore::v1beta1::DocumentChange::MergeFrom(from.document_change());
  8376. break;
  8377. }
  8378. case kDocumentDelete: {
  8379. mutable_document_delete()->::google::firestore::v1beta1::DocumentDelete::MergeFrom(from.document_delete());
  8380. break;
  8381. }
  8382. case kDocumentRemove: {
  8383. mutable_document_remove()->::google::firestore::v1beta1::DocumentRemove::MergeFrom(from.document_remove());
  8384. break;
  8385. }
  8386. case kFilter: {
  8387. mutable_filter()->::google::firestore::v1beta1::ExistenceFilter::MergeFrom(from.filter());
  8388. break;
  8389. }
  8390. case RESPONSE_TYPE_NOT_SET: {
  8391. break;
  8392. }
  8393. }
  8394. // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.ListenResponse)
  8395. }
  8396. void ListenResponse::SharedCtor() {
  8397. clear_has_response_type();
  8398. _cached_size_ = 0;
  8399. }
  8400. ListenResponse::~ListenResponse() {
  8401. // @@protoc_insertion_point(destructor:google.firestore.v1beta1.ListenResponse)
  8402. SharedDtor();
  8403. }
  8404. void ListenResponse::SharedDtor() {
  8405. if (has_response_type()) {
  8406. clear_response_type();
  8407. }
  8408. }
  8409. void ListenResponse::SetCachedSize(int size) const {
  8410. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  8411. _cached_size_ = size;
  8412. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  8413. }
  8414. const ::google::protobuf::Descriptor* ListenResponse::descriptor() {
  8415. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  8416. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  8417. }
  8418. const ListenResponse& ListenResponse::default_instance() {
  8419. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListenResponse();
  8420. return *internal_default_instance();
  8421. }
  8422. ListenResponse* ListenResponse::New(::google::protobuf::Arena* arena) const {
  8423. ListenResponse* n = new ListenResponse;
  8424. if (arena != NULL) {
  8425. arena->Own(n);
  8426. }
  8427. return n;
  8428. }
  8429. void ListenResponse::clear_response_type() {
  8430. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.ListenResponse)
  8431. switch (response_type_case()) {
  8432. case kTargetChange: {
  8433. delete response_type_.target_change_;
  8434. break;
  8435. }
  8436. case kDocumentChange: {
  8437. delete response_type_.document_change_;
  8438. break;
  8439. }
  8440. case kDocumentDelete: {
  8441. delete response_type_.document_delete_;
  8442. break;
  8443. }
  8444. case kDocumentRemove: {
  8445. delete response_type_.document_remove_;
  8446. break;
  8447. }
  8448. case kFilter: {
  8449. delete response_type_.filter_;
  8450. break;
  8451. }
  8452. case RESPONSE_TYPE_NOT_SET: {
  8453. break;
  8454. }
  8455. }
  8456. _oneof_case_[0] = RESPONSE_TYPE_NOT_SET;
  8457. }
  8458. void ListenResponse::Clear() {
  8459. // @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.ListenResponse)
  8460. ::google::protobuf::uint32 cached_has_bits = 0;
  8461. // Prevent compiler warnings about cached_has_bits being unused
  8462. (void) cached_has_bits;
  8463. clear_response_type();
  8464. _internal_metadata_.Clear();
  8465. }
  8466. bool ListenResponse::MergePartialFromCodedStream(
  8467. ::google::protobuf::io::CodedInputStream* input) {
  8468. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  8469. ::google::protobuf::uint32 tag;
  8470. // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.ListenResponse)
  8471. for (;;) {
  8472. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  8473. tag = p.first;
  8474. if (!p.second) goto handle_unusual;
  8475. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  8476. // .google.firestore.v1beta1.TargetChange target_change = 2;
  8477. case 2: {
  8478. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8479. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  8480. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  8481. input, mutable_target_change()));
  8482. } else {
  8483. goto handle_unusual;
  8484. }
  8485. break;
  8486. }
  8487. // .google.firestore.v1beta1.DocumentChange document_change = 3;
  8488. case 3: {
  8489. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8490. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  8491. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  8492. input, mutable_document_change()));
  8493. } else {
  8494. goto handle_unusual;
  8495. }
  8496. break;
  8497. }
  8498. // .google.firestore.v1beta1.DocumentDelete document_delete = 4;
  8499. case 4: {
  8500. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8501. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  8502. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  8503. input, mutable_document_delete()));
  8504. } else {
  8505. goto handle_unusual;
  8506. }
  8507. break;
  8508. }
  8509. // .google.firestore.v1beta1.ExistenceFilter filter = 5;
  8510. case 5: {
  8511. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8512. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  8513. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  8514. input, mutable_filter()));
  8515. } else {
  8516. goto handle_unusual;
  8517. }
  8518. break;
  8519. }
  8520. // .google.firestore.v1beta1.DocumentRemove document_remove = 6;
  8521. case 6: {
  8522. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8523. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  8524. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  8525. input, mutable_document_remove()));
  8526. } else {
  8527. goto handle_unusual;
  8528. }
  8529. break;
  8530. }
  8531. default: {
  8532. handle_unusual:
  8533. if (tag == 0) {
  8534. goto success;
  8535. }
  8536. DO_(::google::protobuf::internal::WireFormat::SkipField(
  8537. input, tag, _internal_metadata_.mutable_unknown_fields()));
  8538. break;
  8539. }
  8540. }
  8541. }
  8542. success:
  8543. // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.ListenResponse)
  8544. return true;
  8545. failure:
  8546. // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.ListenResponse)
  8547. return false;
  8548. #undef DO_
  8549. }
  8550. void ListenResponse::SerializeWithCachedSizes(
  8551. ::google::protobuf::io::CodedOutputStream* output) const {
  8552. // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.ListenResponse)
  8553. ::google::protobuf::uint32 cached_has_bits = 0;
  8554. (void) cached_has_bits;
  8555. // .google.firestore.v1beta1.TargetChange target_change = 2;
  8556. if (has_target_change()) {
  8557. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  8558. 2, *response_type_.target_change_, output);
  8559. }
  8560. // .google.firestore.v1beta1.DocumentChange document_change = 3;
  8561. if (has_document_change()) {
  8562. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  8563. 3, *response_type_.document_change_, output);
  8564. }
  8565. // .google.firestore.v1beta1.DocumentDelete document_delete = 4;
  8566. if (has_document_delete()) {
  8567. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  8568. 4, *response_type_.document_delete_, output);
  8569. }
  8570. // .google.firestore.v1beta1.ExistenceFilter filter = 5;
  8571. if (has_filter()) {
  8572. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  8573. 5, *response_type_.filter_, output);
  8574. }
  8575. // .google.firestore.v1beta1.DocumentRemove document_remove = 6;
  8576. if (has_document_remove()) {
  8577. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  8578. 6, *response_type_.document_remove_, output);
  8579. }
  8580. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  8581. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  8582. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  8583. }
  8584. // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.ListenResponse)
  8585. }
  8586. ::google::protobuf::uint8* ListenResponse::InternalSerializeWithCachedSizesToArray(
  8587. bool deterministic, ::google::protobuf::uint8* target) const {
  8588. (void)deterministic; // Unused
  8589. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.ListenResponse)
  8590. ::google::protobuf::uint32 cached_has_bits = 0;
  8591. (void) cached_has_bits;
  8592. // .google.firestore.v1beta1.TargetChange target_change = 2;
  8593. if (has_target_change()) {
  8594. target = ::google::protobuf::internal::WireFormatLite::
  8595. InternalWriteMessageToArray(
  8596. 2, *response_type_.target_change_, deterministic, target);
  8597. }
  8598. // .google.firestore.v1beta1.DocumentChange document_change = 3;
  8599. if (has_document_change()) {
  8600. target = ::google::protobuf::internal::WireFormatLite::
  8601. InternalWriteMessageToArray(
  8602. 3, *response_type_.document_change_, deterministic, target);
  8603. }
  8604. // .google.firestore.v1beta1.DocumentDelete document_delete = 4;
  8605. if (has_document_delete()) {
  8606. target = ::google::protobuf::internal::WireFormatLite::
  8607. InternalWriteMessageToArray(
  8608. 4, *response_type_.document_delete_, deterministic, target);
  8609. }
  8610. // .google.firestore.v1beta1.ExistenceFilter filter = 5;
  8611. if (has_filter()) {
  8612. target = ::google::protobuf::internal::WireFormatLite::
  8613. InternalWriteMessageToArray(
  8614. 5, *response_type_.filter_, deterministic, target);
  8615. }
  8616. // .google.firestore.v1beta1.DocumentRemove document_remove = 6;
  8617. if (has_document_remove()) {
  8618. target = ::google::protobuf::internal::WireFormatLite::
  8619. InternalWriteMessageToArray(
  8620. 6, *response_type_.document_remove_, deterministic, target);
  8621. }
  8622. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  8623. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  8624. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  8625. }
  8626. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.ListenResponse)
  8627. return target;
  8628. }
  8629. size_t ListenResponse::ByteSizeLong() const {
  8630. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.ListenResponse)
  8631. size_t total_size = 0;
  8632. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  8633. total_size +=
  8634. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  8635. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  8636. }
  8637. switch (response_type_case()) {
  8638. // .google.firestore.v1beta1.TargetChange target_change = 2;
  8639. case kTargetChange: {
  8640. total_size += 1 +
  8641. ::google::protobuf::internal::WireFormatLite::MessageSize(
  8642. *response_type_.target_change_);
  8643. break;
  8644. }
  8645. // .google.firestore.v1beta1.DocumentChange document_change = 3;
  8646. case kDocumentChange: {
  8647. total_size += 1 +
  8648. ::google::protobuf::internal::WireFormatLite::MessageSize(
  8649. *response_type_.document_change_);
  8650. break;
  8651. }
  8652. // .google.firestore.v1beta1.DocumentDelete document_delete = 4;
  8653. case kDocumentDelete: {
  8654. total_size += 1 +
  8655. ::google::protobuf::internal::WireFormatLite::MessageSize(
  8656. *response_type_.document_delete_);
  8657. break;
  8658. }
  8659. // .google.firestore.v1beta1.DocumentRemove document_remove = 6;
  8660. case kDocumentRemove: {
  8661. total_size += 1 +
  8662. ::google::protobuf::internal::WireFormatLite::MessageSize(
  8663. *response_type_.document_remove_);
  8664. break;
  8665. }
  8666. // .google.firestore.v1beta1.ExistenceFilter filter = 5;
  8667. case kFilter: {
  8668. total_size += 1 +
  8669. ::google::protobuf::internal::WireFormatLite::MessageSize(
  8670. *response_type_.filter_);
  8671. break;
  8672. }
  8673. case RESPONSE_TYPE_NOT_SET: {
  8674. break;
  8675. }
  8676. }
  8677. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  8678. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  8679. _cached_size_ = cached_size;
  8680. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  8681. return total_size;
  8682. }
  8683. void ListenResponse::MergeFrom(const ::google::protobuf::Message& from) {
  8684. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.ListenResponse)
  8685. GOOGLE_DCHECK_NE(&from, this);
  8686. const ListenResponse* source =
  8687. ::google::protobuf::internal::DynamicCastToGenerated<const ListenResponse>(
  8688. &from);
  8689. if (source == NULL) {
  8690. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.ListenResponse)
  8691. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  8692. } else {
  8693. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.ListenResponse)
  8694. MergeFrom(*source);
  8695. }
  8696. }
  8697. void ListenResponse::MergeFrom(const ListenResponse& from) {
  8698. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.ListenResponse)
  8699. GOOGLE_DCHECK_NE(&from, this);
  8700. _internal_metadata_.MergeFrom(from._internal_metadata_);
  8701. ::google::protobuf::uint32 cached_has_bits = 0;
  8702. (void) cached_has_bits;
  8703. switch (from.response_type_case()) {
  8704. case kTargetChange: {
  8705. mutable_target_change()->::google::firestore::v1beta1::TargetChange::MergeFrom(from.target_change());
  8706. break;
  8707. }
  8708. case kDocumentChange: {
  8709. mutable_document_change()->::google::firestore::v1beta1::DocumentChange::MergeFrom(from.document_change());
  8710. break;
  8711. }
  8712. case kDocumentDelete: {
  8713. mutable_document_delete()->::google::firestore::v1beta1::DocumentDelete::MergeFrom(from.document_delete());
  8714. break;
  8715. }
  8716. case kDocumentRemove: {
  8717. mutable_document_remove()->::google::firestore::v1beta1::DocumentRemove::MergeFrom(from.document_remove());
  8718. break;
  8719. }
  8720. case kFilter: {
  8721. mutable_filter()->::google::firestore::v1beta1::ExistenceFilter::MergeFrom(from.filter());
  8722. break;
  8723. }
  8724. case RESPONSE_TYPE_NOT_SET: {
  8725. break;
  8726. }
  8727. }
  8728. }
  8729. void ListenResponse::CopyFrom(const ::google::protobuf::Message& from) {
  8730. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.ListenResponse)
  8731. if (&from == this) return;
  8732. Clear();
  8733. MergeFrom(from);
  8734. }
  8735. void ListenResponse::CopyFrom(const ListenResponse& from) {
  8736. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.ListenResponse)
  8737. if (&from == this) return;
  8738. Clear();
  8739. MergeFrom(from);
  8740. }
  8741. bool ListenResponse::IsInitialized() const {
  8742. return true;
  8743. }
  8744. void ListenResponse::Swap(ListenResponse* other) {
  8745. if (other == this) return;
  8746. InternalSwap(other);
  8747. }
  8748. void ListenResponse::InternalSwap(ListenResponse* other) {
  8749. using std::swap;
  8750. swap(response_type_, other->response_type_);
  8751. swap(_oneof_case_[0], other->_oneof_case_[0]);
  8752. _internal_metadata_.Swap(&other->_internal_metadata_);
  8753. swap(_cached_size_, other->_cached_size_);
  8754. }
  8755. ::google::protobuf::Metadata ListenResponse::GetMetadata() const {
  8756. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  8757. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  8758. }
  8759. // ===================================================================
  8760. void Target_DocumentsTarget::InitAsDefaultInstance() {
  8761. }
  8762. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  8763. const int Target_DocumentsTarget::kDocumentsFieldNumber;
  8764. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  8765. Target_DocumentsTarget::Target_DocumentsTarget()
  8766. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  8767. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  8768. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget_DocumentsTarget();
  8769. }
  8770. SharedCtor();
  8771. // @@protoc_insertion_point(constructor:google.firestore.v1beta1.Target.DocumentsTarget)
  8772. }
  8773. Target_DocumentsTarget::Target_DocumentsTarget(const Target_DocumentsTarget& from)
  8774. : ::google::protobuf::Message(),
  8775. _internal_metadata_(NULL),
  8776. documents_(from.documents_),
  8777. _cached_size_(0) {
  8778. _internal_metadata_.MergeFrom(from._internal_metadata_);
  8779. // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.Target.DocumentsTarget)
  8780. }
  8781. void Target_DocumentsTarget::SharedCtor() {
  8782. _cached_size_ = 0;
  8783. }
  8784. Target_DocumentsTarget::~Target_DocumentsTarget() {
  8785. // @@protoc_insertion_point(destructor:google.firestore.v1beta1.Target.DocumentsTarget)
  8786. SharedDtor();
  8787. }
  8788. void Target_DocumentsTarget::SharedDtor() {
  8789. }
  8790. void Target_DocumentsTarget::SetCachedSize(int size) const {
  8791. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  8792. _cached_size_ = size;
  8793. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  8794. }
  8795. const ::google::protobuf::Descriptor* Target_DocumentsTarget::descriptor() {
  8796. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  8797. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  8798. }
  8799. const Target_DocumentsTarget& Target_DocumentsTarget::default_instance() {
  8800. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget_DocumentsTarget();
  8801. return *internal_default_instance();
  8802. }
  8803. Target_DocumentsTarget* Target_DocumentsTarget::New(::google::protobuf::Arena* arena) const {
  8804. Target_DocumentsTarget* n = new Target_DocumentsTarget;
  8805. if (arena != NULL) {
  8806. arena->Own(n);
  8807. }
  8808. return n;
  8809. }
  8810. void Target_DocumentsTarget::Clear() {
  8811. // @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.Target.DocumentsTarget)
  8812. ::google::protobuf::uint32 cached_has_bits = 0;
  8813. // Prevent compiler warnings about cached_has_bits being unused
  8814. (void) cached_has_bits;
  8815. documents_.Clear();
  8816. _internal_metadata_.Clear();
  8817. }
  8818. bool Target_DocumentsTarget::MergePartialFromCodedStream(
  8819. ::google::protobuf::io::CodedInputStream* input) {
  8820. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  8821. ::google::protobuf::uint32 tag;
  8822. // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.Target.DocumentsTarget)
  8823. for (;;) {
  8824. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  8825. tag = p.first;
  8826. if (!p.second) goto handle_unusual;
  8827. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  8828. // repeated string documents = 2;
  8829. case 2: {
  8830. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8831. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  8832. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  8833. input, this->add_documents()));
  8834. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  8835. this->documents(this->documents_size() - 1).data(),
  8836. static_cast<int>(this->documents(this->documents_size() - 1).length()),
  8837. ::google::protobuf::internal::WireFormatLite::PARSE,
  8838. "google.firestore.v1beta1.Target.DocumentsTarget.documents"));
  8839. } else {
  8840. goto handle_unusual;
  8841. }
  8842. break;
  8843. }
  8844. default: {
  8845. handle_unusual:
  8846. if (tag == 0) {
  8847. goto success;
  8848. }
  8849. DO_(::google::protobuf::internal::WireFormat::SkipField(
  8850. input, tag, _internal_metadata_.mutable_unknown_fields()));
  8851. break;
  8852. }
  8853. }
  8854. }
  8855. success:
  8856. // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.Target.DocumentsTarget)
  8857. return true;
  8858. failure:
  8859. // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.Target.DocumentsTarget)
  8860. return false;
  8861. #undef DO_
  8862. }
  8863. void Target_DocumentsTarget::SerializeWithCachedSizes(
  8864. ::google::protobuf::io::CodedOutputStream* output) const {
  8865. // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.Target.DocumentsTarget)
  8866. ::google::protobuf::uint32 cached_has_bits = 0;
  8867. (void) cached_has_bits;
  8868. // repeated string documents = 2;
  8869. for (int i = 0, n = this->documents_size(); i < n; i++) {
  8870. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  8871. this->documents(i).data(), static_cast<int>(this->documents(i).length()),
  8872. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  8873. "google.firestore.v1beta1.Target.DocumentsTarget.documents");
  8874. ::google::protobuf::internal::WireFormatLite::WriteString(
  8875. 2, this->documents(i), output);
  8876. }
  8877. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  8878. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  8879. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  8880. }
  8881. // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.Target.DocumentsTarget)
  8882. }
  8883. ::google::protobuf::uint8* Target_DocumentsTarget::InternalSerializeWithCachedSizesToArray(
  8884. bool deterministic, ::google::protobuf::uint8* target) const {
  8885. (void)deterministic; // Unused
  8886. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.Target.DocumentsTarget)
  8887. ::google::protobuf::uint32 cached_has_bits = 0;
  8888. (void) cached_has_bits;
  8889. // repeated string documents = 2;
  8890. for (int i = 0, n = this->documents_size(); i < n; i++) {
  8891. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  8892. this->documents(i).data(), static_cast<int>(this->documents(i).length()),
  8893. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  8894. "google.firestore.v1beta1.Target.DocumentsTarget.documents");
  8895. target = ::google::protobuf::internal::WireFormatLite::
  8896. WriteStringToArray(2, this->documents(i), target);
  8897. }
  8898. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  8899. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  8900. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  8901. }
  8902. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.Target.DocumentsTarget)
  8903. return target;
  8904. }
  8905. size_t Target_DocumentsTarget::ByteSizeLong() const {
  8906. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.Target.DocumentsTarget)
  8907. size_t total_size = 0;
  8908. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  8909. total_size +=
  8910. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  8911. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  8912. }
  8913. // repeated string documents = 2;
  8914. total_size += 1 *
  8915. ::google::protobuf::internal::FromIntSize(this->documents_size());
  8916. for (int i = 0, n = this->documents_size(); i < n; i++) {
  8917. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  8918. this->documents(i));
  8919. }
  8920. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  8921. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  8922. _cached_size_ = cached_size;
  8923. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  8924. return total_size;
  8925. }
  8926. void Target_DocumentsTarget::MergeFrom(const ::google::protobuf::Message& from) {
  8927. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.Target.DocumentsTarget)
  8928. GOOGLE_DCHECK_NE(&from, this);
  8929. const Target_DocumentsTarget* source =
  8930. ::google::protobuf::internal::DynamicCastToGenerated<const Target_DocumentsTarget>(
  8931. &from);
  8932. if (source == NULL) {
  8933. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.Target.DocumentsTarget)
  8934. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  8935. } else {
  8936. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.Target.DocumentsTarget)
  8937. MergeFrom(*source);
  8938. }
  8939. }
  8940. void Target_DocumentsTarget::MergeFrom(const Target_DocumentsTarget& from) {
  8941. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.Target.DocumentsTarget)
  8942. GOOGLE_DCHECK_NE(&from, this);
  8943. _internal_metadata_.MergeFrom(from._internal_metadata_);
  8944. ::google::protobuf::uint32 cached_has_bits = 0;
  8945. (void) cached_has_bits;
  8946. documents_.MergeFrom(from.documents_);
  8947. }
  8948. void Target_DocumentsTarget::CopyFrom(const ::google::protobuf::Message& from) {
  8949. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.Target.DocumentsTarget)
  8950. if (&from == this) return;
  8951. Clear();
  8952. MergeFrom(from);
  8953. }
  8954. void Target_DocumentsTarget::CopyFrom(const Target_DocumentsTarget& from) {
  8955. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.Target.DocumentsTarget)
  8956. if (&from == this) return;
  8957. Clear();
  8958. MergeFrom(from);
  8959. }
  8960. bool Target_DocumentsTarget::IsInitialized() const {
  8961. return true;
  8962. }
  8963. void Target_DocumentsTarget::Swap(Target_DocumentsTarget* other) {
  8964. if (other == this) return;
  8965. InternalSwap(other);
  8966. }
  8967. void Target_DocumentsTarget::InternalSwap(Target_DocumentsTarget* other) {
  8968. using std::swap;
  8969. documents_.InternalSwap(&other->documents_);
  8970. _internal_metadata_.Swap(&other->_internal_metadata_);
  8971. swap(_cached_size_, other->_cached_size_);
  8972. }
  8973. ::google::protobuf::Metadata Target_DocumentsTarget::GetMetadata() const {
  8974. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  8975. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  8976. }
  8977. // ===================================================================
  8978. void Target_QueryTarget::InitAsDefaultInstance() {
  8979. ::google::firestore::v1beta1::_Target_QueryTarget_default_instance_.structured_query_ = const_cast< ::google::firestore::v1beta1::StructuredQuery*>(
  8980. ::google::firestore::v1beta1::StructuredQuery::internal_default_instance());
  8981. }
  8982. void Target_QueryTarget::set_allocated_structured_query(::google::firestore::v1beta1::StructuredQuery* structured_query) {
  8983. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  8984. clear_query_type();
  8985. if (structured_query) {
  8986. ::google::protobuf::Arena* submessage_arena = NULL;
  8987. if (message_arena != submessage_arena) {
  8988. structured_query = ::google::protobuf::internal::GetOwnedMessage(
  8989. message_arena, structured_query, submessage_arena);
  8990. }
  8991. set_has_structured_query();
  8992. query_type_.structured_query_ = structured_query;
  8993. }
  8994. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Target.QueryTarget.structured_query)
  8995. }
  8996. void Target_QueryTarget::clear_structured_query() {
  8997. if (has_structured_query()) {
  8998. delete query_type_.structured_query_;
  8999. clear_has_query_type();
  9000. }
  9001. }
  9002. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  9003. const int Target_QueryTarget::kParentFieldNumber;
  9004. const int Target_QueryTarget::kStructuredQueryFieldNumber;
  9005. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  9006. Target_QueryTarget::Target_QueryTarget()
  9007. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  9008. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  9009. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget_QueryTarget();
  9010. }
  9011. SharedCtor();
  9012. // @@protoc_insertion_point(constructor:google.firestore.v1beta1.Target.QueryTarget)
  9013. }
  9014. Target_QueryTarget::Target_QueryTarget(const Target_QueryTarget& from)
  9015. : ::google::protobuf::Message(),
  9016. _internal_metadata_(NULL),
  9017. _cached_size_(0) {
  9018. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9019. parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  9020. if (from.parent().size() > 0) {
  9021. parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  9022. }
  9023. clear_has_query_type();
  9024. switch (from.query_type_case()) {
  9025. case kStructuredQuery: {
  9026. mutable_structured_query()->::google::firestore::v1beta1::StructuredQuery::MergeFrom(from.structured_query());
  9027. break;
  9028. }
  9029. case QUERY_TYPE_NOT_SET: {
  9030. break;
  9031. }
  9032. }
  9033. // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.Target.QueryTarget)
  9034. }
  9035. void Target_QueryTarget::SharedCtor() {
  9036. parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  9037. clear_has_query_type();
  9038. _cached_size_ = 0;
  9039. }
  9040. Target_QueryTarget::~Target_QueryTarget() {
  9041. // @@protoc_insertion_point(destructor:google.firestore.v1beta1.Target.QueryTarget)
  9042. SharedDtor();
  9043. }
  9044. void Target_QueryTarget::SharedDtor() {
  9045. parent_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  9046. if (has_query_type()) {
  9047. clear_query_type();
  9048. }
  9049. }
  9050. void Target_QueryTarget::SetCachedSize(int size) const {
  9051. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  9052. _cached_size_ = size;
  9053. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  9054. }
  9055. const ::google::protobuf::Descriptor* Target_QueryTarget::descriptor() {
  9056. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  9057. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  9058. }
  9059. const Target_QueryTarget& Target_QueryTarget::default_instance() {
  9060. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget_QueryTarget();
  9061. return *internal_default_instance();
  9062. }
  9063. Target_QueryTarget* Target_QueryTarget::New(::google::protobuf::Arena* arena) const {
  9064. Target_QueryTarget* n = new Target_QueryTarget;
  9065. if (arena != NULL) {
  9066. arena->Own(n);
  9067. }
  9068. return n;
  9069. }
  9070. void Target_QueryTarget::clear_query_type() {
  9071. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.Target.QueryTarget)
  9072. switch (query_type_case()) {
  9073. case kStructuredQuery: {
  9074. delete query_type_.structured_query_;
  9075. break;
  9076. }
  9077. case QUERY_TYPE_NOT_SET: {
  9078. break;
  9079. }
  9080. }
  9081. _oneof_case_[0] = QUERY_TYPE_NOT_SET;
  9082. }
  9083. void Target_QueryTarget::Clear() {
  9084. // @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.Target.QueryTarget)
  9085. ::google::protobuf::uint32 cached_has_bits = 0;
  9086. // Prevent compiler warnings about cached_has_bits being unused
  9087. (void) cached_has_bits;
  9088. parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  9089. clear_query_type();
  9090. _internal_metadata_.Clear();
  9091. }
  9092. bool Target_QueryTarget::MergePartialFromCodedStream(
  9093. ::google::protobuf::io::CodedInputStream* input) {
  9094. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  9095. ::google::protobuf::uint32 tag;
  9096. // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.Target.QueryTarget)
  9097. for (;;) {
  9098. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  9099. tag = p.first;
  9100. if (!p.second) goto handle_unusual;
  9101. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  9102. // string parent = 1;
  9103. case 1: {
  9104. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9105. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  9106. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  9107. input, this->mutable_parent()));
  9108. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  9109. this->parent().data(), static_cast<int>(this->parent().length()),
  9110. ::google::protobuf::internal::WireFormatLite::PARSE,
  9111. "google.firestore.v1beta1.Target.QueryTarget.parent"));
  9112. } else {
  9113. goto handle_unusual;
  9114. }
  9115. break;
  9116. }
  9117. // .google.firestore.v1beta1.StructuredQuery structured_query = 2;
  9118. case 2: {
  9119. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9120. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  9121. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  9122. input, mutable_structured_query()));
  9123. } else {
  9124. goto handle_unusual;
  9125. }
  9126. break;
  9127. }
  9128. default: {
  9129. handle_unusual:
  9130. if (tag == 0) {
  9131. goto success;
  9132. }
  9133. DO_(::google::protobuf::internal::WireFormat::SkipField(
  9134. input, tag, _internal_metadata_.mutable_unknown_fields()));
  9135. break;
  9136. }
  9137. }
  9138. }
  9139. success:
  9140. // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.Target.QueryTarget)
  9141. return true;
  9142. failure:
  9143. // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.Target.QueryTarget)
  9144. return false;
  9145. #undef DO_
  9146. }
  9147. void Target_QueryTarget::SerializeWithCachedSizes(
  9148. ::google::protobuf::io::CodedOutputStream* output) const {
  9149. // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.Target.QueryTarget)
  9150. ::google::protobuf::uint32 cached_has_bits = 0;
  9151. (void) cached_has_bits;
  9152. // string parent = 1;
  9153. if (this->parent().size() > 0) {
  9154. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  9155. this->parent().data(), static_cast<int>(this->parent().length()),
  9156. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  9157. "google.firestore.v1beta1.Target.QueryTarget.parent");
  9158. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  9159. 1, this->parent(), output);
  9160. }
  9161. // .google.firestore.v1beta1.StructuredQuery structured_query = 2;
  9162. if (has_structured_query()) {
  9163. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  9164. 2, *query_type_.structured_query_, output);
  9165. }
  9166. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  9167. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  9168. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  9169. }
  9170. // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.Target.QueryTarget)
  9171. }
  9172. ::google::protobuf::uint8* Target_QueryTarget::InternalSerializeWithCachedSizesToArray(
  9173. bool deterministic, ::google::protobuf::uint8* target) const {
  9174. (void)deterministic; // Unused
  9175. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.Target.QueryTarget)
  9176. ::google::protobuf::uint32 cached_has_bits = 0;
  9177. (void) cached_has_bits;
  9178. // string parent = 1;
  9179. if (this->parent().size() > 0) {
  9180. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  9181. this->parent().data(), static_cast<int>(this->parent().length()),
  9182. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  9183. "google.firestore.v1beta1.Target.QueryTarget.parent");
  9184. target =
  9185. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  9186. 1, this->parent(), target);
  9187. }
  9188. // .google.firestore.v1beta1.StructuredQuery structured_query = 2;
  9189. if (has_structured_query()) {
  9190. target = ::google::protobuf::internal::WireFormatLite::
  9191. InternalWriteMessageToArray(
  9192. 2, *query_type_.structured_query_, deterministic, target);
  9193. }
  9194. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  9195. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  9196. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  9197. }
  9198. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.Target.QueryTarget)
  9199. return target;
  9200. }
  9201. size_t Target_QueryTarget::ByteSizeLong() const {
  9202. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.Target.QueryTarget)
  9203. size_t total_size = 0;
  9204. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  9205. total_size +=
  9206. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  9207. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  9208. }
  9209. // string parent = 1;
  9210. if (this->parent().size() > 0) {
  9211. total_size += 1 +
  9212. ::google::protobuf::internal::WireFormatLite::StringSize(
  9213. this->parent());
  9214. }
  9215. switch (query_type_case()) {
  9216. // .google.firestore.v1beta1.StructuredQuery structured_query = 2;
  9217. case kStructuredQuery: {
  9218. total_size += 1 +
  9219. ::google::protobuf::internal::WireFormatLite::MessageSize(
  9220. *query_type_.structured_query_);
  9221. break;
  9222. }
  9223. case QUERY_TYPE_NOT_SET: {
  9224. break;
  9225. }
  9226. }
  9227. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  9228. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  9229. _cached_size_ = cached_size;
  9230. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  9231. return total_size;
  9232. }
  9233. void Target_QueryTarget::MergeFrom(const ::google::protobuf::Message& from) {
  9234. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.Target.QueryTarget)
  9235. GOOGLE_DCHECK_NE(&from, this);
  9236. const Target_QueryTarget* source =
  9237. ::google::protobuf::internal::DynamicCastToGenerated<const Target_QueryTarget>(
  9238. &from);
  9239. if (source == NULL) {
  9240. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.Target.QueryTarget)
  9241. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  9242. } else {
  9243. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.Target.QueryTarget)
  9244. MergeFrom(*source);
  9245. }
  9246. }
  9247. void Target_QueryTarget::MergeFrom(const Target_QueryTarget& from) {
  9248. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.Target.QueryTarget)
  9249. GOOGLE_DCHECK_NE(&from, this);
  9250. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9251. ::google::protobuf::uint32 cached_has_bits = 0;
  9252. (void) cached_has_bits;
  9253. if (from.parent().size() > 0) {
  9254. parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  9255. }
  9256. switch (from.query_type_case()) {
  9257. case kStructuredQuery: {
  9258. mutable_structured_query()->::google::firestore::v1beta1::StructuredQuery::MergeFrom(from.structured_query());
  9259. break;
  9260. }
  9261. case QUERY_TYPE_NOT_SET: {
  9262. break;
  9263. }
  9264. }
  9265. }
  9266. void Target_QueryTarget::CopyFrom(const ::google::protobuf::Message& from) {
  9267. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.Target.QueryTarget)
  9268. if (&from == this) return;
  9269. Clear();
  9270. MergeFrom(from);
  9271. }
  9272. void Target_QueryTarget::CopyFrom(const Target_QueryTarget& from) {
  9273. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.Target.QueryTarget)
  9274. if (&from == this) return;
  9275. Clear();
  9276. MergeFrom(from);
  9277. }
  9278. bool Target_QueryTarget::IsInitialized() const {
  9279. return true;
  9280. }
  9281. void Target_QueryTarget::Swap(Target_QueryTarget* other) {
  9282. if (other == this) return;
  9283. InternalSwap(other);
  9284. }
  9285. void Target_QueryTarget::InternalSwap(Target_QueryTarget* other) {
  9286. using std::swap;
  9287. parent_.Swap(&other->parent_);
  9288. swap(query_type_, other->query_type_);
  9289. swap(_oneof_case_[0], other->_oneof_case_[0]);
  9290. _internal_metadata_.Swap(&other->_internal_metadata_);
  9291. swap(_cached_size_, other->_cached_size_);
  9292. }
  9293. ::google::protobuf::Metadata Target_QueryTarget::GetMetadata() const {
  9294. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  9295. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  9296. }
  9297. // ===================================================================
  9298. void Target::InitAsDefaultInstance() {
  9299. ::google::firestore::v1beta1::_Target_default_instance_.query_ = const_cast< ::google::firestore::v1beta1::Target_QueryTarget*>(
  9300. ::google::firestore::v1beta1::Target_QueryTarget::internal_default_instance());
  9301. ::google::firestore::v1beta1::_Target_default_instance_.documents_ = const_cast< ::google::firestore::v1beta1::Target_DocumentsTarget*>(
  9302. ::google::firestore::v1beta1::Target_DocumentsTarget::internal_default_instance());
  9303. ::google::firestore::v1beta1::_Target_default_instance_.resume_token_.UnsafeSetDefault(
  9304. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  9305. ::google::firestore::v1beta1::_Target_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>(
  9306. ::google::protobuf::Timestamp::internal_default_instance());
  9307. }
  9308. void Target::set_allocated_query(::google::firestore::v1beta1::Target_QueryTarget* query) {
  9309. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  9310. clear_target_type();
  9311. if (query) {
  9312. ::google::protobuf::Arena* submessage_arena = NULL;
  9313. if (message_arena != submessage_arena) {
  9314. query = ::google::protobuf::internal::GetOwnedMessage(
  9315. message_arena, query, submessage_arena);
  9316. }
  9317. set_has_query();
  9318. target_type_.query_ = query;
  9319. }
  9320. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Target.query)
  9321. }
  9322. void Target::set_allocated_documents(::google::firestore::v1beta1::Target_DocumentsTarget* documents) {
  9323. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  9324. clear_target_type();
  9325. if (documents) {
  9326. ::google::protobuf::Arena* submessage_arena = NULL;
  9327. if (message_arena != submessage_arena) {
  9328. documents = ::google::protobuf::internal::GetOwnedMessage(
  9329. message_arena, documents, submessage_arena);
  9330. }
  9331. set_has_documents();
  9332. target_type_.documents_ = documents;
  9333. }
  9334. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Target.documents)
  9335. }
  9336. void Target::set_allocated_read_time(::google::protobuf::Timestamp* read_time) {
  9337. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  9338. clear_resume_type();
  9339. if (read_time) {
  9340. ::google::protobuf::Arena* submessage_arena =
  9341. reinterpret_cast< ::google::protobuf::MessageLite*>(read_time)->GetArena();
  9342. if (message_arena != submessage_arena) {
  9343. read_time = ::google::protobuf::internal::GetOwnedMessage(
  9344. message_arena, read_time, submessage_arena);
  9345. }
  9346. set_has_read_time();
  9347. resume_type_.read_time_ = read_time;
  9348. }
  9349. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Target.read_time)
  9350. }
  9351. void Target::clear_read_time() {
  9352. if (has_read_time()) {
  9353. delete resume_type_.read_time_;
  9354. clear_has_resume_type();
  9355. }
  9356. }
  9357. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  9358. const int Target::kQueryFieldNumber;
  9359. const int Target::kDocumentsFieldNumber;
  9360. const int Target::kResumeTokenFieldNumber;
  9361. const int Target::kReadTimeFieldNumber;
  9362. const int Target::kTargetIdFieldNumber;
  9363. const int Target::kOnceFieldNumber;
  9364. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  9365. Target::Target()
  9366. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  9367. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  9368. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget();
  9369. }
  9370. SharedCtor();
  9371. // @@protoc_insertion_point(constructor:google.firestore.v1beta1.Target)
  9372. }
  9373. Target::Target(const Target& from)
  9374. : ::google::protobuf::Message(),
  9375. _internal_metadata_(NULL),
  9376. _cached_size_(0) {
  9377. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9378. ::memcpy(&target_id_, &from.target_id_,
  9379. static_cast<size_t>(reinterpret_cast<char*>(&once_) -
  9380. reinterpret_cast<char*>(&target_id_)) + sizeof(once_));
  9381. clear_has_target_type();
  9382. switch (from.target_type_case()) {
  9383. case kQuery: {
  9384. mutable_query()->::google::firestore::v1beta1::Target_QueryTarget::MergeFrom(from.query());
  9385. break;
  9386. }
  9387. case kDocuments: {
  9388. mutable_documents()->::google::firestore::v1beta1::Target_DocumentsTarget::MergeFrom(from.documents());
  9389. break;
  9390. }
  9391. case TARGET_TYPE_NOT_SET: {
  9392. break;
  9393. }
  9394. }
  9395. clear_has_resume_type();
  9396. switch (from.resume_type_case()) {
  9397. case kResumeToken: {
  9398. set_resume_token(from.resume_token());
  9399. break;
  9400. }
  9401. case kReadTime: {
  9402. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  9403. break;
  9404. }
  9405. case RESUME_TYPE_NOT_SET: {
  9406. break;
  9407. }
  9408. }
  9409. // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.Target)
  9410. }
  9411. void Target::SharedCtor() {
  9412. ::memset(&target_id_, 0, static_cast<size_t>(
  9413. reinterpret_cast<char*>(&once_) -
  9414. reinterpret_cast<char*>(&target_id_)) + sizeof(once_));
  9415. clear_has_target_type();
  9416. clear_has_resume_type();
  9417. _cached_size_ = 0;
  9418. }
  9419. Target::~Target() {
  9420. // @@protoc_insertion_point(destructor:google.firestore.v1beta1.Target)
  9421. SharedDtor();
  9422. }
  9423. void Target::SharedDtor() {
  9424. if (has_target_type()) {
  9425. clear_target_type();
  9426. }
  9427. if (has_resume_type()) {
  9428. clear_resume_type();
  9429. }
  9430. }
  9431. void Target::SetCachedSize(int size) const {
  9432. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  9433. _cached_size_ = size;
  9434. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  9435. }
  9436. const ::google::protobuf::Descriptor* Target::descriptor() {
  9437. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  9438. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  9439. }
  9440. const Target& Target::default_instance() {
  9441. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget();
  9442. return *internal_default_instance();
  9443. }
  9444. Target* Target::New(::google::protobuf::Arena* arena) const {
  9445. Target* n = new Target;
  9446. if (arena != NULL) {
  9447. arena->Own(n);
  9448. }
  9449. return n;
  9450. }
  9451. void Target::clear_target_type() {
  9452. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.Target)
  9453. switch (target_type_case()) {
  9454. case kQuery: {
  9455. delete target_type_.query_;
  9456. break;
  9457. }
  9458. case kDocuments: {
  9459. delete target_type_.documents_;
  9460. break;
  9461. }
  9462. case TARGET_TYPE_NOT_SET: {
  9463. break;
  9464. }
  9465. }
  9466. _oneof_case_[0] = TARGET_TYPE_NOT_SET;
  9467. }
  9468. void Target::clear_resume_type() {
  9469. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.Target)
  9470. switch (resume_type_case()) {
  9471. case kResumeToken: {
  9472. resume_type_.resume_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  9473. break;
  9474. }
  9475. case kReadTime: {
  9476. delete resume_type_.read_time_;
  9477. break;
  9478. }
  9479. case RESUME_TYPE_NOT_SET: {
  9480. break;
  9481. }
  9482. }
  9483. _oneof_case_[1] = RESUME_TYPE_NOT_SET;
  9484. }
  9485. void Target::Clear() {
  9486. // @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.Target)
  9487. ::google::protobuf::uint32 cached_has_bits = 0;
  9488. // Prevent compiler warnings about cached_has_bits being unused
  9489. (void) cached_has_bits;
  9490. ::memset(&target_id_, 0, static_cast<size_t>(
  9491. reinterpret_cast<char*>(&once_) -
  9492. reinterpret_cast<char*>(&target_id_)) + sizeof(once_));
  9493. clear_target_type();
  9494. clear_resume_type();
  9495. _internal_metadata_.Clear();
  9496. }
  9497. bool Target::MergePartialFromCodedStream(
  9498. ::google::protobuf::io::CodedInputStream* input) {
  9499. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  9500. ::google::protobuf::uint32 tag;
  9501. // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.Target)
  9502. for (;;) {
  9503. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  9504. tag = p.first;
  9505. if (!p.second) goto handle_unusual;
  9506. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  9507. // .google.firestore.v1beta1.Target.QueryTarget query = 2;
  9508. case 2: {
  9509. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9510. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  9511. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  9512. input, mutable_query()));
  9513. } else {
  9514. goto handle_unusual;
  9515. }
  9516. break;
  9517. }
  9518. // .google.firestore.v1beta1.Target.DocumentsTarget documents = 3;
  9519. case 3: {
  9520. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9521. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  9522. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  9523. input, mutable_documents()));
  9524. } else {
  9525. goto handle_unusual;
  9526. }
  9527. break;
  9528. }
  9529. // bytes resume_token = 4;
  9530. case 4: {
  9531. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9532. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  9533. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  9534. input, this->mutable_resume_token()));
  9535. } else {
  9536. goto handle_unusual;
  9537. }
  9538. break;
  9539. }
  9540. // int32 target_id = 5;
  9541. case 5: {
  9542. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9543. static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
  9544. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  9545. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  9546. input, &target_id_)));
  9547. } else {
  9548. goto handle_unusual;
  9549. }
  9550. break;
  9551. }
  9552. // bool once = 6;
  9553. case 6: {
  9554. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9555. static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
  9556. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  9557. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  9558. input, &once_)));
  9559. } else {
  9560. goto handle_unusual;
  9561. }
  9562. break;
  9563. }
  9564. // .google.protobuf.Timestamp read_time = 11;
  9565. case 11: {
  9566. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9567. static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
  9568. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  9569. input, mutable_read_time()));
  9570. } else {
  9571. goto handle_unusual;
  9572. }
  9573. break;
  9574. }
  9575. default: {
  9576. handle_unusual:
  9577. if (tag == 0) {
  9578. goto success;
  9579. }
  9580. DO_(::google::protobuf::internal::WireFormat::SkipField(
  9581. input, tag, _internal_metadata_.mutable_unknown_fields()));
  9582. break;
  9583. }
  9584. }
  9585. }
  9586. success:
  9587. // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.Target)
  9588. return true;
  9589. failure:
  9590. // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.Target)
  9591. return false;
  9592. #undef DO_
  9593. }
  9594. void Target::SerializeWithCachedSizes(
  9595. ::google::protobuf::io::CodedOutputStream* output) const {
  9596. // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.Target)
  9597. ::google::protobuf::uint32 cached_has_bits = 0;
  9598. (void) cached_has_bits;
  9599. // .google.firestore.v1beta1.Target.QueryTarget query = 2;
  9600. if (has_query()) {
  9601. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  9602. 2, *target_type_.query_, output);
  9603. }
  9604. // .google.firestore.v1beta1.Target.DocumentsTarget documents = 3;
  9605. if (has_documents()) {
  9606. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  9607. 3, *target_type_.documents_, output);
  9608. }
  9609. // bytes resume_token = 4;
  9610. if (has_resume_token()) {
  9611. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  9612. 4, this->resume_token(), output);
  9613. }
  9614. // int32 target_id = 5;
  9615. if (this->target_id() != 0) {
  9616. ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->target_id(), output);
  9617. }
  9618. // bool once = 6;
  9619. if (this->once() != 0) {
  9620. ::google::protobuf::internal::WireFormatLite::WriteBool(6, this->once(), output);
  9621. }
  9622. // .google.protobuf.Timestamp read_time = 11;
  9623. if (has_read_time()) {
  9624. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  9625. 11, *resume_type_.read_time_, output);
  9626. }
  9627. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  9628. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  9629. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  9630. }
  9631. // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.Target)
  9632. }
  9633. ::google::protobuf::uint8* Target::InternalSerializeWithCachedSizesToArray(
  9634. bool deterministic, ::google::protobuf::uint8* target) const {
  9635. (void)deterministic; // Unused
  9636. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.Target)
  9637. ::google::protobuf::uint32 cached_has_bits = 0;
  9638. (void) cached_has_bits;
  9639. // .google.firestore.v1beta1.Target.QueryTarget query = 2;
  9640. if (has_query()) {
  9641. target = ::google::protobuf::internal::WireFormatLite::
  9642. InternalWriteMessageToArray(
  9643. 2, *target_type_.query_, deterministic, target);
  9644. }
  9645. // .google.firestore.v1beta1.Target.DocumentsTarget documents = 3;
  9646. if (has_documents()) {
  9647. target = ::google::protobuf::internal::WireFormatLite::
  9648. InternalWriteMessageToArray(
  9649. 3, *target_type_.documents_, deterministic, target);
  9650. }
  9651. // bytes resume_token = 4;
  9652. if (has_resume_token()) {
  9653. target =
  9654. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  9655. 4, this->resume_token(), target);
  9656. }
  9657. // int32 target_id = 5;
  9658. if (this->target_id() != 0) {
  9659. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->target_id(), target);
  9660. }
  9661. // bool once = 6;
  9662. if (this->once() != 0) {
  9663. target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(6, this->once(), target);
  9664. }
  9665. // .google.protobuf.Timestamp read_time = 11;
  9666. if (has_read_time()) {
  9667. target = ::google::protobuf::internal::WireFormatLite::
  9668. InternalWriteMessageToArray(
  9669. 11, *resume_type_.read_time_, deterministic, target);
  9670. }
  9671. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  9672. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  9673. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  9674. }
  9675. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.Target)
  9676. return target;
  9677. }
  9678. size_t Target::ByteSizeLong() const {
  9679. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.Target)
  9680. size_t total_size = 0;
  9681. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  9682. total_size +=
  9683. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  9684. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  9685. }
  9686. // int32 target_id = 5;
  9687. if (this->target_id() != 0) {
  9688. total_size += 1 +
  9689. ::google::protobuf::internal::WireFormatLite::Int32Size(
  9690. this->target_id());
  9691. }
  9692. // bool once = 6;
  9693. if (this->once() != 0) {
  9694. total_size += 1 + 1;
  9695. }
  9696. switch (target_type_case()) {
  9697. // .google.firestore.v1beta1.Target.QueryTarget query = 2;
  9698. case kQuery: {
  9699. total_size += 1 +
  9700. ::google::protobuf::internal::WireFormatLite::MessageSize(
  9701. *target_type_.query_);
  9702. break;
  9703. }
  9704. // .google.firestore.v1beta1.Target.DocumentsTarget documents = 3;
  9705. case kDocuments: {
  9706. total_size += 1 +
  9707. ::google::protobuf::internal::WireFormatLite::MessageSize(
  9708. *target_type_.documents_);
  9709. break;
  9710. }
  9711. case TARGET_TYPE_NOT_SET: {
  9712. break;
  9713. }
  9714. }
  9715. switch (resume_type_case()) {
  9716. // bytes resume_token = 4;
  9717. case kResumeToken: {
  9718. total_size += 1 +
  9719. ::google::protobuf::internal::WireFormatLite::BytesSize(
  9720. this->resume_token());
  9721. break;
  9722. }
  9723. // .google.protobuf.Timestamp read_time = 11;
  9724. case kReadTime: {
  9725. total_size += 1 +
  9726. ::google::protobuf::internal::WireFormatLite::MessageSize(
  9727. *resume_type_.read_time_);
  9728. break;
  9729. }
  9730. case RESUME_TYPE_NOT_SET: {
  9731. break;
  9732. }
  9733. }
  9734. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  9735. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  9736. _cached_size_ = cached_size;
  9737. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  9738. return total_size;
  9739. }
  9740. void Target::MergeFrom(const ::google::protobuf::Message& from) {
  9741. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.Target)
  9742. GOOGLE_DCHECK_NE(&from, this);
  9743. const Target* source =
  9744. ::google::protobuf::internal::DynamicCastToGenerated<const Target>(
  9745. &from);
  9746. if (source == NULL) {
  9747. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.Target)
  9748. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  9749. } else {
  9750. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.Target)
  9751. MergeFrom(*source);
  9752. }
  9753. }
  9754. void Target::MergeFrom(const Target& from) {
  9755. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.Target)
  9756. GOOGLE_DCHECK_NE(&from, this);
  9757. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9758. ::google::protobuf::uint32 cached_has_bits = 0;
  9759. (void) cached_has_bits;
  9760. if (from.target_id() != 0) {
  9761. set_target_id(from.target_id());
  9762. }
  9763. if (from.once() != 0) {
  9764. set_once(from.once());
  9765. }
  9766. switch (from.target_type_case()) {
  9767. case kQuery: {
  9768. mutable_query()->::google::firestore::v1beta1::Target_QueryTarget::MergeFrom(from.query());
  9769. break;
  9770. }
  9771. case kDocuments: {
  9772. mutable_documents()->::google::firestore::v1beta1::Target_DocumentsTarget::MergeFrom(from.documents());
  9773. break;
  9774. }
  9775. case TARGET_TYPE_NOT_SET: {
  9776. break;
  9777. }
  9778. }
  9779. switch (from.resume_type_case()) {
  9780. case kResumeToken: {
  9781. set_resume_token(from.resume_token());
  9782. break;
  9783. }
  9784. case kReadTime: {
  9785. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  9786. break;
  9787. }
  9788. case RESUME_TYPE_NOT_SET: {
  9789. break;
  9790. }
  9791. }
  9792. }
  9793. void Target::CopyFrom(const ::google::protobuf::Message& from) {
  9794. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.Target)
  9795. if (&from == this) return;
  9796. Clear();
  9797. MergeFrom(from);
  9798. }
  9799. void Target::CopyFrom(const Target& from) {
  9800. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.Target)
  9801. if (&from == this) return;
  9802. Clear();
  9803. MergeFrom(from);
  9804. }
  9805. bool Target::IsInitialized() const {
  9806. return true;
  9807. }
  9808. void Target::Swap(Target* other) {
  9809. if (other == this) return;
  9810. InternalSwap(other);
  9811. }
  9812. void Target::InternalSwap(Target* other) {
  9813. using std::swap;
  9814. swap(target_id_, other->target_id_);
  9815. swap(once_, other->once_);
  9816. swap(target_type_, other->target_type_);
  9817. swap(_oneof_case_[0], other->_oneof_case_[0]);
  9818. swap(resume_type_, other->resume_type_);
  9819. swap(_oneof_case_[1], other->_oneof_case_[1]);
  9820. _internal_metadata_.Swap(&other->_internal_metadata_);
  9821. swap(_cached_size_, other->_cached_size_);
  9822. }
  9823. ::google::protobuf::Metadata Target::GetMetadata() const {
  9824. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  9825. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  9826. }
  9827. // ===================================================================
  9828. void TargetChange::InitAsDefaultInstance() {
  9829. ::google::firestore::v1beta1::_TargetChange_default_instance_._instance.get_mutable()->cause_ = const_cast< ::google::rpc::Status*>(
  9830. ::google::rpc::Status::internal_default_instance());
  9831. ::google::firestore::v1beta1::_TargetChange_default_instance_._instance.get_mutable()->read_time_ = const_cast< ::google::protobuf::Timestamp*>(
  9832. ::google::protobuf::Timestamp::internal_default_instance());
  9833. }
  9834. void TargetChange::clear_cause() {
  9835. if (GetArenaNoVirtual() == NULL && cause_ != NULL) {
  9836. delete cause_;
  9837. }
  9838. cause_ = NULL;
  9839. }
  9840. void TargetChange::clear_read_time() {
  9841. if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
  9842. delete read_time_;
  9843. }
  9844. read_time_ = NULL;
  9845. }
  9846. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  9847. const int TargetChange::kTargetChangeTypeFieldNumber;
  9848. const int TargetChange::kTargetIdsFieldNumber;
  9849. const int TargetChange::kCauseFieldNumber;
  9850. const int TargetChange::kResumeTokenFieldNumber;
  9851. const int TargetChange::kReadTimeFieldNumber;
  9852. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  9853. TargetChange::TargetChange()
  9854. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  9855. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  9856. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTargetChange();
  9857. }
  9858. SharedCtor();
  9859. // @@protoc_insertion_point(constructor:google.firestore.v1beta1.TargetChange)
  9860. }
  9861. TargetChange::TargetChange(const TargetChange& from)
  9862. : ::google::protobuf::Message(),
  9863. _internal_metadata_(NULL),
  9864. target_ids_(from.target_ids_),
  9865. _cached_size_(0) {
  9866. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9867. resume_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  9868. if (from.resume_token().size() > 0) {
  9869. resume_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.resume_token_);
  9870. }
  9871. if (from.has_cause()) {
  9872. cause_ = new ::google::rpc::Status(*from.cause_);
  9873. } else {
  9874. cause_ = NULL;
  9875. }
  9876. if (from.has_read_time()) {
  9877. read_time_ = new ::google::protobuf::Timestamp(*from.read_time_);
  9878. } else {
  9879. read_time_ = NULL;
  9880. }
  9881. target_change_type_ = from.target_change_type_;
  9882. // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.TargetChange)
  9883. }
  9884. void TargetChange::SharedCtor() {
  9885. resume_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  9886. ::memset(&cause_, 0, static_cast<size_t>(
  9887. reinterpret_cast<char*>(&target_change_type_) -
  9888. reinterpret_cast<char*>(&cause_)) + sizeof(target_change_type_));
  9889. _cached_size_ = 0;
  9890. }
  9891. TargetChange::~TargetChange() {
  9892. // @@protoc_insertion_point(destructor:google.firestore.v1beta1.TargetChange)
  9893. SharedDtor();
  9894. }
  9895. void TargetChange::SharedDtor() {
  9896. resume_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  9897. if (this != internal_default_instance()) delete cause_;
  9898. if (this != internal_default_instance()) delete read_time_;
  9899. }
  9900. void TargetChange::SetCachedSize(int size) const {
  9901. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  9902. _cached_size_ = size;
  9903. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  9904. }
  9905. const ::google::protobuf::Descriptor* TargetChange::descriptor() {
  9906. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  9907. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  9908. }
  9909. const TargetChange& TargetChange::default_instance() {
  9910. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTargetChange();
  9911. return *internal_default_instance();
  9912. }
  9913. TargetChange* TargetChange::New(::google::protobuf::Arena* arena) const {
  9914. TargetChange* n = new TargetChange;
  9915. if (arena != NULL) {
  9916. arena->Own(n);
  9917. }
  9918. return n;
  9919. }
  9920. void TargetChange::Clear() {
  9921. // @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.TargetChange)
  9922. ::google::protobuf::uint32 cached_has_bits = 0;
  9923. // Prevent compiler warnings about cached_has_bits being unused
  9924. (void) cached_has_bits;
  9925. target_ids_.Clear();
  9926. resume_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  9927. if (GetArenaNoVirtual() == NULL && cause_ != NULL) {
  9928. delete cause_;
  9929. }
  9930. cause_ = NULL;
  9931. if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
  9932. delete read_time_;
  9933. }
  9934. read_time_ = NULL;
  9935. target_change_type_ = 0;
  9936. _internal_metadata_.Clear();
  9937. }
  9938. bool TargetChange::MergePartialFromCodedStream(
  9939. ::google::protobuf::io::CodedInputStream* input) {
  9940. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  9941. ::google::protobuf::uint32 tag;
  9942. // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.TargetChange)
  9943. for (;;) {
  9944. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  9945. tag = p.first;
  9946. if (!p.second) goto handle_unusual;
  9947. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  9948. // .google.firestore.v1beta1.TargetChange.TargetChangeType target_change_type = 1;
  9949. case 1: {
  9950. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9951. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  9952. int value;
  9953. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  9954. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  9955. input, &value)));
  9956. set_target_change_type(static_cast< ::google::firestore::v1beta1::TargetChange_TargetChangeType >(value));
  9957. } else {
  9958. goto handle_unusual;
  9959. }
  9960. break;
  9961. }
  9962. // repeated int32 target_ids = 2;
  9963. case 2: {
  9964. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9965. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  9966. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  9967. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  9968. input, this->mutable_target_ids())));
  9969. } else if (
  9970. static_cast< ::google::protobuf::uint8>(tag) ==
  9971. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  9972. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  9973. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  9974. 1, 18u, input, this->mutable_target_ids())));
  9975. } else {
  9976. goto handle_unusual;
  9977. }
  9978. break;
  9979. }
  9980. // .google.rpc.Status cause = 3;
  9981. case 3: {
  9982. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9983. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  9984. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  9985. input, mutable_cause()));
  9986. } else {
  9987. goto handle_unusual;
  9988. }
  9989. break;
  9990. }
  9991. // bytes resume_token = 4;
  9992. case 4: {
  9993. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9994. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  9995. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  9996. input, this->mutable_resume_token()));
  9997. } else {
  9998. goto handle_unusual;
  9999. }
  10000. break;
  10001. }
  10002. // .google.protobuf.Timestamp read_time = 6;
  10003. case 6: {
  10004. if (static_cast< ::google::protobuf::uint8>(tag) ==
  10005. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  10006. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  10007. input, mutable_read_time()));
  10008. } else {
  10009. goto handle_unusual;
  10010. }
  10011. break;
  10012. }
  10013. default: {
  10014. handle_unusual:
  10015. if (tag == 0) {
  10016. goto success;
  10017. }
  10018. DO_(::google::protobuf::internal::WireFormat::SkipField(
  10019. input, tag, _internal_metadata_.mutable_unknown_fields()));
  10020. break;
  10021. }
  10022. }
  10023. }
  10024. success:
  10025. // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.TargetChange)
  10026. return true;
  10027. failure:
  10028. // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.TargetChange)
  10029. return false;
  10030. #undef DO_
  10031. }
  10032. void TargetChange::SerializeWithCachedSizes(
  10033. ::google::protobuf::io::CodedOutputStream* output) const {
  10034. // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.TargetChange)
  10035. ::google::protobuf::uint32 cached_has_bits = 0;
  10036. (void) cached_has_bits;
  10037. // .google.firestore.v1beta1.TargetChange.TargetChangeType target_change_type = 1;
  10038. if (this->target_change_type() != 0) {
  10039. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  10040. 1, this->target_change_type(), output);
  10041. }
  10042. // repeated int32 target_ids = 2;
  10043. if (this->target_ids_size() > 0) {
  10044. ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  10045. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  10046. _target_ids_cached_byte_size_));
  10047. }
  10048. for (int i = 0, n = this->target_ids_size(); i < n; i++) {
  10049. ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
  10050. this->target_ids(i), output);
  10051. }
  10052. // .google.rpc.Status cause = 3;
  10053. if (this->has_cause()) {
  10054. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  10055. 3, *this->cause_, output);
  10056. }
  10057. // bytes resume_token = 4;
  10058. if (this->resume_token().size() > 0) {
  10059. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  10060. 4, this->resume_token(), output);
  10061. }
  10062. // .google.protobuf.Timestamp read_time = 6;
  10063. if (this->has_read_time()) {
  10064. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  10065. 6, *this->read_time_, output);
  10066. }
  10067. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  10068. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  10069. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  10070. }
  10071. // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.TargetChange)
  10072. }
  10073. ::google::protobuf::uint8* TargetChange::InternalSerializeWithCachedSizesToArray(
  10074. bool deterministic, ::google::protobuf::uint8* target) const {
  10075. (void)deterministic; // Unused
  10076. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.TargetChange)
  10077. ::google::protobuf::uint32 cached_has_bits = 0;
  10078. (void) cached_has_bits;
  10079. // .google.firestore.v1beta1.TargetChange.TargetChangeType target_change_type = 1;
  10080. if (this->target_change_type() != 0) {
  10081. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  10082. 1, this->target_change_type(), target);
  10083. }
  10084. // repeated int32 target_ids = 2;
  10085. if (this->target_ids_size() > 0) {
  10086. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  10087. 2,
  10088. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  10089. target);
  10090. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
  10091. static_cast< ::google::protobuf::int32>(
  10092. _target_ids_cached_byte_size_), target);
  10093. target = ::google::protobuf::internal::WireFormatLite::
  10094. WriteInt32NoTagToArray(this->target_ids_, target);
  10095. }
  10096. // .google.rpc.Status cause = 3;
  10097. if (this->has_cause()) {
  10098. target = ::google::protobuf::internal::WireFormatLite::
  10099. InternalWriteMessageToArray(
  10100. 3, *this->cause_, deterministic, target);
  10101. }
  10102. // bytes resume_token = 4;
  10103. if (this->resume_token().size() > 0) {
  10104. target =
  10105. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  10106. 4, this->resume_token(), target);
  10107. }
  10108. // .google.protobuf.Timestamp read_time = 6;
  10109. if (this->has_read_time()) {
  10110. target = ::google::protobuf::internal::WireFormatLite::
  10111. InternalWriteMessageToArray(
  10112. 6, *this->read_time_, deterministic, target);
  10113. }
  10114. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  10115. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  10116. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  10117. }
  10118. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.TargetChange)
  10119. return target;
  10120. }
  10121. size_t TargetChange::ByteSizeLong() const {
  10122. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.TargetChange)
  10123. size_t total_size = 0;
  10124. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  10125. total_size +=
  10126. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  10127. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  10128. }
  10129. // repeated int32 target_ids = 2;
  10130. {
  10131. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  10132. Int32Size(this->target_ids_);
  10133. if (data_size > 0) {
  10134. total_size += 1 +
  10135. ::google::protobuf::internal::WireFormatLite::Int32Size(
  10136. static_cast< ::google::protobuf::int32>(data_size));
  10137. }
  10138. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  10139. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  10140. _target_ids_cached_byte_size_ = cached_size;
  10141. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  10142. total_size += data_size;
  10143. }
  10144. // bytes resume_token = 4;
  10145. if (this->resume_token().size() > 0) {
  10146. total_size += 1 +
  10147. ::google::protobuf::internal::WireFormatLite::BytesSize(
  10148. this->resume_token());
  10149. }
  10150. // .google.rpc.Status cause = 3;
  10151. if (this->has_cause()) {
  10152. total_size += 1 +
  10153. ::google::protobuf::internal::WireFormatLite::MessageSize(
  10154. *this->cause_);
  10155. }
  10156. // .google.protobuf.Timestamp read_time = 6;
  10157. if (this->has_read_time()) {
  10158. total_size += 1 +
  10159. ::google::protobuf::internal::WireFormatLite::MessageSize(
  10160. *this->read_time_);
  10161. }
  10162. // .google.firestore.v1beta1.TargetChange.TargetChangeType target_change_type = 1;
  10163. if (this->target_change_type() != 0) {
  10164. total_size += 1 +
  10165. ::google::protobuf::internal::WireFormatLite::EnumSize(this->target_change_type());
  10166. }
  10167. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  10168. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  10169. _cached_size_ = cached_size;
  10170. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  10171. return total_size;
  10172. }
  10173. void TargetChange::MergeFrom(const ::google::protobuf::Message& from) {
  10174. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.TargetChange)
  10175. GOOGLE_DCHECK_NE(&from, this);
  10176. const TargetChange* source =
  10177. ::google::protobuf::internal::DynamicCastToGenerated<const TargetChange>(
  10178. &from);
  10179. if (source == NULL) {
  10180. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.TargetChange)
  10181. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  10182. } else {
  10183. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.TargetChange)
  10184. MergeFrom(*source);
  10185. }
  10186. }
  10187. void TargetChange::MergeFrom(const TargetChange& from) {
  10188. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.TargetChange)
  10189. GOOGLE_DCHECK_NE(&from, this);
  10190. _internal_metadata_.MergeFrom(from._internal_metadata_);
  10191. ::google::protobuf::uint32 cached_has_bits = 0;
  10192. (void) cached_has_bits;
  10193. target_ids_.MergeFrom(from.target_ids_);
  10194. if (from.resume_token().size() > 0) {
  10195. resume_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.resume_token_);
  10196. }
  10197. if (from.has_cause()) {
  10198. mutable_cause()->::google::rpc::Status::MergeFrom(from.cause());
  10199. }
  10200. if (from.has_read_time()) {
  10201. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  10202. }
  10203. if (from.target_change_type() != 0) {
  10204. set_target_change_type(from.target_change_type());
  10205. }
  10206. }
  10207. void TargetChange::CopyFrom(const ::google::protobuf::Message& from) {
  10208. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.TargetChange)
  10209. if (&from == this) return;
  10210. Clear();
  10211. MergeFrom(from);
  10212. }
  10213. void TargetChange::CopyFrom(const TargetChange& from) {
  10214. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.TargetChange)
  10215. if (&from == this) return;
  10216. Clear();
  10217. MergeFrom(from);
  10218. }
  10219. bool TargetChange::IsInitialized() const {
  10220. return true;
  10221. }
  10222. void TargetChange::Swap(TargetChange* other) {
  10223. if (other == this) return;
  10224. InternalSwap(other);
  10225. }
  10226. void TargetChange::InternalSwap(TargetChange* other) {
  10227. using std::swap;
  10228. target_ids_.InternalSwap(&other->target_ids_);
  10229. resume_token_.Swap(&other->resume_token_);
  10230. swap(cause_, other->cause_);
  10231. swap(read_time_, other->read_time_);
  10232. swap(target_change_type_, other->target_change_type_);
  10233. _internal_metadata_.Swap(&other->_internal_metadata_);
  10234. swap(_cached_size_, other->_cached_size_);
  10235. }
  10236. ::google::protobuf::Metadata TargetChange::GetMetadata() const {
  10237. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  10238. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  10239. }
  10240. // ===================================================================
  10241. void ListCollectionIdsRequest::InitAsDefaultInstance() {
  10242. }
  10243. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  10244. const int ListCollectionIdsRequest::kParentFieldNumber;
  10245. const int ListCollectionIdsRequest::kPageSizeFieldNumber;
  10246. const int ListCollectionIdsRequest::kPageTokenFieldNumber;
  10247. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  10248. ListCollectionIdsRequest::ListCollectionIdsRequest()
  10249. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  10250. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  10251. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListCollectionIdsRequest();
  10252. }
  10253. SharedCtor();
  10254. // @@protoc_insertion_point(constructor:google.firestore.v1beta1.ListCollectionIdsRequest)
  10255. }
  10256. ListCollectionIdsRequest::ListCollectionIdsRequest(const ListCollectionIdsRequest& from)
  10257. : ::google::protobuf::Message(),
  10258. _internal_metadata_(NULL),
  10259. _cached_size_(0) {
  10260. _internal_metadata_.MergeFrom(from._internal_metadata_);
  10261. parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  10262. if (from.parent().size() > 0) {
  10263. parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  10264. }
  10265. page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  10266. if (from.page_token().size() > 0) {
  10267. page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.page_token_);
  10268. }
  10269. page_size_ = from.page_size_;
  10270. // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.ListCollectionIdsRequest)
  10271. }
  10272. void ListCollectionIdsRequest::SharedCtor() {
  10273. parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  10274. page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  10275. page_size_ = 0;
  10276. _cached_size_ = 0;
  10277. }
  10278. ListCollectionIdsRequest::~ListCollectionIdsRequest() {
  10279. // @@protoc_insertion_point(destructor:google.firestore.v1beta1.ListCollectionIdsRequest)
  10280. SharedDtor();
  10281. }
  10282. void ListCollectionIdsRequest::SharedDtor() {
  10283. parent_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  10284. page_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  10285. }
  10286. void ListCollectionIdsRequest::SetCachedSize(int size) const {
  10287. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  10288. _cached_size_ = size;
  10289. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  10290. }
  10291. const ::google::protobuf::Descriptor* ListCollectionIdsRequest::descriptor() {
  10292. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  10293. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  10294. }
  10295. const ListCollectionIdsRequest& ListCollectionIdsRequest::default_instance() {
  10296. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListCollectionIdsRequest();
  10297. return *internal_default_instance();
  10298. }
  10299. ListCollectionIdsRequest* ListCollectionIdsRequest::New(::google::protobuf::Arena* arena) const {
  10300. ListCollectionIdsRequest* n = new ListCollectionIdsRequest;
  10301. if (arena != NULL) {
  10302. arena->Own(n);
  10303. }
  10304. return n;
  10305. }
  10306. void ListCollectionIdsRequest::Clear() {
  10307. // @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.ListCollectionIdsRequest)
  10308. ::google::protobuf::uint32 cached_has_bits = 0;
  10309. // Prevent compiler warnings about cached_has_bits being unused
  10310. (void) cached_has_bits;
  10311. parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  10312. page_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  10313. page_size_ = 0;
  10314. _internal_metadata_.Clear();
  10315. }
  10316. bool ListCollectionIdsRequest::MergePartialFromCodedStream(
  10317. ::google::protobuf::io::CodedInputStream* input) {
  10318. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  10319. ::google::protobuf::uint32 tag;
  10320. // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.ListCollectionIdsRequest)
  10321. for (;;) {
  10322. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  10323. tag = p.first;
  10324. if (!p.second) goto handle_unusual;
  10325. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  10326. // string parent = 1;
  10327. case 1: {
  10328. if (static_cast< ::google::protobuf::uint8>(tag) ==
  10329. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  10330. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  10331. input, this->mutable_parent()));
  10332. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  10333. this->parent().data(), static_cast<int>(this->parent().length()),
  10334. ::google::protobuf::internal::WireFormatLite::PARSE,
  10335. "google.firestore.v1beta1.ListCollectionIdsRequest.parent"));
  10336. } else {
  10337. goto handle_unusual;
  10338. }
  10339. break;
  10340. }
  10341. // int32 page_size = 2;
  10342. case 2: {
  10343. if (static_cast< ::google::protobuf::uint8>(tag) ==
  10344. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  10345. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  10346. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  10347. input, &page_size_)));
  10348. } else {
  10349. goto handle_unusual;
  10350. }
  10351. break;
  10352. }
  10353. // string page_token = 3;
  10354. case 3: {
  10355. if (static_cast< ::google::protobuf::uint8>(tag) ==
  10356. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  10357. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  10358. input, this->mutable_page_token()));
  10359. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  10360. this->page_token().data(), static_cast<int>(this->page_token().length()),
  10361. ::google::protobuf::internal::WireFormatLite::PARSE,
  10362. "google.firestore.v1beta1.ListCollectionIdsRequest.page_token"));
  10363. } else {
  10364. goto handle_unusual;
  10365. }
  10366. break;
  10367. }
  10368. default: {
  10369. handle_unusual:
  10370. if (tag == 0) {
  10371. goto success;
  10372. }
  10373. DO_(::google::protobuf::internal::WireFormat::SkipField(
  10374. input, tag, _internal_metadata_.mutable_unknown_fields()));
  10375. break;
  10376. }
  10377. }
  10378. }
  10379. success:
  10380. // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.ListCollectionIdsRequest)
  10381. return true;
  10382. failure:
  10383. // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.ListCollectionIdsRequest)
  10384. return false;
  10385. #undef DO_
  10386. }
  10387. void ListCollectionIdsRequest::SerializeWithCachedSizes(
  10388. ::google::protobuf::io::CodedOutputStream* output) const {
  10389. // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.ListCollectionIdsRequest)
  10390. ::google::protobuf::uint32 cached_has_bits = 0;
  10391. (void) cached_has_bits;
  10392. // string parent = 1;
  10393. if (this->parent().size() > 0) {
  10394. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  10395. this->parent().data(), static_cast<int>(this->parent().length()),
  10396. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  10397. "google.firestore.v1beta1.ListCollectionIdsRequest.parent");
  10398. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  10399. 1, this->parent(), output);
  10400. }
  10401. // int32 page_size = 2;
  10402. if (this->page_size() != 0) {
  10403. ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->page_size(), output);
  10404. }
  10405. // string page_token = 3;
  10406. if (this->page_token().size() > 0) {
  10407. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  10408. this->page_token().data(), static_cast<int>(this->page_token().length()),
  10409. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  10410. "google.firestore.v1beta1.ListCollectionIdsRequest.page_token");
  10411. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  10412. 3, this->page_token(), output);
  10413. }
  10414. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  10415. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  10416. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  10417. }
  10418. // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.ListCollectionIdsRequest)
  10419. }
  10420. ::google::protobuf::uint8* ListCollectionIdsRequest::InternalSerializeWithCachedSizesToArray(
  10421. bool deterministic, ::google::protobuf::uint8* target) const {
  10422. (void)deterministic; // Unused
  10423. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.ListCollectionIdsRequest)
  10424. ::google::protobuf::uint32 cached_has_bits = 0;
  10425. (void) cached_has_bits;
  10426. // string parent = 1;
  10427. if (this->parent().size() > 0) {
  10428. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  10429. this->parent().data(), static_cast<int>(this->parent().length()),
  10430. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  10431. "google.firestore.v1beta1.ListCollectionIdsRequest.parent");
  10432. target =
  10433. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  10434. 1, this->parent(), target);
  10435. }
  10436. // int32 page_size = 2;
  10437. if (this->page_size() != 0) {
  10438. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->page_size(), target);
  10439. }
  10440. // string page_token = 3;
  10441. if (this->page_token().size() > 0) {
  10442. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  10443. this->page_token().data(), static_cast<int>(this->page_token().length()),
  10444. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  10445. "google.firestore.v1beta1.ListCollectionIdsRequest.page_token");
  10446. target =
  10447. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  10448. 3, this->page_token(), target);
  10449. }
  10450. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  10451. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  10452. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  10453. }
  10454. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.ListCollectionIdsRequest)
  10455. return target;
  10456. }
  10457. size_t ListCollectionIdsRequest::ByteSizeLong() const {
  10458. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.ListCollectionIdsRequest)
  10459. size_t total_size = 0;
  10460. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  10461. total_size +=
  10462. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  10463. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  10464. }
  10465. // string parent = 1;
  10466. if (this->parent().size() > 0) {
  10467. total_size += 1 +
  10468. ::google::protobuf::internal::WireFormatLite::StringSize(
  10469. this->parent());
  10470. }
  10471. // string page_token = 3;
  10472. if (this->page_token().size() > 0) {
  10473. total_size += 1 +
  10474. ::google::protobuf::internal::WireFormatLite::StringSize(
  10475. this->page_token());
  10476. }
  10477. // int32 page_size = 2;
  10478. if (this->page_size() != 0) {
  10479. total_size += 1 +
  10480. ::google::protobuf::internal::WireFormatLite::Int32Size(
  10481. this->page_size());
  10482. }
  10483. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  10484. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  10485. _cached_size_ = cached_size;
  10486. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  10487. return total_size;
  10488. }
  10489. void ListCollectionIdsRequest::MergeFrom(const ::google::protobuf::Message& from) {
  10490. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.ListCollectionIdsRequest)
  10491. GOOGLE_DCHECK_NE(&from, this);
  10492. const ListCollectionIdsRequest* source =
  10493. ::google::protobuf::internal::DynamicCastToGenerated<const ListCollectionIdsRequest>(
  10494. &from);
  10495. if (source == NULL) {
  10496. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.ListCollectionIdsRequest)
  10497. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  10498. } else {
  10499. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.ListCollectionIdsRequest)
  10500. MergeFrom(*source);
  10501. }
  10502. }
  10503. void ListCollectionIdsRequest::MergeFrom(const ListCollectionIdsRequest& from) {
  10504. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.ListCollectionIdsRequest)
  10505. GOOGLE_DCHECK_NE(&from, this);
  10506. _internal_metadata_.MergeFrom(from._internal_metadata_);
  10507. ::google::protobuf::uint32 cached_has_bits = 0;
  10508. (void) cached_has_bits;
  10509. if (from.parent().size() > 0) {
  10510. parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  10511. }
  10512. if (from.page_token().size() > 0) {
  10513. page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.page_token_);
  10514. }
  10515. if (from.page_size() != 0) {
  10516. set_page_size(from.page_size());
  10517. }
  10518. }
  10519. void ListCollectionIdsRequest::CopyFrom(const ::google::protobuf::Message& from) {
  10520. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.ListCollectionIdsRequest)
  10521. if (&from == this) return;
  10522. Clear();
  10523. MergeFrom(from);
  10524. }
  10525. void ListCollectionIdsRequest::CopyFrom(const ListCollectionIdsRequest& from) {
  10526. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.ListCollectionIdsRequest)
  10527. if (&from == this) return;
  10528. Clear();
  10529. MergeFrom(from);
  10530. }
  10531. bool ListCollectionIdsRequest::IsInitialized() const {
  10532. return true;
  10533. }
  10534. void ListCollectionIdsRequest::Swap(ListCollectionIdsRequest* other) {
  10535. if (other == this) return;
  10536. InternalSwap(other);
  10537. }
  10538. void ListCollectionIdsRequest::InternalSwap(ListCollectionIdsRequest* other) {
  10539. using std::swap;
  10540. parent_.Swap(&other->parent_);
  10541. page_token_.Swap(&other->page_token_);
  10542. swap(page_size_, other->page_size_);
  10543. _internal_metadata_.Swap(&other->_internal_metadata_);
  10544. swap(_cached_size_, other->_cached_size_);
  10545. }
  10546. ::google::protobuf::Metadata ListCollectionIdsRequest::GetMetadata() const {
  10547. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  10548. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  10549. }
  10550. // ===================================================================
  10551. void ListCollectionIdsResponse::InitAsDefaultInstance() {
  10552. }
  10553. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  10554. const int ListCollectionIdsResponse::kCollectionIdsFieldNumber;
  10555. const int ListCollectionIdsResponse::kNextPageTokenFieldNumber;
  10556. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  10557. ListCollectionIdsResponse::ListCollectionIdsResponse()
  10558. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  10559. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  10560. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListCollectionIdsResponse();
  10561. }
  10562. SharedCtor();
  10563. // @@protoc_insertion_point(constructor:google.firestore.v1beta1.ListCollectionIdsResponse)
  10564. }
  10565. ListCollectionIdsResponse::ListCollectionIdsResponse(const ListCollectionIdsResponse& from)
  10566. : ::google::protobuf::Message(),
  10567. _internal_metadata_(NULL),
  10568. collection_ids_(from.collection_ids_),
  10569. _cached_size_(0) {
  10570. _internal_metadata_.MergeFrom(from._internal_metadata_);
  10571. next_page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  10572. if (from.next_page_token().size() > 0) {
  10573. next_page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.next_page_token_);
  10574. }
  10575. // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.ListCollectionIdsResponse)
  10576. }
  10577. void ListCollectionIdsResponse::SharedCtor() {
  10578. next_page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  10579. _cached_size_ = 0;
  10580. }
  10581. ListCollectionIdsResponse::~ListCollectionIdsResponse() {
  10582. // @@protoc_insertion_point(destructor:google.firestore.v1beta1.ListCollectionIdsResponse)
  10583. SharedDtor();
  10584. }
  10585. void ListCollectionIdsResponse::SharedDtor() {
  10586. next_page_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  10587. }
  10588. void ListCollectionIdsResponse::SetCachedSize(int size) const {
  10589. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  10590. _cached_size_ = size;
  10591. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  10592. }
  10593. const ::google::protobuf::Descriptor* ListCollectionIdsResponse::descriptor() {
  10594. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  10595. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  10596. }
  10597. const ListCollectionIdsResponse& ListCollectionIdsResponse::default_instance() {
  10598. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListCollectionIdsResponse();
  10599. return *internal_default_instance();
  10600. }
  10601. ListCollectionIdsResponse* ListCollectionIdsResponse::New(::google::protobuf::Arena* arena) const {
  10602. ListCollectionIdsResponse* n = new ListCollectionIdsResponse;
  10603. if (arena != NULL) {
  10604. arena->Own(n);
  10605. }
  10606. return n;
  10607. }
  10608. void ListCollectionIdsResponse::Clear() {
  10609. // @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.ListCollectionIdsResponse)
  10610. ::google::protobuf::uint32 cached_has_bits = 0;
  10611. // Prevent compiler warnings about cached_has_bits being unused
  10612. (void) cached_has_bits;
  10613. collection_ids_.Clear();
  10614. next_page_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  10615. _internal_metadata_.Clear();
  10616. }
  10617. bool ListCollectionIdsResponse::MergePartialFromCodedStream(
  10618. ::google::protobuf::io::CodedInputStream* input) {
  10619. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  10620. ::google::protobuf::uint32 tag;
  10621. // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.ListCollectionIdsResponse)
  10622. for (;;) {
  10623. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  10624. tag = p.first;
  10625. if (!p.second) goto handle_unusual;
  10626. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  10627. // repeated string collection_ids = 1;
  10628. case 1: {
  10629. if (static_cast< ::google::protobuf::uint8>(tag) ==
  10630. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  10631. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  10632. input, this->add_collection_ids()));
  10633. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  10634. this->collection_ids(this->collection_ids_size() - 1).data(),
  10635. static_cast<int>(this->collection_ids(this->collection_ids_size() - 1).length()),
  10636. ::google::protobuf::internal::WireFormatLite::PARSE,
  10637. "google.firestore.v1beta1.ListCollectionIdsResponse.collection_ids"));
  10638. } else {
  10639. goto handle_unusual;
  10640. }
  10641. break;
  10642. }
  10643. // string next_page_token = 2;
  10644. case 2: {
  10645. if (static_cast< ::google::protobuf::uint8>(tag) ==
  10646. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  10647. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  10648. input, this->mutable_next_page_token()));
  10649. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  10650. this->next_page_token().data(), static_cast<int>(this->next_page_token().length()),
  10651. ::google::protobuf::internal::WireFormatLite::PARSE,
  10652. "google.firestore.v1beta1.ListCollectionIdsResponse.next_page_token"));
  10653. } else {
  10654. goto handle_unusual;
  10655. }
  10656. break;
  10657. }
  10658. default: {
  10659. handle_unusual:
  10660. if (tag == 0) {
  10661. goto success;
  10662. }
  10663. DO_(::google::protobuf::internal::WireFormat::SkipField(
  10664. input, tag, _internal_metadata_.mutable_unknown_fields()));
  10665. break;
  10666. }
  10667. }
  10668. }
  10669. success:
  10670. // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.ListCollectionIdsResponse)
  10671. return true;
  10672. failure:
  10673. // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.ListCollectionIdsResponse)
  10674. return false;
  10675. #undef DO_
  10676. }
  10677. void ListCollectionIdsResponse::SerializeWithCachedSizes(
  10678. ::google::protobuf::io::CodedOutputStream* output) const {
  10679. // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.ListCollectionIdsResponse)
  10680. ::google::protobuf::uint32 cached_has_bits = 0;
  10681. (void) cached_has_bits;
  10682. // repeated string collection_ids = 1;
  10683. for (int i = 0, n = this->collection_ids_size(); i < n; i++) {
  10684. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  10685. this->collection_ids(i).data(), static_cast<int>(this->collection_ids(i).length()),
  10686. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  10687. "google.firestore.v1beta1.ListCollectionIdsResponse.collection_ids");
  10688. ::google::protobuf::internal::WireFormatLite::WriteString(
  10689. 1, this->collection_ids(i), output);
  10690. }
  10691. // string next_page_token = 2;
  10692. if (this->next_page_token().size() > 0) {
  10693. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  10694. this->next_page_token().data(), static_cast<int>(this->next_page_token().length()),
  10695. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  10696. "google.firestore.v1beta1.ListCollectionIdsResponse.next_page_token");
  10697. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  10698. 2, this->next_page_token(), output);
  10699. }
  10700. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  10701. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  10702. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  10703. }
  10704. // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.ListCollectionIdsResponse)
  10705. }
  10706. ::google::protobuf::uint8* ListCollectionIdsResponse::InternalSerializeWithCachedSizesToArray(
  10707. bool deterministic, ::google::protobuf::uint8* target) const {
  10708. (void)deterministic; // Unused
  10709. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.ListCollectionIdsResponse)
  10710. ::google::protobuf::uint32 cached_has_bits = 0;
  10711. (void) cached_has_bits;
  10712. // repeated string collection_ids = 1;
  10713. for (int i = 0, n = this->collection_ids_size(); i < n; i++) {
  10714. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  10715. this->collection_ids(i).data(), static_cast<int>(this->collection_ids(i).length()),
  10716. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  10717. "google.firestore.v1beta1.ListCollectionIdsResponse.collection_ids");
  10718. target = ::google::protobuf::internal::WireFormatLite::
  10719. WriteStringToArray(1, this->collection_ids(i), target);
  10720. }
  10721. // string next_page_token = 2;
  10722. if (this->next_page_token().size() > 0) {
  10723. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  10724. this->next_page_token().data(), static_cast<int>(this->next_page_token().length()),
  10725. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  10726. "google.firestore.v1beta1.ListCollectionIdsResponse.next_page_token");
  10727. target =
  10728. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  10729. 2, this->next_page_token(), target);
  10730. }
  10731. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  10732. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  10733. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  10734. }
  10735. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.ListCollectionIdsResponse)
  10736. return target;
  10737. }
  10738. size_t ListCollectionIdsResponse::ByteSizeLong() const {
  10739. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.ListCollectionIdsResponse)
  10740. size_t total_size = 0;
  10741. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  10742. total_size +=
  10743. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  10744. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  10745. }
  10746. // repeated string collection_ids = 1;
  10747. total_size += 1 *
  10748. ::google::protobuf::internal::FromIntSize(this->collection_ids_size());
  10749. for (int i = 0, n = this->collection_ids_size(); i < n; i++) {
  10750. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  10751. this->collection_ids(i));
  10752. }
  10753. // string next_page_token = 2;
  10754. if (this->next_page_token().size() > 0) {
  10755. total_size += 1 +
  10756. ::google::protobuf::internal::WireFormatLite::StringSize(
  10757. this->next_page_token());
  10758. }
  10759. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  10760. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  10761. _cached_size_ = cached_size;
  10762. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  10763. return total_size;
  10764. }
  10765. void ListCollectionIdsResponse::MergeFrom(const ::google::protobuf::Message& from) {
  10766. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.ListCollectionIdsResponse)
  10767. GOOGLE_DCHECK_NE(&from, this);
  10768. const ListCollectionIdsResponse* source =
  10769. ::google::protobuf::internal::DynamicCastToGenerated<const ListCollectionIdsResponse>(
  10770. &from);
  10771. if (source == NULL) {
  10772. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.ListCollectionIdsResponse)
  10773. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  10774. } else {
  10775. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.ListCollectionIdsResponse)
  10776. MergeFrom(*source);
  10777. }
  10778. }
  10779. void ListCollectionIdsResponse::MergeFrom(const ListCollectionIdsResponse& from) {
  10780. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.ListCollectionIdsResponse)
  10781. GOOGLE_DCHECK_NE(&from, this);
  10782. _internal_metadata_.MergeFrom(from._internal_metadata_);
  10783. ::google::protobuf::uint32 cached_has_bits = 0;
  10784. (void) cached_has_bits;
  10785. collection_ids_.MergeFrom(from.collection_ids_);
  10786. if (from.next_page_token().size() > 0) {
  10787. next_page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.next_page_token_);
  10788. }
  10789. }
  10790. void ListCollectionIdsResponse::CopyFrom(const ::google::protobuf::Message& from) {
  10791. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.ListCollectionIdsResponse)
  10792. if (&from == this) return;
  10793. Clear();
  10794. MergeFrom(from);
  10795. }
  10796. void ListCollectionIdsResponse::CopyFrom(const ListCollectionIdsResponse& from) {
  10797. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.ListCollectionIdsResponse)
  10798. if (&from == this) return;
  10799. Clear();
  10800. MergeFrom(from);
  10801. }
  10802. bool ListCollectionIdsResponse::IsInitialized() const {
  10803. return true;
  10804. }
  10805. void ListCollectionIdsResponse::Swap(ListCollectionIdsResponse* other) {
  10806. if (other == this) return;
  10807. InternalSwap(other);
  10808. }
  10809. void ListCollectionIdsResponse::InternalSwap(ListCollectionIdsResponse* other) {
  10810. using std::swap;
  10811. collection_ids_.InternalSwap(&other->collection_ids_);
  10812. next_page_token_.Swap(&other->next_page_token_);
  10813. _internal_metadata_.Swap(&other->_internal_metadata_);
  10814. swap(_cached_size_, other->_cached_size_);
  10815. }
  10816. ::google::protobuf::Metadata ListCollectionIdsResponse::GetMetadata() const {
  10817. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  10818. return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  10819. }
  10820. // @@protoc_insertion_point(namespace_scope)
  10821. } // namespace v1beta1
  10822. } // namespace firestore
  10823. } // namespace google
  10824. // @@protoc_insertion_point(global_scope)