firestore.pb.cc 472 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999
  1. /*
  2. * Copyright 2018 Google
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. // Generated by the protocol buffer compiler. DO NOT EDIT!
  17. // source: google/firestore/v1/firestore.proto
  18. #include "google/firestore/v1/firestore.pb.h"
  19. #include <algorithm>
  20. #include <google/protobuf/stubs/common.h>
  21. #include <google/protobuf/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 v1 {
  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::v1::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::v1::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::v1::StructuredQuery* structured_query_;
  116. ::google::protobuf::internal::ArenaStringPtr transaction_;
  117. const ::google::firestore::v1::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::v1::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::v1::TargetChange* target_change_;
  157. const ::google::firestore::v1::DocumentChange* document_change_;
  158. const ::google::firestore::v1::DocumentDelete* document_delete_;
  159. const ::google::firestore::v1::DocumentRemove* document_remove_;
  160. const ::google::firestore::v1::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::v1::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::v1::Target_QueryTarget* query_;
  178. const ::google::firestore::v1::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 v1
  198. } // namespace firestore
  199. } // namespace google
  200. namespace protobuf_google_2ffirestore_2fv1_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_2fv1_2fcommon_2eproto::InitDefaultsDocumentMask();
  209. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  210. {
  211. void* ptr = &::google::firestore::v1::_GetDocumentRequest_default_instance_;
  212. new (ptr) ::google::firestore::v1::GetDocumentRequest();
  213. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  214. }
  215. ::google::firestore::v1::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_2fv1_2fcommon_2eproto::InitDefaultsDocumentMask();
  229. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  230. {
  231. void* ptr = &::google::firestore::v1::_ListDocumentsRequest_default_instance_;
  232. new (ptr) ::google::firestore::v1::ListDocumentsRequest();
  233. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  234. }
  235. ::google::firestore::v1::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_2fv1_2fdocument_2eproto::InitDefaultsDocument();
  249. {
  250. void* ptr = &::google::firestore::v1::_ListDocumentsResponse_default_instance_;
  251. new (ptr) ::google::firestore::v1::ListDocumentsResponse();
  252. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  253. }
  254. ::google::firestore::v1::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_2fv1_2fdocument_2eproto::InitDefaultsDocument();
  268. protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsDocumentMask();
  269. {
  270. void* ptr = &::google::firestore::v1::_CreateDocumentRequest_default_instance_;
  271. new (ptr) ::google::firestore::v1::CreateDocumentRequest();
  272. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  273. }
  274. ::google::firestore::v1::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_2fv1_2fdocument_2eproto::InitDefaultsDocument();
  288. protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsDocumentMask();
  289. protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsPrecondition();
  290. {
  291. void* ptr = &::google::firestore::v1::_UpdateDocumentRequest_default_instance_;
  292. new (ptr) ::google::firestore::v1::UpdateDocumentRequest();
  293. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  294. }
  295. ::google::firestore::v1::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_2fv1_2fcommon_2eproto::InitDefaultsPrecondition();
  309. {
  310. void* ptr = &::google::firestore::v1::_DeleteDocumentRequest_default_instance_;
  311. new (ptr) ::google::firestore::v1::DeleteDocumentRequest();
  312. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  313. }
  314. ::google::firestore::v1::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_2fv1_2fcommon_2eproto::InitDefaultsDocumentMask();
  328. protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsTransactionOptions();
  329. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  330. {
  331. void* ptr = &::google::firestore::v1::_BatchGetDocumentsRequest_default_instance_;
  332. new (ptr) ::google::firestore::v1::BatchGetDocumentsRequest();
  333. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  334. }
  335. ::google::firestore::v1::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_2fv1_2fdocument_2eproto::InitDefaultsDocument();
  349. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  350. {
  351. void* ptr = &::google::firestore::v1::_BatchGetDocumentsResponse_default_instance_;
  352. new (ptr) ::google::firestore::v1::BatchGetDocumentsResponse();
  353. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  354. }
  355. ::google::firestore::v1::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_2fv1_2fcommon_2eproto::InitDefaultsTransactionOptions();
  369. {
  370. void* ptr = &::google::firestore::v1::_BeginTransactionRequest_default_instance_;
  371. new (ptr) ::google::firestore::v1::BeginTransactionRequest();
  372. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  373. }
  374. ::google::firestore::v1::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::v1::_BeginTransactionResponse_default_instance_;
  389. new (ptr) ::google::firestore::v1::BeginTransactionResponse();
  390. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  391. }
  392. ::google::firestore::v1::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_2fv1_2fwrite_2eproto::InitDefaultsWrite();
  406. {
  407. void* ptr = &::google::firestore::v1::_CommitRequest_default_instance_;
  408. new (ptr) ::google::firestore::v1::CommitRequest();
  409. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  410. }
  411. ::google::firestore::v1::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_2fv1_2fwrite_2eproto::InitDefaultsWriteResult();
  425. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  426. {
  427. void* ptr = &::google::firestore::v1::_CommitResponse_default_instance_;
  428. new (ptr) ::google::firestore::v1::CommitResponse();
  429. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  430. }
  431. ::google::firestore::v1::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::v1::_RollbackRequest_default_instance_;
  446. new (ptr) ::google::firestore::v1::RollbackRequest();
  447. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  448. }
  449. ::google::firestore::v1::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_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery();
  463. protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsTransactionOptions();
  464. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  465. {
  466. void* ptr = &::google::firestore::v1::_RunQueryRequest_default_instance_;
  467. new (ptr) ::google::firestore::v1::RunQueryRequest();
  468. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  469. }
  470. ::google::firestore::v1::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_2fv1_2fdocument_2eproto::InitDefaultsDocument();
  484. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  485. {
  486. void* ptr = &::google::firestore::v1::_RunQueryResponse_default_instance_;
  487. new (ptr) ::google::firestore::v1::RunQueryResponse();
  488. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  489. }
  490. ::google::firestore::v1::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::v1::_WriteRequest_LabelsEntry_DoNotUse_default_instance_;
  505. new (ptr) ::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse();
  506. }
  507. ::google::firestore::v1::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_2fv1_2fwrite_2eproto::InitDefaultsWrite();
  521. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsWriteRequest_LabelsEntry_DoNotUse();
  522. {
  523. void* ptr = &::google::firestore::v1::_WriteRequest_default_instance_;
  524. new (ptr) ::google::firestore::v1::WriteRequest();
  525. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  526. }
  527. ::google::firestore::v1::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_2fv1_2fwrite_2eproto::InitDefaultsWriteResult();
  541. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  542. {
  543. void* ptr = &::google::firestore::v1::_WriteResponse_default_instance_;
  544. new (ptr) ::google::firestore::v1::WriteResponse();
  545. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  546. }
  547. ::google::firestore::v1::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::v1::_ListenRequest_LabelsEntry_DoNotUse_default_instance_;
  562. new (ptr) ::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse();
  563. }
  564. ::google::firestore::v1::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_2fv1_2ffirestore_2eproto::InitDefaultsTarget();
  578. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListenRequest_LabelsEntry_DoNotUse();
  579. {
  580. void* ptr = &::google::firestore::v1::_ListenRequest_default_instance_;
  581. new (ptr) ::google::firestore::v1::ListenRequest();
  582. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  583. }
  584. ::google::firestore::v1::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_2fv1_2ffirestore_2eproto::InitDefaultsTargetChange();
  598. protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentChange();
  599. protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentDelete();
  600. protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentRemove();
  601. protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsExistenceFilter();
  602. {
  603. void* ptr = &::google::firestore::v1::_ListenResponse_default_instance_;
  604. new (ptr) ::google::firestore::v1::ListenResponse();
  605. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  606. }
  607. ::google::firestore::v1::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::v1::_Target_DocumentsTarget_default_instance_;
  622. new (ptr) ::google::firestore::v1::Target_DocumentsTarget();
  623. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  624. }
  625. ::google::firestore::v1::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_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery();
  639. {
  640. void* ptr = &::google::firestore::v1::_Target_QueryTarget_default_instance_;
  641. new (ptr) ::google::firestore::v1::Target_QueryTarget();
  642. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  643. }
  644. ::google::firestore::v1::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_2fv1_2ffirestore_2eproto::InitDefaultsTarget_QueryTarget();
  658. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsTarget_DocumentsTarget();
  659. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  660. {
  661. void* ptr = &::google::firestore::v1::_Target_default_instance_;
  662. new (ptr) ::google::firestore::v1::Target();
  663. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  664. }
  665. ::google::firestore::v1::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::v1::_TargetChange_default_instance_;
  682. new (ptr) ::google::firestore::v1::TargetChange();
  683. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  684. }
  685. ::google::firestore::v1::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::v1::_ListCollectionIdsRequest_default_instance_;
  700. new (ptr) ::google::firestore::v1::ListCollectionIdsRequest();
  701. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  702. }
  703. ::google::firestore::v1::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::v1::_ListCollectionIdsResponse_default_instance_;
  718. new (ptr) ::google::firestore::v1::ListCollectionIdsResponse();
  719. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  720. }
  721. ::google::firestore::v1::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::v1::GetDocumentRequest, _internal_metadata_),
  732. ~0u, // no _extensions_
  733. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::GetDocumentRequest, _oneof_case_[0]),
  734. ~0u, // no _weak_field_map_
  735. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::GetDocumentRequest, name_),
  736. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::GetDocumentRequest, mask_),
  737. offsetof(::google::firestore::v1::GetDocumentRequestDefaultTypeInternal, transaction_),
  738. offsetof(::google::firestore::v1::GetDocumentRequestDefaultTypeInternal, read_time_),
  739. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::GetDocumentRequest, consistency_selector_),
  740. ~0u, // no _has_bits_
  741. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, _internal_metadata_),
  742. ~0u, // no _extensions_
  743. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, _oneof_case_[0]),
  744. ~0u, // no _weak_field_map_
  745. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, parent_),
  746. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, collection_id_),
  747. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, page_size_),
  748. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, page_token_),
  749. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, order_by_),
  750. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, mask_),
  751. offsetof(::google::firestore::v1::ListDocumentsRequestDefaultTypeInternal, transaction_),
  752. offsetof(::google::firestore::v1::ListDocumentsRequestDefaultTypeInternal, read_time_),
  753. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, show_missing_),
  754. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, consistency_selector_),
  755. ~0u, // no _has_bits_
  756. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::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::v1::ListDocumentsResponse, documents_),
  761. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListDocumentsResponse, next_page_token_),
  762. ~0u, // no _has_bits_
  763. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::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::v1::CreateDocumentRequest, parent_),
  768. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::CreateDocumentRequest, collection_id_),
  769. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::CreateDocumentRequest, document_id_),
  770. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::CreateDocumentRequest, document_),
  771. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::CreateDocumentRequest, mask_),
  772. ~0u, // no _has_bits_
  773. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::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::v1::UpdateDocumentRequest, document_),
  778. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::UpdateDocumentRequest, update_mask_),
  779. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::UpdateDocumentRequest, mask_),
  780. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::UpdateDocumentRequest, current_document_),
  781. ~0u, // no _has_bits_
  782. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::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::v1::DeleteDocumentRequest, name_),
  787. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DeleteDocumentRequest, current_document_),
  788. ~0u, // no _has_bits_
  789. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsRequest, _internal_metadata_),
  790. ~0u, // no _extensions_
  791. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsRequest, _oneof_case_[0]),
  792. ~0u, // no _weak_field_map_
  793. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsRequest, database_),
  794. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsRequest, documents_),
  795. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsRequest, mask_),
  796. offsetof(::google::firestore::v1::BatchGetDocumentsRequestDefaultTypeInternal, transaction_),
  797. offsetof(::google::firestore::v1::BatchGetDocumentsRequestDefaultTypeInternal, new_transaction_),
  798. offsetof(::google::firestore::v1::BatchGetDocumentsRequestDefaultTypeInternal, read_time_),
  799. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsRequest, consistency_selector_),
  800. ~0u, // no _has_bits_
  801. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsResponse, _internal_metadata_),
  802. ~0u, // no _extensions_
  803. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsResponse, _oneof_case_[0]),
  804. ~0u, // no _weak_field_map_
  805. offsetof(::google::firestore::v1::BatchGetDocumentsResponseDefaultTypeInternal, found_),
  806. offsetof(::google::firestore::v1::BatchGetDocumentsResponseDefaultTypeInternal, missing_),
  807. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsResponse, transaction_),
  808. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsResponse, read_time_),
  809. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsResponse, result_),
  810. ~0u, // no _has_bits_
  811. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::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::v1::BeginTransactionRequest, database_),
  816. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BeginTransactionRequest, options_),
  817. ~0u, // no _has_bits_
  818. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::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::v1::BeginTransactionResponse, transaction_),
  823. ~0u, // no _has_bits_
  824. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::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::v1::CommitRequest, database_),
  829. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::CommitRequest, writes_),
  830. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::CommitRequest, transaction_),
  831. ~0u, // no _has_bits_
  832. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::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::v1::CommitResponse, write_results_),
  837. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::CommitResponse, commit_time_),
  838. ~0u, // no _has_bits_
  839. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::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::v1::RollbackRequest, database_),
  844. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::RollbackRequest, transaction_),
  845. ~0u, // no _has_bits_
  846. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::RunQueryRequest, _internal_metadata_),
  847. ~0u, // no _extensions_
  848. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::RunQueryRequest, _oneof_case_[0]),
  849. ~0u, // no _weak_field_map_
  850. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::RunQueryRequest, parent_),
  851. offsetof(::google::firestore::v1::RunQueryRequestDefaultTypeInternal, structured_query_),
  852. offsetof(::google::firestore::v1::RunQueryRequestDefaultTypeInternal, transaction_),
  853. offsetof(::google::firestore::v1::RunQueryRequestDefaultTypeInternal, new_transaction_),
  854. offsetof(::google::firestore::v1::RunQueryRequestDefaultTypeInternal, read_time_),
  855. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::RunQueryRequest, query_type_),
  856. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::RunQueryRequest, consistency_selector_),
  857. ~0u, // no _has_bits_
  858. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::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::v1::RunQueryResponse, transaction_),
  863. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::RunQueryResponse, document_),
  864. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::RunQueryResponse, read_time_),
  865. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::RunQueryResponse, skipped_results_),
  866. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse, _has_bits_),
  867. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::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::v1::WriteRequest_LabelsEntry_DoNotUse, key_),
  872. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse, value_),
  873. 0,
  874. 1,
  875. ~0u, // no _has_bits_
  876. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::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::v1::WriteRequest, database_),
  881. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteRequest, stream_id_),
  882. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteRequest, writes_),
  883. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteRequest, stream_token_),
  884. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteRequest, labels_),
  885. ~0u, // no _has_bits_
  886. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::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::v1::WriteResponse, stream_id_),
  891. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteResponse, stream_token_),
  892. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteResponse, write_results_),
  893. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteResponse, commit_time_),
  894. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse, _has_bits_),
  895. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::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::v1::ListenRequest_LabelsEntry_DoNotUse, key_),
  900. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse, value_),
  901. 0,
  902. 1,
  903. ~0u, // no _has_bits_
  904. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListenRequest, _internal_metadata_),
  905. ~0u, // no _extensions_
  906. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListenRequest, _oneof_case_[0]),
  907. ~0u, // no _weak_field_map_
  908. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListenRequest, database_),
  909. offsetof(::google::firestore::v1::ListenRequestDefaultTypeInternal, add_target_),
  910. offsetof(::google::firestore::v1::ListenRequestDefaultTypeInternal, remove_target_),
  911. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListenRequest, labels_),
  912. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListenRequest, target_change_),
  913. ~0u, // no _has_bits_
  914. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListenResponse, _internal_metadata_),
  915. ~0u, // no _extensions_
  916. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListenResponse, _oneof_case_[0]),
  917. ~0u, // no _weak_field_map_
  918. offsetof(::google::firestore::v1::ListenResponseDefaultTypeInternal, target_change_),
  919. offsetof(::google::firestore::v1::ListenResponseDefaultTypeInternal, document_change_),
  920. offsetof(::google::firestore::v1::ListenResponseDefaultTypeInternal, document_delete_),
  921. offsetof(::google::firestore::v1::ListenResponseDefaultTypeInternal, document_remove_),
  922. offsetof(::google::firestore::v1::ListenResponseDefaultTypeInternal, filter_),
  923. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListenResponse, response_type_),
  924. ~0u, // no _has_bits_
  925. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::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::v1::Target_DocumentsTarget, documents_),
  930. ~0u, // no _has_bits_
  931. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Target_QueryTarget, _internal_metadata_),
  932. ~0u, // no _extensions_
  933. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Target_QueryTarget, _oneof_case_[0]),
  934. ~0u, // no _weak_field_map_
  935. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Target_QueryTarget, parent_),
  936. offsetof(::google::firestore::v1::Target_QueryTargetDefaultTypeInternal, structured_query_),
  937. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Target_QueryTarget, query_type_),
  938. ~0u, // no _has_bits_
  939. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Target, _internal_metadata_),
  940. ~0u, // no _extensions_
  941. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Target, _oneof_case_[0]),
  942. ~0u, // no _weak_field_map_
  943. offsetof(::google::firestore::v1::TargetDefaultTypeInternal, query_),
  944. offsetof(::google::firestore::v1::TargetDefaultTypeInternal, documents_),
  945. offsetof(::google::firestore::v1::TargetDefaultTypeInternal, resume_token_),
  946. offsetof(::google::firestore::v1::TargetDefaultTypeInternal, read_time_),
  947. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Target, target_id_),
  948. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Target, once_),
  949. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Target, target_type_),
  950. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Target, resume_type_),
  951. ~0u, // no _has_bits_
  952. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::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::v1::TargetChange, target_change_type_),
  957. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::TargetChange, target_ids_),
  958. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::TargetChange, cause_),
  959. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::TargetChange, resume_token_),
  960. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::TargetChange, read_time_),
  961. ~0u, // no _has_bits_
  962. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::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::v1::ListCollectionIdsRequest, parent_),
  967. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListCollectionIdsRequest, page_size_),
  968. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListCollectionIdsRequest, page_token_),
  969. ~0u, // no _has_bits_
  970. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::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::v1::ListCollectionIdsResponse, collection_ids_),
  975. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::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::v1::GetDocumentRequest)},
  979. { 10, -1, sizeof(::google::firestore::v1::ListDocumentsRequest)},
  980. { 25, -1, sizeof(::google::firestore::v1::ListDocumentsResponse)},
  981. { 32, -1, sizeof(::google::firestore::v1::CreateDocumentRequest)},
  982. { 42, -1, sizeof(::google::firestore::v1::UpdateDocumentRequest)},
  983. { 51, -1, sizeof(::google::firestore::v1::DeleteDocumentRequest)},
  984. { 58, -1, sizeof(::google::firestore::v1::BatchGetDocumentsRequest)},
  985. { 70, -1, sizeof(::google::firestore::v1::BatchGetDocumentsResponse)},
  986. { 80, -1, sizeof(::google::firestore::v1::BeginTransactionRequest)},
  987. { 87, -1, sizeof(::google::firestore::v1::BeginTransactionResponse)},
  988. { 93, -1, sizeof(::google::firestore::v1::CommitRequest)},
  989. { 101, -1, sizeof(::google::firestore::v1::CommitResponse)},
  990. { 108, -1, sizeof(::google::firestore::v1::RollbackRequest)},
  991. { 115, -1, sizeof(::google::firestore::v1::RunQueryRequest)},
  992. { 127, -1, sizeof(::google::firestore::v1::RunQueryResponse)},
  993. { 136, 143, sizeof(::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse)},
  994. { 145, -1, sizeof(::google::firestore::v1::WriteRequest)},
  995. { 155, -1, sizeof(::google::firestore::v1::WriteResponse)},
  996. { 164, 171, sizeof(::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse)},
  997. { 173, -1, sizeof(::google::firestore::v1::ListenRequest)},
  998. { 183, -1, sizeof(::google::firestore::v1::ListenResponse)},
  999. { 194, -1, sizeof(::google::firestore::v1::Target_DocumentsTarget)},
  1000. { 200, -1, sizeof(::google::firestore::v1::Target_QueryTarget)},
  1001. { 208, -1, sizeof(::google::firestore::v1::Target)},
  1002. { 221, -1, sizeof(::google::firestore::v1::TargetChange)},
  1003. { 231, -1, sizeof(::google::firestore::v1::ListCollectionIdsRequest)},
  1004. { 239, -1, sizeof(::google::firestore::v1::ListCollectionIdsResponse)},
  1005. };
  1006. static ::google::protobuf::Message const * const file_default_instances[] = {
  1007. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_GetDocumentRequest_default_instance_),
  1008. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_ListDocumentsRequest_default_instance_),
  1009. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_ListDocumentsResponse_default_instance_),
  1010. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_CreateDocumentRequest_default_instance_),
  1011. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_UpdateDocumentRequest_default_instance_),
  1012. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_DeleteDocumentRequest_default_instance_),
  1013. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_BatchGetDocumentsRequest_default_instance_),
  1014. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_BatchGetDocumentsResponse_default_instance_),
  1015. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_BeginTransactionRequest_default_instance_),
  1016. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_BeginTransactionResponse_default_instance_),
  1017. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_CommitRequest_default_instance_),
  1018. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_CommitResponse_default_instance_),
  1019. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_RollbackRequest_default_instance_),
  1020. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_RunQueryRequest_default_instance_),
  1021. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_RunQueryResponse_default_instance_),
  1022. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_WriteRequest_LabelsEntry_DoNotUse_default_instance_),
  1023. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_WriteRequest_default_instance_),
  1024. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_WriteResponse_default_instance_),
  1025. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_ListenRequest_LabelsEntry_DoNotUse_default_instance_),
  1026. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_ListenRequest_default_instance_),
  1027. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_ListenResponse_default_instance_),
  1028. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_Target_DocumentsTarget_default_instance_),
  1029. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_Target_QueryTarget_default_instance_),
  1030. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_Target_default_instance_),
  1031. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_TargetChange_default_instance_),
  1032. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_ListCollectionIdsRequest_default_instance_),
  1033. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_ListCollectionIdsResponse_default_instance_),
  1034. };
  1035. void protobuf_AssignDescriptors() {
  1036. AddDescriptors();
  1037. ::google::protobuf::MessageFactory* factory = NULL;
  1038. AssignDescriptors(
  1039. "google/firestore/v1/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/v1/firestore.proto\022\023g"
  1055. "oogle.firestore.v1\032\034google/api/annotatio"
  1056. "ns.proto\032 google/firestore/v1/common.pro"
  1057. "to\032\"google/firestore/v1/document.proto\032\037"
  1058. "google/firestore/v1/query.proto\032\037google/"
  1059. "firestore/v1/write.proto\032\033google/protobu"
  1060. "f/empty.proto\032\037google/protobuf/timestamp"
  1061. ".proto\032\027google/rpc/status.proto\"\263\001\n\022GetD"
  1062. "ocumentRequest\022\014\n\004name\030\001 \001(\t\022/\n\004mask\030\002 \001"
  1063. "(\0132!.google.firestore.v1.DocumentMask\022\025\n"
  1064. "\013transaction\030\003 \001(\014H\000\022/\n\tread_time\030\005 \001(\0132"
  1065. "\032.google.protobuf.TimestampH\000B\026\n\024consist"
  1066. "ency_selector\"\235\002\n\024ListDocumentsRequest\022\016"
  1067. "\n\006parent\030\001 \001(\t\022\025\n\rcollection_id\030\002 \001(\t\022\021\n"
  1068. "\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022\020\n\010"
  1069. "order_by\030\006 \001(\t\022/\n\004mask\030\007 \001(\0132!.google.fi"
  1070. "restore.v1.DocumentMask\022\025\n\013transaction\030\010"
  1071. " \001(\014H\000\022/\n\tread_time\030\n \001(\0132\032.google.proto"
  1072. "buf.TimestampH\000\022\024\n\014show_missing\030\014 \001(\010B\026\n"
  1073. "\024consistency_selector\"b\n\025ListDocumentsRe"
  1074. "sponse\0220\n\tdocuments\030\001 \003(\0132\035.google.fires"
  1075. "tore.v1.Document\022\027\n\017next_page_token\030\002 \001("
  1076. "\t\"\265\001\n\025CreateDocumentRequest\022\016\n\006parent\030\001 "
  1077. "\001(\t\022\025\n\rcollection_id\030\002 \001(\t\022\023\n\013document_i"
  1078. "d\030\003 \001(\t\022/\n\010document\030\004 \001(\0132\035.google.fires"
  1079. "tore.v1.Document\022/\n\004mask\030\005 \001(\0132!.google."
  1080. "firestore.v1.DocumentMask\"\356\001\n\025UpdateDocu"
  1081. "mentRequest\022/\n\010document\030\001 \001(\0132\035.google.f"
  1082. "irestore.v1.Document\0226\n\013update_mask\030\002 \001("
  1083. "\0132!.google.firestore.v1.DocumentMask\022/\n\004"
  1084. "mask\030\003 \001(\0132!.google.firestore.v1.Documen"
  1085. "tMask\022;\n\020current_document\030\004 \001(\0132!.google"
  1086. ".firestore.v1.Precondition\"b\n\025DeleteDocu"
  1087. "mentRequest\022\014\n\004name\030\001 \001(\t\022;\n\020current_doc"
  1088. "ument\030\002 \001(\0132!.google.firestore.v1.Precon"
  1089. "dition\"\224\002\n\030BatchGetDocumentsRequest\022\020\n\010d"
  1090. "atabase\030\001 \001(\t\022\021\n\tdocuments\030\002 \003(\t\022/\n\004mask"
  1091. "\030\003 \001(\0132!.google.firestore.v1.DocumentMas"
  1092. "k\022\025\n\013transaction\030\004 \001(\014H\000\022B\n\017new_transact"
  1093. "ion\030\005 \001(\0132\'.google.firestore.v1.Transact"
  1094. "ionOptionsH\000\022/\n\tread_time\030\007 \001(\0132\032.google"
  1095. ".protobuf.TimestampH\000B\026\n\024consistency_sel"
  1096. "ector\"\254\001\n\031BatchGetDocumentsResponse\022.\n\005f"
  1097. "ound\030\001 \001(\0132\035.google.firestore.v1.Documen"
  1098. "tH\000\022\021\n\007missing\030\002 \001(\tH\000\022\023\n\013transaction\030\003 "
  1099. "\001(\014\022-\n\tread_time\030\004 \001(\0132\032.google.protobuf"
  1100. ".TimestampB\010\n\006result\"e\n\027BeginTransaction"
  1101. "Request\022\020\n\010database\030\001 \001(\t\0228\n\007options\030\002 \001"
  1102. "(\0132\'.google.firestore.v1.TransactionOpti"
  1103. "ons\"/\n\030BeginTransactionResponse\022\023\n\013trans"
  1104. "action\030\001 \001(\014\"b\n\rCommitRequest\022\020\n\010databas"
  1105. "e\030\001 \001(\t\022*\n\006writes\030\002 \003(\0132\032.google.firesto"
  1106. "re.v1.Write\022\023\n\013transaction\030\003 \001(\014\"z\n\016Comm"
  1107. "itResponse\0227\n\rwrite_results\030\001 \003(\0132 .goog"
  1108. "le.firestore.v1.WriteResult\022/\n\013commit_ti"
  1109. "me\030\002 \001(\0132\032.google.protobuf.Timestamp\"8\n\017"
  1110. "RollbackRequest\022\020\n\010database\030\001 \001(\t\022\023\n\013tra"
  1111. "nsaction\030\002 \001(\014\"\225\002\n\017RunQueryRequest\022\016\n\006pa"
  1112. "rent\030\001 \001(\t\022@\n\020structured_query\030\002 \001(\0132$.g"
  1113. "oogle.firestore.v1.StructuredQueryH\000\022\025\n\013"
  1114. "transaction\030\005 \001(\014H\001\022B\n\017new_transaction\030\006"
  1115. " \001(\0132\'.google.firestore.v1.TransactionOp"
  1116. "tionsH\001\022/\n\tread_time\030\007 \001(\0132\032.google.prot"
  1117. "obuf.TimestampH\001B\014\n\nquery_typeB\026\n\024consis"
  1118. "tency_selector\"\240\001\n\020RunQueryResponse\022\023\n\013t"
  1119. "ransaction\030\002 \001(\014\022/\n\010document\030\001 \001(\0132\035.goo"
  1120. "gle.firestore.v1.Document\022-\n\tread_time\030\003"
  1121. " \001(\0132\032.google.protobuf.Timestamp\022\027\n\017skip"
  1122. "ped_results\030\004 \001(\005\"\343\001\n\014WriteRequest\022\020\n\010da"
  1123. "tabase\030\001 \001(\t\022\021\n\tstream_id\030\002 \001(\t\022*\n\006write"
  1124. "s\030\003 \003(\0132\032.google.firestore.v1.Write\022\024\n\014s"
  1125. "tream_token\030\004 \001(\014\022=\n\006labels\030\005 \003(\0132-.goog"
  1126. "le.firestore.v1.WriteRequest.LabelsEntry"
  1127. "\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 "
  1128. "\001(\t:\0028\001\"\242\001\n\rWriteResponse\022\021\n\tstream_id\030\001"
  1129. " \001(\t\022\024\n\014stream_token\030\002 \001(\014\0227\n\rwrite_resu"
  1130. "lts\030\003 \003(\0132 .google.firestore.v1.WriteRes"
  1131. "ult\022/\n\013commit_time\030\004 \001(\0132\032.google.protob"
  1132. "uf.Timestamp\"\355\001\n\rListenRequest\022\020\n\010databa"
  1133. "se\030\001 \001(\t\0221\n\nadd_target\030\002 \001(\0132\033.google.fi"
  1134. "restore.v1.TargetH\000\022\027\n\rremove_target\030\003 \001"
  1135. "(\005H\000\022>\n\006labels\030\004 \003(\0132..google.firestore."
  1136. "v1.ListenRequest.LabelsEntry\032-\n\013LabelsEn"
  1137. "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\017\n\rt"
  1138. "arget_change\"\325\002\n\016ListenResponse\022:\n\rtarge"
  1139. "t_change\030\002 \001(\0132!.google.firestore.v1.Tar"
  1140. "getChangeH\000\022>\n\017document_change\030\003 \001(\0132#.g"
  1141. "oogle.firestore.v1.DocumentChangeH\000\022>\n\017d"
  1142. "ocument_delete\030\004 \001(\0132#.google.firestore."
  1143. "v1.DocumentDeleteH\000\022>\n\017document_remove\030\006"
  1144. " \001(\0132#.google.firestore.v1.DocumentRemov"
  1145. "eH\000\0226\n\006filter\030\005 \001(\0132$.google.firestore.v"
  1146. "1.ExistenceFilterH\000B\017\n\rresponse_type\"\241\003\n"
  1147. "\006Target\0228\n\005query\030\002 \001(\0132\'.google.firestor"
  1148. "e.v1.Target.QueryTargetH\000\022@\n\tdocuments\030\003"
  1149. " \001(\0132+.google.firestore.v1.Target.Docume"
  1150. "ntsTargetH\000\022\026\n\014resume_token\030\004 \001(\014H\001\022/\n\tr"
  1151. "ead_time\030\013 \001(\0132\032.google.protobuf.Timesta"
  1152. "mpH\001\022\021\n\ttarget_id\030\005 \001(\005\022\014\n\004once\030\006 \001(\010\032$\n"
  1153. "\017DocumentsTarget\022\021\n\tdocuments\030\002 \003(\t\032m\n\013Q"
  1154. "ueryTarget\022\016\n\006parent\030\001 \001(\t\022@\n\020structured"
  1155. "_query\030\002 \001(\0132$.google.firestore.v1.Struc"
  1156. "turedQueryH\000B\014\n\nquery_typeB\r\n\013target_typ"
  1157. "eB\r\n\013resume_type\"\252\002\n\014TargetChange\022N\n\022tar"
  1158. "get_change_type\030\001 \001(\01622.google.firestore"
  1159. ".v1.TargetChange.TargetChangeType\022\022\n\ntar"
  1160. "get_ids\030\002 \003(\005\022!\n\005cause\030\003 \001(\0132\022.google.rp"
  1161. "c.Status\022\024\n\014resume_token\030\004 \001(\014\022-\n\tread_t"
  1162. "ime\030\006 \001(\0132\032.google.protobuf.Timestamp\"N\n"
  1163. "\020TargetChangeType\022\r\n\tNO_CHANGE\020\000\022\007\n\003ADD\020"
  1164. "\001\022\n\n\006REMOVE\020\002\022\013\n\007CURRENT\020\003\022\t\n\005RESET\020\004\"Q\n"
  1165. "\030ListCollectionIdsRequest\022\016\n\006parent\030\001 \001("
  1166. "\t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t"
  1167. "\"L\n\031ListCollectionIdsResponse\022\026\n\016collect"
  1168. "ion_ids\030\001 \003(\t\022\027\n\017next_page_token\030\002 \001(\t2\204"
  1169. "\022\n\tFirestore\022\217\001\n\013GetDocument\022\'.google.fi"
  1170. "restore.v1.GetDocumentRequest\032\035.google.f"
  1171. "irestore.v1.Document\"8\202\323\344\223\0022\0220/v1/{name="
  1172. "projects/*/databases/*/documents/*/**}\022\262"
  1173. "\001\n\rListDocuments\022).google.firestore.v1.L"
  1174. "istDocumentsRequest\032*.google.firestore.v"
  1175. "1.ListDocumentsResponse\"J\202\323\344\223\002D\022B/v1/{pa"
  1176. "rent=projects/*/databases/*/documents/*/"
  1177. "**}/{collection_id}\022\257\001\n\016CreateDocument\022*"
  1178. ".google.firestore.v1.CreateDocumentReque"
  1179. "st\032\035.google.firestore.v1.Document\"R\202\323\344\223\002"
  1180. "L\"@/v1/{parent=projects/*/databases/*/do"
  1181. "cuments/**}/{collection_id}:\010document\022\250\001"
  1182. "\n\016UpdateDocument\022*.google.firestore.v1.U"
  1183. "pdateDocumentRequest\032\035.google.firestore."
  1184. "v1.Document\"K\202\323\344\223\002E29/v1/{document.name="
  1185. "projects/*/databases/*/documents/*/**}:\010"
  1186. "document\022\216\001\n\016DeleteDocument\022*.google.fir"
  1187. "estore.v1.DeleteDocumentRequest\032\026.google"
  1188. ".protobuf.Empty\"8\202\323\344\223\0022*0/v1/{name=proje"
  1189. "cts/*/databases/*/documents/*/**}\022\271\001\n\021Ba"
  1190. "tchGetDocuments\022-.google.firestore.v1.Ba"
  1191. "tchGetDocumentsRequest\032..google.firestor"
  1192. "e.v1.BatchGetDocumentsResponse\"C\202\323\344\223\002=\"8"
  1193. "/v1/{database=projects/*/databases/*}/do"
  1194. "cuments:batchGet:\001*0\001\022\274\001\n\020BeginTransacti"
  1195. "on\022,.google.firestore.v1.BeginTransactio"
  1196. "nRequest\032-.google.firestore.v1.BeginTran"
  1197. "sactionResponse\"K\202\323\344\223\002E\"@/v1/{database=p"
  1198. "rojects/*/databases/*}/documents:beginTr"
  1199. "ansaction:\001*\022\224\001\n\006Commit\022\".google.firesto"
  1200. "re.v1.CommitRequest\032#.google.firestore.v"
  1201. "1.CommitResponse\"A\202\323\344\223\002;\"6/v1/{database="
  1202. "projects/*/databases/*}/documents:commit"
  1203. ":\001*\022\215\001\n\010Rollback\022$.google.firestore.v1.R"
  1204. "ollbackRequest\032\026.google.protobuf.Empty\"C"
  1205. "\202\323\344\223\002=\"8/v1/{database=projects/*/databas"
  1206. "es/*}/documents:rollback:\001*\022\337\001\n\010RunQuery"
  1207. "\022$.google.firestore.v1.RunQueryRequest\032%"
  1208. ".google.firestore.v1.RunQueryResponse\"\203\001"
  1209. "\202\323\344\223\002}\"6/v1/{parent=projects/*/databases"
  1210. "/*/documents}:runQuery:\001*Z@\";/v1/{parent"
  1211. "=projects/*/databases/*/documents/*/**}:"
  1212. "runQuery:\001*0\001\022\224\001\n\005Write\022!.google.firesto"
  1213. "re.v1.WriteRequest\032\".google.firestore.v1"
  1214. ".WriteResponse\"@\202\323\344\223\002:\"5/v1/{database=pr"
  1215. "ojects/*/databases/*}/documents:write:\001*"
  1216. "(\0010\001\022\230\001\n\006Listen\022\".google.firestore.v1.Li"
  1217. "stenRequest\032#.google.firestore.v1.Listen"
  1218. "Response\"A\202\323\344\223\002;\"6/v1/{database=projects"
  1219. "/*/databases/*}/documents:listen:\001*(\0010\001\022"
  1220. "\213\002\n\021ListCollectionIds\022-.google.firestore"
  1221. ".v1.ListCollectionIdsRequest\032..google.fi"
  1222. "restore.v1.ListCollectionIdsResponse\"\226\001\202"
  1223. "\323\344\223\002\217\001\"\?/v1/{parent=projects/*/databases"
  1224. "/*/documents}:listCollectionIds:\001*ZI\"D/v"
  1225. "1/{parent=projects/*/databases/*/documen"
  1226. "ts/*/**}:listCollectionIds:\001*B\262\001\n\027com.go"
  1227. "ogle.firestore.v1B\016FirestoreProtoP\001Z<goo"
  1228. "gle.golang.org/genproto/googleapis/fires"
  1229. "tore/v1;firestore\242\002\004GCFS\252\002\036Google.Cloud."
  1230. "Firestore.V1Beta1\312\002\036Google\\Cloud\\Firesto"
  1231. "re\\V1beta1b\006proto3"
  1232. };
  1233. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  1234. descriptor, 7098);
  1235. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  1236. "google/firestore/v1/firestore.proto", &protobuf_RegisterTypes);
  1237. ::protobuf_google_2fapi_2fannotations_2eproto::AddDescriptors();
  1238. ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::AddDescriptors();
  1239. ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::AddDescriptors();
  1240. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::AddDescriptors();
  1241. ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::AddDescriptors();
  1242. ::protobuf_google_2fprotobuf_2fempty_2eproto::AddDescriptors();
  1243. ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::AddDescriptors();
  1244. ::protobuf_google_2frpc_2fstatus_2eproto::AddDescriptors();
  1245. }
  1246. void AddDescriptors() {
  1247. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  1248. ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
  1249. }
  1250. // Force AddDescriptors() to be called at dynamic initialization time.
  1251. struct StaticDescriptorInitializer {
  1252. StaticDescriptorInitializer() {
  1253. AddDescriptors();
  1254. }
  1255. } static_descriptor_initializer;
  1256. } // namespace protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto
  1257. namespace google {
  1258. namespace firestore {
  1259. namespace v1 {
  1260. const ::google::protobuf::EnumDescriptor* TargetChange_TargetChangeType_descriptor() {
  1261. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  1262. return protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_enum_descriptors[0];
  1263. }
  1264. bool TargetChange_TargetChangeType_IsValid(int value) {
  1265. switch (value) {
  1266. case 0:
  1267. case 1:
  1268. case 2:
  1269. case 3:
  1270. case 4:
  1271. return true;
  1272. default:
  1273. return false;
  1274. }
  1275. }
  1276. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1277. const TargetChange_TargetChangeType TargetChange::NO_CHANGE;
  1278. const TargetChange_TargetChangeType TargetChange::ADD;
  1279. const TargetChange_TargetChangeType TargetChange::REMOVE;
  1280. const TargetChange_TargetChangeType TargetChange::CURRENT;
  1281. const TargetChange_TargetChangeType TargetChange::RESET;
  1282. const TargetChange_TargetChangeType TargetChange::TargetChangeType_MIN;
  1283. const TargetChange_TargetChangeType TargetChange::TargetChangeType_MAX;
  1284. const int TargetChange::TargetChangeType_ARRAYSIZE;
  1285. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1286. // ===================================================================
  1287. void GetDocumentRequest::InitAsDefaultInstance() {
  1288. ::google::firestore::v1::_GetDocumentRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1::DocumentMask*>(
  1289. ::google::firestore::v1::DocumentMask::internal_default_instance());
  1290. ::google::firestore::v1::_GetDocumentRequest_default_instance_.transaction_.UnsafeSetDefault(
  1291. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1292. ::google::firestore::v1::_GetDocumentRequest_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>(
  1293. ::google::protobuf::Timestamp::internal_default_instance());
  1294. }
  1295. void GetDocumentRequest::clear_mask() {
  1296. if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
  1297. delete mask_;
  1298. }
  1299. mask_ = NULL;
  1300. }
  1301. void GetDocumentRequest::set_allocated_read_time(::google::protobuf::Timestamp* read_time) {
  1302. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  1303. clear_consistency_selector();
  1304. if (read_time) {
  1305. ::google::protobuf::Arena* submessage_arena =
  1306. reinterpret_cast< ::google::protobuf::MessageLite*>(read_time)->GetArena();
  1307. if (message_arena != submessage_arena) {
  1308. read_time = ::google::protobuf::internal::GetOwnedMessage(
  1309. message_arena, read_time, submessage_arena);
  1310. }
  1311. set_has_read_time();
  1312. consistency_selector_.read_time_ = read_time;
  1313. }
  1314. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.GetDocumentRequest.read_time)
  1315. }
  1316. void GetDocumentRequest::clear_read_time() {
  1317. if (has_read_time()) {
  1318. delete consistency_selector_.read_time_;
  1319. clear_has_consistency_selector();
  1320. }
  1321. }
  1322. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1323. const int GetDocumentRequest::kNameFieldNumber;
  1324. const int GetDocumentRequest::kMaskFieldNumber;
  1325. const int GetDocumentRequest::kTransactionFieldNumber;
  1326. const int GetDocumentRequest::kReadTimeFieldNumber;
  1327. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1328. GetDocumentRequest::GetDocumentRequest()
  1329. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1330. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  1331. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsGetDocumentRequest();
  1332. }
  1333. SharedCtor();
  1334. // @@protoc_insertion_point(constructor:google.firestore.v1.GetDocumentRequest)
  1335. }
  1336. GetDocumentRequest::GetDocumentRequest(const GetDocumentRequest& from)
  1337. : ::google::protobuf::Message(),
  1338. _internal_metadata_(NULL),
  1339. _cached_size_(0) {
  1340. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1341. name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1342. if (from.name().size() > 0) {
  1343. name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  1344. }
  1345. if (from.has_mask()) {
  1346. mask_ = new ::google::firestore::v1::DocumentMask(*from.mask_);
  1347. } else {
  1348. mask_ = NULL;
  1349. }
  1350. clear_has_consistency_selector();
  1351. switch (from.consistency_selector_case()) {
  1352. case kTransaction: {
  1353. set_transaction(from.transaction());
  1354. break;
  1355. }
  1356. case kReadTime: {
  1357. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  1358. break;
  1359. }
  1360. case CONSISTENCY_SELECTOR_NOT_SET: {
  1361. break;
  1362. }
  1363. }
  1364. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.GetDocumentRequest)
  1365. }
  1366. void GetDocumentRequest::SharedCtor() {
  1367. name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1368. mask_ = NULL;
  1369. clear_has_consistency_selector();
  1370. _cached_size_ = 0;
  1371. }
  1372. GetDocumentRequest::~GetDocumentRequest() {
  1373. // @@protoc_insertion_point(destructor:google.firestore.v1.GetDocumentRequest)
  1374. SharedDtor();
  1375. }
  1376. void GetDocumentRequest::SharedDtor() {
  1377. name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1378. if (this != internal_default_instance()) delete mask_;
  1379. if (has_consistency_selector()) {
  1380. clear_consistency_selector();
  1381. }
  1382. }
  1383. void GetDocumentRequest::SetCachedSize(int size) const {
  1384. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1385. _cached_size_ = size;
  1386. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1387. }
  1388. const ::google::protobuf::Descriptor* GetDocumentRequest::descriptor() {
  1389. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  1390. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1391. }
  1392. const GetDocumentRequest& GetDocumentRequest::default_instance() {
  1393. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsGetDocumentRequest();
  1394. return *internal_default_instance();
  1395. }
  1396. GetDocumentRequest* GetDocumentRequest::New(::google::protobuf::Arena* arena) const {
  1397. GetDocumentRequest* n = new GetDocumentRequest;
  1398. if (arena != NULL) {
  1399. arena->Own(n);
  1400. }
  1401. return n;
  1402. }
  1403. void GetDocumentRequest::clear_consistency_selector() {
  1404. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.GetDocumentRequest)
  1405. switch (consistency_selector_case()) {
  1406. case kTransaction: {
  1407. consistency_selector_.transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1408. break;
  1409. }
  1410. case kReadTime: {
  1411. delete consistency_selector_.read_time_;
  1412. break;
  1413. }
  1414. case CONSISTENCY_SELECTOR_NOT_SET: {
  1415. break;
  1416. }
  1417. }
  1418. _oneof_case_[0] = CONSISTENCY_SELECTOR_NOT_SET;
  1419. }
  1420. void GetDocumentRequest::Clear() {
  1421. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.GetDocumentRequest)
  1422. ::google::protobuf::uint32 cached_has_bits = 0;
  1423. // Prevent compiler warnings about cached_has_bits being unused
  1424. (void) cached_has_bits;
  1425. name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1426. if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
  1427. delete mask_;
  1428. }
  1429. mask_ = NULL;
  1430. clear_consistency_selector();
  1431. _internal_metadata_.Clear();
  1432. }
  1433. bool GetDocumentRequest::MergePartialFromCodedStream(
  1434. ::google::protobuf::io::CodedInputStream* input) {
  1435. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1436. ::google::protobuf::uint32 tag;
  1437. // @@protoc_insertion_point(parse_start:google.firestore.v1.GetDocumentRequest)
  1438. for (;;) {
  1439. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1440. tag = p.first;
  1441. if (!p.second) goto handle_unusual;
  1442. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1443. // string name = 1;
  1444. case 1: {
  1445. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1446. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1447. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1448. input, this->mutable_name()));
  1449. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1450. this->name().data(), static_cast<int>(this->name().length()),
  1451. ::google::protobuf::internal::WireFormatLite::PARSE,
  1452. "google.firestore.v1.GetDocumentRequest.name"));
  1453. } else {
  1454. goto handle_unusual;
  1455. }
  1456. break;
  1457. }
  1458. // .google.firestore.v1.DocumentMask mask = 2;
  1459. case 2: {
  1460. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1461. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  1462. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1463. input, mutable_mask()));
  1464. } else {
  1465. goto handle_unusual;
  1466. }
  1467. break;
  1468. }
  1469. // bytes transaction = 3;
  1470. case 3: {
  1471. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1472. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  1473. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  1474. input, this->mutable_transaction()));
  1475. } else {
  1476. goto handle_unusual;
  1477. }
  1478. break;
  1479. }
  1480. // .google.protobuf.Timestamp read_time = 5;
  1481. case 5: {
  1482. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1483. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  1484. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1485. input, mutable_read_time()));
  1486. } else {
  1487. goto handle_unusual;
  1488. }
  1489. break;
  1490. }
  1491. default: {
  1492. handle_unusual:
  1493. if (tag == 0) {
  1494. goto success;
  1495. }
  1496. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1497. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1498. break;
  1499. }
  1500. }
  1501. }
  1502. success:
  1503. // @@protoc_insertion_point(parse_success:google.firestore.v1.GetDocumentRequest)
  1504. return true;
  1505. failure:
  1506. // @@protoc_insertion_point(parse_failure:google.firestore.v1.GetDocumentRequest)
  1507. return false;
  1508. #undef DO_
  1509. }
  1510. void GetDocumentRequest::SerializeWithCachedSizes(
  1511. ::google::protobuf::io::CodedOutputStream* output) const {
  1512. // @@protoc_insertion_point(serialize_start:google.firestore.v1.GetDocumentRequest)
  1513. ::google::protobuf::uint32 cached_has_bits = 0;
  1514. (void) cached_has_bits;
  1515. // string name = 1;
  1516. if (this->name().size() > 0) {
  1517. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1518. this->name().data(), static_cast<int>(this->name().length()),
  1519. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1520. "google.firestore.v1.GetDocumentRequest.name");
  1521. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  1522. 1, this->name(), output);
  1523. }
  1524. // .google.firestore.v1.DocumentMask mask = 2;
  1525. if (this->has_mask()) {
  1526. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1527. 2, *this->mask_, output);
  1528. }
  1529. // bytes transaction = 3;
  1530. if (has_transaction()) {
  1531. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  1532. 3, this->transaction(), output);
  1533. }
  1534. // .google.protobuf.Timestamp read_time = 5;
  1535. if (has_read_time()) {
  1536. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1537. 5, *consistency_selector_.read_time_, output);
  1538. }
  1539. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1540. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1541. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1542. }
  1543. // @@protoc_insertion_point(serialize_end:google.firestore.v1.GetDocumentRequest)
  1544. }
  1545. ::google::protobuf::uint8* GetDocumentRequest::InternalSerializeWithCachedSizesToArray(
  1546. bool deterministic, ::google::protobuf::uint8* target) const {
  1547. (void)deterministic; // Unused
  1548. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.GetDocumentRequest)
  1549. ::google::protobuf::uint32 cached_has_bits = 0;
  1550. (void) cached_has_bits;
  1551. // string name = 1;
  1552. if (this->name().size() > 0) {
  1553. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1554. this->name().data(), static_cast<int>(this->name().length()),
  1555. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1556. "google.firestore.v1.GetDocumentRequest.name");
  1557. target =
  1558. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  1559. 1, this->name(), target);
  1560. }
  1561. // .google.firestore.v1.DocumentMask mask = 2;
  1562. if (this->has_mask()) {
  1563. target = ::google::protobuf::internal::WireFormatLite::
  1564. InternalWriteMessageToArray(
  1565. 2, *this->mask_, deterministic, target);
  1566. }
  1567. // bytes transaction = 3;
  1568. if (has_transaction()) {
  1569. target =
  1570. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  1571. 3, this->transaction(), target);
  1572. }
  1573. // .google.protobuf.Timestamp read_time = 5;
  1574. if (has_read_time()) {
  1575. target = ::google::protobuf::internal::WireFormatLite::
  1576. InternalWriteMessageToArray(
  1577. 5, *consistency_selector_.read_time_, deterministic, target);
  1578. }
  1579. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1580. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1581. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1582. }
  1583. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.GetDocumentRequest)
  1584. return target;
  1585. }
  1586. size_t GetDocumentRequest::ByteSizeLong() const {
  1587. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.GetDocumentRequest)
  1588. size_t total_size = 0;
  1589. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1590. total_size +=
  1591. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1592. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1593. }
  1594. // string name = 1;
  1595. if (this->name().size() > 0) {
  1596. total_size += 1 +
  1597. ::google::protobuf::internal::WireFormatLite::StringSize(
  1598. this->name());
  1599. }
  1600. // .google.firestore.v1.DocumentMask mask = 2;
  1601. if (this->has_mask()) {
  1602. total_size += 1 +
  1603. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1604. *this->mask_);
  1605. }
  1606. switch (consistency_selector_case()) {
  1607. // bytes transaction = 3;
  1608. case kTransaction: {
  1609. total_size += 1 +
  1610. ::google::protobuf::internal::WireFormatLite::BytesSize(
  1611. this->transaction());
  1612. break;
  1613. }
  1614. // .google.protobuf.Timestamp read_time = 5;
  1615. case kReadTime: {
  1616. total_size += 1 +
  1617. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1618. *consistency_selector_.read_time_);
  1619. break;
  1620. }
  1621. case CONSISTENCY_SELECTOR_NOT_SET: {
  1622. break;
  1623. }
  1624. }
  1625. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1626. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1627. _cached_size_ = cached_size;
  1628. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1629. return total_size;
  1630. }
  1631. void GetDocumentRequest::MergeFrom(const ::google::protobuf::Message& from) {
  1632. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.GetDocumentRequest)
  1633. GOOGLE_DCHECK_NE(&from, this);
  1634. const GetDocumentRequest* source =
  1635. ::google::protobuf::internal::DynamicCastToGenerated<const GetDocumentRequest>(
  1636. &from);
  1637. if (source == NULL) {
  1638. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.GetDocumentRequest)
  1639. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1640. } else {
  1641. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.GetDocumentRequest)
  1642. MergeFrom(*source);
  1643. }
  1644. }
  1645. void GetDocumentRequest::MergeFrom(const GetDocumentRequest& from) {
  1646. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.GetDocumentRequest)
  1647. GOOGLE_DCHECK_NE(&from, this);
  1648. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1649. ::google::protobuf::uint32 cached_has_bits = 0;
  1650. (void) cached_has_bits;
  1651. if (from.name().size() > 0) {
  1652. name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  1653. }
  1654. if (from.has_mask()) {
  1655. mutable_mask()->::google::firestore::v1::DocumentMask::MergeFrom(from.mask());
  1656. }
  1657. switch (from.consistency_selector_case()) {
  1658. case kTransaction: {
  1659. set_transaction(from.transaction());
  1660. break;
  1661. }
  1662. case kReadTime: {
  1663. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  1664. break;
  1665. }
  1666. case CONSISTENCY_SELECTOR_NOT_SET: {
  1667. break;
  1668. }
  1669. }
  1670. }
  1671. void GetDocumentRequest::CopyFrom(const ::google::protobuf::Message& from) {
  1672. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.GetDocumentRequest)
  1673. if (&from == this) return;
  1674. Clear();
  1675. MergeFrom(from);
  1676. }
  1677. void GetDocumentRequest::CopyFrom(const GetDocumentRequest& from) {
  1678. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.GetDocumentRequest)
  1679. if (&from == this) return;
  1680. Clear();
  1681. MergeFrom(from);
  1682. }
  1683. bool GetDocumentRequest::IsInitialized() const {
  1684. return true;
  1685. }
  1686. void GetDocumentRequest::Swap(GetDocumentRequest* other) {
  1687. if (other == this) return;
  1688. InternalSwap(other);
  1689. }
  1690. void GetDocumentRequest::InternalSwap(GetDocumentRequest* other) {
  1691. using std::swap;
  1692. name_.Swap(&other->name_);
  1693. swap(mask_, other->mask_);
  1694. swap(consistency_selector_, other->consistency_selector_);
  1695. swap(_oneof_case_[0], other->_oneof_case_[0]);
  1696. _internal_metadata_.Swap(&other->_internal_metadata_);
  1697. swap(_cached_size_, other->_cached_size_);
  1698. }
  1699. ::google::protobuf::Metadata GetDocumentRequest::GetMetadata() const {
  1700. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  1701. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  1702. }
  1703. // ===================================================================
  1704. void ListDocumentsRequest::InitAsDefaultInstance() {
  1705. ::google::firestore::v1::_ListDocumentsRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1::DocumentMask*>(
  1706. ::google::firestore::v1::DocumentMask::internal_default_instance());
  1707. ::google::firestore::v1::_ListDocumentsRequest_default_instance_.transaction_.UnsafeSetDefault(
  1708. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1709. ::google::firestore::v1::_ListDocumentsRequest_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>(
  1710. ::google::protobuf::Timestamp::internal_default_instance());
  1711. }
  1712. void ListDocumentsRequest::clear_mask() {
  1713. if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
  1714. delete mask_;
  1715. }
  1716. mask_ = NULL;
  1717. }
  1718. void ListDocumentsRequest::set_allocated_read_time(::google::protobuf::Timestamp* read_time) {
  1719. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  1720. clear_consistency_selector();
  1721. if (read_time) {
  1722. ::google::protobuf::Arena* submessage_arena =
  1723. reinterpret_cast< ::google::protobuf::MessageLite*>(read_time)->GetArena();
  1724. if (message_arena != submessage_arena) {
  1725. read_time = ::google::protobuf::internal::GetOwnedMessage(
  1726. message_arena, read_time, submessage_arena);
  1727. }
  1728. set_has_read_time();
  1729. consistency_selector_.read_time_ = read_time;
  1730. }
  1731. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListDocumentsRequest.read_time)
  1732. }
  1733. void ListDocumentsRequest::clear_read_time() {
  1734. if (has_read_time()) {
  1735. delete consistency_selector_.read_time_;
  1736. clear_has_consistency_selector();
  1737. }
  1738. }
  1739. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1740. const int ListDocumentsRequest::kParentFieldNumber;
  1741. const int ListDocumentsRequest::kCollectionIdFieldNumber;
  1742. const int ListDocumentsRequest::kPageSizeFieldNumber;
  1743. const int ListDocumentsRequest::kPageTokenFieldNumber;
  1744. const int ListDocumentsRequest::kOrderByFieldNumber;
  1745. const int ListDocumentsRequest::kMaskFieldNumber;
  1746. const int ListDocumentsRequest::kTransactionFieldNumber;
  1747. const int ListDocumentsRequest::kReadTimeFieldNumber;
  1748. const int ListDocumentsRequest::kShowMissingFieldNumber;
  1749. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1750. ListDocumentsRequest::ListDocumentsRequest()
  1751. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1752. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  1753. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListDocumentsRequest();
  1754. }
  1755. SharedCtor();
  1756. // @@protoc_insertion_point(constructor:google.firestore.v1.ListDocumentsRequest)
  1757. }
  1758. ListDocumentsRequest::ListDocumentsRequest(const ListDocumentsRequest& from)
  1759. : ::google::protobuf::Message(),
  1760. _internal_metadata_(NULL),
  1761. _cached_size_(0) {
  1762. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1763. parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1764. if (from.parent().size() > 0) {
  1765. parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  1766. }
  1767. collection_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1768. if (from.collection_id().size() > 0) {
  1769. collection_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.collection_id_);
  1770. }
  1771. page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1772. if (from.page_token().size() > 0) {
  1773. page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.page_token_);
  1774. }
  1775. order_by_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1776. if (from.order_by().size() > 0) {
  1777. order_by_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.order_by_);
  1778. }
  1779. if (from.has_mask()) {
  1780. mask_ = new ::google::firestore::v1::DocumentMask(*from.mask_);
  1781. } else {
  1782. mask_ = NULL;
  1783. }
  1784. ::memcpy(&page_size_, &from.page_size_,
  1785. static_cast<size_t>(reinterpret_cast<char*>(&show_missing_) -
  1786. reinterpret_cast<char*>(&page_size_)) + sizeof(show_missing_));
  1787. clear_has_consistency_selector();
  1788. switch (from.consistency_selector_case()) {
  1789. case kTransaction: {
  1790. set_transaction(from.transaction());
  1791. break;
  1792. }
  1793. case kReadTime: {
  1794. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  1795. break;
  1796. }
  1797. case CONSISTENCY_SELECTOR_NOT_SET: {
  1798. break;
  1799. }
  1800. }
  1801. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ListDocumentsRequest)
  1802. }
  1803. void ListDocumentsRequest::SharedCtor() {
  1804. parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1805. collection_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1806. page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1807. order_by_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1808. ::memset(&mask_, 0, static_cast<size_t>(
  1809. reinterpret_cast<char*>(&show_missing_) -
  1810. reinterpret_cast<char*>(&mask_)) + sizeof(show_missing_));
  1811. clear_has_consistency_selector();
  1812. _cached_size_ = 0;
  1813. }
  1814. ListDocumentsRequest::~ListDocumentsRequest() {
  1815. // @@protoc_insertion_point(destructor:google.firestore.v1.ListDocumentsRequest)
  1816. SharedDtor();
  1817. }
  1818. void ListDocumentsRequest::SharedDtor() {
  1819. parent_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1820. collection_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1821. page_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1822. order_by_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1823. if (this != internal_default_instance()) delete mask_;
  1824. if (has_consistency_selector()) {
  1825. clear_consistency_selector();
  1826. }
  1827. }
  1828. void ListDocumentsRequest::SetCachedSize(int size) const {
  1829. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1830. _cached_size_ = size;
  1831. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1832. }
  1833. const ::google::protobuf::Descriptor* ListDocumentsRequest::descriptor() {
  1834. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  1835. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1836. }
  1837. const ListDocumentsRequest& ListDocumentsRequest::default_instance() {
  1838. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListDocumentsRequest();
  1839. return *internal_default_instance();
  1840. }
  1841. ListDocumentsRequest* ListDocumentsRequest::New(::google::protobuf::Arena* arena) const {
  1842. ListDocumentsRequest* n = new ListDocumentsRequest;
  1843. if (arena != NULL) {
  1844. arena->Own(n);
  1845. }
  1846. return n;
  1847. }
  1848. void ListDocumentsRequest::clear_consistency_selector() {
  1849. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.ListDocumentsRequest)
  1850. switch (consistency_selector_case()) {
  1851. case kTransaction: {
  1852. consistency_selector_.transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1853. break;
  1854. }
  1855. case kReadTime: {
  1856. delete consistency_selector_.read_time_;
  1857. break;
  1858. }
  1859. case CONSISTENCY_SELECTOR_NOT_SET: {
  1860. break;
  1861. }
  1862. }
  1863. _oneof_case_[0] = CONSISTENCY_SELECTOR_NOT_SET;
  1864. }
  1865. void ListDocumentsRequest::Clear() {
  1866. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.ListDocumentsRequest)
  1867. ::google::protobuf::uint32 cached_has_bits = 0;
  1868. // Prevent compiler warnings about cached_has_bits being unused
  1869. (void) cached_has_bits;
  1870. parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1871. collection_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1872. page_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1873. order_by_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1874. if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
  1875. delete mask_;
  1876. }
  1877. mask_ = NULL;
  1878. ::memset(&page_size_, 0, static_cast<size_t>(
  1879. reinterpret_cast<char*>(&show_missing_) -
  1880. reinterpret_cast<char*>(&page_size_)) + sizeof(show_missing_));
  1881. clear_consistency_selector();
  1882. _internal_metadata_.Clear();
  1883. }
  1884. bool ListDocumentsRequest::MergePartialFromCodedStream(
  1885. ::google::protobuf::io::CodedInputStream* input) {
  1886. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1887. ::google::protobuf::uint32 tag;
  1888. // @@protoc_insertion_point(parse_start:google.firestore.v1.ListDocumentsRequest)
  1889. for (;;) {
  1890. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1891. tag = p.first;
  1892. if (!p.second) goto handle_unusual;
  1893. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1894. // string parent = 1;
  1895. case 1: {
  1896. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1897. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1898. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1899. input, this->mutable_parent()));
  1900. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1901. this->parent().data(), static_cast<int>(this->parent().length()),
  1902. ::google::protobuf::internal::WireFormatLite::PARSE,
  1903. "google.firestore.v1.ListDocumentsRequest.parent"));
  1904. } else {
  1905. goto handle_unusual;
  1906. }
  1907. break;
  1908. }
  1909. // string collection_id = 2;
  1910. case 2: {
  1911. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1912. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  1913. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1914. input, this->mutable_collection_id()));
  1915. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1916. this->collection_id().data(), static_cast<int>(this->collection_id().length()),
  1917. ::google::protobuf::internal::WireFormatLite::PARSE,
  1918. "google.firestore.v1.ListDocumentsRequest.collection_id"));
  1919. } else {
  1920. goto handle_unusual;
  1921. }
  1922. break;
  1923. }
  1924. // int32 page_size = 3;
  1925. case 3: {
  1926. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1927. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  1928. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1929. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  1930. input, &page_size_)));
  1931. } else {
  1932. goto handle_unusual;
  1933. }
  1934. break;
  1935. }
  1936. // string page_token = 4;
  1937. case 4: {
  1938. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1939. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  1940. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1941. input, this->mutable_page_token()));
  1942. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1943. this->page_token().data(), static_cast<int>(this->page_token().length()),
  1944. ::google::protobuf::internal::WireFormatLite::PARSE,
  1945. "google.firestore.v1.ListDocumentsRequest.page_token"));
  1946. } else {
  1947. goto handle_unusual;
  1948. }
  1949. break;
  1950. }
  1951. // string order_by = 6;
  1952. case 6: {
  1953. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1954. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  1955. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1956. input, this->mutable_order_by()));
  1957. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1958. this->order_by().data(), static_cast<int>(this->order_by().length()),
  1959. ::google::protobuf::internal::WireFormatLite::PARSE,
  1960. "google.firestore.v1.ListDocumentsRequest.order_by"));
  1961. } else {
  1962. goto handle_unusual;
  1963. }
  1964. break;
  1965. }
  1966. // .google.firestore.v1.DocumentMask mask = 7;
  1967. case 7: {
  1968. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1969. static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
  1970. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1971. input, mutable_mask()));
  1972. } else {
  1973. goto handle_unusual;
  1974. }
  1975. break;
  1976. }
  1977. // bytes transaction = 8;
  1978. case 8: {
  1979. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1980. static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
  1981. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  1982. input, this->mutable_transaction()));
  1983. } else {
  1984. goto handle_unusual;
  1985. }
  1986. break;
  1987. }
  1988. // .google.protobuf.Timestamp read_time = 10;
  1989. case 10: {
  1990. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1991. static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) {
  1992. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1993. input, mutable_read_time()));
  1994. } else {
  1995. goto handle_unusual;
  1996. }
  1997. break;
  1998. }
  1999. // bool show_missing = 12;
  2000. case 12: {
  2001. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2002. static_cast< ::google::protobuf::uint8>(96u /* 96 & 0xFF */)) {
  2003. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2004. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  2005. input, &show_missing_)));
  2006. } else {
  2007. goto handle_unusual;
  2008. }
  2009. break;
  2010. }
  2011. default: {
  2012. handle_unusual:
  2013. if (tag == 0) {
  2014. goto success;
  2015. }
  2016. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2017. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2018. break;
  2019. }
  2020. }
  2021. }
  2022. success:
  2023. // @@protoc_insertion_point(parse_success:google.firestore.v1.ListDocumentsRequest)
  2024. return true;
  2025. failure:
  2026. // @@protoc_insertion_point(parse_failure:google.firestore.v1.ListDocumentsRequest)
  2027. return false;
  2028. #undef DO_
  2029. }
  2030. void ListDocumentsRequest::SerializeWithCachedSizes(
  2031. ::google::protobuf::io::CodedOutputStream* output) const {
  2032. // @@protoc_insertion_point(serialize_start:google.firestore.v1.ListDocumentsRequest)
  2033. ::google::protobuf::uint32 cached_has_bits = 0;
  2034. (void) cached_has_bits;
  2035. // string parent = 1;
  2036. if (this->parent().size() > 0) {
  2037. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2038. this->parent().data(), static_cast<int>(this->parent().length()),
  2039. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2040. "google.firestore.v1.ListDocumentsRequest.parent");
  2041. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  2042. 1, this->parent(), output);
  2043. }
  2044. // string collection_id = 2;
  2045. if (this->collection_id().size() > 0) {
  2046. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2047. this->collection_id().data(), static_cast<int>(this->collection_id().length()),
  2048. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2049. "google.firestore.v1.ListDocumentsRequest.collection_id");
  2050. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  2051. 2, this->collection_id(), output);
  2052. }
  2053. // int32 page_size = 3;
  2054. if (this->page_size() != 0) {
  2055. ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->page_size(), output);
  2056. }
  2057. // string page_token = 4;
  2058. if (this->page_token().size() > 0) {
  2059. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2060. this->page_token().data(), static_cast<int>(this->page_token().length()),
  2061. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2062. "google.firestore.v1.ListDocumentsRequest.page_token");
  2063. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  2064. 4, this->page_token(), output);
  2065. }
  2066. // string order_by = 6;
  2067. if (this->order_by().size() > 0) {
  2068. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2069. this->order_by().data(), static_cast<int>(this->order_by().length()),
  2070. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2071. "google.firestore.v1.ListDocumentsRequest.order_by");
  2072. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  2073. 6, this->order_by(), output);
  2074. }
  2075. // .google.firestore.v1.DocumentMask mask = 7;
  2076. if (this->has_mask()) {
  2077. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2078. 7, *this->mask_, output);
  2079. }
  2080. // bytes transaction = 8;
  2081. if (has_transaction()) {
  2082. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  2083. 8, this->transaction(), output);
  2084. }
  2085. // .google.protobuf.Timestamp read_time = 10;
  2086. if (has_read_time()) {
  2087. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2088. 10, *consistency_selector_.read_time_, output);
  2089. }
  2090. // bool show_missing = 12;
  2091. if (this->show_missing() != 0) {
  2092. ::google::protobuf::internal::WireFormatLite::WriteBool(12, this->show_missing(), output);
  2093. }
  2094. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2095. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2096. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2097. }
  2098. // @@protoc_insertion_point(serialize_end:google.firestore.v1.ListDocumentsRequest)
  2099. }
  2100. ::google::protobuf::uint8* ListDocumentsRequest::InternalSerializeWithCachedSizesToArray(
  2101. bool deterministic, ::google::protobuf::uint8* target) const {
  2102. (void)deterministic; // Unused
  2103. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ListDocumentsRequest)
  2104. ::google::protobuf::uint32 cached_has_bits = 0;
  2105. (void) cached_has_bits;
  2106. // string parent = 1;
  2107. if (this->parent().size() > 0) {
  2108. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2109. this->parent().data(), static_cast<int>(this->parent().length()),
  2110. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2111. "google.firestore.v1.ListDocumentsRequest.parent");
  2112. target =
  2113. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  2114. 1, this->parent(), target);
  2115. }
  2116. // string collection_id = 2;
  2117. if (this->collection_id().size() > 0) {
  2118. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2119. this->collection_id().data(), static_cast<int>(this->collection_id().length()),
  2120. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2121. "google.firestore.v1.ListDocumentsRequest.collection_id");
  2122. target =
  2123. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  2124. 2, this->collection_id(), target);
  2125. }
  2126. // int32 page_size = 3;
  2127. if (this->page_size() != 0) {
  2128. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->page_size(), target);
  2129. }
  2130. // string page_token = 4;
  2131. if (this->page_token().size() > 0) {
  2132. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2133. this->page_token().data(), static_cast<int>(this->page_token().length()),
  2134. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2135. "google.firestore.v1.ListDocumentsRequest.page_token");
  2136. target =
  2137. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  2138. 4, this->page_token(), target);
  2139. }
  2140. // string order_by = 6;
  2141. if (this->order_by().size() > 0) {
  2142. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2143. this->order_by().data(), static_cast<int>(this->order_by().length()),
  2144. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2145. "google.firestore.v1.ListDocumentsRequest.order_by");
  2146. target =
  2147. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  2148. 6, this->order_by(), target);
  2149. }
  2150. // .google.firestore.v1.DocumentMask mask = 7;
  2151. if (this->has_mask()) {
  2152. target = ::google::protobuf::internal::WireFormatLite::
  2153. InternalWriteMessageToArray(
  2154. 7, *this->mask_, deterministic, target);
  2155. }
  2156. // bytes transaction = 8;
  2157. if (has_transaction()) {
  2158. target =
  2159. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  2160. 8, this->transaction(), target);
  2161. }
  2162. // .google.protobuf.Timestamp read_time = 10;
  2163. if (has_read_time()) {
  2164. target = ::google::protobuf::internal::WireFormatLite::
  2165. InternalWriteMessageToArray(
  2166. 10, *consistency_selector_.read_time_, deterministic, target);
  2167. }
  2168. // bool show_missing = 12;
  2169. if (this->show_missing() != 0) {
  2170. target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(12, this->show_missing(), target);
  2171. }
  2172. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2173. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2174. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2175. }
  2176. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ListDocumentsRequest)
  2177. return target;
  2178. }
  2179. size_t ListDocumentsRequest::ByteSizeLong() const {
  2180. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ListDocumentsRequest)
  2181. size_t total_size = 0;
  2182. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2183. total_size +=
  2184. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2185. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2186. }
  2187. // string parent = 1;
  2188. if (this->parent().size() > 0) {
  2189. total_size += 1 +
  2190. ::google::protobuf::internal::WireFormatLite::StringSize(
  2191. this->parent());
  2192. }
  2193. // string collection_id = 2;
  2194. if (this->collection_id().size() > 0) {
  2195. total_size += 1 +
  2196. ::google::protobuf::internal::WireFormatLite::StringSize(
  2197. this->collection_id());
  2198. }
  2199. // string page_token = 4;
  2200. if (this->page_token().size() > 0) {
  2201. total_size += 1 +
  2202. ::google::protobuf::internal::WireFormatLite::StringSize(
  2203. this->page_token());
  2204. }
  2205. // string order_by = 6;
  2206. if (this->order_by().size() > 0) {
  2207. total_size += 1 +
  2208. ::google::protobuf::internal::WireFormatLite::StringSize(
  2209. this->order_by());
  2210. }
  2211. // .google.firestore.v1.DocumentMask mask = 7;
  2212. if (this->has_mask()) {
  2213. total_size += 1 +
  2214. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2215. *this->mask_);
  2216. }
  2217. // int32 page_size = 3;
  2218. if (this->page_size() != 0) {
  2219. total_size += 1 +
  2220. ::google::protobuf::internal::WireFormatLite::Int32Size(
  2221. this->page_size());
  2222. }
  2223. // bool show_missing = 12;
  2224. if (this->show_missing() != 0) {
  2225. total_size += 1 + 1;
  2226. }
  2227. switch (consistency_selector_case()) {
  2228. // bytes transaction = 8;
  2229. case kTransaction: {
  2230. total_size += 1 +
  2231. ::google::protobuf::internal::WireFormatLite::BytesSize(
  2232. this->transaction());
  2233. break;
  2234. }
  2235. // .google.protobuf.Timestamp read_time = 10;
  2236. case kReadTime: {
  2237. total_size += 1 +
  2238. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2239. *consistency_selector_.read_time_);
  2240. break;
  2241. }
  2242. case CONSISTENCY_SELECTOR_NOT_SET: {
  2243. break;
  2244. }
  2245. }
  2246. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2247. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2248. _cached_size_ = cached_size;
  2249. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2250. return total_size;
  2251. }
  2252. void ListDocumentsRequest::MergeFrom(const ::google::protobuf::Message& from) {
  2253. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ListDocumentsRequest)
  2254. GOOGLE_DCHECK_NE(&from, this);
  2255. const ListDocumentsRequest* source =
  2256. ::google::protobuf::internal::DynamicCastToGenerated<const ListDocumentsRequest>(
  2257. &from);
  2258. if (source == NULL) {
  2259. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ListDocumentsRequest)
  2260. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2261. } else {
  2262. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ListDocumentsRequest)
  2263. MergeFrom(*source);
  2264. }
  2265. }
  2266. void ListDocumentsRequest::MergeFrom(const ListDocumentsRequest& from) {
  2267. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ListDocumentsRequest)
  2268. GOOGLE_DCHECK_NE(&from, this);
  2269. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2270. ::google::protobuf::uint32 cached_has_bits = 0;
  2271. (void) cached_has_bits;
  2272. if (from.parent().size() > 0) {
  2273. parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  2274. }
  2275. if (from.collection_id().size() > 0) {
  2276. collection_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.collection_id_);
  2277. }
  2278. if (from.page_token().size() > 0) {
  2279. page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.page_token_);
  2280. }
  2281. if (from.order_by().size() > 0) {
  2282. order_by_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.order_by_);
  2283. }
  2284. if (from.has_mask()) {
  2285. mutable_mask()->::google::firestore::v1::DocumentMask::MergeFrom(from.mask());
  2286. }
  2287. if (from.page_size() != 0) {
  2288. set_page_size(from.page_size());
  2289. }
  2290. if (from.show_missing() != 0) {
  2291. set_show_missing(from.show_missing());
  2292. }
  2293. switch (from.consistency_selector_case()) {
  2294. case kTransaction: {
  2295. set_transaction(from.transaction());
  2296. break;
  2297. }
  2298. case kReadTime: {
  2299. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  2300. break;
  2301. }
  2302. case CONSISTENCY_SELECTOR_NOT_SET: {
  2303. break;
  2304. }
  2305. }
  2306. }
  2307. void ListDocumentsRequest::CopyFrom(const ::google::protobuf::Message& from) {
  2308. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ListDocumentsRequest)
  2309. if (&from == this) return;
  2310. Clear();
  2311. MergeFrom(from);
  2312. }
  2313. void ListDocumentsRequest::CopyFrom(const ListDocumentsRequest& from) {
  2314. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ListDocumentsRequest)
  2315. if (&from == this) return;
  2316. Clear();
  2317. MergeFrom(from);
  2318. }
  2319. bool ListDocumentsRequest::IsInitialized() const {
  2320. return true;
  2321. }
  2322. void ListDocumentsRequest::Swap(ListDocumentsRequest* other) {
  2323. if (other == this) return;
  2324. InternalSwap(other);
  2325. }
  2326. void ListDocumentsRequest::InternalSwap(ListDocumentsRequest* other) {
  2327. using std::swap;
  2328. parent_.Swap(&other->parent_);
  2329. collection_id_.Swap(&other->collection_id_);
  2330. page_token_.Swap(&other->page_token_);
  2331. order_by_.Swap(&other->order_by_);
  2332. swap(mask_, other->mask_);
  2333. swap(page_size_, other->page_size_);
  2334. swap(show_missing_, other->show_missing_);
  2335. swap(consistency_selector_, other->consistency_selector_);
  2336. swap(_oneof_case_[0], other->_oneof_case_[0]);
  2337. _internal_metadata_.Swap(&other->_internal_metadata_);
  2338. swap(_cached_size_, other->_cached_size_);
  2339. }
  2340. ::google::protobuf::Metadata ListDocumentsRequest::GetMetadata() const {
  2341. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  2342. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  2343. }
  2344. // ===================================================================
  2345. void ListDocumentsResponse::InitAsDefaultInstance() {
  2346. }
  2347. void ListDocumentsResponse::clear_documents() {
  2348. documents_.Clear();
  2349. }
  2350. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2351. const int ListDocumentsResponse::kDocumentsFieldNumber;
  2352. const int ListDocumentsResponse::kNextPageTokenFieldNumber;
  2353. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2354. ListDocumentsResponse::ListDocumentsResponse()
  2355. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2356. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  2357. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListDocumentsResponse();
  2358. }
  2359. SharedCtor();
  2360. // @@protoc_insertion_point(constructor:google.firestore.v1.ListDocumentsResponse)
  2361. }
  2362. ListDocumentsResponse::ListDocumentsResponse(const ListDocumentsResponse& from)
  2363. : ::google::protobuf::Message(),
  2364. _internal_metadata_(NULL),
  2365. documents_(from.documents_),
  2366. _cached_size_(0) {
  2367. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2368. next_page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2369. if (from.next_page_token().size() > 0) {
  2370. next_page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.next_page_token_);
  2371. }
  2372. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ListDocumentsResponse)
  2373. }
  2374. void ListDocumentsResponse::SharedCtor() {
  2375. next_page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2376. _cached_size_ = 0;
  2377. }
  2378. ListDocumentsResponse::~ListDocumentsResponse() {
  2379. // @@protoc_insertion_point(destructor:google.firestore.v1.ListDocumentsResponse)
  2380. SharedDtor();
  2381. }
  2382. void ListDocumentsResponse::SharedDtor() {
  2383. next_page_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2384. }
  2385. void ListDocumentsResponse::SetCachedSize(int size) const {
  2386. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2387. _cached_size_ = size;
  2388. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2389. }
  2390. const ::google::protobuf::Descriptor* ListDocumentsResponse::descriptor() {
  2391. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  2392. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2393. }
  2394. const ListDocumentsResponse& ListDocumentsResponse::default_instance() {
  2395. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListDocumentsResponse();
  2396. return *internal_default_instance();
  2397. }
  2398. ListDocumentsResponse* ListDocumentsResponse::New(::google::protobuf::Arena* arena) const {
  2399. ListDocumentsResponse* n = new ListDocumentsResponse;
  2400. if (arena != NULL) {
  2401. arena->Own(n);
  2402. }
  2403. return n;
  2404. }
  2405. void ListDocumentsResponse::Clear() {
  2406. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.ListDocumentsResponse)
  2407. ::google::protobuf::uint32 cached_has_bits = 0;
  2408. // Prevent compiler warnings about cached_has_bits being unused
  2409. (void) cached_has_bits;
  2410. documents_.Clear();
  2411. next_page_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2412. _internal_metadata_.Clear();
  2413. }
  2414. bool ListDocumentsResponse::MergePartialFromCodedStream(
  2415. ::google::protobuf::io::CodedInputStream* input) {
  2416. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2417. ::google::protobuf::uint32 tag;
  2418. // @@protoc_insertion_point(parse_start:google.firestore.v1.ListDocumentsResponse)
  2419. for (;;) {
  2420. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2421. tag = p.first;
  2422. if (!p.second) goto handle_unusual;
  2423. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2424. // repeated .google.firestore.v1.Document documents = 1;
  2425. case 1: {
  2426. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2427. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  2428. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_documents()));
  2429. } else {
  2430. goto handle_unusual;
  2431. }
  2432. break;
  2433. }
  2434. // string next_page_token = 2;
  2435. case 2: {
  2436. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2437. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  2438. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  2439. input, this->mutable_next_page_token()));
  2440. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2441. this->next_page_token().data(), static_cast<int>(this->next_page_token().length()),
  2442. ::google::protobuf::internal::WireFormatLite::PARSE,
  2443. "google.firestore.v1.ListDocumentsResponse.next_page_token"));
  2444. } else {
  2445. goto handle_unusual;
  2446. }
  2447. break;
  2448. }
  2449. default: {
  2450. handle_unusual:
  2451. if (tag == 0) {
  2452. goto success;
  2453. }
  2454. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2455. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2456. break;
  2457. }
  2458. }
  2459. }
  2460. success:
  2461. // @@protoc_insertion_point(parse_success:google.firestore.v1.ListDocumentsResponse)
  2462. return true;
  2463. failure:
  2464. // @@protoc_insertion_point(parse_failure:google.firestore.v1.ListDocumentsResponse)
  2465. return false;
  2466. #undef DO_
  2467. }
  2468. void ListDocumentsResponse::SerializeWithCachedSizes(
  2469. ::google::protobuf::io::CodedOutputStream* output) const {
  2470. // @@protoc_insertion_point(serialize_start:google.firestore.v1.ListDocumentsResponse)
  2471. ::google::protobuf::uint32 cached_has_bits = 0;
  2472. (void) cached_has_bits;
  2473. // repeated .google.firestore.v1.Document documents = 1;
  2474. for (unsigned int i = 0,
  2475. n = static_cast<unsigned int>(this->documents_size()); i < n; i++) {
  2476. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2477. 1, this->documents(static_cast<int>(i)), output);
  2478. }
  2479. // string next_page_token = 2;
  2480. if (this->next_page_token().size() > 0) {
  2481. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2482. this->next_page_token().data(), static_cast<int>(this->next_page_token().length()),
  2483. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2484. "google.firestore.v1.ListDocumentsResponse.next_page_token");
  2485. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  2486. 2, this->next_page_token(), output);
  2487. }
  2488. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2489. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2490. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2491. }
  2492. // @@protoc_insertion_point(serialize_end:google.firestore.v1.ListDocumentsResponse)
  2493. }
  2494. ::google::protobuf::uint8* ListDocumentsResponse::InternalSerializeWithCachedSizesToArray(
  2495. bool deterministic, ::google::protobuf::uint8* target) const {
  2496. (void)deterministic; // Unused
  2497. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ListDocumentsResponse)
  2498. ::google::protobuf::uint32 cached_has_bits = 0;
  2499. (void) cached_has_bits;
  2500. // repeated .google.firestore.v1.Document documents = 1;
  2501. for (unsigned int i = 0,
  2502. n = static_cast<unsigned int>(this->documents_size()); i < n; i++) {
  2503. target = ::google::protobuf::internal::WireFormatLite::
  2504. InternalWriteMessageToArray(
  2505. 1, this->documents(static_cast<int>(i)), deterministic, target);
  2506. }
  2507. // string next_page_token = 2;
  2508. if (this->next_page_token().size() > 0) {
  2509. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2510. this->next_page_token().data(), static_cast<int>(this->next_page_token().length()),
  2511. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2512. "google.firestore.v1.ListDocumentsResponse.next_page_token");
  2513. target =
  2514. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  2515. 2, this->next_page_token(), target);
  2516. }
  2517. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2518. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2519. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2520. }
  2521. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ListDocumentsResponse)
  2522. return target;
  2523. }
  2524. size_t ListDocumentsResponse::ByteSizeLong() const {
  2525. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ListDocumentsResponse)
  2526. size_t total_size = 0;
  2527. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2528. total_size +=
  2529. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2530. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2531. }
  2532. // repeated .google.firestore.v1.Document documents = 1;
  2533. {
  2534. unsigned int count = static_cast<unsigned int>(this->documents_size());
  2535. total_size += 1UL * count;
  2536. for (unsigned int i = 0; i < count; i++) {
  2537. total_size +=
  2538. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2539. this->documents(static_cast<int>(i)));
  2540. }
  2541. }
  2542. // string next_page_token = 2;
  2543. if (this->next_page_token().size() > 0) {
  2544. total_size += 1 +
  2545. ::google::protobuf::internal::WireFormatLite::StringSize(
  2546. this->next_page_token());
  2547. }
  2548. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2549. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2550. _cached_size_ = cached_size;
  2551. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2552. return total_size;
  2553. }
  2554. void ListDocumentsResponse::MergeFrom(const ::google::protobuf::Message& from) {
  2555. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ListDocumentsResponse)
  2556. GOOGLE_DCHECK_NE(&from, this);
  2557. const ListDocumentsResponse* source =
  2558. ::google::protobuf::internal::DynamicCastToGenerated<const ListDocumentsResponse>(
  2559. &from);
  2560. if (source == NULL) {
  2561. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ListDocumentsResponse)
  2562. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2563. } else {
  2564. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ListDocumentsResponse)
  2565. MergeFrom(*source);
  2566. }
  2567. }
  2568. void ListDocumentsResponse::MergeFrom(const ListDocumentsResponse& from) {
  2569. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ListDocumentsResponse)
  2570. GOOGLE_DCHECK_NE(&from, this);
  2571. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2572. ::google::protobuf::uint32 cached_has_bits = 0;
  2573. (void) cached_has_bits;
  2574. documents_.MergeFrom(from.documents_);
  2575. if (from.next_page_token().size() > 0) {
  2576. next_page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.next_page_token_);
  2577. }
  2578. }
  2579. void ListDocumentsResponse::CopyFrom(const ::google::protobuf::Message& from) {
  2580. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ListDocumentsResponse)
  2581. if (&from == this) return;
  2582. Clear();
  2583. MergeFrom(from);
  2584. }
  2585. void ListDocumentsResponse::CopyFrom(const ListDocumentsResponse& from) {
  2586. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ListDocumentsResponse)
  2587. if (&from == this) return;
  2588. Clear();
  2589. MergeFrom(from);
  2590. }
  2591. bool ListDocumentsResponse::IsInitialized() const {
  2592. return true;
  2593. }
  2594. void ListDocumentsResponse::Swap(ListDocumentsResponse* other) {
  2595. if (other == this) return;
  2596. InternalSwap(other);
  2597. }
  2598. void ListDocumentsResponse::InternalSwap(ListDocumentsResponse* other) {
  2599. using std::swap;
  2600. documents_.InternalSwap(&other->documents_);
  2601. next_page_token_.Swap(&other->next_page_token_);
  2602. _internal_metadata_.Swap(&other->_internal_metadata_);
  2603. swap(_cached_size_, other->_cached_size_);
  2604. }
  2605. ::google::protobuf::Metadata ListDocumentsResponse::GetMetadata() const {
  2606. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  2607. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  2608. }
  2609. // ===================================================================
  2610. void CreateDocumentRequest::InitAsDefaultInstance() {
  2611. ::google::firestore::v1::_CreateDocumentRequest_default_instance_._instance.get_mutable()->document_ = const_cast< ::google::firestore::v1::Document*>(
  2612. ::google::firestore::v1::Document::internal_default_instance());
  2613. ::google::firestore::v1::_CreateDocumentRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1::DocumentMask*>(
  2614. ::google::firestore::v1::DocumentMask::internal_default_instance());
  2615. }
  2616. void CreateDocumentRequest::clear_document() {
  2617. if (GetArenaNoVirtual() == NULL && document_ != NULL) {
  2618. delete document_;
  2619. }
  2620. document_ = NULL;
  2621. }
  2622. void CreateDocumentRequest::clear_mask() {
  2623. if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
  2624. delete mask_;
  2625. }
  2626. mask_ = NULL;
  2627. }
  2628. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2629. const int CreateDocumentRequest::kParentFieldNumber;
  2630. const int CreateDocumentRequest::kCollectionIdFieldNumber;
  2631. const int CreateDocumentRequest::kDocumentIdFieldNumber;
  2632. const int CreateDocumentRequest::kDocumentFieldNumber;
  2633. const int CreateDocumentRequest::kMaskFieldNumber;
  2634. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2635. CreateDocumentRequest::CreateDocumentRequest()
  2636. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2637. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  2638. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsCreateDocumentRequest();
  2639. }
  2640. SharedCtor();
  2641. // @@protoc_insertion_point(constructor:google.firestore.v1.CreateDocumentRequest)
  2642. }
  2643. CreateDocumentRequest::CreateDocumentRequest(const CreateDocumentRequest& from)
  2644. : ::google::protobuf::Message(),
  2645. _internal_metadata_(NULL),
  2646. _cached_size_(0) {
  2647. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2648. parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2649. if (from.parent().size() > 0) {
  2650. parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  2651. }
  2652. collection_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2653. if (from.collection_id().size() > 0) {
  2654. collection_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.collection_id_);
  2655. }
  2656. document_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2657. if (from.document_id().size() > 0) {
  2658. document_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.document_id_);
  2659. }
  2660. if (from.has_document()) {
  2661. document_ = new ::google::firestore::v1::Document(*from.document_);
  2662. } else {
  2663. document_ = NULL;
  2664. }
  2665. if (from.has_mask()) {
  2666. mask_ = new ::google::firestore::v1::DocumentMask(*from.mask_);
  2667. } else {
  2668. mask_ = NULL;
  2669. }
  2670. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.CreateDocumentRequest)
  2671. }
  2672. void CreateDocumentRequest::SharedCtor() {
  2673. parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2674. collection_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2675. document_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2676. ::memset(&document_, 0, static_cast<size_t>(
  2677. reinterpret_cast<char*>(&mask_) -
  2678. reinterpret_cast<char*>(&document_)) + sizeof(mask_));
  2679. _cached_size_ = 0;
  2680. }
  2681. CreateDocumentRequest::~CreateDocumentRequest() {
  2682. // @@protoc_insertion_point(destructor:google.firestore.v1.CreateDocumentRequest)
  2683. SharedDtor();
  2684. }
  2685. void CreateDocumentRequest::SharedDtor() {
  2686. parent_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2687. collection_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2688. document_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2689. if (this != internal_default_instance()) delete document_;
  2690. if (this != internal_default_instance()) delete mask_;
  2691. }
  2692. void CreateDocumentRequest::SetCachedSize(int size) const {
  2693. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2694. _cached_size_ = size;
  2695. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2696. }
  2697. const ::google::protobuf::Descriptor* CreateDocumentRequest::descriptor() {
  2698. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  2699. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2700. }
  2701. const CreateDocumentRequest& CreateDocumentRequest::default_instance() {
  2702. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsCreateDocumentRequest();
  2703. return *internal_default_instance();
  2704. }
  2705. CreateDocumentRequest* CreateDocumentRequest::New(::google::protobuf::Arena* arena) const {
  2706. CreateDocumentRequest* n = new CreateDocumentRequest;
  2707. if (arena != NULL) {
  2708. arena->Own(n);
  2709. }
  2710. return n;
  2711. }
  2712. void CreateDocumentRequest::Clear() {
  2713. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.CreateDocumentRequest)
  2714. ::google::protobuf::uint32 cached_has_bits = 0;
  2715. // Prevent compiler warnings about cached_has_bits being unused
  2716. (void) cached_has_bits;
  2717. parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2718. collection_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2719. document_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2720. if (GetArenaNoVirtual() == NULL && document_ != NULL) {
  2721. delete document_;
  2722. }
  2723. document_ = NULL;
  2724. if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
  2725. delete mask_;
  2726. }
  2727. mask_ = NULL;
  2728. _internal_metadata_.Clear();
  2729. }
  2730. bool CreateDocumentRequest::MergePartialFromCodedStream(
  2731. ::google::protobuf::io::CodedInputStream* input) {
  2732. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2733. ::google::protobuf::uint32 tag;
  2734. // @@protoc_insertion_point(parse_start:google.firestore.v1.CreateDocumentRequest)
  2735. for (;;) {
  2736. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2737. tag = p.first;
  2738. if (!p.second) goto handle_unusual;
  2739. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2740. // string parent = 1;
  2741. case 1: {
  2742. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2743. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  2744. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  2745. input, this->mutable_parent()));
  2746. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2747. this->parent().data(), static_cast<int>(this->parent().length()),
  2748. ::google::protobuf::internal::WireFormatLite::PARSE,
  2749. "google.firestore.v1.CreateDocumentRequest.parent"));
  2750. } else {
  2751. goto handle_unusual;
  2752. }
  2753. break;
  2754. }
  2755. // string collection_id = 2;
  2756. case 2: {
  2757. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2758. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  2759. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  2760. input, this->mutable_collection_id()));
  2761. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2762. this->collection_id().data(), static_cast<int>(this->collection_id().length()),
  2763. ::google::protobuf::internal::WireFormatLite::PARSE,
  2764. "google.firestore.v1.CreateDocumentRequest.collection_id"));
  2765. } else {
  2766. goto handle_unusual;
  2767. }
  2768. break;
  2769. }
  2770. // string document_id = 3;
  2771. case 3: {
  2772. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2773. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  2774. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  2775. input, this->mutable_document_id()));
  2776. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2777. this->document_id().data(), static_cast<int>(this->document_id().length()),
  2778. ::google::protobuf::internal::WireFormatLite::PARSE,
  2779. "google.firestore.v1.CreateDocumentRequest.document_id"));
  2780. } else {
  2781. goto handle_unusual;
  2782. }
  2783. break;
  2784. }
  2785. // .google.firestore.v1.Document document = 4;
  2786. case 4: {
  2787. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2788. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  2789. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2790. input, mutable_document()));
  2791. } else {
  2792. goto handle_unusual;
  2793. }
  2794. break;
  2795. }
  2796. // .google.firestore.v1.DocumentMask mask = 5;
  2797. case 5: {
  2798. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2799. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  2800. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2801. input, mutable_mask()));
  2802. } else {
  2803. goto handle_unusual;
  2804. }
  2805. break;
  2806. }
  2807. default: {
  2808. handle_unusual:
  2809. if (tag == 0) {
  2810. goto success;
  2811. }
  2812. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2813. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2814. break;
  2815. }
  2816. }
  2817. }
  2818. success:
  2819. // @@protoc_insertion_point(parse_success:google.firestore.v1.CreateDocumentRequest)
  2820. return true;
  2821. failure:
  2822. // @@protoc_insertion_point(parse_failure:google.firestore.v1.CreateDocumentRequest)
  2823. return false;
  2824. #undef DO_
  2825. }
  2826. void CreateDocumentRequest::SerializeWithCachedSizes(
  2827. ::google::protobuf::io::CodedOutputStream* output) const {
  2828. // @@protoc_insertion_point(serialize_start:google.firestore.v1.CreateDocumentRequest)
  2829. ::google::protobuf::uint32 cached_has_bits = 0;
  2830. (void) cached_has_bits;
  2831. // string parent = 1;
  2832. if (this->parent().size() > 0) {
  2833. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2834. this->parent().data(), static_cast<int>(this->parent().length()),
  2835. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2836. "google.firestore.v1.CreateDocumentRequest.parent");
  2837. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  2838. 1, this->parent(), output);
  2839. }
  2840. // string collection_id = 2;
  2841. if (this->collection_id().size() > 0) {
  2842. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2843. this->collection_id().data(), static_cast<int>(this->collection_id().length()),
  2844. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2845. "google.firestore.v1.CreateDocumentRequest.collection_id");
  2846. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  2847. 2, this->collection_id(), output);
  2848. }
  2849. // string document_id = 3;
  2850. if (this->document_id().size() > 0) {
  2851. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2852. this->document_id().data(), static_cast<int>(this->document_id().length()),
  2853. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2854. "google.firestore.v1.CreateDocumentRequest.document_id");
  2855. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  2856. 3, this->document_id(), output);
  2857. }
  2858. // .google.firestore.v1.Document document = 4;
  2859. if (this->has_document()) {
  2860. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2861. 4, *this->document_, output);
  2862. }
  2863. // .google.firestore.v1.DocumentMask mask = 5;
  2864. if (this->has_mask()) {
  2865. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2866. 5, *this->mask_, output);
  2867. }
  2868. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2869. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2870. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2871. }
  2872. // @@protoc_insertion_point(serialize_end:google.firestore.v1.CreateDocumentRequest)
  2873. }
  2874. ::google::protobuf::uint8* CreateDocumentRequest::InternalSerializeWithCachedSizesToArray(
  2875. bool deterministic, ::google::protobuf::uint8* target) const {
  2876. (void)deterministic; // Unused
  2877. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.CreateDocumentRequest)
  2878. ::google::protobuf::uint32 cached_has_bits = 0;
  2879. (void) cached_has_bits;
  2880. // string parent = 1;
  2881. if (this->parent().size() > 0) {
  2882. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2883. this->parent().data(), static_cast<int>(this->parent().length()),
  2884. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2885. "google.firestore.v1.CreateDocumentRequest.parent");
  2886. target =
  2887. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  2888. 1, this->parent(), target);
  2889. }
  2890. // string collection_id = 2;
  2891. if (this->collection_id().size() > 0) {
  2892. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2893. this->collection_id().data(), static_cast<int>(this->collection_id().length()),
  2894. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2895. "google.firestore.v1.CreateDocumentRequest.collection_id");
  2896. target =
  2897. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  2898. 2, this->collection_id(), target);
  2899. }
  2900. // string document_id = 3;
  2901. if (this->document_id().size() > 0) {
  2902. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2903. this->document_id().data(), static_cast<int>(this->document_id().length()),
  2904. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2905. "google.firestore.v1.CreateDocumentRequest.document_id");
  2906. target =
  2907. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  2908. 3, this->document_id(), target);
  2909. }
  2910. // .google.firestore.v1.Document document = 4;
  2911. if (this->has_document()) {
  2912. target = ::google::protobuf::internal::WireFormatLite::
  2913. InternalWriteMessageToArray(
  2914. 4, *this->document_, deterministic, target);
  2915. }
  2916. // .google.firestore.v1.DocumentMask mask = 5;
  2917. if (this->has_mask()) {
  2918. target = ::google::protobuf::internal::WireFormatLite::
  2919. InternalWriteMessageToArray(
  2920. 5, *this->mask_, deterministic, target);
  2921. }
  2922. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2923. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2924. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2925. }
  2926. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.CreateDocumentRequest)
  2927. return target;
  2928. }
  2929. size_t CreateDocumentRequest::ByteSizeLong() const {
  2930. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.CreateDocumentRequest)
  2931. size_t total_size = 0;
  2932. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2933. total_size +=
  2934. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2935. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2936. }
  2937. // string parent = 1;
  2938. if (this->parent().size() > 0) {
  2939. total_size += 1 +
  2940. ::google::protobuf::internal::WireFormatLite::StringSize(
  2941. this->parent());
  2942. }
  2943. // string collection_id = 2;
  2944. if (this->collection_id().size() > 0) {
  2945. total_size += 1 +
  2946. ::google::protobuf::internal::WireFormatLite::StringSize(
  2947. this->collection_id());
  2948. }
  2949. // string document_id = 3;
  2950. if (this->document_id().size() > 0) {
  2951. total_size += 1 +
  2952. ::google::protobuf::internal::WireFormatLite::StringSize(
  2953. this->document_id());
  2954. }
  2955. // .google.firestore.v1.Document document = 4;
  2956. if (this->has_document()) {
  2957. total_size += 1 +
  2958. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2959. *this->document_);
  2960. }
  2961. // .google.firestore.v1.DocumentMask mask = 5;
  2962. if (this->has_mask()) {
  2963. total_size += 1 +
  2964. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2965. *this->mask_);
  2966. }
  2967. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2968. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2969. _cached_size_ = cached_size;
  2970. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2971. return total_size;
  2972. }
  2973. void CreateDocumentRequest::MergeFrom(const ::google::protobuf::Message& from) {
  2974. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.CreateDocumentRequest)
  2975. GOOGLE_DCHECK_NE(&from, this);
  2976. const CreateDocumentRequest* source =
  2977. ::google::protobuf::internal::DynamicCastToGenerated<const CreateDocumentRequest>(
  2978. &from);
  2979. if (source == NULL) {
  2980. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.CreateDocumentRequest)
  2981. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2982. } else {
  2983. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.CreateDocumentRequest)
  2984. MergeFrom(*source);
  2985. }
  2986. }
  2987. void CreateDocumentRequest::MergeFrom(const CreateDocumentRequest& from) {
  2988. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.CreateDocumentRequest)
  2989. GOOGLE_DCHECK_NE(&from, this);
  2990. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2991. ::google::protobuf::uint32 cached_has_bits = 0;
  2992. (void) cached_has_bits;
  2993. if (from.parent().size() > 0) {
  2994. parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  2995. }
  2996. if (from.collection_id().size() > 0) {
  2997. collection_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.collection_id_);
  2998. }
  2999. if (from.document_id().size() > 0) {
  3000. document_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.document_id_);
  3001. }
  3002. if (from.has_document()) {
  3003. mutable_document()->::google::firestore::v1::Document::MergeFrom(from.document());
  3004. }
  3005. if (from.has_mask()) {
  3006. mutable_mask()->::google::firestore::v1::DocumentMask::MergeFrom(from.mask());
  3007. }
  3008. }
  3009. void CreateDocumentRequest::CopyFrom(const ::google::protobuf::Message& from) {
  3010. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.CreateDocumentRequest)
  3011. if (&from == this) return;
  3012. Clear();
  3013. MergeFrom(from);
  3014. }
  3015. void CreateDocumentRequest::CopyFrom(const CreateDocumentRequest& from) {
  3016. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.CreateDocumentRequest)
  3017. if (&from == this) return;
  3018. Clear();
  3019. MergeFrom(from);
  3020. }
  3021. bool CreateDocumentRequest::IsInitialized() const {
  3022. return true;
  3023. }
  3024. void CreateDocumentRequest::Swap(CreateDocumentRequest* other) {
  3025. if (other == this) return;
  3026. InternalSwap(other);
  3027. }
  3028. void CreateDocumentRequest::InternalSwap(CreateDocumentRequest* other) {
  3029. using std::swap;
  3030. parent_.Swap(&other->parent_);
  3031. collection_id_.Swap(&other->collection_id_);
  3032. document_id_.Swap(&other->document_id_);
  3033. swap(document_, other->document_);
  3034. swap(mask_, other->mask_);
  3035. _internal_metadata_.Swap(&other->_internal_metadata_);
  3036. swap(_cached_size_, other->_cached_size_);
  3037. }
  3038. ::google::protobuf::Metadata CreateDocumentRequest::GetMetadata() const {
  3039. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  3040. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  3041. }
  3042. // ===================================================================
  3043. void UpdateDocumentRequest::InitAsDefaultInstance() {
  3044. ::google::firestore::v1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->document_ = const_cast< ::google::firestore::v1::Document*>(
  3045. ::google::firestore::v1::Document::internal_default_instance());
  3046. ::google::firestore::v1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->update_mask_ = const_cast< ::google::firestore::v1::DocumentMask*>(
  3047. ::google::firestore::v1::DocumentMask::internal_default_instance());
  3048. ::google::firestore::v1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1::DocumentMask*>(
  3049. ::google::firestore::v1::DocumentMask::internal_default_instance());
  3050. ::google::firestore::v1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->current_document_ = const_cast< ::google::firestore::v1::Precondition*>(
  3051. ::google::firestore::v1::Precondition::internal_default_instance());
  3052. }
  3053. void UpdateDocumentRequest::clear_document() {
  3054. if (GetArenaNoVirtual() == NULL && document_ != NULL) {
  3055. delete document_;
  3056. }
  3057. document_ = NULL;
  3058. }
  3059. void UpdateDocumentRequest::clear_update_mask() {
  3060. if (GetArenaNoVirtual() == NULL && update_mask_ != NULL) {
  3061. delete update_mask_;
  3062. }
  3063. update_mask_ = NULL;
  3064. }
  3065. void UpdateDocumentRequest::clear_mask() {
  3066. if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
  3067. delete mask_;
  3068. }
  3069. mask_ = NULL;
  3070. }
  3071. void UpdateDocumentRequest::clear_current_document() {
  3072. if (GetArenaNoVirtual() == NULL && current_document_ != NULL) {
  3073. delete current_document_;
  3074. }
  3075. current_document_ = NULL;
  3076. }
  3077. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3078. const int UpdateDocumentRequest::kDocumentFieldNumber;
  3079. const int UpdateDocumentRequest::kUpdateMaskFieldNumber;
  3080. const int UpdateDocumentRequest::kMaskFieldNumber;
  3081. const int UpdateDocumentRequest::kCurrentDocumentFieldNumber;
  3082. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3083. UpdateDocumentRequest::UpdateDocumentRequest()
  3084. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  3085. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  3086. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsUpdateDocumentRequest();
  3087. }
  3088. SharedCtor();
  3089. // @@protoc_insertion_point(constructor:google.firestore.v1.UpdateDocumentRequest)
  3090. }
  3091. UpdateDocumentRequest::UpdateDocumentRequest(const UpdateDocumentRequest& from)
  3092. : ::google::protobuf::Message(),
  3093. _internal_metadata_(NULL),
  3094. _cached_size_(0) {
  3095. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3096. if (from.has_document()) {
  3097. document_ = new ::google::firestore::v1::Document(*from.document_);
  3098. } else {
  3099. document_ = NULL;
  3100. }
  3101. if (from.has_update_mask()) {
  3102. update_mask_ = new ::google::firestore::v1::DocumentMask(*from.update_mask_);
  3103. } else {
  3104. update_mask_ = NULL;
  3105. }
  3106. if (from.has_mask()) {
  3107. mask_ = new ::google::firestore::v1::DocumentMask(*from.mask_);
  3108. } else {
  3109. mask_ = NULL;
  3110. }
  3111. if (from.has_current_document()) {
  3112. current_document_ = new ::google::firestore::v1::Precondition(*from.current_document_);
  3113. } else {
  3114. current_document_ = NULL;
  3115. }
  3116. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.UpdateDocumentRequest)
  3117. }
  3118. void UpdateDocumentRequest::SharedCtor() {
  3119. ::memset(&document_, 0, static_cast<size_t>(
  3120. reinterpret_cast<char*>(&current_document_) -
  3121. reinterpret_cast<char*>(&document_)) + sizeof(current_document_));
  3122. _cached_size_ = 0;
  3123. }
  3124. UpdateDocumentRequest::~UpdateDocumentRequest() {
  3125. // @@protoc_insertion_point(destructor:google.firestore.v1.UpdateDocumentRequest)
  3126. SharedDtor();
  3127. }
  3128. void UpdateDocumentRequest::SharedDtor() {
  3129. if (this != internal_default_instance()) delete document_;
  3130. if (this != internal_default_instance()) delete update_mask_;
  3131. if (this != internal_default_instance()) delete mask_;
  3132. if (this != internal_default_instance()) delete current_document_;
  3133. }
  3134. void UpdateDocumentRequest::SetCachedSize(int size) const {
  3135. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  3136. _cached_size_ = size;
  3137. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  3138. }
  3139. const ::google::protobuf::Descriptor* UpdateDocumentRequest::descriptor() {
  3140. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  3141. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  3142. }
  3143. const UpdateDocumentRequest& UpdateDocumentRequest::default_instance() {
  3144. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsUpdateDocumentRequest();
  3145. return *internal_default_instance();
  3146. }
  3147. UpdateDocumentRequest* UpdateDocumentRequest::New(::google::protobuf::Arena* arena) const {
  3148. UpdateDocumentRequest* n = new UpdateDocumentRequest;
  3149. if (arena != NULL) {
  3150. arena->Own(n);
  3151. }
  3152. return n;
  3153. }
  3154. void UpdateDocumentRequest::Clear() {
  3155. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.UpdateDocumentRequest)
  3156. ::google::protobuf::uint32 cached_has_bits = 0;
  3157. // Prevent compiler warnings about cached_has_bits being unused
  3158. (void) cached_has_bits;
  3159. if (GetArenaNoVirtual() == NULL && document_ != NULL) {
  3160. delete document_;
  3161. }
  3162. document_ = NULL;
  3163. if (GetArenaNoVirtual() == NULL && update_mask_ != NULL) {
  3164. delete update_mask_;
  3165. }
  3166. update_mask_ = NULL;
  3167. if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
  3168. delete mask_;
  3169. }
  3170. mask_ = NULL;
  3171. if (GetArenaNoVirtual() == NULL && current_document_ != NULL) {
  3172. delete current_document_;
  3173. }
  3174. current_document_ = NULL;
  3175. _internal_metadata_.Clear();
  3176. }
  3177. bool UpdateDocumentRequest::MergePartialFromCodedStream(
  3178. ::google::protobuf::io::CodedInputStream* input) {
  3179. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3180. ::google::protobuf::uint32 tag;
  3181. // @@protoc_insertion_point(parse_start:google.firestore.v1.UpdateDocumentRequest)
  3182. for (;;) {
  3183. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3184. tag = p.first;
  3185. if (!p.second) goto handle_unusual;
  3186. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3187. // .google.firestore.v1.Document document = 1;
  3188. case 1: {
  3189. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3190. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  3191. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  3192. input, mutable_document()));
  3193. } else {
  3194. goto handle_unusual;
  3195. }
  3196. break;
  3197. }
  3198. // .google.firestore.v1.DocumentMask update_mask = 2;
  3199. case 2: {
  3200. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3201. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  3202. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  3203. input, mutable_update_mask()));
  3204. } else {
  3205. goto handle_unusual;
  3206. }
  3207. break;
  3208. }
  3209. // .google.firestore.v1.DocumentMask mask = 3;
  3210. case 3: {
  3211. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3212. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  3213. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  3214. input, mutable_mask()));
  3215. } else {
  3216. goto handle_unusual;
  3217. }
  3218. break;
  3219. }
  3220. // .google.firestore.v1.Precondition current_document = 4;
  3221. case 4: {
  3222. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3223. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  3224. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  3225. input, mutable_current_document()));
  3226. } else {
  3227. goto handle_unusual;
  3228. }
  3229. break;
  3230. }
  3231. default: {
  3232. handle_unusual:
  3233. if (tag == 0) {
  3234. goto success;
  3235. }
  3236. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3237. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3238. break;
  3239. }
  3240. }
  3241. }
  3242. success:
  3243. // @@protoc_insertion_point(parse_success:google.firestore.v1.UpdateDocumentRequest)
  3244. return true;
  3245. failure:
  3246. // @@protoc_insertion_point(parse_failure:google.firestore.v1.UpdateDocumentRequest)
  3247. return false;
  3248. #undef DO_
  3249. }
  3250. void UpdateDocumentRequest::SerializeWithCachedSizes(
  3251. ::google::protobuf::io::CodedOutputStream* output) const {
  3252. // @@protoc_insertion_point(serialize_start:google.firestore.v1.UpdateDocumentRequest)
  3253. ::google::protobuf::uint32 cached_has_bits = 0;
  3254. (void) cached_has_bits;
  3255. // .google.firestore.v1.Document document = 1;
  3256. if (this->has_document()) {
  3257. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3258. 1, *this->document_, output);
  3259. }
  3260. // .google.firestore.v1.DocumentMask update_mask = 2;
  3261. if (this->has_update_mask()) {
  3262. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3263. 2, *this->update_mask_, output);
  3264. }
  3265. // .google.firestore.v1.DocumentMask mask = 3;
  3266. if (this->has_mask()) {
  3267. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3268. 3, *this->mask_, output);
  3269. }
  3270. // .google.firestore.v1.Precondition current_document = 4;
  3271. if (this->has_current_document()) {
  3272. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3273. 4, *this->current_document_, output);
  3274. }
  3275. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3276. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  3277. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  3278. }
  3279. // @@protoc_insertion_point(serialize_end:google.firestore.v1.UpdateDocumentRequest)
  3280. }
  3281. ::google::protobuf::uint8* UpdateDocumentRequest::InternalSerializeWithCachedSizesToArray(
  3282. bool deterministic, ::google::protobuf::uint8* target) const {
  3283. (void)deterministic; // Unused
  3284. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.UpdateDocumentRequest)
  3285. ::google::protobuf::uint32 cached_has_bits = 0;
  3286. (void) cached_has_bits;
  3287. // .google.firestore.v1.Document document = 1;
  3288. if (this->has_document()) {
  3289. target = ::google::protobuf::internal::WireFormatLite::
  3290. InternalWriteMessageToArray(
  3291. 1, *this->document_, deterministic, target);
  3292. }
  3293. // .google.firestore.v1.DocumentMask update_mask = 2;
  3294. if (this->has_update_mask()) {
  3295. target = ::google::protobuf::internal::WireFormatLite::
  3296. InternalWriteMessageToArray(
  3297. 2, *this->update_mask_, deterministic, target);
  3298. }
  3299. // .google.firestore.v1.DocumentMask mask = 3;
  3300. if (this->has_mask()) {
  3301. target = ::google::protobuf::internal::WireFormatLite::
  3302. InternalWriteMessageToArray(
  3303. 3, *this->mask_, deterministic, target);
  3304. }
  3305. // .google.firestore.v1.Precondition current_document = 4;
  3306. if (this->has_current_document()) {
  3307. target = ::google::protobuf::internal::WireFormatLite::
  3308. InternalWriteMessageToArray(
  3309. 4, *this->current_document_, deterministic, target);
  3310. }
  3311. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3312. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  3313. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  3314. }
  3315. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.UpdateDocumentRequest)
  3316. return target;
  3317. }
  3318. size_t UpdateDocumentRequest::ByteSizeLong() const {
  3319. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.UpdateDocumentRequest)
  3320. size_t total_size = 0;
  3321. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3322. total_size +=
  3323. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  3324. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  3325. }
  3326. // .google.firestore.v1.Document document = 1;
  3327. if (this->has_document()) {
  3328. total_size += 1 +
  3329. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3330. *this->document_);
  3331. }
  3332. // .google.firestore.v1.DocumentMask update_mask = 2;
  3333. if (this->has_update_mask()) {
  3334. total_size += 1 +
  3335. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3336. *this->update_mask_);
  3337. }
  3338. // .google.firestore.v1.DocumentMask mask = 3;
  3339. if (this->has_mask()) {
  3340. total_size += 1 +
  3341. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3342. *this->mask_);
  3343. }
  3344. // .google.firestore.v1.Precondition current_document = 4;
  3345. if (this->has_current_document()) {
  3346. total_size += 1 +
  3347. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3348. *this->current_document_);
  3349. }
  3350. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  3351. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  3352. _cached_size_ = cached_size;
  3353. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  3354. return total_size;
  3355. }
  3356. void UpdateDocumentRequest::MergeFrom(const ::google::protobuf::Message& from) {
  3357. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.UpdateDocumentRequest)
  3358. GOOGLE_DCHECK_NE(&from, this);
  3359. const UpdateDocumentRequest* source =
  3360. ::google::protobuf::internal::DynamicCastToGenerated<const UpdateDocumentRequest>(
  3361. &from);
  3362. if (source == NULL) {
  3363. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.UpdateDocumentRequest)
  3364. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  3365. } else {
  3366. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.UpdateDocumentRequest)
  3367. MergeFrom(*source);
  3368. }
  3369. }
  3370. void UpdateDocumentRequest::MergeFrom(const UpdateDocumentRequest& from) {
  3371. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.UpdateDocumentRequest)
  3372. GOOGLE_DCHECK_NE(&from, this);
  3373. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3374. ::google::protobuf::uint32 cached_has_bits = 0;
  3375. (void) cached_has_bits;
  3376. if (from.has_document()) {
  3377. mutable_document()->::google::firestore::v1::Document::MergeFrom(from.document());
  3378. }
  3379. if (from.has_update_mask()) {
  3380. mutable_update_mask()->::google::firestore::v1::DocumentMask::MergeFrom(from.update_mask());
  3381. }
  3382. if (from.has_mask()) {
  3383. mutable_mask()->::google::firestore::v1::DocumentMask::MergeFrom(from.mask());
  3384. }
  3385. if (from.has_current_document()) {
  3386. mutable_current_document()->::google::firestore::v1::Precondition::MergeFrom(from.current_document());
  3387. }
  3388. }
  3389. void UpdateDocumentRequest::CopyFrom(const ::google::protobuf::Message& from) {
  3390. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.UpdateDocumentRequest)
  3391. if (&from == this) return;
  3392. Clear();
  3393. MergeFrom(from);
  3394. }
  3395. void UpdateDocumentRequest::CopyFrom(const UpdateDocumentRequest& from) {
  3396. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.UpdateDocumentRequest)
  3397. if (&from == this) return;
  3398. Clear();
  3399. MergeFrom(from);
  3400. }
  3401. bool UpdateDocumentRequest::IsInitialized() const {
  3402. return true;
  3403. }
  3404. void UpdateDocumentRequest::Swap(UpdateDocumentRequest* other) {
  3405. if (other == this) return;
  3406. InternalSwap(other);
  3407. }
  3408. void UpdateDocumentRequest::InternalSwap(UpdateDocumentRequest* other) {
  3409. using std::swap;
  3410. swap(document_, other->document_);
  3411. swap(update_mask_, other->update_mask_);
  3412. swap(mask_, other->mask_);
  3413. swap(current_document_, other->current_document_);
  3414. _internal_metadata_.Swap(&other->_internal_metadata_);
  3415. swap(_cached_size_, other->_cached_size_);
  3416. }
  3417. ::google::protobuf::Metadata UpdateDocumentRequest::GetMetadata() const {
  3418. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  3419. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  3420. }
  3421. // ===================================================================
  3422. void DeleteDocumentRequest::InitAsDefaultInstance() {
  3423. ::google::firestore::v1::_DeleteDocumentRequest_default_instance_._instance.get_mutable()->current_document_ = const_cast< ::google::firestore::v1::Precondition*>(
  3424. ::google::firestore::v1::Precondition::internal_default_instance());
  3425. }
  3426. void DeleteDocumentRequest::clear_current_document() {
  3427. if (GetArenaNoVirtual() == NULL && current_document_ != NULL) {
  3428. delete current_document_;
  3429. }
  3430. current_document_ = NULL;
  3431. }
  3432. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3433. const int DeleteDocumentRequest::kNameFieldNumber;
  3434. const int DeleteDocumentRequest::kCurrentDocumentFieldNumber;
  3435. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3436. DeleteDocumentRequest::DeleteDocumentRequest()
  3437. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  3438. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  3439. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsDeleteDocumentRequest();
  3440. }
  3441. SharedCtor();
  3442. // @@protoc_insertion_point(constructor:google.firestore.v1.DeleteDocumentRequest)
  3443. }
  3444. DeleteDocumentRequest::DeleteDocumentRequest(const DeleteDocumentRequest& from)
  3445. : ::google::protobuf::Message(),
  3446. _internal_metadata_(NULL),
  3447. _cached_size_(0) {
  3448. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3449. name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3450. if (from.name().size() > 0) {
  3451. name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  3452. }
  3453. if (from.has_current_document()) {
  3454. current_document_ = new ::google::firestore::v1::Precondition(*from.current_document_);
  3455. } else {
  3456. current_document_ = NULL;
  3457. }
  3458. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.DeleteDocumentRequest)
  3459. }
  3460. void DeleteDocumentRequest::SharedCtor() {
  3461. name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3462. current_document_ = NULL;
  3463. _cached_size_ = 0;
  3464. }
  3465. DeleteDocumentRequest::~DeleteDocumentRequest() {
  3466. // @@protoc_insertion_point(destructor:google.firestore.v1.DeleteDocumentRequest)
  3467. SharedDtor();
  3468. }
  3469. void DeleteDocumentRequest::SharedDtor() {
  3470. name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3471. if (this != internal_default_instance()) delete current_document_;
  3472. }
  3473. void DeleteDocumentRequest::SetCachedSize(int size) const {
  3474. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  3475. _cached_size_ = size;
  3476. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  3477. }
  3478. const ::google::protobuf::Descriptor* DeleteDocumentRequest::descriptor() {
  3479. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  3480. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  3481. }
  3482. const DeleteDocumentRequest& DeleteDocumentRequest::default_instance() {
  3483. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsDeleteDocumentRequest();
  3484. return *internal_default_instance();
  3485. }
  3486. DeleteDocumentRequest* DeleteDocumentRequest::New(::google::protobuf::Arena* arena) const {
  3487. DeleteDocumentRequest* n = new DeleteDocumentRequest;
  3488. if (arena != NULL) {
  3489. arena->Own(n);
  3490. }
  3491. return n;
  3492. }
  3493. void DeleteDocumentRequest::Clear() {
  3494. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.DeleteDocumentRequest)
  3495. ::google::protobuf::uint32 cached_has_bits = 0;
  3496. // Prevent compiler warnings about cached_has_bits being unused
  3497. (void) cached_has_bits;
  3498. name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3499. if (GetArenaNoVirtual() == NULL && current_document_ != NULL) {
  3500. delete current_document_;
  3501. }
  3502. current_document_ = NULL;
  3503. _internal_metadata_.Clear();
  3504. }
  3505. bool DeleteDocumentRequest::MergePartialFromCodedStream(
  3506. ::google::protobuf::io::CodedInputStream* input) {
  3507. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3508. ::google::protobuf::uint32 tag;
  3509. // @@protoc_insertion_point(parse_start:google.firestore.v1.DeleteDocumentRequest)
  3510. for (;;) {
  3511. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3512. tag = p.first;
  3513. if (!p.second) goto handle_unusual;
  3514. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3515. // string name = 1;
  3516. case 1: {
  3517. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3518. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  3519. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  3520. input, this->mutable_name()));
  3521. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3522. this->name().data(), static_cast<int>(this->name().length()),
  3523. ::google::protobuf::internal::WireFormatLite::PARSE,
  3524. "google.firestore.v1.DeleteDocumentRequest.name"));
  3525. } else {
  3526. goto handle_unusual;
  3527. }
  3528. break;
  3529. }
  3530. // .google.firestore.v1.Precondition current_document = 2;
  3531. case 2: {
  3532. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3533. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  3534. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  3535. input, mutable_current_document()));
  3536. } else {
  3537. goto handle_unusual;
  3538. }
  3539. break;
  3540. }
  3541. default: {
  3542. handle_unusual:
  3543. if (tag == 0) {
  3544. goto success;
  3545. }
  3546. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3547. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3548. break;
  3549. }
  3550. }
  3551. }
  3552. success:
  3553. // @@protoc_insertion_point(parse_success:google.firestore.v1.DeleteDocumentRequest)
  3554. return true;
  3555. failure:
  3556. // @@protoc_insertion_point(parse_failure:google.firestore.v1.DeleteDocumentRequest)
  3557. return false;
  3558. #undef DO_
  3559. }
  3560. void DeleteDocumentRequest::SerializeWithCachedSizes(
  3561. ::google::protobuf::io::CodedOutputStream* output) const {
  3562. // @@protoc_insertion_point(serialize_start:google.firestore.v1.DeleteDocumentRequest)
  3563. ::google::protobuf::uint32 cached_has_bits = 0;
  3564. (void) cached_has_bits;
  3565. // string name = 1;
  3566. if (this->name().size() > 0) {
  3567. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3568. this->name().data(), static_cast<int>(this->name().length()),
  3569. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  3570. "google.firestore.v1.DeleteDocumentRequest.name");
  3571. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  3572. 1, this->name(), output);
  3573. }
  3574. // .google.firestore.v1.Precondition current_document = 2;
  3575. if (this->has_current_document()) {
  3576. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3577. 2, *this->current_document_, output);
  3578. }
  3579. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3580. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  3581. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  3582. }
  3583. // @@protoc_insertion_point(serialize_end:google.firestore.v1.DeleteDocumentRequest)
  3584. }
  3585. ::google::protobuf::uint8* DeleteDocumentRequest::InternalSerializeWithCachedSizesToArray(
  3586. bool deterministic, ::google::protobuf::uint8* target) const {
  3587. (void)deterministic; // Unused
  3588. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.DeleteDocumentRequest)
  3589. ::google::protobuf::uint32 cached_has_bits = 0;
  3590. (void) cached_has_bits;
  3591. // string name = 1;
  3592. if (this->name().size() > 0) {
  3593. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3594. this->name().data(), static_cast<int>(this->name().length()),
  3595. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  3596. "google.firestore.v1.DeleteDocumentRequest.name");
  3597. target =
  3598. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  3599. 1, this->name(), target);
  3600. }
  3601. // .google.firestore.v1.Precondition current_document = 2;
  3602. if (this->has_current_document()) {
  3603. target = ::google::protobuf::internal::WireFormatLite::
  3604. InternalWriteMessageToArray(
  3605. 2, *this->current_document_, deterministic, target);
  3606. }
  3607. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3608. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  3609. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  3610. }
  3611. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.DeleteDocumentRequest)
  3612. return target;
  3613. }
  3614. size_t DeleteDocumentRequest::ByteSizeLong() const {
  3615. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.DeleteDocumentRequest)
  3616. size_t total_size = 0;
  3617. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3618. total_size +=
  3619. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  3620. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  3621. }
  3622. // string name = 1;
  3623. if (this->name().size() > 0) {
  3624. total_size += 1 +
  3625. ::google::protobuf::internal::WireFormatLite::StringSize(
  3626. this->name());
  3627. }
  3628. // .google.firestore.v1.Precondition current_document = 2;
  3629. if (this->has_current_document()) {
  3630. total_size += 1 +
  3631. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3632. *this->current_document_);
  3633. }
  3634. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  3635. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  3636. _cached_size_ = cached_size;
  3637. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  3638. return total_size;
  3639. }
  3640. void DeleteDocumentRequest::MergeFrom(const ::google::protobuf::Message& from) {
  3641. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.DeleteDocumentRequest)
  3642. GOOGLE_DCHECK_NE(&from, this);
  3643. const DeleteDocumentRequest* source =
  3644. ::google::protobuf::internal::DynamicCastToGenerated<const DeleteDocumentRequest>(
  3645. &from);
  3646. if (source == NULL) {
  3647. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.DeleteDocumentRequest)
  3648. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  3649. } else {
  3650. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.DeleteDocumentRequest)
  3651. MergeFrom(*source);
  3652. }
  3653. }
  3654. void DeleteDocumentRequest::MergeFrom(const DeleteDocumentRequest& from) {
  3655. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.DeleteDocumentRequest)
  3656. GOOGLE_DCHECK_NE(&from, this);
  3657. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3658. ::google::protobuf::uint32 cached_has_bits = 0;
  3659. (void) cached_has_bits;
  3660. if (from.name().size() > 0) {
  3661. name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  3662. }
  3663. if (from.has_current_document()) {
  3664. mutable_current_document()->::google::firestore::v1::Precondition::MergeFrom(from.current_document());
  3665. }
  3666. }
  3667. void DeleteDocumentRequest::CopyFrom(const ::google::protobuf::Message& from) {
  3668. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.DeleteDocumentRequest)
  3669. if (&from == this) return;
  3670. Clear();
  3671. MergeFrom(from);
  3672. }
  3673. void DeleteDocumentRequest::CopyFrom(const DeleteDocumentRequest& from) {
  3674. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.DeleteDocumentRequest)
  3675. if (&from == this) return;
  3676. Clear();
  3677. MergeFrom(from);
  3678. }
  3679. bool DeleteDocumentRequest::IsInitialized() const {
  3680. return true;
  3681. }
  3682. void DeleteDocumentRequest::Swap(DeleteDocumentRequest* other) {
  3683. if (other == this) return;
  3684. InternalSwap(other);
  3685. }
  3686. void DeleteDocumentRequest::InternalSwap(DeleteDocumentRequest* other) {
  3687. using std::swap;
  3688. name_.Swap(&other->name_);
  3689. swap(current_document_, other->current_document_);
  3690. _internal_metadata_.Swap(&other->_internal_metadata_);
  3691. swap(_cached_size_, other->_cached_size_);
  3692. }
  3693. ::google::protobuf::Metadata DeleteDocumentRequest::GetMetadata() const {
  3694. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  3695. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  3696. }
  3697. // ===================================================================
  3698. void BatchGetDocumentsRequest::InitAsDefaultInstance() {
  3699. ::google::firestore::v1::_BatchGetDocumentsRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1::DocumentMask*>(
  3700. ::google::firestore::v1::DocumentMask::internal_default_instance());
  3701. ::google::firestore::v1::_BatchGetDocumentsRequest_default_instance_.transaction_.UnsafeSetDefault(
  3702. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3703. ::google::firestore::v1::_BatchGetDocumentsRequest_default_instance_.new_transaction_ = const_cast< ::google::firestore::v1::TransactionOptions*>(
  3704. ::google::firestore::v1::TransactionOptions::internal_default_instance());
  3705. ::google::firestore::v1::_BatchGetDocumentsRequest_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>(
  3706. ::google::protobuf::Timestamp::internal_default_instance());
  3707. }
  3708. void BatchGetDocumentsRequest::clear_mask() {
  3709. if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
  3710. delete mask_;
  3711. }
  3712. mask_ = NULL;
  3713. }
  3714. void BatchGetDocumentsRequest::set_allocated_new_transaction(::google::firestore::v1::TransactionOptions* new_transaction) {
  3715. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  3716. clear_consistency_selector();
  3717. if (new_transaction) {
  3718. ::google::protobuf::Arena* submessage_arena = NULL;
  3719. if (message_arena != submessage_arena) {
  3720. new_transaction = ::google::protobuf::internal::GetOwnedMessage(
  3721. message_arena, new_transaction, submessage_arena);
  3722. }
  3723. set_has_new_transaction();
  3724. consistency_selector_.new_transaction_ = new_transaction;
  3725. }
  3726. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.BatchGetDocumentsRequest.new_transaction)
  3727. }
  3728. void BatchGetDocumentsRequest::clear_new_transaction() {
  3729. if (has_new_transaction()) {
  3730. delete consistency_selector_.new_transaction_;
  3731. clear_has_consistency_selector();
  3732. }
  3733. }
  3734. void BatchGetDocumentsRequest::set_allocated_read_time(::google::protobuf::Timestamp* read_time) {
  3735. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  3736. clear_consistency_selector();
  3737. if (read_time) {
  3738. ::google::protobuf::Arena* submessage_arena =
  3739. reinterpret_cast< ::google::protobuf::MessageLite*>(read_time)->GetArena();
  3740. if (message_arena != submessage_arena) {
  3741. read_time = ::google::protobuf::internal::GetOwnedMessage(
  3742. message_arena, read_time, submessage_arena);
  3743. }
  3744. set_has_read_time();
  3745. consistency_selector_.read_time_ = read_time;
  3746. }
  3747. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.BatchGetDocumentsRequest.read_time)
  3748. }
  3749. void BatchGetDocumentsRequest::clear_read_time() {
  3750. if (has_read_time()) {
  3751. delete consistency_selector_.read_time_;
  3752. clear_has_consistency_selector();
  3753. }
  3754. }
  3755. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3756. const int BatchGetDocumentsRequest::kDatabaseFieldNumber;
  3757. const int BatchGetDocumentsRequest::kDocumentsFieldNumber;
  3758. const int BatchGetDocumentsRequest::kMaskFieldNumber;
  3759. const int BatchGetDocumentsRequest::kTransactionFieldNumber;
  3760. const int BatchGetDocumentsRequest::kNewTransactionFieldNumber;
  3761. const int BatchGetDocumentsRequest::kReadTimeFieldNumber;
  3762. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3763. BatchGetDocumentsRequest::BatchGetDocumentsRequest()
  3764. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  3765. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  3766. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsBatchGetDocumentsRequest();
  3767. }
  3768. SharedCtor();
  3769. // @@protoc_insertion_point(constructor:google.firestore.v1.BatchGetDocumentsRequest)
  3770. }
  3771. BatchGetDocumentsRequest::BatchGetDocumentsRequest(const BatchGetDocumentsRequest& from)
  3772. : ::google::protobuf::Message(),
  3773. _internal_metadata_(NULL),
  3774. documents_(from.documents_),
  3775. _cached_size_(0) {
  3776. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3777. database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3778. if (from.database().size() > 0) {
  3779. database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  3780. }
  3781. if (from.has_mask()) {
  3782. mask_ = new ::google::firestore::v1::DocumentMask(*from.mask_);
  3783. } else {
  3784. mask_ = NULL;
  3785. }
  3786. clear_has_consistency_selector();
  3787. switch (from.consistency_selector_case()) {
  3788. case kTransaction: {
  3789. set_transaction(from.transaction());
  3790. break;
  3791. }
  3792. case kNewTransaction: {
  3793. mutable_new_transaction()->::google::firestore::v1::TransactionOptions::MergeFrom(from.new_transaction());
  3794. break;
  3795. }
  3796. case kReadTime: {
  3797. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  3798. break;
  3799. }
  3800. case CONSISTENCY_SELECTOR_NOT_SET: {
  3801. break;
  3802. }
  3803. }
  3804. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.BatchGetDocumentsRequest)
  3805. }
  3806. void BatchGetDocumentsRequest::SharedCtor() {
  3807. database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3808. mask_ = NULL;
  3809. clear_has_consistency_selector();
  3810. _cached_size_ = 0;
  3811. }
  3812. BatchGetDocumentsRequest::~BatchGetDocumentsRequest() {
  3813. // @@protoc_insertion_point(destructor:google.firestore.v1.BatchGetDocumentsRequest)
  3814. SharedDtor();
  3815. }
  3816. void BatchGetDocumentsRequest::SharedDtor() {
  3817. database_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3818. if (this != internal_default_instance()) delete mask_;
  3819. if (has_consistency_selector()) {
  3820. clear_consistency_selector();
  3821. }
  3822. }
  3823. void BatchGetDocumentsRequest::SetCachedSize(int size) const {
  3824. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  3825. _cached_size_ = size;
  3826. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  3827. }
  3828. const ::google::protobuf::Descriptor* BatchGetDocumentsRequest::descriptor() {
  3829. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  3830. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  3831. }
  3832. const BatchGetDocumentsRequest& BatchGetDocumentsRequest::default_instance() {
  3833. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsBatchGetDocumentsRequest();
  3834. return *internal_default_instance();
  3835. }
  3836. BatchGetDocumentsRequest* BatchGetDocumentsRequest::New(::google::protobuf::Arena* arena) const {
  3837. BatchGetDocumentsRequest* n = new BatchGetDocumentsRequest;
  3838. if (arena != NULL) {
  3839. arena->Own(n);
  3840. }
  3841. return n;
  3842. }
  3843. void BatchGetDocumentsRequest::clear_consistency_selector() {
  3844. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.BatchGetDocumentsRequest)
  3845. switch (consistency_selector_case()) {
  3846. case kTransaction: {
  3847. consistency_selector_.transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3848. break;
  3849. }
  3850. case kNewTransaction: {
  3851. delete consistency_selector_.new_transaction_;
  3852. break;
  3853. }
  3854. case kReadTime: {
  3855. delete consistency_selector_.read_time_;
  3856. break;
  3857. }
  3858. case CONSISTENCY_SELECTOR_NOT_SET: {
  3859. break;
  3860. }
  3861. }
  3862. _oneof_case_[0] = CONSISTENCY_SELECTOR_NOT_SET;
  3863. }
  3864. void BatchGetDocumentsRequest::Clear() {
  3865. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.BatchGetDocumentsRequest)
  3866. ::google::protobuf::uint32 cached_has_bits = 0;
  3867. // Prevent compiler warnings about cached_has_bits being unused
  3868. (void) cached_has_bits;
  3869. documents_.Clear();
  3870. database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  3871. if (GetArenaNoVirtual() == NULL && mask_ != NULL) {
  3872. delete mask_;
  3873. }
  3874. mask_ = NULL;
  3875. clear_consistency_selector();
  3876. _internal_metadata_.Clear();
  3877. }
  3878. bool BatchGetDocumentsRequest::MergePartialFromCodedStream(
  3879. ::google::protobuf::io::CodedInputStream* input) {
  3880. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3881. ::google::protobuf::uint32 tag;
  3882. // @@protoc_insertion_point(parse_start:google.firestore.v1.BatchGetDocumentsRequest)
  3883. for (;;) {
  3884. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3885. tag = p.first;
  3886. if (!p.second) goto handle_unusual;
  3887. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3888. // string database = 1;
  3889. case 1: {
  3890. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3891. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  3892. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  3893. input, this->mutable_database()));
  3894. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3895. this->database().data(), static_cast<int>(this->database().length()),
  3896. ::google::protobuf::internal::WireFormatLite::PARSE,
  3897. "google.firestore.v1.BatchGetDocumentsRequest.database"));
  3898. } else {
  3899. goto handle_unusual;
  3900. }
  3901. break;
  3902. }
  3903. // repeated string documents = 2;
  3904. case 2: {
  3905. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3906. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  3907. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  3908. input, this->add_documents()));
  3909. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3910. this->documents(this->documents_size() - 1).data(),
  3911. static_cast<int>(this->documents(this->documents_size() - 1).length()),
  3912. ::google::protobuf::internal::WireFormatLite::PARSE,
  3913. "google.firestore.v1.BatchGetDocumentsRequest.documents"));
  3914. } else {
  3915. goto handle_unusual;
  3916. }
  3917. break;
  3918. }
  3919. // .google.firestore.v1.DocumentMask mask = 3;
  3920. case 3: {
  3921. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3922. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  3923. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  3924. input, mutable_mask()));
  3925. } else {
  3926. goto handle_unusual;
  3927. }
  3928. break;
  3929. }
  3930. // bytes transaction = 4;
  3931. case 4: {
  3932. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3933. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  3934. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  3935. input, this->mutable_transaction()));
  3936. } else {
  3937. goto handle_unusual;
  3938. }
  3939. break;
  3940. }
  3941. // .google.firestore.v1.TransactionOptions new_transaction = 5;
  3942. case 5: {
  3943. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3944. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  3945. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  3946. input, mutable_new_transaction()));
  3947. } else {
  3948. goto handle_unusual;
  3949. }
  3950. break;
  3951. }
  3952. // .google.protobuf.Timestamp read_time = 7;
  3953. case 7: {
  3954. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3955. static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
  3956. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  3957. input, mutable_read_time()));
  3958. } else {
  3959. goto handle_unusual;
  3960. }
  3961. break;
  3962. }
  3963. default: {
  3964. handle_unusual:
  3965. if (tag == 0) {
  3966. goto success;
  3967. }
  3968. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3969. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3970. break;
  3971. }
  3972. }
  3973. }
  3974. success:
  3975. // @@protoc_insertion_point(parse_success:google.firestore.v1.BatchGetDocumentsRequest)
  3976. return true;
  3977. failure:
  3978. // @@protoc_insertion_point(parse_failure:google.firestore.v1.BatchGetDocumentsRequest)
  3979. return false;
  3980. #undef DO_
  3981. }
  3982. void BatchGetDocumentsRequest::SerializeWithCachedSizes(
  3983. ::google::protobuf::io::CodedOutputStream* output) const {
  3984. // @@protoc_insertion_point(serialize_start:google.firestore.v1.BatchGetDocumentsRequest)
  3985. ::google::protobuf::uint32 cached_has_bits = 0;
  3986. (void) cached_has_bits;
  3987. // string database = 1;
  3988. if (this->database().size() > 0) {
  3989. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3990. this->database().data(), static_cast<int>(this->database().length()),
  3991. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  3992. "google.firestore.v1.BatchGetDocumentsRequest.database");
  3993. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  3994. 1, this->database(), output);
  3995. }
  3996. // repeated string documents = 2;
  3997. for (int i = 0, n = this->documents_size(); i < n; i++) {
  3998. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  3999. this->documents(i).data(), static_cast<int>(this->documents(i).length()),
  4000. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4001. "google.firestore.v1.BatchGetDocumentsRequest.documents");
  4002. ::google::protobuf::internal::WireFormatLite::WriteString(
  4003. 2, this->documents(i), output);
  4004. }
  4005. // .google.firestore.v1.DocumentMask mask = 3;
  4006. if (this->has_mask()) {
  4007. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  4008. 3, *this->mask_, output);
  4009. }
  4010. // bytes transaction = 4;
  4011. if (has_transaction()) {
  4012. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  4013. 4, this->transaction(), output);
  4014. }
  4015. // .google.firestore.v1.TransactionOptions new_transaction = 5;
  4016. if (has_new_transaction()) {
  4017. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  4018. 5, *consistency_selector_.new_transaction_, output);
  4019. }
  4020. // .google.protobuf.Timestamp read_time = 7;
  4021. if (has_read_time()) {
  4022. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  4023. 7, *consistency_selector_.read_time_, output);
  4024. }
  4025. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4026. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  4027. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  4028. }
  4029. // @@protoc_insertion_point(serialize_end:google.firestore.v1.BatchGetDocumentsRequest)
  4030. }
  4031. ::google::protobuf::uint8* BatchGetDocumentsRequest::InternalSerializeWithCachedSizesToArray(
  4032. bool deterministic, ::google::protobuf::uint8* target) const {
  4033. (void)deterministic; // Unused
  4034. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.BatchGetDocumentsRequest)
  4035. ::google::protobuf::uint32 cached_has_bits = 0;
  4036. (void) cached_has_bits;
  4037. // string database = 1;
  4038. if (this->database().size() > 0) {
  4039. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4040. this->database().data(), static_cast<int>(this->database().length()),
  4041. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4042. "google.firestore.v1.BatchGetDocumentsRequest.database");
  4043. target =
  4044. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  4045. 1, this->database(), target);
  4046. }
  4047. // repeated string documents = 2;
  4048. for (int i = 0, n = this->documents_size(); i < n; i++) {
  4049. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4050. this->documents(i).data(), static_cast<int>(this->documents(i).length()),
  4051. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4052. "google.firestore.v1.BatchGetDocumentsRequest.documents");
  4053. target = ::google::protobuf::internal::WireFormatLite::
  4054. WriteStringToArray(2, this->documents(i), target);
  4055. }
  4056. // .google.firestore.v1.DocumentMask mask = 3;
  4057. if (this->has_mask()) {
  4058. target = ::google::protobuf::internal::WireFormatLite::
  4059. InternalWriteMessageToArray(
  4060. 3, *this->mask_, deterministic, target);
  4061. }
  4062. // bytes transaction = 4;
  4063. if (has_transaction()) {
  4064. target =
  4065. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  4066. 4, this->transaction(), target);
  4067. }
  4068. // .google.firestore.v1.TransactionOptions new_transaction = 5;
  4069. if (has_new_transaction()) {
  4070. target = ::google::protobuf::internal::WireFormatLite::
  4071. InternalWriteMessageToArray(
  4072. 5, *consistency_selector_.new_transaction_, deterministic, target);
  4073. }
  4074. // .google.protobuf.Timestamp read_time = 7;
  4075. if (has_read_time()) {
  4076. target = ::google::protobuf::internal::WireFormatLite::
  4077. InternalWriteMessageToArray(
  4078. 7, *consistency_selector_.read_time_, deterministic, target);
  4079. }
  4080. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4081. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  4082. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  4083. }
  4084. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.BatchGetDocumentsRequest)
  4085. return target;
  4086. }
  4087. size_t BatchGetDocumentsRequest::ByteSizeLong() const {
  4088. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.BatchGetDocumentsRequest)
  4089. size_t total_size = 0;
  4090. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4091. total_size +=
  4092. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  4093. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  4094. }
  4095. // repeated string documents = 2;
  4096. total_size += 1 *
  4097. ::google::protobuf::internal::FromIntSize(this->documents_size());
  4098. for (int i = 0, n = this->documents_size(); i < n; i++) {
  4099. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  4100. this->documents(i));
  4101. }
  4102. // string database = 1;
  4103. if (this->database().size() > 0) {
  4104. total_size += 1 +
  4105. ::google::protobuf::internal::WireFormatLite::StringSize(
  4106. this->database());
  4107. }
  4108. // .google.firestore.v1.DocumentMask mask = 3;
  4109. if (this->has_mask()) {
  4110. total_size += 1 +
  4111. ::google::protobuf::internal::WireFormatLite::MessageSize(
  4112. *this->mask_);
  4113. }
  4114. switch (consistency_selector_case()) {
  4115. // bytes transaction = 4;
  4116. case kTransaction: {
  4117. total_size += 1 +
  4118. ::google::protobuf::internal::WireFormatLite::BytesSize(
  4119. this->transaction());
  4120. break;
  4121. }
  4122. // .google.firestore.v1.TransactionOptions new_transaction = 5;
  4123. case kNewTransaction: {
  4124. total_size += 1 +
  4125. ::google::protobuf::internal::WireFormatLite::MessageSize(
  4126. *consistency_selector_.new_transaction_);
  4127. break;
  4128. }
  4129. // .google.protobuf.Timestamp read_time = 7;
  4130. case kReadTime: {
  4131. total_size += 1 +
  4132. ::google::protobuf::internal::WireFormatLite::MessageSize(
  4133. *consistency_selector_.read_time_);
  4134. break;
  4135. }
  4136. case CONSISTENCY_SELECTOR_NOT_SET: {
  4137. break;
  4138. }
  4139. }
  4140. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  4141. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4142. _cached_size_ = cached_size;
  4143. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4144. return total_size;
  4145. }
  4146. void BatchGetDocumentsRequest::MergeFrom(const ::google::protobuf::Message& from) {
  4147. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.BatchGetDocumentsRequest)
  4148. GOOGLE_DCHECK_NE(&from, this);
  4149. const BatchGetDocumentsRequest* source =
  4150. ::google::protobuf::internal::DynamicCastToGenerated<const BatchGetDocumentsRequest>(
  4151. &from);
  4152. if (source == NULL) {
  4153. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.BatchGetDocumentsRequest)
  4154. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  4155. } else {
  4156. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.BatchGetDocumentsRequest)
  4157. MergeFrom(*source);
  4158. }
  4159. }
  4160. void BatchGetDocumentsRequest::MergeFrom(const BatchGetDocumentsRequest& from) {
  4161. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.BatchGetDocumentsRequest)
  4162. GOOGLE_DCHECK_NE(&from, this);
  4163. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4164. ::google::protobuf::uint32 cached_has_bits = 0;
  4165. (void) cached_has_bits;
  4166. documents_.MergeFrom(from.documents_);
  4167. if (from.database().size() > 0) {
  4168. database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  4169. }
  4170. if (from.has_mask()) {
  4171. mutable_mask()->::google::firestore::v1::DocumentMask::MergeFrom(from.mask());
  4172. }
  4173. switch (from.consistency_selector_case()) {
  4174. case kTransaction: {
  4175. set_transaction(from.transaction());
  4176. break;
  4177. }
  4178. case kNewTransaction: {
  4179. mutable_new_transaction()->::google::firestore::v1::TransactionOptions::MergeFrom(from.new_transaction());
  4180. break;
  4181. }
  4182. case kReadTime: {
  4183. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  4184. break;
  4185. }
  4186. case CONSISTENCY_SELECTOR_NOT_SET: {
  4187. break;
  4188. }
  4189. }
  4190. }
  4191. void BatchGetDocumentsRequest::CopyFrom(const ::google::protobuf::Message& from) {
  4192. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.BatchGetDocumentsRequest)
  4193. if (&from == this) return;
  4194. Clear();
  4195. MergeFrom(from);
  4196. }
  4197. void BatchGetDocumentsRequest::CopyFrom(const BatchGetDocumentsRequest& from) {
  4198. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.BatchGetDocumentsRequest)
  4199. if (&from == this) return;
  4200. Clear();
  4201. MergeFrom(from);
  4202. }
  4203. bool BatchGetDocumentsRequest::IsInitialized() const {
  4204. return true;
  4205. }
  4206. void BatchGetDocumentsRequest::Swap(BatchGetDocumentsRequest* other) {
  4207. if (other == this) return;
  4208. InternalSwap(other);
  4209. }
  4210. void BatchGetDocumentsRequest::InternalSwap(BatchGetDocumentsRequest* other) {
  4211. using std::swap;
  4212. documents_.InternalSwap(&other->documents_);
  4213. database_.Swap(&other->database_);
  4214. swap(mask_, other->mask_);
  4215. swap(consistency_selector_, other->consistency_selector_);
  4216. swap(_oneof_case_[0], other->_oneof_case_[0]);
  4217. _internal_metadata_.Swap(&other->_internal_metadata_);
  4218. swap(_cached_size_, other->_cached_size_);
  4219. }
  4220. ::google::protobuf::Metadata BatchGetDocumentsRequest::GetMetadata() const {
  4221. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  4222. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  4223. }
  4224. // ===================================================================
  4225. void BatchGetDocumentsResponse::InitAsDefaultInstance() {
  4226. ::google::firestore::v1::_BatchGetDocumentsResponse_default_instance_.found_ = const_cast< ::google::firestore::v1::Document*>(
  4227. ::google::firestore::v1::Document::internal_default_instance());
  4228. ::google::firestore::v1::_BatchGetDocumentsResponse_default_instance_.missing_.UnsafeSetDefault(
  4229. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4230. ::google::firestore::v1::_BatchGetDocumentsResponse_default_instance_._instance.get_mutable()->read_time_ = const_cast< ::google::protobuf::Timestamp*>(
  4231. ::google::protobuf::Timestamp::internal_default_instance());
  4232. }
  4233. void BatchGetDocumentsResponse::set_allocated_found(::google::firestore::v1::Document* found) {
  4234. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  4235. clear_result();
  4236. if (found) {
  4237. ::google::protobuf::Arena* submessage_arena = NULL;
  4238. if (message_arena != submessage_arena) {
  4239. found = ::google::protobuf::internal::GetOwnedMessage(
  4240. message_arena, found, submessage_arena);
  4241. }
  4242. set_has_found();
  4243. result_.found_ = found;
  4244. }
  4245. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.BatchGetDocumentsResponse.found)
  4246. }
  4247. void BatchGetDocumentsResponse::clear_found() {
  4248. if (has_found()) {
  4249. delete result_.found_;
  4250. clear_has_result();
  4251. }
  4252. }
  4253. void BatchGetDocumentsResponse::clear_read_time() {
  4254. if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
  4255. delete read_time_;
  4256. }
  4257. read_time_ = NULL;
  4258. }
  4259. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  4260. const int BatchGetDocumentsResponse::kFoundFieldNumber;
  4261. const int BatchGetDocumentsResponse::kMissingFieldNumber;
  4262. const int BatchGetDocumentsResponse::kTransactionFieldNumber;
  4263. const int BatchGetDocumentsResponse::kReadTimeFieldNumber;
  4264. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  4265. BatchGetDocumentsResponse::BatchGetDocumentsResponse()
  4266. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  4267. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  4268. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsBatchGetDocumentsResponse();
  4269. }
  4270. SharedCtor();
  4271. // @@protoc_insertion_point(constructor:google.firestore.v1.BatchGetDocumentsResponse)
  4272. }
  4273. BatchGetDocumentsResponse::BatchGetDocumentsResponse(const BatchGetDocumentsResponse& from)
  4274. : ::google::protobuf::Message(),
  4275. _internal_metadata_(NULL),
  4276. _cached_size_(0) {
  4277. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4278. transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4279. if (from.transaction().size() > 0) {
  4280. transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  4281. }
  4282. if (from.has_read_time()) {
  4283. read_time_ = new ::google::protobuf::Timestamp(*from.read_time_);
  4284. } else {
  4285. read_time_ = NULL;
  4286. }
  4287. clear_has_result();
  4288. switch (from.result_case()) {
  4289. case kFound: {
  4290. mutable_found()->::google::firestore::v1::Document::MergeFrom(from.found());
  4291. break;
  4292. }
  4293. case kMissing: {
  4294. set_missing(from.missing());
  4295. break;
  4296. }
  4297. case RESULT_NOT_SET: {
  4298. break;
  4299. }
  4300. }
  4301. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.BatchGetDocumentsResponse)
  4302. }
  4303. void BatchGetDocumentsResponse::SharedCtor() {
  4304. transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4305. read_time_ = NULL;
  4306. clear_has_result();
  4307. _cached_size_ = 0;
  4308. }
  4309. BatchGetDocumentsResponse::~BatchGetDocumentsResponse() {
  4310. // @@protoc_insertion_point(destructor:google.firestore.v1.BatchGetDocumentsResponse)
  4311. SharedDtor();
  4312. }
  4313. void BatchGetDocumentsResponse::SharedDtor() {
  4314. transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4315. if (this != internal_default_instance()) delete read_time_;
  4316. if (has_result()) {
  4317. clear_result();
  4318. }
  4319. }
  4320. void BatchGetDocumentsResponse::SetCachedSize(int size) const {
  4321. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4322. _cached_size_ = size;
  4323. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4324. }
  4325. const ::google::protobuf::Descriptor* BatchGetDocumentsResponse::descriptor() {
  4326. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  4327. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  4328. }
  4329. const BatchGetDocumentsResponse& BatchGetDocumentsResponse::default_instance() {
  4330. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsBatchGetDocumentsResponse();
  4331. return *internal_default_instance();
  4332. }
  4333. BatchGetDocumentsResponse* BatchGetDocumentsResponse::New(::google::protobuf::Arena* arena) const {
  4334. BatchGetDocumentsResponse* n = new BatchGetDocumentsResponse;
  4335. if (arena != NULL) {
  4336. arena->Own(n);
  4337. }
  4338. return n;
  4339. }
  4340. void BatchGetDocumentsResponse::clear_result() {
  4341. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.BatchGetDocumentsResponse)
  4342. switch (result_case()) {
  4343. case kFound: {
  4344. delete result_.found_;
  4345. break;
  4346. }
  4347. case kMissing: {
  4348. result_.missing_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4349. break;
  4350. }
  4351. case RESULT_NOT_SET: {
  4352. break;
  4353. }
  4354. }
  4355. _oneof_case_[0] = RESULT_NOT_SET;
  4356. }
  4357. void BatchGetDocumentsResponse::Clear() {
  4358. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.BatchGetDocumentsResponse)
  4359. ::google::protobuf::uint32 cached_has_bits = 0;
  4360. // Prevent compiler warnings about cached_has_bits being unused
  4361. (void) cached_has_bits;
  4362. transaction_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4363. if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
  4364. delete read_time_;
  4365. }
  4366. read_time_ = NULL;
  4367. clear_result();
  4368. _internal_metadata_.Clear();
  4369. }
  4370. bool BatchGetDocumentsResponse::MergePartialFromCodedStream(
  4371. ::google::protobuf::io::CodedInputStream* input) {
  4372. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  4373. ::google::protobuf::uint32 tag;
  4374. // @@protoc_insertion_point(parse_start:google.firestore.v1.BatchGetDocumentsResponse)
  4375. for (;;) {
  4376. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  4377. tag = p.first;
  4378. if (!p.second) goto handle_unusual;
  4379. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  4380. // .google.firestore.v1.Document found = 1;
  4381. case 1: {
  4382. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4383. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  4384. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  4385. input, mutable_found()));
  4386. } else {
  4387. goto handle_unusual;
  4388. }
  4389. break;
  4390. }
  4391. // string missing = 2;
  4392. case 2: {
  4393. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4394. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  4395. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  4396. input, this->mutable_missing()));
  4397. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4398. this->missing().data(), static_cast<int>(this->missing().length()),
  4399. ::google::protobuf::internal::WireFormatLite::PARSE,
  4400. "google.firestore.v1.BatchGetDocumentsResponse.missing"));
  4401. } else {
  4402. goto handle_unusual;
  4403. }
  4404. break;
  4405. }
  4406. // bytes transaction = 3;
  4407. case 3: {
  4408. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4409. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  4410. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  4411. input, this->mutable_transaction()));
  4412. } else {
  4413. goto handle_unusual;
  4414. }
  4415. break;
  4416. }
  4417. // .google.protobuf.Timestamp read_time = 4;
  4418. case 4: {
  4419. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4420. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  4421. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  4422. input, mutable_read_time()));
  4423. } else {
  4424. goto handle_unusual;
  4425. }
  4426. break;
  4427. }
  4428. default: {
  4429. handle_unusual:
  4430. if (tag == 0) {
  4431. goto success;
  4432. }
  4433. DO_(::google::protobuf::internal::WireFormat::SkipField(
  4434. input, tag, _internal_metadata_.mutable_unknown_fields()));
  4435. break;
  4436. }
  4437. }
  4438. }
  4439. success:
  4440. // @@protoc_insertion_point(parse_success:google.firestore.v1.BatchGetDocumentsResponse)
  4441. return true;
  4442. failure:
  4443. // @@protoc_insertion_point(parse_failure:google.firestore.v1.BatchGetDocumentsResponse)
  4444. return false;
  4445. #undef DO_
  4446. }
  4447. void BatchGetDocumentsResponse::SerializeWithCachedSizes(
  4448. ::google::protobuf::io::CodedOutputStream* output) const {
  4449. // @@protoc_insertion_point(serialize_start:google.firestore.v1.BatchGetDocumentsResponse)
  4450. ::google::protobuf::uint32 cached_has_bits = 0;
  4451. (void) cached_has_bits;
  4452. // .google.firestore.v1.Document found = 1;
  4453. if (has_found()) {
  4454. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  4455. 1, *result_.found_, output);
  4456. }
  4457. // string missing = 2;
  4458. if (has_missing()) {
  4459. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4460. this->missing().data(), static_cast<int>(this->missing().length()),
  4461. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4462. "google.firestore.v1.BatchGetDocumentsResponse.missing");
  4463. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  4464. 2, this->missing(), output);
  4465. }
  4466. // bytes transaction = 3;
  4467. if (this->transaction().size() > 0) {
  4468. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  4469. 3, this->transaction(), output);
  4470. }
  4471. // .google.protobuf.Timestamp read_time = 4;
  4472. if (this->has_read_time()) {
  4473. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  4474. 4, *this->read_time_, output);
  4475. }
  4476. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4477. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  4478. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  4479. }
  4480. // @@protoc_insertion_point(serialize_end:google.firestore.v1.BatchGetDocumentsResponse)
  4481. }
  4482. ::google::protobuf::uint8* BatchGetDocumentsResponse::InternalSerializeWithCachedSizesToArray(
  4483. bool deterministic, ::google::protobuf::uint8* target) const {
  4484. (void)deterministic; // Unused
  4485. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.BatchGetDocumentsResponse)
  4486. ::google::protobuf::uint32 cached_has_bits = 0;
  4487. (void) cached_has_bits;
  4488. // .google.firestore.v1.Document found = 1;
  4489. if (has_found()) {
  4490. target = ::google::protobuf::internal::WireFormatLite::
  4491. InternalWriteMessageToArray(
  4492. 1, *result_.found_, deterministic, target);
  4493. }
  4494. // string missing = 2;
  4495. if (has_missing()) {
  4496. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4497. this->missing().data(), static_cast<int>(this->missing().length()),
  4498. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4499. "google.firestore.v1.BatchGetDocumentsResponse.missing");
  4500. target =
  4501. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  4502. 2, this->missing(), target);
  4503. }
  4504. // bytes transaction = 3;
  4505. if (this->transaction().size() > 0) {
  4506. target =
  4507. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  4508. 3, this->transaction(), target);
  4509. }
  4510. // .google.protobuf.Timestamp read_time = 4;
  4511. if (this->has_read_time()) {
  4512. target = ::google::protobuf::internal::WireFormatLite::
  4513. InternalWriteMessageToArray(
  4514. 4, *this->read_time_, deterministic, target);
  4515. }
  4516. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4517. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  4518. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  4519. }
  4520. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.BatchGetDocumentsResponse)
  4521. return target;
  4522. }
  4523. size_t BatchGetDocumentsResponse::ByteSizeLong() const {
  4524. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.BatchGetDocumentsResponse)
  4525. size_t total_size = 0;
  4526. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4527. total_size +=
  4528. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  4529. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  4530. }
  4531. // bytes transaction = 3;
  4532. if (this->transaction().size() > 0) {
  4533. total_size += 1 +
  4534. ::google::protobuf::internal::WireFormatLite::BytesSize(
  4535. this->transaction());
  4536. }
  4537. // .google.protobuf.Timestamp read_time = 4;
  4538. if (this->has_read_time()) {
  4539. total_size += 1 +
  4540. ::google::protobuf::internal::WireFormatLite::MessageSize(
  4541. *this->read_time_);
  4542. }
  4543. switch (result_case()) {
  4544. // .google.firestore.v1.Document found = 1;
  4545. case kFound: {
  4546. total_size += 1 +
  4547. ::google::protobuf::internal::WireFormatLite::MessageSize(
  4548. *result_.found_);
  4549. break;
  4550. }
  4551. // string missing = 2;
  4552. case kMissing: {
  4553. total_size += 1 +
  4554. ::google::protobuf::internal::WireFormatLite::StringSize(
  4555. this->missing());
  4556. break;
  4557. }
  4558. case RESULT_NOT_SET: {
  4559. break;
  4560. }
  4561. }
  4562. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  4563. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4564. _cached_size_ = cached_size;
  4565. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4566. return total_size;
  4567. }
  4568. void BatchGetDocumentsResponse::MergeFrom(const ::google::protobuf::Message& from) {
  4569. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.BatchGetDocumentsResponse)
  4570. GOOGLE_DCHECK_NE(&from, this);
  4571. const BatchGetDocumentsResponse* source =
  4572. ::google::protobuf::internal::DynamicCastToGenerated<const BatchGetDocumentsResponse>(
  4573. &from);
  4574. if (source == NULL) {
  4575. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.BatchGetDocumentsResponse)
  4576. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  4577. } else {
  4578. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.BatchGetDocumentsResponse)
  4579. MergeFrom(*source);
  4580. }
  4581. }
  4582. void BatchGetDocumentsResponse::MergeFrom(const BatchGetDocumentsResponse& from) {
  4583. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.BatchGetDocumentsResponse)
  4584. GOOGLE_DCHECK_NE(&from, this);
  4585. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4586. ::google::protobuf::uint32 cached_has_bits = 0;
  4587. (void) cached_has_bits;
  4588. if (from.transaction().size() > 0) {
  4589. transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  4590. }
  4591. if (from.has_read_time()) {
  4592. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  4593. }
  4594. switch (from.result_case()) {
  4595. case kFound: {
  4596. mutable_found()->::google::firestore::v1::Document::MergeFrom(from.found());
  4597. break;
  4598. }
  4599. case kMissing: {
  4600. set_missing(from.missing());
  4601. break;
  4602. }
  4603. case RESULT_NOT_SET: {
  4604. break;
  4605. }
  4606. }
  4607. }
  4608. void BatchGetDocumentsResponse::CopyFrom(const ::google::protobuf::Message& from) {
  4609. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.BatchGetDocumentsResponse)
  4610. if (&from == this) return;
  4611. Clear();
  4612. MergeFrom(from);
  4613. }
  4614. void BatchGetDocumentsResponse::CopyFrom(const BatchGetDocumentsResponse& from) {
  4615. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.BatchGetDocumentsResponse)
  4616. if (&from == this) return;
  4617. Clear();
  4618. MergeFrom(from);
  4619. }
  4620. bool BatchGetDocumentsResponse::IsInitialized() const {
  4621. return true;
  4622. }
  4623. void BatchGetDocumentsResponse::Swap(BatchGetDocumentsResponse* other) {
  4624. if (other == this) return;
  4625. InternalSwap(other);
  4626. }
  4627. void BatchGetDocumentsResponse::InternalSwap(BatchGetDocumentsResponse* other) {
  4628. using std::swap;
  4629. transaction_.Swap(&other->transaction_);
  4630. swap(read_time_, other->read_time_);
  4631. swap(result_, other->result_);
  4632. swap(_oneof_case_[0], other->_oneof_case_[0]);
  4633. _internal_metadata_.Swap(&other->_internal_metadata_);
  4634. swap(_cached_size_, other->_cached_size_);
  4635. }
  4636. ::google::protobuf::Metadata BatchGetDocumentsResponse::GetMetadata() const {
  4637. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  4638. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  4639. }
  4640. // ===================================================================
  4641. void BeginTransactionRequest::InitAsDefaultInstance() {
  4642. ::google::firestore::v1::_BeginTransactionRequest_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::firestore::v1::TransactionOptions*>(
  4643. ::google::firestore::v1::TransactionOptions::internal_default_instance());
  4644. }
  4645. void BeginTransactionRequest::clear_options() {
  4646. if (GetArenaNoVirtual() == NULL && options_ != NULL) {
  4647. delete options_;
  4648. }
  4649. options_ = NULL;
  4650. }
  4651. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  4652. const int BeginTransactionRequest::kDatabaseFieldNumber;
  4653. const int BeginTransactionRequest::kOptionsFieldNumber;
  4654. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  4655. BeginTransactionRequest::BeginTransactionRequest()
  4656. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  4657. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  4658. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsBeginTransactionRequest();
  4659. }
  4660. SharedCtor();
  4661. // @@protoc_insertion_point(constructor:google.firestore.v1.BeginTransactionRequest)
  4662. }
  4663. BeginTransactionRequest::BeginTransactionRequest(const BeginTransactionRequest& from)
  4664. : ::google::protobuf::Message(),
  4665. _internal_metadata_(NULL),
  4666. _cached_size_(0) {
  4667. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4668. database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4669. if (from.database().size() > 0) {
  4670. database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  4671. }
  4672. if (from.has_options()) {
  4673. options_ = new ::google::firestore::v1::TransactionOptions(*from.options_);
  4674. } else {
  4675. options_ = NULL;
  4676. }
  4677. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.BeginTransactionRequest)
  4678. }
  4679. void BeginTransactionRequest::SharedCtor() {
  4680. database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4681. options_ = NULL;
  4682. _cached_size_ = 0;
  4683. }
  4684. BeginTransactionRequest::~BeginTransactionRequest() {
  4685. // @@protoc_insertion_point(destructor:google.firestore.v1.BeginTransactionRequest)
  4686. SharedDtor();
  4687. }
  4688. void BeginTransactionRequest::SharedDtor() {
  4689. database_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4690. if (this != internal_default_instance()) delete options_;
  4691. }
  4692. void BeginTransactionRequest::SetCachedSize(int size) const {
  4693. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4694. _cached_size_ = size;
  4695. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4696. }
  4697. const ::google::protobuf::Descriptor* BeginTransactionRequest::descriptor() {
  4698. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  4699. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  4700. }
  4701. const BeginTransactionRequest& BeginTransactionRequest::default_instance() {
  4702. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsBeginTransactionRequest();
  4703. return *internal_default_instance();
  4704. }
  4705. BeginTransactionRequest* BeginTransactionRequest::New(::google::protobuf::Arena* arena) const {
  4706. BeginTransactionRequest* n = new BeginTransactionRequest;
  4707. if (arena != NULL) {
  4708. arena->Own(n);
  4709. }
  4710. return n;
  4711. }
  4712. void BeginTransactionRequest::Clear() {
  4713. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.BeginTransactionRequest)
  4714. ::google::protobuf::uint32 cached_has_bits = 0;
  4715. // Prevent compiler warnings about cached_has_bits being unused
  4716. (void) cached_has_bits;
  4717. database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4718. if (GetArenaNoVirtual() == NULL && options_ != NULL) {
  4719. delete options_;
  4720. }
  4721. options_ = NULL;
  4722. _internal_metadata_.Clear();
  4723. }
  4724. bool BeginTransactionRequest::MergePartialFromCodedStream(
  4725. ::google::protobuf::io::CodedInputStream* input) {
  4726. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  4727. ::google::protobuf::uint32 tag;
  4728. // @@protoc_insertion_point(parse_start:google.firestore.v1.BeginTransactionRequest)
  4729. for (;;) {
  4730. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  4731. tag = p.first;
  4732. if (!p.second) goto handle_unusual;
  4733. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  4734. // string database = 1;
  4735. case 1: {
  4736. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4737. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  4738. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  4739. input, this->mutable_database()));
  4740. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4741. this->database().data(), static_cast<int>(this->database().length()),
  4742. ::google::protobuf::internal::WireFormatLite::PARSE,
  4743. "google.firestore.v1.BeginTransactionRequest.database"));
  4744. } else {
  4745. goto handle_unusual;
  4746. }
  4747. break;
  4748. }
  4749. // .google.firestore.v1.TransactionOptions options = 2;
  4750. case 2: {
  4751. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4752. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  4753. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  4754. input, mutable_options()));
  4755. } else {
  4756. goto handle_unusual;
  4757. }
  4758. break;
  4759. }
  4760. default: {
  4761. handle_unusual:
  4762. if (tag == 0) {
  4763. goto success;
  4764. }
  4765. DO_(::google::protobuf::internal::WireFormat::SkipField(
  4766. input, tag, _internal_metadata_.mutable_unknown_fields()));
  4767. break;
  4768. }
  4769. }
  4770. }
  4771. success:
  4772. // @@protoc_insertion_point(parse_success:google.firestore.v1.BeginTransactionRequest)
  4773. return true;
  4774. failure:
  4775. // @@protoc_insertion_point(parse_failure:google.firestore.v1.BeginTransactionRequest)
  4776. return false;
  4777. #undef DO_
  4778. }
  4779. void BeginTransactionRequest::SerializeWithCachedSizes(
  4780. ::google::protobuf::io::CodedOutputStream* output) const {
  4781. // @@protoc_insertion_point(serialize_start:google.firestore.v1.BeginTransactionRequest)
  4782. ::google::protobuf::uint32 cached_has_bits = 0;
  4783. (void) cached_has_bits;
  4784. // string database = 1;
  4785. if (this->database().size() > 0) {
  4786. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4787. this->database().data(), static_cast<int>(this->database().length()),
  4788. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4789. "google.firestore.v1.BeginTransactionRequest.database");
  4790. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  4791. 1, this->database(), output);
  4792. }
  4793. // .google.firestore.v1.TransactionOptions options = 2;
  4794. if (this->has_options()) {
  4795. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  4796. 2, *this->options_, output);
  4797. }
  4798. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4799. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  4800. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  4801. }
  4802. // @@protoc_insertion_point(serialize_end:google.firestore.v1.BeginTransactionRequest)
  4803. }
  4804. ::google::protobuf::uint8* BeginTransactionRequest::InternalSerializeWithCachedSizesToArray(
  4805. bool deterministic, ::google::protobuf::uint8* target) const {
  4806. (void)deterministic; // Unused
  4807. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.BeginTransactionRequest)
  4808. ::google::protobuf::uint32 cached_has_bits = 0;
  4809. (void) cached_has_bits;
  4810. // string database = 1;
  4811. if (this->database().size() > 0) {
  4812. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  4813. this->database().data(), static_cast<int>(this->database().length()),
  4814. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  4815. "google.firestore.v1.BeginTransactionRequest.database");
  4816. target =
  4817. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  4818. 1, this->database(), target);
  4819. }
  4820. // .google.firestore.v1.TransactionOptions options = 2;
  4821. if (this->has_options()) {
  4822. target = ::google::protobuf::internal::WireFormatLite::
  4823. InternalWriteMessageToArray(
  4824. 2, *this->options_, deterministic, target);
  4825. }
  4826. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4827. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  4828. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  4829. }
  4830. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.BeginTransactionRequest)
  4831. return target;
  4832. }
  4833. size_t BeginTransactionRequest::ByteSizeLong() const {
  4834. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.BeginTransactionRequest)
  4835. size_t total_size = 0;
  4836. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  4837. total_size +=
  4838. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  4839. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  4840. }
  4841. // string database = 1;
  4842. if (this->database().size() > 0) {
  4843. total_size += 1 +
  4844. ::google::protobuf::internal::WireFormatLite::StringSize(
  4845. this->database());
  4846. }
  4847. // .google.firestore.v1.TransactionOptions options = 2;
  4848. if (this->has_options()) {
  4849. total_size += 1 +
  4850. ::google::protobuf::internal::WireFormatLite::MessageSize(
  4851. *this->options_);
  4852. }
  4853. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  4854. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4855. _cached_size_ = cached_size;
  4856. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4857. return total_size;
  4858. }
  4859. void BeginTransactionRequest::MergeFrom(const ::google::protobuf::Message& from) {
  4860. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.BeginTransactionRequest)
  4861. GOOGLE_DCHECK_NE(&from, this);
  4862. const BeginTransactionRequest* source =
  4863. ::google::protobuf::internal::DynamicCastToGenerated<const BeginTransactionRequest>(
  4864. &from);
  4865. if (source == NULL) {
  4866. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.BeginTransactionRequest)
  4867. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  4868. } else {
  4869. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.BeginTransactionRequest)
  4870. MergeFrom(*source);
  4871. }
  4872. }
  4873. void BeginTransactionRequest::MergeFrom(const BeginTransactionRequest& from) {
  4874. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.BeginTransactionRequest)
  4875. GOOGLE_DCHECK_NE(&from, this);
  4876. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4877. ::google::protobuf::uint32 cached_has_bits = 0;
  4878. (void) cached_has_bits;
  4879. if (from.database().size() > 0) {
  4880. database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  4881. }
  4882. if (from.has_options()) {
  4883. mutable_options()->::google::firestore::v1::TransactionOptions::MergeFrom(from.options());
  4884. }
  4885. }
  4886. void BeginTransactionRequest::CopyFrom(const ::google::protobuf::Message& from) {
  4887. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.BeginTransactionRequest)
  4888. if (&from == this) return;
  4889. Clear();
  4890. MergeFrom(from);
  4891. }
  4892. void BeginTransactionRequest::CopyFrom(const BeginTransactionRequest& from) {
  4893. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.BeginTransactionRequest)
  4894. if (&from == this) return;
  4895. Clear();
  4896. MergeFrom(from);
  4897. }
  4898. bool BeginTransactionRequest::IsInitialized() const {
  4899. return true;
  4900. }
  4901. void BeginTransactionRequest::Swap(BeginTransactionRequest* other) {
  4902. if (other == this) return;
  4903. InternalSwap(other);
  4904. }
  4905. void BeginTransactionRequest::InternalSwap(BeginTransactionRequest* other) {
  4906. using std::swap;
  4907. database_.Swap(&other->database_);
  4908. swap(options_, other->options_);
  4909. _internal_metadata_.Swap(&other->_internal_metadata_);
  4910. swap(_cached_size_, other->_cached_size_);
  4911. }
  4912. ::google::protobuf::Metadata BeginTransactionRequest::GetMetadata() const {
  4913. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  4914. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  4915. }
  4916. // ===================================================================
  4917. void BeginTransactionResponse::InitAsDefaultInstance() {
  4918. }
  4919. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  4920. const int BeginTransactionResponse::kTransactionFieldNumber;
  4921. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  4922. BeginTransactionResponse::BeginTransactionResponse()
  4923. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  4924. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  4925. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsBeginTransactionResponse();
  4926. }
  4927. SharedCtor();
  4928. // @@protoc_insertion_point(constructor:google.firestore.v1.BeginTransactionResponse)
  4929. }
  4930. BeginTransactionResponse::BeginTransactionResponse(const BeginTransactionResponse& from)
  4931. : ::google::protobuf::Message(),
  4932. _internal_metadata_(NULL),
  4933. _cached_size_(0) {
  4934. _internal_metadata_.MergeFrom(from._internal_metadata_);
  4935. transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4936. if (from.transaction().size() > 0) {
  4937. transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  4938. }
  4939. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.BeginTransactionResponse)
  4940. }
  4941. void BeginTransactionResponse::SharedCtor() {
  4942. transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4943. _cached_size_ = 0;
  4944. }
  4945. BeginTransactionResponse::~BeginTransactionResponse() {
  4946. // @@protoc_insertion_point(destructor:google.firestore.v1.BeginTransactionResponse)
  4947. SharedDtor();
  4948. }
  4949. void BeginTransactionResponse::SharedDtor() {
  4950. transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4951. }
  4952. void BeginTransactionResponse::SetCachedSize(int size) const {
  4953. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  4954. _cached_size_ = size;
  4955. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  4956. }
  4957. const ::google::protobuf::Descriptor* BeginTransactionResponse::descriptor() {
  4958. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  4959. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  4960. }
  4961. const BeginTransactionResponse& BeginTransactionResponse::default_instance() {
  4962. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsBeginTransactionResponse();
  4963. return *internal_default_instance();
  4964. }
  4965. BeginTransactionResponse* BeginTransactionResponse::New(::google::protobuf::Arena* arena) const {
  4966. BeginTransactionResponse* n = new BeginTransactionResponse;
  4967. if (arena != NULL) {
  4968. arena->Own(n);
  4969. }
  4970. return n;
  4971. }
  4972. void BeginTransactionResponse::Clear() {
  4973. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.BeginTransactionResponse)
  4974. ::google::protobuf::uint32 cached_has_bits = 0;
  4975. // Prevent compiler warnings about cached_has_bits being unused
  4976. (void) cached_has_bits;
  4977. transaction_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  4978. _internal_metadata_.Clear();
  4979. }
  4980. bool BeginTransactionResponse::MergePartialFromCodedStream(
  4981. ::google::protobuf::io::CodedInputStream* input) {
  4982. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  4983. ::google::protobuf::uint32 tag;
  4984. // @@protoc_insertion_point(parse_start:google.firestore.v1.BeginTransactionResponse)
  4985. for (;;) {
  4986. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  4987. tag = p.first;
  4988. if (!p.second) goto handle_unusual;
  4989. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  4990. // bytes transaction = 1;
  4991. case 1: {
  4992. if (static_cast< ::google::protobuf::uint8>(tag) ==
  4993. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  4994. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  4995. input, this->mutable_transaction()));
  4996. } else {
  4997. goto handle_unusual;
  4998. }
  4999. break;
  5000. }
  5001. default: {
  5002. handle_unusual:
  5003. if (tag == 0) {
  5004. goto success;
  5005. }
  5006. DO_(::google::protobuf::internal::WireFormat::SkipField(
  5007. input, tag, _internal_metadata_.mutable_unknown_fields()));
  5008. break;
  5009. }
  5010. }
  5011. }
  5012. success:
  5013. // @@protoc_insertion_point(parse_success:google.firestore.v1.BeginTransactionResponse)
  5014. return true;
  5015. failure:
  5016. // @@protoc_insertion_point(parse_failure:google.firestore.v1.BeginTransactionResponse)
  5017. return false;
  5018. #undef DO_
  5019. }
  5020. void BeginTransactionResponse::SerializeWithCachedSizes(
  5021. ::google::protobuf::io::CodedOutputStream* output) const {
  5022. // @@protoc_insertion_point(serialize_start:google.firestore.v1.BeginTransactionResponse)
  5023. ::google::protobuf::uint32 cached_has_bits = 0;
  5024. (void) cached_has_bits;
  5025. // bytes transaction = 1;
  5026. if (this->transaction().size() > 0) {
  5027. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  5028. 1, this->transaction(), output);
  5029. }
  5030. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5031. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  5032. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  5033. }
  5034. // @@protoc_insertion_point(serialize_end:google.firestore.v1.BeginTransactionResponse)
  5035. }
  5036. ::google::protobuf::uint8* BeginTransactionResponse::InternalSerializeWithCachedSizesToArray(
  5037. bool deterministic, ::google::protobuf::uint8* target) const {
  5038. (void)deterministic; // Unused
  5039. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.BeginTransactionResponse)
  5040. ::google::protobuf::uint32 cached_has_bits = 0;
  5041. (void) cached_has_bits;
  5042. // bytes transaction = 1;
  5043. if (this->transaction().size() > 0) {
  5044. target =
  5045. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  5046. 1, this->transaction(), target);
  5047. }
  5048. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5049. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  5050. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  5051. }
  5052. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.BeginTransactionResponse)
  5053. return target;
  5054. }
  5055. size_t BeginTransactionResponse::ByteSizeLong() const {
  5056. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.BeginTransactionResponse)
  5057. size_t total_size = 0;
  5058. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5059. total_size +=
  5060. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  5061. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  5062. }
  5063. // bytes transaction = 1;
  5064. if (this->transaction().size() > 0) {
  5065. total_size += 1 +
  5066. ::google::protobuf::internal::WireFormatLite::BytesSize(
  5067. this->transaction());
  5068. }
  5069. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  5070. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  5071. _cached_size_ = cached_size;
  5072. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  5073. return total_size;
  5074. }
  5075. void BeginTransactionResponse::MergeFrom(const ::google::protobuf::Message& from) {
  5076. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.BeginTransactionResponse)
  5077. GOOGLE_DCHECK_NE(&from, this);
  5078. const BeginTransactionResponse* source =
  5079. ::google::protobuf::internal::DynamicCastToGenerated<const BeginTransactionResponse>(
  5080. &from);
  5081. if (source == NULL) {
  5082. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.BeginTransactionResponse)
  5083. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  5084. } else {
  5085. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.BeginTransactionResponse)
  5086. MergeFrom(*source);
  5087. }
  5088. }
  5089. void BeginTransactionResponse::MergeFrom(const BeginTransactionResponse& from) {
  5090. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.BeginTransactionResponse)
  5091. GOOGLE_DCHECK_NE(&from, this);
  5092. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5093. ::google::protobuf::uint32 cached_has_bits = 0;
  5094. (void) cached_has_bits;
  5095. if (from.transaction().size() > 0) {
  5096. transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  5097. }
  5098. }
  5099. void BeginTransactionResponse::CopyFrom(const ::google::protobuf::Message& from) {
  5100. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.BeginTransactionResponse)
  5101. if (&from == this) return;
  5102. Clear();
  5103. MergeFrom(from);
  5104. }
  5105. void BeginTransactionResponse::CopyFrom(const BeginTransactionResponse& from) {
  5106. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.BeginTransactionResponse)
  5107. if (&from == this) return;
  5108. Clear();
  5109. MergeFrom(from);
  5110. }
  5111. bool BeginTransactionResponse::IsInitialized() const {
  5112. return true;
  5113. }
  5114. void BeginTransactionResponse::Swap(BeginTransactionResponse* other) {
  5115. if (other == this) return;
  5116. InternalSwap(other);
  5117. }
  5118. void BeginTransactionResponse::InternalSwap(BeginTransactionResponse* other) {
  5119. using std::swap;
  5120. transaction_.Swap(&other->transaction_);
  5121. _internal_metadata_.Swap(&other->_internal_metadata_);
  5122. swap(_cached_size_, other->_cached_size_);
  5123. }
  5124. ::google::protobuf::Metadata BeginTransactionResponse::GetMetadata() const {
  5125. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  5126. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  5127. }
  5128. // ===================================================================
  5129. void CommitRequest::InitAsDefaultInstance() {
  5130. }
  5131. void CommitRequest::clear_writes() {
  5132. writes_.Clear();
  5133. }
  5134. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  5135. const int CommitRequest::kDatabaseFieldNumber;
  5136. const int CommitRequest::kWritesFieldNumber;
  5137. const int CommitRequest::kTransactionFieldNumber;
  5138. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  5139. CommitRequest::CommitRequest()
  5140. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  5141. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  5142. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsCommitRequest();
  5143. }
  5144. SharedCtor();
  5145. // @@protoc_insertion_point(constructor:google.firestore.v1.CommitRequest)
  5146. }
  5147. CommitRequest::CommitRequest(const CommitRequest& from)
  5148. : ::google::protobuf::Message(),
  5149. _internal_metadata_(NULL),
  5150. writes_(from.writes_),
  5151. _cached_size_(0) {
  5152. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5153. database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5154. if (from.database().size() > 0) {
  5155. database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  5156. }
  5157. transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5158. if (from.transaction().size() > 0) {
  5159. transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  5160. }
  5161. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.CommitRequest)
  5162. }
  5163. void CommitRequest::SharedCtor() {
  5164. database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5165. transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5166. _cached_size_ = 0;
  5167. }
  5168. CommitRequest::~CommitRequest() {
  5169. // @@protoc_insertion_point(destructor:google.firestore.v1.CommitRequest)
  5170. SharedDtor();
  5171. }
  5172. void CommitRequest::SharedDtor() {
  5173. database_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5174. transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5175. }
  5176. void CommitRequest::SetCachedSize(int size) const {
  5177. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  5178. _cached_size_ = size;
  5179. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  5180. }
  5181. const ::google::protobuf::Descriptor* CommitRequest::descriptor() {
  5182. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  5183. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  5184. }
  5185. const CommitRequest& CommitRequest::default_instance() {
  5186. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsCommitRequest();
  5187. return *internal_default_instance();
  5188. }
  5189. CommitRequest* CommitRequest::New(::google::protobuf::Arena* arena) const {
  5190. CommitRequest* n = new CommitRequest;
  5191. if (arena != NULL) {
  5192. arena->Own(n);
  5193. }
  5194. return n;
  5195. }
  5196. void CommitRequest::Clear() {
  5197. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.CommitRequest)
  5198. ::google::protobuf::uint32 cached_has_bits = 0;
  5199. // Prevent compiler warnings about cached_has_bits being unused
  5200. (void) cached_has_bits;
  5201. writes_.Clear();
  5202. database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5203. transaction_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5204. _internal_metadata_.Clear();
  5205. }
  5206. bool CommitRequest::MergePartialFromCodedStream(
  5207. ::google::protobuf::io::CodedInputStream* input) {
  5208. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  5209. ::google::protobuf::uint32 tag;
  5210. // @@protoc_insertion_point(parse_start:google.firestore.v1.CommitRequest)
  5211. for (;;) {
  5212. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  5213. tag = p.first;
  5214. if (!p.second) goto handle_unusual;
  5215. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  5216. // string database = 1;
  5217. case 1: {
  5218. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5219. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  5220. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  5221. input, this->mutable_database()));
  5222. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5223. this->database().data(), static_cast<int>(this->database().length()),
  5224. ::google::protobuf::internal::WireFormatLite::PARSE,
  5225. "google.firestore.v1.CommitRequest.database"));
  5226. } else {
  5227. goto handle_unusual;
  5228. }
  5229. break;
  5230. }
  5231. // repeated .google.firestore.v1.Write writes = 2;
  5232. case 2: {
  5233. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5234. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  5235. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_writes()));
  5236. } else {
  5237. goto handle_unusual;
  5238. }
  5239. break;
  5240. }
  5241. // bytes transaction = 3;
  5242. case 3: {
  5243. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5244. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  5245. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  5246. input, this->mutable_transaction()));
  5247. } else {
  5248. goto handle_unusual;
  5249. }
  5250. break;
  5251. }
  5252. default: {
  5253. handle_unusual:
  5254. if (tag == 0) {
  5255. goto success;
  5256. }
  5257. DO_(::google::protobuf::internal::WireFormat::SkipField(
  5258. input, tag, _internal_metadata_.mutable_unknown_fields()));
  5259. break;
  5260. }
  5261. }
  5262. }
  5263. success:
  5264. // @@protoc_insertion_point(parse_success:google.firestore.v1.CommitRequest)
  5265. return true;
  5266. failure:
  5267. // @@protoc_insertion_point(parse_failure:google.firestore.v1.CommitRequest)
  5268. return false;
  5269. #undef DO_
  5270. }
  5271. void CommitRequest::SerializeWithCachedSizes(
  5272. ::google::protobuf::io::CodedOutputStream* output) const {
  5273. // @@protoc_insertion_point(serialize_start:google.firestore.v1.CommitRequest)
  5274. ::google::protobuf::uint32 cached_has_bits = 0;
  5275. (void) cached_has_bits;
  5276. // string database = 1;
  5277. if (this->database().size() > 0) {
  5278. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5279. this->database().data(), static_cast<int>(this->database().length()),
  5280. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5281. "google.firestore.v1.CommitRequest.database");
  5282. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  5283. 1, this->database(), output);
  5284. }
  5285. // repeated .google.firestore.v1.Write writes = 2;
  5286. for (unsigned int i = 0,
  5287. n = static_cast<unsigned int>(this->writes_size()); i < n; i++) {
  5288. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  5289. 2, this->writes(static_cast<int>(i)), output);
  5290. }
  5291. // bytes transaction = 3;
  5292. if (this->transaction().size() > 0) {
  5293. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  5294. 3, this->transaction(), output);
  5295. }
  5296. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5297. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  5298. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  5299. }
  5300. // @@protoc_insertion_point(serialize_end:google.firestore.v1.CommitRequest)
  5301. }
  5302. ::google::protobuf::uint8* CommitRequest::InternalSerializeWithCachedSizesToArray(
  5303. bool deterministic, ::google::protobuf::uint8* target) const {
  5304. (void)deterministic; // Unused
  5305. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.CommitRequest)
  5306. ::google::protobuf::uint32 cached_has_bits = 0;
  5307. (void) cached_has_bits;
  5308. // string database = 1;
  5309. if (this->database().size() > 0) {
  5310. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5311. this->database().data(), static_cast<int>(this->database().length()),
  5312. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5313. "google.firestore.v1.CommitRequest.database");
  5314. target =
  5315. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  5316. 1, this->database(), target);
  5317. }
  5318. // repeated .google.firestore.v1.Write writes = 2;
  5319. for (unsigned int i = 0,
  5320. n = static_cast<unsigned int>(this->writes_size()); i < n; i++) {
  5321. target = ::google::protobuf::internal::WireFormatLite::
  5322. InternalWriteMessageToArray(
  5323. 2, this->writes(static_cast<int>(i)), deterministic, target);
  5324. }
  5325. // bytes transaction = 3;
  5326. if (this->transaction().size() > 0) {
  5327. target =
  5328. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  5329. 3, this->transaction(), target);
  5330. }
  5331. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5332. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  5333. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  5334. }
  5335. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.CommitRequest)
  5336. return target;
  5337. }
  5338. size_t CommitRequest::ByteSizeLong() const {
  5339. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.CommitRequest)
  5340. size_t total_size = 0;
  5341. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5342. total_size +=
  5343. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  5344. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  5345. }
  5346. // repeated .google.firestore.v1.Write writes = 2;
  5347. {
  5348. unsigned int count = static_cast<unsigned int>(this->writes_size());
  5349. total_size += 1UL * count;
  5350. for (unsigned int i = 0; i < count; i++) {
  5351. total_size +=
  5352. ::google::protobuf::internal::WireFormatLite::MessageSize(
  5353. this->writes(static_cast<int>(i)));
  5354. }
  5355. }
  5356. // string database = 1;
  5357. if (this->database().size() > 0) {
  5358. total_size += 1 +
  5359. ::google::protobuf::internal::WireFormatLite::StringSize(
  5360. this->database());
  5361. }
  5362. // bytes transaction = 3;
  5363. if (this->transaction().size() > 0) {
  5364. total_size += 1 +
  5365. ::google::protobuf::internal::WireFormatLite::BytesSize(
  5366. this->transaction());
  5367. }
  5368. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  5369. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  5370. _cached_size_ = cached_size;
  5371. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  5372. return total_size;
  5373. }
  5374. void CommitRequest::MergeFrom(const ::google::protobuf::Message& from) {
  5375. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.CommitRequest)
  5376. GOOGLE_DCHECK_NE(&from, this);
  5377. const CommitRequest* source =
  5378. ::google::protobuf::internal::DynamicCastToGenerated<const CommitRequest>(
  5379. &from);
  5380. if (source == NULL) {
  5381. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.CommitRequest)
  5382. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  5383. } else {
  5384. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.CommitRequest)
  5385. MergeFrom(*source);
  5386. }
  5387. }
  5388. void CommitRequest::MergeFrom(const CommitRequest& from) {
  5389. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.CommitRequest)
  5390. GOOGLE_DCHECK_NE(&from, this);
  5391. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5392. ::google::protobuf::uint32 cached_has_bits = 0;
  5393. (void) cached_has_bits;
  5394. writes_.MergeFrom(from.writes_);
  5395. if (from.database().size() > 0) {
  5396. database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  5397. }
  5398. if (from.transaction().size() > 0) {
  5399. transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  5400. }
  5401. }
  5402. void CommitRequest::CopyFrom(const ::google::protobuf::Message& from) {
  5403. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.CommitRequest)
  5404. if (&from == this) return;
  5405. Clear();
  5406. MergeFrom(from);
  5407. }
  5408. void CommitRequest::CopyFrom(const CommitRequest& from) {
  5409. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.CommitRequest)
  5410. if (&from == this) return;
  5411. Clear();
  5412. MergeFrom(from);
  5413. }
  5414. bool CommitRequest::IsInitialized() const {
  5415. return true;
  5416. }
  5417. void CommitRequest::Swap(CommitRequest* other) {
  5418. if (other == this) return;
  5419. InternalSwap(other);
  5420. }
  5421. void CommitRequest::InternalSwap(CommitRequest* other) {
  5422. using std::swap;
  5423. writes_.InternalSwap(&other->writes_);
  5424. database_.Swap(&other->database_);
  5425. transaction_.Swap(&other->transaction_);
  5426. _internal_metadata_.Swap(&other->_internal_metadata_);
  5427. swap(_cached_size_, other->_cached_size_);
  5428. }
  5429. ::google::protobuf::Metadata CommitRequest::GetMetadata() const {
  5430. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  5431. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  5432. }
  5433. // ===================================================================
  5434. void CommitResponse::InitAsDefaultInstance() {
  5435. ::google::firestore::v1::_CommitResponse_default_instance_._instance.get_mutable()->commit_time_ = const_cast< ::google::protobuf::Timestamp*>(
  5436. ::google::protobuf::Timestamp::internal_default_instance());
  5437. }
  5438. void CommitResponse::clear_write_results() {
  5439. write_results_.Clear();
  5440. }
  5441. void CommitResponse::clear_commit_time() {
  5442. if (GetArenaNoVirtual() == NULL && commit_time_ != NULL) {
  5443. delete commit_time_;
  5444. }
  5445. commit_time_ = NULL;
  5446. }
  5447. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  5448. const int CommitResponse::kWriteResultsFieldNumber;
  5449. const int CommitResponse::kCommitTimeFieldNumber;
  5450. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  5451. CommitResponse::CommitResponse()
  5452. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  5453. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  5454. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsCommitResponse();
  5455. }
  5456. SharedCtor();
  5457. // @@protoc_insertion_point(constructor:google.firestore.v1.CommitResponse)
  5458. }
  5459. CommitResponse::CommitResponse(const CommitResponse& from)
  5460. : ::google::protobuf::Message(),
  5461. _internal_metadata_(NULL),
  5462. write_results_(from.write_results_),
  5463. _cached_size_(0) {
  5464. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5465. if (from.has_commit_time()) {
  5466. commit_time_ = new ::google::protobuf::Timestamp(*from.commit_time_);
  5467. } else {
  5468. commit_time_ = NULL;
  5469. }
  5470. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.CommitResponse)
  5471. }
  5472. void CommitResponse::SharedCtor() {
  5473. commit_time_ = NULL;
  5474. _cached_size_ = 0;
  5475. }
  5476. CommitResponse::~CommitResponse() {
  5477. // @@protoc_insertion_point(destructor:google.firestore.v1.CommitResponse)
  5478. SharedDtor();
  5479. }
  5480. void CommitResponse::SharedDtor() {
  5481. if (this != internal_default_instance()) delete commit_time_;
  5482. }
  5483. void CommitResponse::SetCachedSize(int size) const {
  5484. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  5485. _cached_size_ = size;
  5486. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  5487. }
  5488. const ::google::protobuf::Descriptor* CommitResponse::descriptor() {
  5489. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  5490. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  5491. }
  5492. const CommitResponse& CommitResponse::default_instance() {
  5493. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsCommitResponse();
  5494. return *internal_default_instance();
  5495. }
  5496. CommitResponse* CommitResponse::New(::google::protobuf::Arena* arena) const {
  5497. CommitResponse* n = new CommitResponse;
  5498. if (arena != NULL) {
  5499. arena->Own(n);
  5500. }
  5501. return n;
  5502. }
  5503. void CommitResponse::Clear() {
  5504. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.CommitResponse)
  5505. ::google::protobuf::uint32 cached_has_bits = 0;
  5506. // Prevent compiler warnings about cached_has_bits being unused
  5507. (void) cached_has_bits;
  5508. write_results_.Clear();
  5509. if (GetArenaNoVirtual() == NULL && commit_time_ != NULL) {
  5510. delete commit_time_;
  5511. }
  5512. commit_time_ = NULL;
  5513. _internal_metadata_.Clear();
  5514. }
  5515. bool CommitResponse::MergePartialFromCodedStream(
  5516. ::google::protobuf::io::CodedInputStream* input) {
  5517. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  5518. ::google::protobuf::uint32 tag;
  5519. // @@protoc_insertion_point(parse_start:google.firestore.v1.CommitResponse)
  5520. for (;;) {
  5521. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  5522. tag = p.first;
  5523. if (!p.second) goto handle_unusual;
  5524. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  5525. // repeated .google.firestore.v1.WriteResult write_results = 1;
  5526. case 1: {
  5527. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5528. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  5529. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_write_results()));
  5530. } else {
  5531. goto handle_unusual;
  5532. }
  5533. break;
  5534. }
  5535. // .google.protobuf.Timestamp commit_time = 2;
  5536. case 2: {
  5537. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5538. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  5539. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  5540. input, mutable_commit_time()));
  5541. } else {
  5542. goto handle_unusual;
  5543. }
  5544. break;
  5545. }
  5546. default: {
  5547. handle_unusual:
  5548. if (tag == 0) {
  5549. goto success;
  5550. }
  5551. DO_(::google::protobuf::internal::WireFormat::SkipField(
  5552. input, tag, _internal_metadata_.mutable_unknown_fields()));
  5553. break;
  5554. }
  5555. }
  5556. }
  5557. success:
  5558. // @@protoc_insertion_point(parse_success:google.firestore.v1.CommitResponse)
  5559. return true;
  5560. failure:
  5561. // @@protoc_insertion_point(parse_failure:google.firestore.v1.CommitResponse)
  5562. return false;
  5563. #undef DO_
  5564. }
  5565. void CommitResponse::SerializeWithCachedSizes(
  5566. ::google::protobuf::io::CodedOutputStream* output) const {
  5567. // @@protoc_insertion_point(serialize_start:google.firestore.v1.CommitResponse)
  5568. ::google::protobuf::uint32 cached_has_bits = 0;
  5569. (void) cached_has_bits;
  5570. // repeated .google.firestore.v1.WriteResult write_results = 1;
  5571. for (unsigned int i = 0,
  5572. n = static_cast<unsigned int>(this->write_results_size()); i < n; i++) {
  5573. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  5574. 1, this->write_results(static_cast<int>(i)), output);
  5575. }
  5576. // .google.protobuf.Timestamp commit_time = 2;
  5577. if (this->has_commit_time()) {
  5578. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  5579. 2, *this->commit_time_, output);
  5580. }
  5581. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5582. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  5583. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  5584. }
  5585. // @@protoc_insertion_point(serialize_end:google.firestore.v1.CommitResponse)
  5586. }
  5587. ::google::protobuf::uint8* CommitResponse::InternalSerializeWithCachedSizesToArray(
  5588. bool deterministic, ::google::protobuf::uint8* target) const {
  5589. (void)deterministic; // Unused
  5590. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.CommitResponse)
  5591. ::google::protobuf::uint32 cached_has_bits = 0;
  5592. (void) cached_has_bits;
  5593. // repeated .google.firestore.v1.WriteResult write_results = 1;
  5594. for (unsigned int i = 0,
  5595. n = static_cast<unsigned int>(this->write_results_size()); i < n; i++) {
  5596. target = ::google::protobuf::internal::WireFormatLite::
  5597. InternalWriteMessageToArray(
  5598. 1, this->write_results(static_cast<int>(i)), deterministic, target);
  5599. }
  5600. // .google.protobuf.Timestamp commit_time = 2;
  5601. if (this->has_commit_time()) {
  5602. target = ::google::protobuf::internal::WireFormatLite::
  5603. InternalWriteMessageToArray(
  5604. 2, *this->commit_time_, deterministic, target);
  5605. }
  5606. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5607. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  5608. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  5609. }
  5610. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.CommitResponse)
  5611. return target;
  5612. }
  5613. size_t CommitResponse::ByteSizeLong() const {
  5614. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.CommitResponse)
  5615. size_t total_size = 0;
  5616. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5617. total_size +=
  5618. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  5619. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  5620. }
  5621. // repeated .google.firestore.v1.WriteResult write_results = 1;
  5622. {
  5623. unsigned int count = static_cast<unsigned int>(this->write_results_size());
  5624. total_size += 1UL * count;
  5625. for (unsigned int i = 0; i < count; i++) {
  5626. total_size +=
  5627. ::google::protobuf::internal::WireFormatLite::MessageSize(
  5628. this->write_results(static_cast<int>(i)));
  5629. }
  5630. }
  5631. // .google.protobuf.Timestamp commit_time = 2;
  5632. if (this->has_commit_time()) {
  5633. total_size += 1 +
  5634. ::google::protobuf::internal::WireFormatLite::MessageSize(
  5635. *this->commit_time_);
  5636. }
  5637. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  5638. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  5639. _cached_size_ = cached_size;
  5640. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  5641. return total_size;
  5642. }
  5643. void CommitResponse::MergeFrom(const ::google::protobuf::Message& from) {
  5644. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.CommitResponse)
  5645. GOOGLE_DCHECK_NE(&from, this);
  5646. const CommitResponse* source =
  5647. ::google::protobuf::internal::DynamicCastToGenerated<const CommitResponse>(
  5648. &from);
  5649. if (source == NULL) {
  5650. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.CommitResponse)
  5651. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  5652. } else {
  5653. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.CommitResponse)
  5654. MergeFrom(*source);
  5655. }
  5656. }
  5657. void CommitResponse::MergeFrom(const CommitResponse& from) {
  5658. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.CommitResponse)
  5659. GOOGLE_DCHECK_NE(&from, this);
  5660. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5661. ::google::protobuf::uint32 cached_has_bits = 0;
  5662. (void) cached_has_bits;
  5663. write_results_.MergeFrom(from.write_results_);
  5664. if (from.has_commit_time()) {
  5665. mutable_commit_time()->::google::protobuf::Timestamp::MergeFrom(from.commit_time());
  5666. }
  5667. }
  5668. void CommitResponse::CopyFrom(const ::google::protobuf::Message& from) {
  5669. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.CommitResponse)
  5670. if (&from == this) return;
  5671. Clear();
  5672. MergeFrom(from);
  5673. }
  5674. void CommitResponse::CopyFrom(const CommitResponse& from) {
  5675. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.CommitResponse)
  5676. if (&from == this) return;
  5677. Clear();
  5678. MergeFrom(from);
  5679. }
  5680. bool CommitResponse::IsInitialized() const {
  5681. return true;
  5682. }
  5683. void CommitResponse::Swap(CommitResponse* other) {
  5684. if (other == this) return;
  5685. InternalSwap(other);
  5686. }
  5687. void CommitResponse::InternalSwap(CommitResponse* other) {
  5688. using std::swap;
  5689. write_results_.InternalSwap(&other->write_results_);
  5690. swap(commit_time_, other->commit_time_);
  5691. _internal_metadata_.Swap(&other->_internal_metadata_);
  5692. swap(_cached_size_, other->_cached_size_);
  5693. }
  5694. ::google::protobuf::Metadata CommitResponse::GetMetadata() const {
  5695. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  5696. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  5697. }
  5698. // ===================================================================
  5699. void RollbackRequest::InitAsDefaultInstance() {
  5700. }
  5701. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  5702. const int RollbackRequest::kDatabaseFieldNumber;
  5703. const int RollbackRequest::kTransactionFieldNumber;
  5704. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  5705. RollbackRequest::RollbackRequest()
  5706. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  5707. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  5708. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsRollbackRequest();
  5709. }
  5710. SharedCtor();
  5711. // @@protoc_insertion_point(constructor:google.firestore.v1.RollbackRequest)
  5712. }
  5713. RollbackRequest::RollbackRequest(const RollbackRequest& from)
  5714. : ::google::protobuf::Message(),
  5715. _internal_metadata_(NULL),
  5716. _cached_size_(0) {
  5717. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5718. database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5719. if (from.database().size() > 0) {
  5720. database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  5721. }
  5722. transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5723. if (from.transaction().size() > 0) {
  5724. transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  5725. }
  5726. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.RollbackRequest)
  5727. }
  5728. void RollbackRequest::SharedCtor() {
  5729. database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5730. transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5731. _cached_size_ = 0;
  5732. }
  5733. RollbackRequest::~RollbackRequest() {
  5734. // @@protoc_insertion_point(destructor:google.firestore.v1.RollbackRequest)
  5735. SharedDtor();
  5736. }
  5737. void RollbackRequest::SharedDtor() {
  5738. database_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5739. transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5740. }
  5741. void RollbackRequest::SetCachedSize(int size) const {
  5742. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  5743. _cached_size_ = size;
  5744. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  5745. }
  5746. const ::google::protobuf::Descriptor* RollbackRequest::descriptor() {
  5747. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  5748. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  5749. }
  5750. const RollbackRequest& RollbackRequest::default_instance() {
  5751. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsRollbackRequest();
  5752. return *internal_default_instance();
  5753. }
  5754. RollbackRequest* RollbackRequest::New(::google::protobuf::Arena* arena) const {
  5755. RollbackRequest* n = new RollbackRequest;
  5756. if (arena != NULL) {
  5757. arena->Own(n);
  5758. }
  5759. return n;
  5760. }
  5761. void RollbackRequest::Clear() {
  5762. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.RollbackRequest)
  5763. ::google::protobuf::uint32 cached_has_bits = 0;
  5764. // Prevent compiler warnings about cached_has_bits being unused
  5765. (void) cached_has_bits;
  5766. database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5767. transaction_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5768. _internal_metadata_.Clear();
  5769. }
  5770. bool RollbackRequest::MergePartialFromCodedStream(
  5771. ::google::protobuf::io::CodedInputStream* input) {
  5772. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  5773. ::google::protobuf::uint32 tag;
  5774. // @@protoc_insertion_point(parse_start:google.firestore.v1.RollbackRequest)
  5775. for (;;) {
  5776. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  5777. tag = p.first;
  5778. if (!p.second) goto handle_unusual;
  5779. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  5780. // string database = 1;
  5781. case 1: {
  5782. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5783. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  5784. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  5785. input, this->mutable_database()));
  5786. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5787. this->database().data(), static_cast<int>(this->database().length()),
  5788. ::google::protobuf::internal::WireFormatLite::PARSE,
  5789. "google.firestore.v1.RollbackRequest.database"));
  5790. } else {
  5791. goto handle_unusual;
  5792. }
  5793. break;
  5794. }
  5795. // bytes transaction = 2;
  5796. case 2: {
  5797. if (static_cast< ::google::protobuf::uint8>(tag) ==
  5798. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  5799. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  5800. input, this->mutable_transaction()));
  5801. } else {
  5802. goto handle_unusual;
  5803. }
  5804. break;
  5805. }
  5806. default: {
  5807. handle_unusual:
  5808. if (tag == 0) {
  5809. goto success;
  5810. }
  5811. DO_(::google::protobuf::internal::WireFormat::SkipField(
  5812. input, tag, _internal_metadata_.mutable_unknown_fields()));
  5813. break;
  5814. }
  5815. }
  5816. }
  5817. success:
  5818. // @@protoc_insertion_point(parse_success:google.firestore.v1.RollbackRequest)
  5819. return true;
  5820. failure:
  5821. // @@protoc_insertion_point(parse_failure:google.firestore.v1.RollbackRequest)
  5822. return false;
  5823. #undef DO_
  5824. }
  5825. void RollbackRequest::SerializeWithCachedSizes(
  5826. ::google::protobuf::io::CodedOutputStream* output) const {
  5827. // @@protoc_insertion_point(serialize_start:google.firestore.v1.RollbackRequest)
  5828. ::google::protobuf::uint32 cached_has_bits = 0;
  5829. (void) cached_has_bits;
  5830. // string database = 1;
  5831. if (this->database().size() > 0) {
  5832. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5833. this->database().data(), static_cast<int>(this->database().length()),
  5834. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5835. "google.firestore.v1.RollbackRequest.database");
  5836. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  5837. 1, this->database(), output);
  5838. }
  5839. // bytes transaction = 2;
  5840. if (this->transaction().size() > 0) {
  5841. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  5842. 2, this->transaction(), output);
  5843. }
  5844. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5845. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  5846. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  5847. }
  5848. // @@protoc_insertion_point(serialize_end:google.firestore.v1.RollbackRequest)
  5849. }
  5850. ::google::protobuf::uint8* RollbackRequest::InternalSerializeWithCachedSizesToArray(
  5851. bool deterministic, ::google::protobuf::uint8* target) const {
  5852. (void)deterministic; // Unused
  5853. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.RollbackRequest)
  5854. ::google::protobuf::uint32 cached_has_bits = 0;
  5855. (void) cached_has_bits;
  5856. // string database = 1;
  5857. if (this->database().size() > 0) {
  5858. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  5859. this->database().data(), static_cast<int>(this->database().length()),
  5860. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  5861. "google.firestore.v1.RollbackRequest.database");
  5862. target =
  5863. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  5864. 1, this->database(), target);
  5865. }
  5866. // bytes transaction = 2;
  5867. if (this->transaction().size() > 0) {
  5868. target =
  5869. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  5870. 2, this->transaction(), target);
  5871. }
  5872. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5873. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  5874. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  5875. }
  5876. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.RollbackRequest)
  5877. return target;
  5878. }
  5879. size_t RollbackRequest::ByteSizeLong() const {
  5880. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.RollbackRequest)
  5881. size_t total_size = 0;
  5882. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  5883. total_size +=
  5884. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  5885. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  5886. }
  5887. // string database = 1;
  5888. if (this->database().size() > 0) {
  5889. total_size += 1 +
  5890. ::google::protobuf::internal::WireFormatLite::StringSize(
  5891. this->database());
  5892. }
  5893. // bytes transaction = 2;
  5894. if (this->transaction().size() > 0) {
  5895. total_size += 1 +
  5896. ::google::protobuf::internal::WireFormatLite::BytesSize(
  5897. this->transaction());
  5898. }
  5899. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  5900. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  5901. _cached_size_ = cached_size;
  5902. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  5903. return total_size;
  5904. }
  5905. void RollbackRequest::MergeFrom(const ::google::protobuf::Message& from) {
  5906. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.RollbackRequest)
  5907. GOOGLE_DCHECK_NE(&from, this);
  5908. const RollbackRequest* source =
  5909. ::google::protobuf::internal::DynamicCastToGenerated<const RollbackRequest>(
  5910. &from);
  5911. if (source == NULL) {
  5912. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.RollbackRequest)
  5913. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  5914. } else {
  5915. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.RollbackRequest)
  5916. MergeFrom(*source);
  5917. }
  5918. }
  5919. void RollbackRequest::MergeFrom(const RollbackRequest& from) {
  5920. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.RollbackRequest)
  5921. GOOGLE_DCHECK_NE(&from, this);
  5922. _internal_metadata_.MergeFrom(from._internal_metadata_);
  5923. ::google::protobuf::uint32 cached_has_bits = 0;
  5924. (void) cached_has_bits;
  5925. if (from.database().size() > 0) {
  5926. database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  5927. }
  5928. if (from.transaction().size() > 0) {
  5929. transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  5930. }
  5931. }
  5932. void RollbackRequest::CopyFrom(const ::google::protobuf::Message& from) {
  5933. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.RollbackRequest)
  5934. if (&from == this) return;
  5935. Clear();
  5936. MergeFrom(from);
  5937. }
  5938. void RollbackRequest::CopyFrom(const RollbackRequest& from) {
  5939. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.RollbackRequest)
  5940. if (&from == this) return;
  5941. Clear();
  5942. MergeFrom(from);
  5943. }
  5944. bool RollbackRequest::IsInitialized() const {
  5945. return true;
  5946. }
  5947. void RollbackRequest::Swap(RollbackRequest* other) {
  5948. if (other == this) return;
  5949. InternalSwap(other);
  5950. }
  5951. void RollbackRequest::InternalSwap(RollbackRequest* other) {
  5952. using std::swap;
  5953. database_.Swap(&other->database_);
  5954. transaction_.Swap(&other->transaction_);
  5955. _internal_metadata_.Swap(&other->_internal_metadata_);
  5956. swap(_cached_size_, other->_cached_size_);
  5957. }
  5958. ::google::protobuf::Metadata RollbackRequest::GetMetadata() const {
  5959. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  5960. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  5961. }
  5962. // ===================================================================
  5963. void RunQueryRequest::InitAsDefaultInstance() {
  5964. ::google::firestore::v1::_RunQueryRequest_default_instance_.structured_query_ = const_cast< ::google::firestore::v1::StructuredQuery*>(
  5965. ::google::firestore::v1::StructuredQuery::internal_default_instance());
  5966. ::google::firestore::v1::_RunQueryRequest_default_instance_.transaction_.UnsafeSetDefault(
  5967. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  5968. ::google::firestore::v1::_RunQueryRequest_default_instance_.new_transaction_ = const_cast< ::google::firestore::v1::TransactionOptions*>(
  5969. ::google::firestore::v1::TransactionOptions::internal_default_instance());
  5970. ::google::firestore::v1::_RunQueryRequest_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>(
  5971. ::google::protobuf::Timestamp::internal_default_instance());
  5972. }
  5973. void RunQueryRequest::set_allocated_structured_query(::google::firestore::v1::StructuredQuery* structured_query) {
  5974. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  5975. clear_query_type();
  5976. if (structured_query) {
  5977. ::google::protobuf::Arena* submessage_arena = NULL;
  5978. if (message_arena != submessage_arena) {
  5979. structured_query = ::google::protobuf::internal::GetOwnedMessage(
  5980. message_arena, structured_query, submessage_arena);
  5981. }
  5982. set_has_structured_query();
  5983. query_type_.structured_query_ = structured_query;
  5984. }
  5985. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.RunQueryRequest.structured_query)
  5986. }
  5987. void RunQueryRequest::clear_structured_query() {
  5988. if (has_structured_query()) {
  5989. delete query_type_.structured_query_;
  5990. clear_has_query_type();
  5991. }
  5992. }
  5993. void RunQueryRequest::set_allocated_new_transaction(::google::firestore::v1::TransactionOptions* new_transaction) {
  5994. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  5995. clear_consistency_selector();
  5996. if (new_transaction) {
  5997. ::google::protobuf::Arena* submessage_arena = NULL;
  5998. if (message_arena != submessage_arena) {
  5999. new_transaction = ::google::protobuf::internal::GetOwnedMessage(
  6000. message_arena, new_transaction, submessage_arena);
  6001. }
  6002. set_has_new_transaction();
  6003. consistency_selector_.new_transaction_ = new_transaction;
  6004. }
  6005. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.RunQueryRequest.new_transaction)
  6006. }
  6007. void RunQueryRequest::clear_new_transaction() {
  6008. if (has_new_transaction()) {
  6009. delete consistency_selector_.new_transaction_;
  6010. clear_has_consistency_selector();
  6011. }
  6012. }
  6013. void RunQueryRequest::set_allocated_read_time(::google::protobuf::Timestamp* read_time) {
  6014. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  6015. clear_consistency_selector();
  6016. if (read_time) {
  6017. ::google::protobuf::Arena* submessage_arena =
  6018. reinterpret_cast< ::google::protobuf::MessageLite*>(read_time)->GetArena();
  6019. if (message_arena != submessage_arena) {
  6020. read_time = ::google::protobuf::internal::GetOwnedMessage(
  6021. message_arena, read_time, submessage_arena);
  6022. }
  6023. set_has_read_time();
  6024. consistency_selector_.read_time_ = read_time;
  6025. }
  6026. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.RunQueryRequest.read_time)
  6027. }
  6028. void RunQueryRequest::clear_read_time() {
  6029. if (has_read_time()) {
  6030. delete consistency_selector_.read_time_;
  6031. clear_has_consistency_selector();
  6032. }
  6033. }
  6034. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  6035. const int RunQueryRequest::kParentFieldNumber;
  6036. const int RunQueryRequest::kStructuredQueryFieldNumber;
  6037. const int RunQueryRequest::kTransactionFieldNumber;
  6038. const int RunQueryRequest::kNewTransactionFieldNumber;
  6039. const int RunQueryRequest::kReadTimeFieldNumber;
  6040. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  6041. RunQueryRequest::RunQueryRequest()
  6042. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  6043. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  6044. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsRunQueryRequest();
  6045. }
  6046. SharedCtor();
  6047. // @@protoc_insertion_point(constructor:google.firestore.v1.RunQueryRequest)
  6048. }
  6049. RunQueryRequest::RunQueryRequest(const RunQueryRequest& from)
  6050. : ::google::protobuf::Message(),
  6051. _internal_metadata_(NULL),
  6052. _cached_size_(0) {
  6053. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6054. parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6055. if (from.parent().size() > 0) {
  6056. parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  6057. }
  6058. clear_has_query_type();
  6059. switch (from.query_type_case()) {
  6060. case kStructuredQuery: {
  6061. mutable_structured_query()->::google::firestore::v1::StructuredQuery::MergeFrom(from.structured_query());
  6062. break;
  6063. }
  6064. case QUERY_TYPE_NOT_SET: {
  6065. break;
  6066. }
  6067. }
  6068. clear_has_consistency_selector();
  6069. switch (from.consistency_selector_case()) {
  6070. case kTransaction: {
  6071. set_transaction(from.transaction());
  6072. break;
  6073. }
  6074. case kNewTransaction: {
  6075. mutable_new_transaction()->::google::firestore::v1::TransactionOptions::MergeFrom(from.new_transaction());
  6076. break;
  6077. }
  6078. case kReadTime: {
  6079. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  6080. break;
  6081. }
  6082. case CONSISTENCY_SELECTOR_NOT_SET: {
  6083. break;
  6084. }
  6085. }
  6086. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.RunQueryRequest)
  6087. }
  6088. void RunQueryRequest::SharedCtor() {
  6089. parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6090. clear_has_query_type();
  6091. clear_has_consistency_selector();
  6092. _cached_size_ = 0;
  6093. }
  6094. RunQueryRequest::~RunQueryRequest() {
  6095. // @@protoc_insertion_point(destructor:google.firestore.v1.RunQueryRequest)
  6096. SharedDtor();
  6097. }
  6098. void RunQueryRequest::SharedDtor() {
  6099. parent_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6100. if (has_query_type()) {
  6101. clear_query_type();
  6102. }
  6103. if (has_consistency_selector()) {
  6104. clear_consistency_selector();
  6105. }
  6106. }
  6107. void RunQueryRequest::SetCachedSize(int size) const {
  6108. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  6109. _cached_size_ = size;
  6110. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  6111. }
  6112. const ::google::protobuf::Descriptor* RunQueryRequest::descriptor() {
  6113. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  6114. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  6115. }
  6116. const RunQueryRequest& RunQueryRequest::default_instance() {
  6117. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsRunQueryRequest();
  6118. return *internal_default_instance();
  6119. }
  6120. RunQueryRequest* RunQueryRequest::New(::google::protobuf::Arena* arena) const {
  6121. RunQueryRequest* n = new RunQueryRequest;
  6122. if (arena != NULL) {
  6123. arena->Own(n);
  6124. }
  6125. return n;
  6126. }
  6127. void RunQueryRequest::clear_query_type() {
  6128. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.RunQueryRequest)
  6129. switch (query_type_case()) {
  6130. case kStructuredQuery: {
  6131. delete query_type_.structured_query_;
  6132. break;
  6133. }
  6134. case QUERY_TYPE_NOT_SET: {
  6135. break;
  6136. }
  6137. }
  6138. _oneof_case_[0] = QUERY_TYPE_NOT_SET;
  6139. }
  6140. void RunQueryRequest::clear_consistency_selector() {
  6141. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.RunQueryRequest)
  6142. switch (consistency_selector_case()) {
  6143. case kTransaction: {
  6144. consistency_selector_.transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6145. break;
  6146. }
  6147. case kNewTransaction: {
  6148. delete consistency_selector_.new_transaction_;
  6149. break;
  6150. }
  6151. case kReadTime: {
  6152. delete consistency_selector_.read_time_;
  6153. break;
  6154. }
  6155. case CONSISTENCY_SELECTOR_NOT_SET: {
  6156. break;
  6157. }
  6158. }
  6159. _oneof_case_[1] = CONSISTENCY_SELECTOR_NOT_SET;
  6160. }
  6161. void RunQueryRequest::Clear() {
  6162. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.RunQueryRequest)
  6163. ::google::protobuf::uint32 cached_has_bits = 0;
  6164. // Prevent compiler warnings about cached_has_bits being unused
  6165. (void) cached_has_bits;
  6166. parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6167. clear_query_type();
  6168. clear_consistency_selector();
  6169. _internal_metadata_.Clear();
  6170. }
  6171. bool RunQueryRequest::MergePartialFromCodedStream(
  6172. ::google::protobuf::io::CodedInputStream* input) {
  6173. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  6174. ::google::protobuf::uint32 tag;
  6175. // @@protoc_insertion_point(parse_start:google.firestore.v1.RunQueryRequest)
  6176. for (;;) {
  6177. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  6178. tag = p.first;
  6179. if (!p.second) goto handle_unusual;
  6180. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  6181. // string parent = 1;
  6182. case 1: {
  6183. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6184. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  6185. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  6186. input, this->mutable_parent()));
  6187. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6188. this->parent().data(), static_cast<int>(this->parent().length()),
  6189. ::google::protobuf::internal::WireFormatLite::PARSE,
  6190. "google.firestore.v1.RunQueryRequest.parent"));
  6191. } else {
  6192. goto handle_unusual;
  6193. }
  6194. break;
  6195. }
  6196. // .google.firestore.v1.StructuredQuery structured_query = 2;
  6197. case 2: {
  6198. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6199. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  6200. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  6201. input, mutable_structured_query()));
  6202. } else {
  6203. goto handle_unusual;
  6204. }
  6205. break;
  6206. }
  6207. // bytes transaction = 5;
  6208. case 5: {
  6209. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6210. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  6211. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  6212. input, this->mutable_transaction()));
  6213. } else {
  6214. goto handle_unusual;
  6215. }
  6216. break;
  6217. }
  6218. // .google.firestore.v1.TransactionOptions new_transaction = 6;
  6219. case 6: {
  6220. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6221. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  6222. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  6223. input, mutable_new_transaction()));
  6224. } else {
  6225. goto handle_unusual;
  6226. }
  6227. break;
  6228. }
  6229. // .google.protobuf.Timestamp read_time = 7;
  6230. case 7: {
  6231. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6232. static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
  6233. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  6234. input, mutable_read_time()));
  6235. } else {
  6236. goto handle_unusual;
  6237. }
  6238. break;
  6239. }
  6240. default: {
  6241. handle_unusual:
  6242. if (tag == 0) {
  6243. goto success;
  6244. }
  6245. DO_(::google::protobuf::internal::WireFormat::SkipField(
  6246. input, tag, _internal_metadata_.mutable_unknown_fields()));
  6247. break;
  6248. }
  6249. }
  6250. }
  6251. success:
  6252. // @@protoc_insertion_point(parse_success:google.firestore.v1.RunQueryRequest)
  6253. return true;
  6254. failure:
  6255. // @@protoc_insertion_point(parse_failure:google.firestore.v1.RunQueryRequest)
  6256. return false;
  6257. #undef DO_
  6258. }
  6259. void RunQueryRequest::SerializeWithCachedSizes(
  6260. ::google::protobuf::io::CodedOutputStream* output) const {
  6261. // @@protoc_insertion_point(serialize_start:google.firestore.v1.RunQueryRequest)
  6262. ::google::protobuf::uint32 cached_has_bits = 0;
  6263. (void) cached_has_bits;
  6264. // string parent = 1;
  6265. if (this->parent().size() > 0) {
  6266. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6267. this->parent().data(), static_cast<int>(this->parent().length()),
  6268. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  6269. "google.firestore.v1.RunQueryRequest.parent");
  6270. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  6271. 1, this->parent(), output);
  6272. }
  6273. // .google.firestore.v1.StructuredQuery structured_query = 2;
  6274. if (has_structured_query()) {
  6275. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6276. 2, *query_type_.structured_query_, output);
  6277. }
  6278. // bytes transaction = 5;
  6279. if (has_transaction()) {
  6280. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  6281. 5, this->transaction(), output);
  6282. }
  6283. // .google.firestore.v1.TransactionOptions new_transaction = 6;
  6284. if (has_new_transaction()) {
  6285. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6286. 6, *consistency_selector_.new_transaction_, output);
  6287. }
  6288. // .google.protobuf.Timestamp read_time = 7;
  6289. if (has_read_time()) {
  6290. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6291. 7, *consistency_selector_.read_time_, output);
  6292. }
  6293. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6294. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  6295. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  6296. }
  6297. // @@protoc_insertion_point(serialize_end:google.firestore.v1.RunQueryRequest)
  6298. }
  6299. ::google::protobuf::uint8* RunQueryRequest::InternalSerializeWithCachedSizesToArray(
  6300. bool deterministic, ::google::protobuf::uint8* target) const {
  6301. (void)deterministic; // Unused
  6302. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.RunQueryRequest)
  6303. ::google::protobuf::uint32 cached_has_bits = 0;
  6304. (void) cached_has_bits;
  6305. // string parent = 1;
  6306. if (this->parent().size() > 0) {
  6307. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6308. this->parent().data(), static_cast<int>(this->parent().length()),
  6309. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  6310. "google.firestore.v1.RunQueryRequest.parent");
  6311. target =
  6312. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  6313. 1, this->parent(), target);
  6314. }
  6315. // .google.firestore.v1.StructuredQuery structured_query = 2;
  6316. if (has_structured_query()) {
  6317. target = ::google::protobuf::internal::WireFormatLite::
  6318. InternalWriteMessageToArray(
  6319. 2, *query_type_.structured_query_, deterministic, target);
  6320. }
  6321. // bytes transaction = 5;
  6322. if (has_transaction()) {
  6323. target =
  6324. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  6325. 5, this->transaction(), target);
  6326. }
  6327. // .google.firestore.v1.TransactionOptions new_transaction = 6;
  6328. if (has_new_transaction()) {
  6329. target = ::google::protobuf::internal::WireFormatLite::
  6330. InternalWriteMessageToArray(
  6331. 6, *consistency_selector_.new_transaction_, deterministic, target);
  6332. }
  6333. // .google.protobuf.Timestamp read_time = 7;
  6334. if (has_read_time()) {
  6335. target = ::google::protobuf::internal::WireFormatLite::
  6336. InternalWriteMessageToArray(
  6337. 7, *consistency_selector_.read_time_, deterministic, target);
  6338. }
  6339. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6340. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  6341. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  6342. }
  6343. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.RunQueryRequest)
  6344. return target;
  6345. }
  6346. size_t RunQueryRequest::ByteSizeLong() const {
  6347. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.RunQueryRequest)
  6348. size_t total_size = 0;
  6349. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6350. total_size +=
  6351. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  6352. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  6353. }
  6354. // string parent = 1;
  6355. if (this->parent().size() > 0) {
  6356. total_size += 1 +
  6357. ::google::protobuf::internal::WireFormatLite::StringSize(
  6358. this->parent());
  6359. }
  6360. switch (query_type_case()) {
  6361. // .google.firestore.v1.StructuredQuery structured_query = 2;
  6362. case kStructuredQuery: {
  6363. total_size += 1 +
  6364. ::google::protobuf::internal::WireFormatLite::MessageSize(
  6365. *query_type_.structured_query_);
  6366. break;
  6367. }
  6368. case QUERY_TYPE_NOT_SET: {
  6369. break;
  6370. }
  6371. }
  6372. switch (consistency_selector_case()) {
  6373. // bytes transaction = 5;
  6374. case kTransaction: {
  6375. total_size += 1 +
  6376. ::google::protobuf::internal::WireFormatLite::BytesSize(
  6377. this->transaction());
  6378. break;
  6379. }
  6380. // .google.firestore.v1.TransactionOptions new_transaction = 6;
  6381. case kNewTransaction: {
  6382. total_size += 1 +
  6383. ::google::protobuf::internal::WireFormatLite::MessageSize(
  6384. *consistency_selector_.new_transaction_);
  6385. break;
  6386. }
  6387. // .google.protobuf.Timestamp read_time = 7;
  6388. case kReadTime: {
  6389. total_size += 1 +
  6390. ::google::protobuf::internal::WireFormatLite::MessageSize(
  6391. *consistency_selector_.read_time_);
  6392. break;
  6393. }
  6394. case CONSISTENCY_SELECTOR_NOT_SET: {
  6395. break;
  6396. }
  6397. }
  6398. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  6399. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  6400. _cached_size_ = cached_size;
  6401. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  6402. return total_size;
  6403. }
  6404. void RunQueryRequest::MergeFrom(const ::google::protobuf::Message& from) {
  6405. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.RunQueryRequest)
  6406. GOOGLE_DCHECK_NE(&from, this);
  6407. const RunQueryRequest* source =
  6408. ::google::protobuf::internal::DynamicCastToGenerated<const RunQueryRequest>(
  6409. &from);
  6410. if (source == NULL) {
  6411. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.RunQueryRequest)
  6412. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  6413. } else {
  6414. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.RunQueryRequest)
  6415. MergeFrom(*source);
  6416. }
  6417. }
  6418. void RunQueryRequest::MergeFrom(const RunQueryRequest& from) {
  6419. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.RunQueryRequest)
  6420. GOOGLE_DCHECK_NE(&from, this);
  6421. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6422. ::google::protobuf::uint32 cached_has_bits = 0;
  6423. (void) cached_has_bits;
  6424. if (from.parent().size() > 0) {
  6425. parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  6426. }
  6427. switch (from.query_type_case()) {
  6428. case kStructuredQuery: {
  6429. mutable_structured_query()->::google::firestore::v1::StructuredQuery::MergeFrom(from.structured_query());
  6430. break;
  6431. }
  6432. case QUERY_TYPE_NOT_SET: {
  6433. break;
  6434. }
  6435. }
  6436. switch (from.consistency_selector_case()) {
  6437. case kTransaction: {
  6438. set_transaction(from.transaction());
  6439. break;
  6440. }
  6441. case kNewTransaction: {
  6442. mutable_new_transaction()->::google::firestore::v1::TransactionOptions::MergeFrom(from.new_transaction());
  6443. break;
  6444. }
  6445. case kReadTime: {
  6446. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  6447. break;
  6448. }
  6449. case CONSISTENCY_SELECTOR_NOT_SET: {
  6450. break;
  6451. }
  6452. }
  6453. }
  6454. void RunQueryRequest::CopyFrom(const ::google::protobuf::Message& from) {
  6455. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.RunQueryRequest)
  6456. if (&from == this) return;
  6457. Clear();
  6458. MergeFrom(from);
  6459. }
  6460. void RunQueryRequest::CopyFrom(const RunQueryRequest& from) {
  6461. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.RunQueryRequest)
  6462. if (&from == this) return;
  6463. Clear();
  6464. MergeFrom(from);
  6465. }
  6466. bool RunQueryRequest::IsInitialized() const {
  6467. return true;
  6468. }
  6469. void RunQueryRequest::Swap(RunQueryRequest* other) {
  6470. if (other == this) return;
  6471. InternalSwap(other);
  6472. }
  6473. void RunQueryRequest::InternalSwap(RunQueryRequest* other) {
  6474. using std::swap;
  6475. parent_.Swap(&other->parent_);
  6476. swap(query_type_, other->query_type_);
  6477. swap(_oneof_case_[0], other->_oneof_case_[0]);
  6478. swap(consistency_selector_, other->consistency_selector_);
  6479. swap(_oneof_case_[1], other->_oneof_case_[1]);
  6480. _internal_metadata_.Swap(&other->_internal_metadata_);
  6481. swap(_cached_size_, other->_cached_size_);
  6482. }
  6483. ::google::protobuf::Metadata RunQueryRequest::GetMetadata() const {
  6484. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  6485. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  6486. }
  6487. // ===================================================================
  6488. void RunQueryResponse::InitAsDefaultInstance() {
  6489. ::google::firestore::v1::_RunQueryResponse_default_instance_._instance.get_mutable()->document_ = const_cast< ::google::firestore::v1::Document*>(
  6490. ::google::firestore::v1::Document::internal_default_instance());
  6491. ::google::firestore::v1::_RunQueryResponse_default_instance_._instance.get_mutable()->read_time_ = const_cast< ::google::protobuf::Timestamp*>(
  6492. ::google::protobuf::Timestamp::internal_default_instance());
  6493. }
  6494. void RunQueryResponse::clear_document() {
  6495. if (GetArenaNoVirtual() == NULL && document_ != NULL) {
  6496. delete document_;
  6497. }
  6498. document_ = NULL;
  6499. }
  6500. void RunQueryResponse::clear_read_time() {
  6501. if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
  6502. delete read_time_;
  6503. }
  6504. read_time_ = NULL;
  6505. }
  6506. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  6507. const int RunQueryResponse::kTransactionFieldNumber;
  6508. const int RunQueryResponse::kDocumentFieldNumber;
  6509. const int RunQueryResponse::kReadTimeFieldNumber;
  6510. const int RunQueryResponse::kSkippedResultsFieldNumber;
  6511. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  6512. RunQueryResponse::RunQueryResponse()
  6513. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  6514. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  6515. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsRunQueryResponse();
  6516. }
  6517. SharedCtor();
  6518. // @@protoc_insertion_point(constructor:google.firestore.v1.RunQueryResponse)
  6519. }
  6520. RunQueryResponse::RunQueryResponse(const RunQueryResponse& from)
  6521. : ::google::protobuf::Message(),
  6522. _internal_metadata_(NULL),
  6523. _cached_size_(0) {
  6524. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6525. transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6526. if (from.transaction().size() > 0) {
  6527. transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  6528. }
  6529. if (from.has_document()) {
  6530. document_ = new ::google::firestore::v1::Document(*from.document_);
  6531. } else {
  6532. document_ = NULL;
  6533. }
  6534. if (from.has_read_time()) {
  6535. read_time_ = new ::google::protobuf::Timestamp(*from.read_time_);
  6536. } else {
  6537. read_time_ = NULL;
  6538. }
  6539. skipped_results_ = from.skipped_results_;
  6540. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.RunQueryResponse)
  6541. }
  6542. void RunQueryResponse::SharedCtor() {
  6543. transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6544. ::memset(&document_, 0, static_cast<size_t>(
  6545. reinterpret_cast<char*>(&skipped_results_) -
  6546. reinterpret_cast<char*>(&document_)) + sizeof(skipped_results_));
  6547. _cached_size_ = 0;
  6548. }
  6549. RunQueryResponse::~RunQueryResponse() {
  6550. // @@protoc_insertion_point(destructor:google.firestore.v1.RunQueryResponse)
  6551. SharedDtor();
  6552. }
  6553. void RunQueryResponse::SharedDtor() {
  6554. transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6555. if (this != internal_default_instance()) delete document_;
  6556. if (this != internal_default_instance()) delete read_time_;
  6557. }
  6558. void RunQueryResponse::SetCachedSize(int size) const {
  6559. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  6560. _cached_size_ = size;
  6561. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  6562. }
  6563. const ::google::protobuf::Descriptor* RunQueryResponse::descriptor() {
  6564. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  6565. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  6566. }
  6567. const RunQueryResponse& RunQueryResponse::default_instance() {
  6568. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsRunQueryResponse();
  6569. return *internal_default_instance();
  6570. }
  6571. RunQueryResponse* RunQueryResponse::New(::google::protobuf::Arena* arena) const {
  6572. RunQueryResponse* n = new RunQueryResponse;
  6573. if (arena != NULL) {
  6574. arena->Own(n);
  6575. }
  6576. return n;
  6577. }
  6578. void RunQueryResponse::Clear() {
  6579. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.RunQueryResponse)
  6580. ::google::protobuf::uint32 cached_has_bits = 0;
  6581. // Prevent compiler warnings about cached_has_bits being unused
  6582. (void) cached_has_bits;
  6583. transaction_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6584. if (GetArenaNoVirtual() == NULL && document_ != NULL) {
  6585. delete document_;
  6586. }
  6587. document_ = NULL;
  6588. if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
  6589. delete read_time_;
  6590. }
  6591. read_time_ = NULL;
  6592. skipped_results_ = 0;
  6593. _internal_metadata_.Clear();
  6594. }
  6595. bool RunQueryResponse::MergePartialFromCodedStream(
  6596. ::google::protobuf::io::CodedInputStream* input) {
  6597. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  6598. ::google::protobuf::uint32 tag;
  6599. // @@protoc_insertion_point(parse_start:google.firestore.v1.RunQueryResponse)
  6600. for (;;) {
  6601. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  6602. tag = p.first;
  6603. if (!p.second) goto handle_unusual;
  6604. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  6605. // .google.firestore.v1.Document document = 1;
  6606. case 1: {
  6607. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6608. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  6609. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  6610. input, mutable_document()));
  6611. } else {
  6612. goto handle_unusual;
  6613. }
  6614. break;
  6615. }
  6616. // bytes transaction = 2;
  6617. case 2: {
  6618. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6619. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  6620. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  6621. input, this->mutable_transaction()));
  6622. } else {
  6623. goto handle_unusual;
  6624. }
  6625. break;
  6626. }
  6627. // .google.protobuf.Timestamp read_time = 3;
  6628. case 3: {
  6629. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6630. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  6631. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  6632. input, mutable_read_time()));
  6633. } else {
  6634. goto handle_unusual;
  6635. }
  6636. break;
  6637. }
  6638. // int32 skipped_results = 4;
  6639. case 4: {
  6640. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6641. static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
  6642. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  6643. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  6644. input, &skipped_results_)));
  6645. } else {
  6646. goto handle_unusual;
  6647. }
  6648. break;
  6649. }
  6650. default: {
  6651. handle_unusual:
  6652. if (tag == 0) {
  6653. goto success;
  6654. }
  6655. DO_(::google::protobuf::internal::WireFormat::SkipField(
  6656. input, tag, _internal_metadata_.mutable_unknown_fields()));
  6657. break;
  6658. }
  6659. }
  6660. }
  6661. success:
  6662. // @@protoc_insertion_point(parse_success:google.firestore.v1.RunQueryResponse)
  6663. return true;
  6664. failure:
  6665. // @@protoc_insertion_point(parse_failure:google.firestore.v1.RunQueryResponse)
  6666. return false;
  6667. #undef DO_
  6668. }
  6669. void RunQueryResponse::SerializeWithCachedSizes(
  6670. ::google::protobuf::io::CodedOutputStream* output) const {
  6671. // @@protoc_insertion_point(serialize_start:google.firestore.v1.RunQueryResponse)
  6672. ::google::protobuf::uint32 cached_has_bits = 0;
  6673. (void) cached_has_bits;
  6674. // .google.firestore.v1.Document document = 1;
  6675. if (this->has_document()) {
  6676. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6677. 1, *this->document_, output);
  6678. }
  6679. // bytes transaction = 2;
  6680. if (this->transaction().size() > 0) {
  6681. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  6682. 2, this->transaction(), output);
  6683. }
  6684. // .google.protobuf.Timestamp read_time = 3;
  6685. if (this->has_read_time()) {
  6686. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  6687. 3, *this->read_time_, output);
  6688. }
  6689. // int32 skipped_results = 4;
  6690. if (this->skipped_results() != 0) {
  6691. ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->skipped_results(), output);
  6692. }
  6693. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6694. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  6695. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  6696. }
  6697. // @@protoc_insertion_point(serialize_end:google.firestore.v1.RunQueryResponse)
  6698. }
  6699. ::google::protobuf::uint8* RunQueryResponse::InternalSerializeWithCachedSizesToArray(
  6700. bool deterministic, ::google::protobuf::uint8* target) const {
  6701. (void)deterministic; // Unused
  6702. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.RunQueryResponse)
  6703. ::google::protobuf::uint32 cached_has_bits = 0;
  6704. (void) cached_has_bits;
  6705. // .google.firestore.v1.Document document = 1;
  6706. if (this->has_document()) {
  6707. target = ::google::protobuf::internal::WireFormatLite::
  6708. InternalWriteMessageToArray(
  6709. 1, *this->document_, deterministic, target);
  6710. }
  6711. // bytes transaction = 2;
  6712. if (this->transaction().size() > 0) {
  6713. target =
  6714. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  6715. 2, this->transaction(), target);
  6716. }
  6717. // .google.protobuf.Timestamp read_time = 3;
  6718. if (this->has_read_time()) {
  6719. target = ::google::protobuf::internal::WireFormatLite::
  6720. InternalWriteMessageToArray(
  6721. 3, *this->read_time_, deterministic, target);
  6722. }
  6723. // int32 skipped_results = 4;
  6724. if (this->skipped_results() != 0) {
  6725. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->skipped_results(), target);
  6726. }
  6727. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6728. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  6729. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  6730. }
  6731. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.RunQueryResponse)
  6732. return target;
  6733. }
  6734. size_t RunQueryResponse::ByteSizeLong() const {
  6735. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.RunQueryResponse)
  6736. size_t total_size = 0;
  6737. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  6738. total_size +=
  6739. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  6740. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  6741. }
  6742. // bytes transaction = 2;
  6743. if (this->transaction().size() > 0) {
  6744. total_size += 1 +
  6745. ::google::protobuf::internal::WireFormatLite::BytesSize(
  6746. this->transaction());
  6747. }
  6748. // .google.firestore.v1.Document document = 1;
  6749. if (this->has_document()) {
  6750. total_size += 1 +
  6751. ::google::protobuf::internal::WireFormatLite::MessageSize(
  6752. *this->document_);
  6753. }
  6754. // .google.protobuf.Timestamp read_time = 3;
  6755. if (this->has_read_time()) {
  6756. total_size += 1 +
  6757. ::google::protobuf::internal::WireFormatLite::MessageSize(
  6758. *this->read_time_);
  6759. }
  6760. // int32 skipped_results = 4;
  6761. if (this->skipped_results() != 0) {
  6762. total_size += 1 +
  6763. ::google::protobuf::internal::WireFormatLite::Int32Size(
  6764. this->skipped_results());
  6765. }
  6766. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  6767. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  6768. _cached_size_ = cached_size;
  6769. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  6770. return total_size;
  6771. }
  6772. void RunQueryResponse::MergeFrom(const ::google::protobuf::Message& from) {
  6773. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.RunQueryResponse)
  6774. GOOGLE_DCHECK_NE(&from, this);
  6775. const RunQueryResponse* source =
  6776. ::google::protobuf::internal::DynamicCastToGenerated<const RunQueryResponse>(
  6777. &from);
  6778. if (source == NULL) {
  6779. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.RunQueryResponse)
  6780. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  6781. } else {
  6782. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.RunQueryResponse)
  6783. MergeFrom(*source);
  6784. }
  6785. }
  6786. void RunQueryResponse::MergeFrom(const RunQueryResponse& from) {
  6787. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.RunQueryResponse)
  6788. GOOGLE_DCHECK_NE(&from, this);
  6789. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6790. ::google::protobuf::uint32 cached_has_bits = 0;
  6791. (void) cached_has_bits;
  6792. if (from.transaction().size() > 0) {
  6793. transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  6794. }
  6795. if (from.has_document()) {
  6796. mutable_document()->::google::firestore::v1::Document::MergeFrom(from.document());
  6797. }
  6798. if (from.has_read_time()) {
  6799. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  6800. }
  6801. if (from.skipped_results() != 0) {
  6802. set_skipped_results(from.skipped_results());
  6803. }
  6804. }
  6805. void RunQueryResponse::CopyFrom(const ::google::protobuf::Message& from) {
  6806. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.RunQueryResponse)
  6807. if (&from == this) return;
  6808. Clear();
  6809. MergeFrom(from);
  6810. }
  6811. void RunQueryResponse::CopyFrom(const RunQueryResponse& from) {
  6812. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.RunQueryResponse)
  6813. if (&from == this) return;
  6814. Clear();
  6815. MergeFrom(from);
  6816. }
  6817. bool RunQueryResponse::IsInitialized() const {
  6818. return true;
  6819. }
  6820. void RunQueryResponse::Swap(RunQueryResponse* other) {
  6821. if (other == this) return;
  6822. InternalSwap(other);
  6823. }
  6824. void RunQueryResponse::InternalSwap(RunQueryResponse* other) {
  6825. using std::swap;
  6826. transaction_.Swap(&other->transaction_);
  6827. swap(document_, other->document_);
  6828. swap(read_time_, other->read_time_);
  6829. swap(skipped_results_, other->skipped_results_);
  6830. _internal_metadata_.Swap(&other->_internal_metadata_);
  6831. swap(_cached_size_, other->_cached_size_);
  6832. }
  6833. ::google::protobuf::Metadata RunQueryResponse::GetMetadata() const {
  6834. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  6835. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  6836. }
  6837. // ===================================================================
  6838. WriteRequest_LabelsEntry_DoNotUse::WriteRequest_LabelsEntry_DoNotUse() {}
  6839. WriteRequest_LabelsEntry_DoNotUse::WriteRequest_LabelsEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  6840. void WriteRequest_LabelsEntry_DoNotUse::MergeFrom(const WriteRequest_LabelsEntry_DoNotUse& other) {
  6841. MergeFromInternal(other);
  6842. }
  6843. ::google::protobuf::Metadata WriteRequest_LabelsEntry_DoNotUse::GetMetadata() const {
  6844. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  6845. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[15];
  6846. }
  6847. void WriteRequest_LabelsEntry_DoNotUse::MergeFrom(
  6848. const ::google::protobuf::Message& other) {
  6849. ::google::protobuf::Message::MergeFrom(other);
  6850. }
  6851. // ===================================================================
  6852. void WriteRequest::InitAsDefaultInstance() {
  6853. }
  6854. void WriteRequest::clear_writes() {
  6855. writes_.Clear();
  6856. }
  6857. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  6858. const int WriteRequest::kDatabaseFieldNumber;
  6859. const int WriteRequest::kStreamIdFieldNumber;
  6860. const int WriteRequest::kWritesFieldNumber;
  6861. const int WriteRequest::kStreamTokenFieldNumber;
  6862. const int WriteRequest::kLabelsFieldNumber;
  6863. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  6864. WriteRequest::WriteRequest()
  6865. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  6866. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  6867. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsWriteRequest();
  6868. }
  6869. SharedCtor();
  6870. // @@protoc_insertion_point(constructor:google.firestore.v1.WriteRequest)
  6871. }
  6872. WriteRequest::WriteRequest(const WriteRequest& from)
  6873. : ::google::protobuf::Message(),
  6874. _internal_metadata_(NULL),
  6875. writes_(from.writes_),
  6876. _cached_size_(0) {
  6877. _internal_metadata_.MergeFrom(from._internal_metadata_);
  6878. labels_.MergeFrom(from.labels_);
  6879. database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6880. if (from.database().size() > 0) {
  6881. database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  6882. }
  6883. stream_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6884. if (from.stream_id().size() > 0) {
  6885. stream_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stream_id_);
  6886. }
  6887. stream_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6888. if (from.stream_token().size() > 0) {
  6889. stream_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stream_token_);
  6890. }
  6891. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.WriteRequest)
  6892. }
  6893. void WriteRequest::SharedCtor() {
  6894. database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6895. stream_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6896. stream_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6897. _cached_size_ = 0;
  6898. }
  6899. WriteRequest::~WriteRequest() {
  6900. // @@protoc_insertion_point(destructor:google.firestore.v1.WriteRequest)
  6901. SharedDtor();
  6902. }
  6903. void WriteRequest::SharedDtor() {
  6904. database_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6905. stream_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6906. stream_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6907. }
  6908. void WriteRequest::SetCachedSize(int size) const {
  6909. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  6910. _cached_size_ = size;
  6911. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  6912. }
  6913. const ::google::protobuf::Descriptor* WriteRequest::descriptor() {
  6914. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  6915. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  6916. }
  6917. const WriteRequest& WriteRequest::default_instance() {
  6918. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsWriteRequest();
  6919. return *internal_default_instance();
  6920. }
  6921. WriteRequest* WriteRequest::New(::google::protobuf::Arena* arena) const {
  6922. WriteRequest* n = new WriteRequest;
  6923. if (arena != NULL) {
  6924. arena->Own(n);
  6925. }
  6926. return n;
  6927. }
  6928. void WriteRequest::Clear() {
  6929. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.WriteRequest)
  6930. ::google::protobuf::uint32 cached_has_bits = 0;
  6931. // Prevent compiler warnings about cached_has_bits being unused
  6932. (void) cached_has_bits;
  6933. writes_.Clear();
  6934. labels_.Clear();
  6935. database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6936. stream_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6937. stream_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  6938. _internal_metadata_.Clear();
  6939. }
  6940. bool WriteRequest::MergePartialFromCodedStream(
  6941. ::google::protobuf::io::CodedInputStream* input) {
  6942. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  6943. ::google::protobuf::uint32 tag;
  6944. // @@protoc_insertion_point(parse_start:google.firestore.v1.WriteRequest)
  6945. for (;;) {
  6946. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  6947. tag = p.first;
  6948. if (!p.second) goto handle_unusual;
  6949. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  6950. // string database = 1;
  6951. case 1: {
  6952. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6953. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  6954. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  6955. input, this->mutable_database()));
  6956. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6957. this->database().data(), static_cast<int>(this->database().length()),
  6958. ::google::protobuf::internal::WireFormatLite::PARSE,
  6959. "google.firestore.v1.WriteRequest.database"));
  6960. } else {
  6961. goto handle_unusual;
  6962. }
  6963. break;
  6964. }
  6965. // string stream_id = 2;
  6966. case 2: {
  6967. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6968. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  6969. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  6970. input, this->mutable_stream_id()));
  6971. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  6972. this->stream_id().data(), static_cast<int>(this->stream_id().length()),
  6973. ::google::protobuf::internal::WireFormatLite::PARSE,
  6974. "google.firestore.v1.WriteRequest.stream_id"));
  6975. } else {
  6976. goto handle_unusual;
  6977. }
  6978. break;
  6979. }
  6980. // repeated .google.firestore.v1.Write writes = 3;
  6981. case 3: {
  6982. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6983. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  6984. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_writes()));
  6985. } else {
  6986. goto handle_unusual;
  6987. }
  6988. break;
  6989. }
  6990. // bytes stream_token = 4;
  6991. case 4: {
  6992. if (static_cast< ::google::protobuf::uint8>(tag) ==
  6993. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  6994. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  6995. input, this->mutable_stream_token()));
  6996. } else {
  6997. goto handle_unusual;
  6998. }
  6999. break;
  7000. }
  7001. // map<string, string> labels = 5;
  7002. case 5: {
  7003. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7004. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  7005. WriteRequest_LabelsEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  7006. WriteRequest_LabelsEntry_DoNotUse,
  7007. ::std::string, ::std::string,
  7008. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  7009. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  7010. 0 >,
  7011. ::google::protobuf::Map< ::std::string, ::std::string > > parser(&labels_);
  7012. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  7013. input, &parser));
  7014. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7015. parser.key().data(), static_cast<int>(parser.key().length()),
  7016. ::google::protobuf::internal::WireFormatLite::PARSE,
  7017. "google.firestore.v1.WriteRequest.LabelsEntry.key"));
  7018. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7019. parser.value().data(), static_cast<int>(parser.value().length()),
  7020. ::google::protobuf::internal::WireFormatLite::PARSE,
  7021. "google.firestore.v1.WriteRequest.LabelsEntry.value"));
  7022. } else {
  7023. goto handle_unusual;
  7024. }
  7025. break;
  7026. }
  7027. default: {
  7028. handle_unusual:
  7029. if (tag == 0) {
  7030. goto success;
  7031. }
  7032. DO_(::google::protobuf::internal::WireFormat::SkipField(
  7033. input, tag, _internal_metadata_.mutable_unknown_fields()));
  7034. break;
  7035. }
  7036. }
  7037. }
  7038. success:
  7039. // @@protoc_insertion_point(parse_success:google.firestore.v1.WriteRequest)
  7040. return true;
  7041. failure:
  7042. // @@protoc_insertion_point(parse_failure:google.firestore.v1.WriteRequest)
  7043. return false;
  7044. #undef DO_
  7045. }
  7046. void WriteRequest::SerializeWithCachedSizes(
  7047. ::google::protobuf::io::CodedOutputStream* output) const {
  7048. // @@protoc_insertion_point(serialize_start:google.firestore.v1.WriteRequest)
  7049. ::google::protobuf::uint32 cached_has_bits = 0;
  7050. (void) cached_has_bits;
  7051. // string database = 1;
  7052. if (this->database().size() > 0) {
  7053. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7054. this->database().data(), static_cast<int>(this->database().length()),
  7055. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7056. "google.firestore.v1.WriteRequest.database");
  7057. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  7058. 1, this->database(), output);
  7059. }
  7060. // string stream_id = 2;
  7061. if (this->stream_id().size() > 0) {
  7062. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7063. this->stream_id().data(), static_cast<int>(this->stream_id().length()),
  7064. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7065. "google.firestore.v1.WriteRequest.stream_id");
  7066. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  7067. 2, this->stream_id(), output);
  7068. }
  7069. // repeated .google.firestore.v1.Write writes = 3;
  7070. for (unsigned int i = 0,
  7071. n = static_cast<unsigned int>(this->writes_size()); i < n; i++) {
  7072. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  7073. 3, this->writes(static_cast<int>(i)), output);
  7074. }
  7075. // bytes stream_token = 4;
  7076. if (this->stream_token().size() > 0) {
  7077. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  7078. 4, this->stream_token(), output);
  7079. }
  7080. // map<string, string> labels = 5;
  7081. if (!this->labels().empty()) {
  7082. typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
  7083. ConstPtr;
  7084. typedef ConstPtr SortItem;
  7085. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  7086. struct Utf8Check {
  7087. static void Check(ConstPtr p) {
  7088. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7089. p->first.data(), static_cast<int>(p->first.length()),
  7090. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7091. "google.firestore.v1.WriteRequest.LabelsEntry.key");
  7092. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7093. p->second.data(), static_cast<int>(p->second.length()),
  7094. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7095. "google.firestore.v1.WriteRequest.LabelsEntry.value");
  7096. }
  7097. };
  7098. if (output->IsSerializationDeterministic() &&
  7099. this->labels().size() > 1) {
  7100. ::google::protobuf::scoped_array<SortItem> items(
  7101. new SortItem[this->labels().size()]);
  7102. typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
  7103. size_type n = 0;
  7104. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  7105. it = this->labels().begin();
  7106. it != this->labels().end(); ++it, ++n) {
  7107. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  7108. }
  7109. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  7110. ::google::protobuf::scoped_ptr<WriteRequest_LabelsEntry_DoNotUse> entry;
  7111. for (size_type i = 0; i < n; i++) {
  7112. entry.reset(labels_.NewEntryWrapper(
  7113. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  7114. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  7115. 5, *entry, output);
  7116. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  7117. }
  7118. } else {
  7119. ::google::protobuf::scoped_ptr<WriteRequest_LabelsEntry_DoNotUse> entry;
  7120. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  7121. it = this->labels().begin();
  7122. it != this->labels().end(); ++it) {
  7123. entry.reset(labels_.NewEntryWrapper(
  7124. it->first, it->second));
  7125. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  7126. 5, *entry, output);
  7127. Utf8Check::Check(&*it);
  7128. }
  7129. }
  7130. }
  7131. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  7132. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  7133. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  7134. }
  7135. // @@protoc_insertion_point(serialize_end:google.firestore.v1.WriteRequest)
  7136. }
  7137. ::google::protobuf::uint8* WriteRequest::InternalSerializeWithCachedSizesToArray(
  7138. bool deterministic, ::google::protobuf::uint8* target) const {
  7139. (void)deterministic; // Unused
  7140. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.WriteRequest)
  7141. ::google::protobuf::uint32 cached_has_bits = 0;
  7142. (void) cached_has_bits;
  7143. // string database = 1;
  7144. if (this->database().size() > 0) {
  7145. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7146. this->database().data(), static_cast<int>(this->database().length()),
  7147. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7148. "google.firestore.v1.WriteRequest.database");
  7149. target =
  7150. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  7151. 1, this->database(), target);
  7152. }
  7153. // string stream_id = 2;
  7154. if (this->stream_id().size() > 0) {
  7155. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7156. this->stream_id().data(), static_cast<int>(this->stream_id().length()),
  7157. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7158. "google.firestore.v1.WriteRequest.stream_id");
  7159. target =
  7160. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  7161. 2, this->stream_id(), target);
  7162. }
  7163. // repeated .google.firestore.v1.Write writes = 3;
  7164. for (unsigned int i = 0,
  7165. n = static_cast<unsigned int>(this->writes_size()); i < n; i++) {
  7166. target = ::google::protobuf::internal::WireFormatLite::
  7167. InternalWriteMessageToArray(
  7168. 3, this->writes(static_cast<int>(i)), deterministic, target);
  7169. }
  7170. // bytes stream_token = 4;
  7171. if (this->stream_token().size() > 0) {
  7172. target =
  7173. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  7174. 4, this->stream_token(), target);
  7175. }
  7176. // map<string, string> labels = 5;
  7177. if (!this->labels().empty()) {
  7178. typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
  7179. ConstPtr;
  7180. typedef ConstPtr SortItem;
  7181. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  7182. struct Utf8Check {
  7183. static void Check(ConstPtr p) {
  7184. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7185. p->first.data(), static_cast<int>(p->first.length()),
  7186. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7187. "google.firestore.v1.WriteRequest.LabelsEntry.key");
  7188. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7189. p->second.data(), static_cast<int>(p->second.length()),
  7190. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7191. "google.firestore.v1.WriteRequest.LabelsEntry.value");
  7192. }
  7193. };
  7194. if (deterministic &&
  7195. this->labels().size() > 1) {
  7196. ::google::protobuf::scoped_array<SortItem> items(
  7197. new SortItem[this->labels().size()]);
  7198. typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
  7199. size_type n = 0;
  7200. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  7201. it = this->labels().begin();
  7202. it != this->labels().end(); ++it, ++n) {
  7203. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  7204. }
  7205. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  7206. ::google::protobuf::scoped_ptr<WriteRequest_LabelsEntry_DoNotUse> entry;
  7207. for (size_type i = 0; i < n; i++) {
  7208. entry.reset(labels_.NewEntryWrapper(
  7209. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  7210. target = ::google::protobuf::internal::WireFormatLite::
  7211. InternalWriteMessageNoVirtualToArray(
  7212. 5, *entry, deterministic, target);
  7213. ;
  7214. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  7215. }
  7216. } else {
  7217. ::google::protobuf::scoped_ptr<WriteRequest_LabelsEntry_DoNotUse> entry;
  7218. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  7219. it = this->labels().begin();
  7220. it != this->labels().end(); ++it) {
  7221. entry.reset(labels_.NewEntryWrapper(
  7222. it->first, it->second));
  7223. target = ::google::protobuf::internal::WireFormatLite::
  7224. InternalWriteMessageNoVirtualToArray(
  7225. 5, *entry, deterministic, target);
  7226. ;
  7227. Utf8Check::Check(&*it);
  7228. }
  7229. }
  7230. }
  7231. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  7232. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  7233. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  7234. }
  7235. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.WriteRequest)
  7236. return target;
  7237. }
  7238. size_t WriteRequest::ByteSizeLong() const {
  7239. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.WriteRequest)
  7240. size_t total_size = 0;
  7241. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  7242. total_size +=
  7243. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  7244. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  7245. }
  7246. // repeated .google.firestore.v1.Write writes = 3;
  7247. {
  7248. unsigned int count = static_cast<unsigned int>(this->writes_size());
  7249. total_size += 1UL * count;
  7250. for (unsigned int i = 0; i < count; i++) {
  7251. total_size +=
  7252. ::google::protobuf::internal::WireFormatLite::MessageSize(
  7253. this->writes(static_cast<int>(i)));
  7254. }
  7255. }
  7256. // map<string, string> labels = 5;
  7257. total_size += 1 *
  7258. ::google::protobuf::internal::FromIntSize(this->labels_size());
  7259. {
  7260. ::google::protobuf::scoped_ptr<WriteRequest_LabelsEntry_DoNotUse> entry;
  7261. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  7262. it = this->labels().begin();
  7263. it != this->labels().end(); ++it) {
  7264. entry.reset(labels_.NewEntryWrapper(it->first, it->second));
  7265. total_size += ::google::protobuf::internal::WireFormatLite::
  7266. MessageSizeNoVirtual(*entry);
  7267. }
  7268. }
  7269. // string database = 1;
  7270. if (this->database().size() > 0) {
  7271. total_size += 1 +
  7272. ::google::protobuf::internal::WireFormatLite::StringSize(
  7273. this->database());
  7274. }
  7275. // string stream_id = 2;
  7276. if (this->stream_id().size() > 0) {
  7277. total_size += 1 +
  7278. ::google::protobuf::internal::WireFormatLite::StringSize(
  7279. this->stream_id());
  7280. }
  7281. // bytes stream_token = 4;
  7282. if (this->stream_token().size() > 0) {
  7283. total_size += 1 +
  7284. ::google::protobuf::internal::WireFormatLite::BytesSize(
  7285. this->stream_token());
  7286. }
  7287. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  7288. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  7289. _cached_size_ = cached_size;
  7290. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  7291. return total_size;
  7292. }
  7293. void WriteRequest::MergeFrom(const ::google::protobuf::Message& from) {
  7294. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.WriteRequest)
  7295. GOOGLE_DCHECK_NE(&from, this);
  7296. const WriteRequest* source =
  7297. ::google::protobuf::internal::DynamicCastToGenerated<const WriteRequest>(
  7298. &from);
  7299. if (source == NULL) {
  7300. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.WriteRequest)
  7301. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  7302. } else {
  7303. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.WriteRequest)
  7304. MergeFrom(*source);
  7305. }
  7306. }
  7307. void WriteRequest::MergeFrom(const WriteRequest& from) {
  7308. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.WriteRequest)
  7309. GOOGLE_DCHECK_NE(&from, this);
  7310. _internal_metadata_.MergeFrom(from._internal_metadata_);
  7311. ::google::protobuf::uint32 cached_has_bits = 0;
  7312. (void) cached_has_bits;
  7313. writes_.MergeFrom(from.writes_);
  7314. labels_.MergeFrom(from.labels_);
  7315. if (from.database().size() > 0) {
  7316. database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  7317. }
  7318. if (from.stream_id().size() > 0) {
  7319. stream_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stream_id_);
  7320. }
  7321. if (from.stream_token().size() > 0) {
  7322. stream_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stream_token_);
  7323. }
  7324. }
  7325. void WriteRequest::CopyFrom(const ::google::protobuf::Message& from) {
  7326. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.WriteRequest)
  7327. if (&from == this) return;
  7328. Clear();
  7329. MergeFrom(from);
  7330. }
  7331. void WriteRequest::CopyFrom(const WriteRequest& from) {
  7332. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.WriteRequest)
  7333. if (&from == this) return;
  7334. Clear();
  7335. MergeFrom(from);
  7336. }
  7337. bool WriteRequest::IsInitialized() const {
  7338. return true;
  7339. }
  7340. void WriteRequest::Swap(WriteRequest* other) {
  7341. if (other == this) return;
  7342. InternalSwap(other);
  7343. }
  7344. void WriteRequest::InternalSwap(WriteRequest* other) {
  7345. using std::swap;
  7346. writes_.InternalSwap(&other->writes_);
  7347. labels_.Swap(&other->labels_);
  7348. database_.Swap(&other->database_);
  7349. stream_id_.Swap(&other->stream_id_);
  7350. stream_token_.Swap(&other->stream_token_);
  7351. _internal_metadata_.Swap(&other->_internal_metadata_);
  7352. swap(_cached_size_, other->_cached_size_);
  7353. }
  7354. ::google::protobuf::Metadata WriteRequest::GetMetadata() const {
  7355. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  7356. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  7357. }
  7358. // ===================================================================
  7359. void WriteResponse::InitAsDefaultInstance() {
  7360. ::google::firestore::v1::_WriteResponse_default_instance_._instance.get_mutable()->commit_time_ = const_cast< ::google::protobuf::Timestamp*>(
  7361. ::google::protobuf::Timestamp::internal_default_instance());
  7362. }
  7363. void WriteResponse::clear_write_results() {
  7364. write_results_.Clear();
  7365. }
  7366. void WriteResponse::clear_commit_time() {
  7367. if (GetArenaNoVirtual() == NULL && commit_time_ != NULL) {
  7368. delete commit_time_;
  7369. }
  7370. commit_time_ = NULL;
  7371. }
  7372. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  7373. const int WriteResponse::kStreamIdFieldNumber;
  7374. const int WriteResponse::kStreamTokenFieldNumber;
  7375. const int WriteResponse::kWriteResultsFieldNumber;
  7376. const int WriteResponse::kCommitTimeFieldNumber;
  7377. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  7378. WriteResponse::WriteResponse()
  7379. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  7380. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  7381. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsWriteResponse();
  7382. }
  7383. SharedCtor();
  7384. // @@protoc_insertion_point(constructor:google.firestore.v1.WriteResponse)
  7385. }
  7386. WriteResponse::WriteResponse(const WriteResponse& from)
  7387. : ::google::protobuf::Message(),
  7388. _internal_metadata_(NULL),
  7389. write_results_(from.write_results_),
  7390. _cached_size_(0) {
  7391. _internal_metadata_.MergeFrom(from._internal_metadata_);
  7392. stream_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  7393. if (from.stream_id().size() > 0) {
  7394. stream_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stream_id_);
  7395. }
  7396. stream_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  7397. if (from.stream_token().size() > 0) {
  7398. stream_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stream_token_);
  7399. }
  7400. if (from.has_commit_time()) {
  7401. commit_time_ = new ::google::protobuf::Timestamp(*from.commit_time_);
  7402. } else {
  7403. commit_time_ = NULL;
  7404. }
  7405. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.WriteResponse)
  7406. }
  7407. void WriteResponse::SharedCtor() {
  7408. stream_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  7409. stream_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  7410. commit_time_ = NULL;
  7411. _cached_size_ = 0;
  7412. }
  7413. WriteResponse::~WriteResponse() {
  7414. // @@protoc_insertion_point(destructor:google.firestore.v1.WriteResponse)
  7415. SharedDtor();
  7416. }
  7417. void WriteResponse::SharedDtor() {
  7418. stream_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  7419. stream_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  7420. if (this != internal_default_instance()) delete commit_time_;
  7421. }
  7422. void WriteResponse::SetCachedSize(int size) const {
  7423. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  7424. _cached_size_ = size;
  7425. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  7426. }
  7427. const ::google::protobuf::Descriptor* WriteResponse::descriptor() {
  7428. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  7429. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  7430. }
  7431. const WriteResponse& WriteResponse::default_instance() {
  7432. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsWriteResponse();
  7433. return *internal_default_instance();
  7434. }
  7435. WriteResponse* WriteResponse::New(::google::protobuf::Arena* arena) const {
  7436. WriteResponse* n = new WriteResponse;
  7437. if (arena != NULL) {
  7438. arena->Own(n);
  7439. }
  7440. return n;
  7441. }
  7442. void WriteResponse::Clear() {
  7443. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.WriteResponse)
  7444. ::google::protobuf::uint32 cached_has_bits = 0;
  7445. // Prevent compiler warnings about cached_has_bits being unused
  7446. (void) cached_has_bits;
  7447. write_results_.Clear();
  7448. stream_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  7449. stream_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  7450. if (GetArenaNoVirtual() == NULL && commit_time_ != NULL) {
  7451. delete commit_time_;
  7452. }
  7453. commit_time_ = NULL;
  7454. _internal_metadata_.Clear();
  7455. }
  7456. bool WriteResponse::MergePartialFromCodedStream(
  7457. ::google::protobuf::io::CodedInputStream* input) {
  7458. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  7459. ::google::protobuf::uint32 tag;
  7460. // @@protoc_insertion_point(parse_start:google.firestore.v1.WriteResponse)
  7461. for (;;) {
  7462. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  7463. tag = p.first;
  7464. if (!p.second) goto handle_unusual;
  7465. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  7466. // string stream_id = 1;
  7467. case 1: {
  7468. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7469. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  7470. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  7471. input, this->mutable_stream_id()));
  7472. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7473. this->stream_id().data(), static_cast<int>(this->stream_id().length()),
  7474. ::google::protobuf::internal::WireFormatLite::PARSE,
  7475. "google.firestore.v1.WriteResponse.stream_id"));
  7476. } else {
  7477. goto handle_unusual;
  7478. }
  7479. break;
  7480. }
  7481. // bytes stream_token = 2;
  7482. case 2: {
  7483. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7484. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  7485. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  7486. input, this->mutable_stream_token()));
  7487. } else {
  7488. goto handle_unusual;
  7489. }
  7490. break;
  7491. }
  7492. // repeated .google.firestore.v1.WriteResult write_results = 3;
  7493. case 3: {
  7494. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7495. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  7496. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_write_results()));
  7497. } else {
  7498. goto handle_unusual;
  7499. }
  7500. break;
  7501. }
  7502. // .google.protobuf.Timestamp commit_time = 4;
  7503. case 4: {
  7504. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7505. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  7506. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  7507. input, mutable_commit_time()));
  7508. } else {
  7509. goto handle_unusual;
  7510. }
  7511. break;
  7512. }
  7513. default: {
  7514. handle_unusual:
  7515. if (tag == 0) {
  7516. goto success;
  7517. }
  7518. DO_(::google::protobuf::internal::WireFormat::SkipField(
  7519. input, tag, _internal_metadata_.mutable_unknown_fields()));
  7520. break;
  7521. }
  7522. }
  7523. }
  7524. success:
  7525. // @@protoc_insertion_point(parse_success:google.firestore.v1.WriteResponse)
  7526. return true;
  7527. failure:
  7528. // @@protoc_insertion_point(parse_failure:google.firestore.v1.WriteResponse)
  7529. return false;
  7530. #undef DO_
  7531. }
  7532. void WriteResponse::SerializeWithCachedSizes(
  7533. ::google::protobuf::io::CodedOutputStream* output) const {
  7534. // @@protoc_insertion_point(serialize_start:google.firestore.v1.WriteResponse)
  7535. ::google::protobuf::uint32 cached_has_bits = 0;
  7536. (void) cached_has_bits;
  7537. // string stream_id = 1;
  7538. if (this->stream_id().size() > 0) {
  7539. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7540. this->stream_id().data(), static_cast<int>(this->stream_id().length()),
  7541. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7542. "google.firestore.v1.WriteResponse.stream_id");
  7543. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  7544. 1, this->stream_id(), output);
  7545. }
  7546. // bytes stream_token = 2;
  7547. if (this->stream_token().size() > 0) {
  7548. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  7549. 2, this->stream_token(), output);
  7550. }
  7551. // repeated .google.firestore.v1.WriteResult write_results = 3;
  7552. for (unsigned int i = 0,
  7553. n = static_cast<unsigned int>(this->write_results_size()); i < n; i++) {
  7554. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  7555. 3, this->write_results(static_cast<int>(i)), output);
  7556. }
  7557. // .google.protobuf.Timestamp commit_time = 4;
  7558. if (this->has_commit_time()) {
  7559. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  7560. 4, *this->commit_time_, output);
  7561. }
  7562. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  7563. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  7564. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  7565. }
  7566. // @@protoc_insertion_point(serialize_end:google.firestore.v1.WriteResponse)
  7567. }
  7568. ::google::protobuf::uint8* WriteResponse::InternalSerializeWithCachedSizesToArray(
  7569. bool deterministic, ::google::protobuf::uint8* target) const {
  7570. (void)deterministic; // Unused
  7571. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.WriteResponse)
  7572. ::google::protobuf::uint32 cached_has_bits = 0;
  7573. (void) cached_has_bits;
  7574. // string stream_id = 1;
  7575. if (this->stream_id().size() > 0) {
  7576. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7577. this->stream_id().data(), static_cast<int>(this->stream_id().length()),
  7578. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7579. "google.firestore.v1.WriteResponse.stream_id");
  7580. target =
  7581. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  7582. 1, this->stream_id(), target);
  7583. }
  7584. // bytes stream_token = 2;
  7585. if (this->stream_token().size() > 0) {
  7586. target =
  7587. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  7588. 2, this->stream_token(), target);
  7589. }
  7590. // repeated .google.firestore.v1.WriteResult write_results = 3;
  7591. for (unsigned int i = 0,
  7592. n = static_cast<unsigned int>(this->write_results_size()); i < n; i++) {
  7593. target = ::google::protobuf::internal::WireFormatLite::
  7594. InternalWriteMessageToArray(
  7595. 3, this->write_results(static_cast<int>(i)), deterministic, target);
  7596. }
  7597. // .google.protobuf.Timestamp commit_time = 4;
  7598. if (this->has_commit_time()) {
  7599. target = ::google::protobuf::internal::WireFormatLite::
  7600. InternalWriteMessageToArray(
  7601. 4, *this->commit_time_, deterministic, target);
  7602. }
  7603. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  7604. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  7605. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  7606. }
  7607. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.WriteResponse)
  7608. return target;
  7609. }
  7610. size_t WriteResponse::ByteSizeLong() const {
  7611. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.WriteResponse)
  7612. size_t total_size = 0;
  7613. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  7614. total_size +=
  7615. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  7616. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  7617. }
  7618. // repeated .google.firestore.v1.WriteResult write_results = 3;
  7619. {
  7620. unsigned int count = static_cast<unsigned int>(this->write_results_size());
  7621. total_size += 1UL * count;
  7622. for (unsigned int i = 0; i < count; i++) {
  7623. total_size +=
  7624. ::google::protobuf::internal::WireFormatLite::MessageSize(
  7625. this->write_results(static_cast<int>(i)));
  7626. }
  7627. }
  7628. // string stream_id = 1;
  7629. if (this->stream_id().size() > 0) {
  7630. total_size += 1 +
  7631. ::google::protobuf::internal::WireFormatLite::StringSize(
  7632. this->stream_id());
  7633. }
  7634. // bytes stream_token = 2;
  7635. if (this->stream_token().size() > 0) {
  7636. total_size += 1 +
  7637. ::google::protobuf::internal::WireFormatLite::BytesSize(
  7638. this->stream_token());
  7639. }
  7640. // .google.protobuf.Timestamp commit_time = 4;
  7641. if (this->has_commit_time()) {
  7642. total_size += 1 +
  7643. ::google::protobuf::internal::WireFormatLite::MessageSize(
  7644. *this->commit_time_);
  7645. }
  7646. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  7647. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  7648. _cached_size_ = cached_size;
  7649. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  7650. return total_size;
  7651. }
  7652. void WriteResponse::MergeFrom(const ::google::protobuf::Message& from) {
  7653. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.WriteResponse)
  7654. GOOGLE_DCHECK_NE(&from, this);
  7655. const WriteResponse* source =
  7656. ::google::protobuf::internal::DynamicCastToGenerated<const WriteResponse>(
  7657. &from);
  7658. if (source == NULL) {
  7659. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.WriteResponse)
  7660. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  7661. } else {
  7662. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.WriteResponse)
  7663. MergeFrom(*source);
  7664. }
  7665. }
  7666. void WriteResponse::MergeFrom(const WriteResponse& from) {
  7667. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.WriteResponse)
  7668. GOOGLE_DCHECK_NE(&from, this);
  7669. _internal_metadata_.MergeFrom(from._internal_metadata_);
  7670. ::google::protobuf::uint32 cached_has_bits = 0;
  7671. (void) cached_has_bits;
  7672. write_results_.MergeFrom(from.write_results_);
  7673. if (from.stream_id().size() > 0) {
  7674. stream_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stream_id_);
  7675. }
  7676. if (from.stream_token().size() > 0) {
  7677. stream_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stream_token_);
  7678. }
  7679. if (from.has_commit_time()) {
  7680. mutable_commit_time()->::google::protobuf::Timestamp::MergeFrom(from.commit_time());
  7681. }
  7682. }
  7683. void WriteResponse::CopyFrom(const ::google::protobuf::Message& from) {
  7684. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.WriteResponse)
  7685. if (&from == this) return;
  7686. Clear();
  7687. MergeFrom(from);
  7688. }
  7689. void WriteResponse::CopyFrom(const WriteResponse& from) {
  7690. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.WriteResponse)
  7691. if (&from == this) return;
  7692. Clear();
  7693. MergeFrom(from);
  7694. }
  7695. bool WriteResponse::IsInitialized() const {
  7696. return true;
  7697. }
  7698. void WriteResponse::Swap(WriteResponse* other) {
  7699. if (other == this) return;
  7700. InternalSwap(other);
  7701. }
  7702. void WriteResponse::InternalSwap(WriteResponse* other) {
  7703. using std::swap;
  7704. write_results_.InternalSwap(&other->write_results_);
  7705. stream_id_.Swap(&other->stream_id_);
  7706. stream_token_.Swap(&other->stream_token_);
  7707. swap(commit_time_, other->commit_time_);
  7708. _internal_metadata_.Swap(&other->_internal_metadata_);
  7709. swap(_cached_size_, other->_cached_size_);
  7710. }
  7711. ::google::protobuf::Metadata WriteResponse::GetMetadata() const {
  7712. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  7713. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  7714. }
  7715. // ===================================================================
  7716. ListenRequest_LabelsEntry_DoNotUse::ListenRequest_LabelsEntry_DoNotUse() {}
  7717. ListenRequest_LabelsEntry_DoNotUse::ListenRequest_LabelsEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  7718. void ListenRequest_LabelsEntry_DoNotUse::MergeFrom(const ListenRequest_LabelsEntry_DoNotUse& other) {
  7719. MergeFromInternal(other);
  7720. }
  7721. ::google::protobuf::Metadata ListenRequest_LabelsEntry_DoNotUse::GetMetadata() const {
  7722. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  7723. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[18];
  7724. }
  7725. void ListenRequest_LabelsEntry_DoNotUse::MergeFrom(
  7726. const ::google::protobuf::Message& other) {
  7727. ::google::protobuf::Message::MergeFrom(other);
  7728. }
  7729. // ===================================================================
  7730. void ListenRequest::InitAsDefaultInstance() {
  7731. ::google::firestore::v1::_ListenRequest_default_instance_.add_target_ = const_cast< ::google::firestore::v1::Target*>(
  7732. ::google::firestore::v1::Target::internal_default_instance());
  7733. ::google::firestore::v1::_ListenRequest_default_instance_.remove_target_ = 0;
  7734. }
  7735. void ListenRequest::set_allocated_add_target(::google::firestore::v1::Target* add_target) {
  7736. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  7737. clear_target_change();
  7738. if (add_target) {
  7739. ::google::protobuf::Arena* submessage_arena = NULL;
  7740. if (message_arena != submessage_arena) {
  7741. add_target = ::google::protobuf::internal::GetOwnedMessage(
  7742. message_arena, add_target, submessage_arena);
  7743. }
  7744. set_has_add_target();
  7745. target_change_.add_target_ = add_target;
  7746. }
  7747. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListenRequest.add_target)
  7748. }
  7749. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  7750. const int ListenRequest::kDatabaseFieldNumber;
  7751. const int ListenRequest::kAddTargetFieldNumber;
  7752. const int ListenRequest::kRemoveTargetFieldNumber;
  7753. const int ListenRequest::kLabelsFieldNumber;
  7754. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  7755. ListenRequest::ListenRequest()
  7756. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  7757. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  7758. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListenRequest();
  7759. }
  7760. SharedCtor();
  7761. // @@protoc_insertion_point(constructor:google.firestore.v1.ListenRequest)
  7762. }
  7763. ListenRequest::ListenRequest(const ListenRequest& from)
  7764. : ::google::protobuf::Message(),
  7765. _internal_metadata_(NULL),
  7766. _cached_size_(0) {
  7767. _internal_metadata_.MergeFrom(from._internal_metadata_);
  7768. labels_.MergeFrom(from.labels_);
  7769. database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  7770. if (from.database().size() > 0) {
  7771. database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  7772. }
  7773. clear_has_target_change();
  7774. switch (from.target_change_case()) {
  7775. case kAddTarget: {
  7776. mutable_add_target()->::google::firestore::v1::Target::MergeFrom(from.add_target());
  7777. break;
  7778. }
  7779. case kRemoveTarget: {
  7780. set_remove_target(from.remove_target());
  7781. break;
  7782. }
  7783. case TARGET_CHANGE_NOT_SET: {
  7784. break;
  7785. }
  7786. }
  7787. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ListenRequest)
  7788. }
  7789. void ListenRequest::SharedCtor() {
  7790. database_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  7791. clear_has_target_change();
  7792. _cached_size_ = 0;
  7793. }
  7794. ListenRequest::~ListenRequest() {
  7795. // @@protoc_insertion_point(destructor:google.firestore.v1.ListenRequest)
  7796. SharedDtor();
  7797. }
  7798. void ListenRequest::SharedDtor() {
  7799. database_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  7800. if (has_target_change()) {
  7801. clear_target_change();
  7802. }
  7803. }
  7804. void ListenRequest::SetCachedSize(int size) const {
  7805. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  7806. _cached_size_ = size;
  7807. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  7808. }
  7809. const ::google::protobuf::Descriptor* ListenRequest::descriptor() {
  7810. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  7811. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  7812. }
  7813. const ListenRequest& ListenRequest::default_instance() {
  7814. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListenRequest();
  7815. return *internal_default_instance();
  7816. }
  7817. ListenRequest* ListenRequest::New(::google::protobuf::Arena* arena) const {
  7818. ListenRequest* n = new ListenRequest;
  7819. if (arena != NULL) {
  7820. arena->Own(n);
  7821. }
  7822. return n;
  7823. }
  7824. void ListenRequest::clear_target_change() {
  7825. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.ListenRequest)
  7826. switch (target_change_case()) {
  7827. case kAddTarget: {
  7828. delete target_change_.add_target_;
  7829. break;
  7830. }
  7831. case kRemoveTarget: {
  7832. // No need to clear
  7833. break;
  7834. }
  7835. case TARGET_CHANGE_NOT_SET: {
  7836. break;
  7837. }
  7838. }
  7839. _oneof_case_[0] = TARGET_CHANGE_NOT_SET;
  7840. }
  7841. void ListenRequest::Clear() {
  7842. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.ListenRequest)
  7843. ::google::protobuf::uint32 cached_has_bits = 0;
  7844. // Prevent compiler warnings about cached_has_bits being unused
  7845. (void) cached_has_bits;
  7846. labels_.Clear();
  7847. database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  7848. clear_target_change();
  7849. _internal_metadata_.Clear();
  7850. }
  7851. bool ListenRequest::MergePartialFromCodedStream(
  7852. ::google::protobuf::io::CodedInputStream* input) {
  7853. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  7854. ::google::protobuf::uint32 tag;
  7855. // @@protoc_insertion_point(parse_start:google.firestore.v1.ListenRequest)
  7856. for (;;) {
  7857. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  7858. tag = p.first;
  7859. if (!p.second) goto handle_unusual;
  7860. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  7861. // string database = 1;
  7862. case 1: {
  7863. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7864. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  7865. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  7866. input, this->mutable_database()));
  7867. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7868. this->database().data(), static_cast<int>(this->database().length()),
  7869. ::google::protobuf::internal::WireFormatLite::PARSE,
  7870. "google.firestore.v1.ListenRequest.database"));
  7871. } else {
  7872. goto handle_unusual;
  7873. }
  7874. break;
  7875. }
  7876. // .google.firestore.v1.Target add_target = 2;
  7877. case 2: {
  7878. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7879. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  7880. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  7881. input, mutable_add_target()));
  7882. } else {
  7883. goto handle_unusual;
  7884. }
  7885. break;
  7886. }
  7887. // int32 remove_target = 3;
  7888. case 3: {
  7889. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7890. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  7891. clear_target_change();
  7892. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  7893. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  7894. input, &target_change_.remove_target_)));
  7895. set_has_remove_target();
  7896. } else {
  7897. goto handle_unusual;
  7898. }
  7899. break;
  7900. }
  7901. // map<string, string> labels = 4;
  7902. case 4: {
  7903. if (static_cast< ::google::protobuf::uint8>(tag) ==
  7904. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  7905. ListenRequest_LabelsEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  7906. ListenRequest_LabelsEntry_DoNotUse,
  7907. ::std::string, ::std::string,
  7908. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  7909. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  7910. 0 >,
  7911. ::google::protobuf::Map< ::std::string, ::std::string > > parser(&labels_);
  7912. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  7913. input, &parser));
  7914. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7915. parser.key().data(), static_cast<int>(parser.key().length()),
  7916. ::google::protobuf::internal::WireFormatLite::PARSE,
  7917. "google.firestore.v1.ListenRequest.LabelsEntry.key"));
  7918. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7919. parser.value().data(), static_cast<int>(parser.value().length()),
  7920. ::google::protobuf::internal::WireFormatLite::PARSE,
  7921. "google.firestore.v1.ListenRequest.LabelsEntry.value"));
  7922. } else {
  7923. goto handle_unusual;
  7924. }
  7925. break;
  7926. }
  7927. default: {
  7928. handle_unusual:
  7929. if (tag == 0) {
  7930. goto success;
  7931. }
  7932. DO_(::google::protobuf::internal::WireFormat::SkipField(
  7933. input, tag, _internal_metadata_.mutable_unknown_fields()));
  7934. break;
  7935. }
  7936. }
  7937. }
  7938. success:
  7939. // @@protoc_insertion_point(parse_success:google.firestore.v1.ListenRequest)
  7940. return true;
  7941. failure:
  7942. // @@protoc_insertion_point(parse_failure:google.firestore.v1.ListenRequest)
  7943. return false;
  7944. #undef DO_
  7945. }
  7946. void ListenRequest::SerializeWithCachedSizes(
  7947. ::google::protobuf::io::CodedOutputStream* output) const {
  7948. // @@protoc_insertion_point(serialize_start:google.firestore.v1.ListenRequest)
  7949. ::google::protobuf::uint32 cached_has_bits = 0;
  7950. (void) cached_has_bits;
  7951. // string database = 1;
  7952. if (this->database().size() > 0) {
  7953. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7954. this->database().data(), static_cast<int>(this->database().length()),
  7955. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7956. "google.firestore.v1.ListenRequest.database");
  7957. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  7958. 1, this->database(), output);
  7959. }
  7960. // .google.firestore.v1.Target add_target = 2;
  7961. if (has_add_target()) {
  7962. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  7963. 2, *target_change_.add_target_, output);
  7964. }
  7965. // int32 remove_target = 3;
  7966. if (has_remove_target()) {
  7967. ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->remove_target(), output);
  7968. }
  7969. // map<string, string> labels = 4;
  7970. if (!this->labels().empty()) {
  7971. typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
  7972. ConstPtr;
  7973. typedef ConstPtr SortItem;
  7974. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  7975. struct Utf8Check {
  7976. static void Check(ConstPtr p) {
  7977. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7978. p->first.data(), static_cast<int>(p->first.length()),
  7979. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7980. "google.firestore.v1.ListenRequest.LabelsEntry.key");
  7981. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  7982. p->second.data(), static_cast<int>(p->second.length()),
  7983. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  7984. "google.firestore.v1.ListenRequest.LabelsEntry.value");
  7985. }
  7986. };
  7987. if (output->IsSerializationDeterministic() &&
  7988. this->labels().size() > 1) {
  7989. ::google::protobuf::scoped_array<SortItem> items(
  7990. new SortItem[this->labels().size()]);
  7991. typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
  7992. size_type n = 0;
  7993. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  7994. it = this->labels().begin();
  7995. it != this->labels().end(); ++it, ++n) {
  7996. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  7997. }
  7998. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  7999. ::google::protobuf::scoped_ptr<ListenRequest_LabelsEntry_DoNotUse> entry;
  8000. for (size_type i = 0; i < n; i++) {
  8001. entry.reset(labels_.NewEntryWrapper(
  8002. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  8003. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  8004. 4, *entry, output);
  8005. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  8006. }
  8007. } else {
  8008. ::google::protobuf::scoped_ptr<ListenRequest_LabelsEntry_DoNotUse> entry;
  8009. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  8010. it = this->labels().begin();
  8011. it != this->labels().end(); ++it) {
  8012. entry.reset(labels_.NewEntryWrapper(
  8013. it->first, it->second));
  8014. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  8015. 4, *entry, output);
  8016. Utf8Check::Check(&*it);
  8017. }
  8018. }
  8019. }
  8020. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  8021. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  8022. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  8023. }
  8024. // @@protoc_insertion_point(serialize_end:google.firestore.v1.ListenRequest)
  8025. }
  8026. ::google::protobuf::uint8* ListenRequest::InternalSerializeWithCachedSizesToArray(
  8027. bool deterministic, ::google::protobuf::uint8* target) const {
  8028. (void)deterministic; // Unused
  8029. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ListenRequest)
  8030. ::google::protobuf::uint32 cached_has_bits = 0;
  8031. (void) cached_has_bits;
  8032. // string database = 1;
  8033. if (this->database().size() > 0) {
  8034. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  8035. this->database().data(), static_cast<int>(this->database().length()),
  8036. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  8037. "google.firestore.v1.ListenRequest.database");
  8038. target =
  8039. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  8040. 1, this->database(), target);
  8041. }
  8042. // .google.firestore.v1.Target add_target = 2;
  8043. if (has_add_target()) {
  8044. target = ::google::protobuf::internal::WireFormatLite::
  8045. InternalWriteMessageToArray(
  8046. 2, *target_change_.add_target_, deterministic, target);
  8047. }
  8048. // int32 remove_target = 3;
  8049. if (has_remove_target()) {
  8050. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->remove_target(), target);
  8051. }
  8052. // map<string, string> labels = 4;
  8053. if (!this->labels().empty()) {
  8054. typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
  8055. ConstPtr;
  8056. typedef ConstPtr SortItem;
  8057. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  8058. struct Utf8Check {
  8059. static void Check(ConstPtr p) {
  8060. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  8061. p->first.data(), static_cast<int>(p->first.length()),
  8062. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  8063. "google.firestore.v1.ListenRequest.LabelsEntry.key");
  8064. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  8065. p->second.data(), static_cast<int>(p->second.length()),
  8066. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  8067. "google.firestore.v1.ListenRequest.LabelsEntry.value");
  8068. }
  8069. };
  8070. if (deterministic &&
  8071. this->labels().size() > 1) {
  8072. ::google::protobuf::scoped_array<SortItem> items(
  8073. new SortItem[this->labels().size()]);
  8074. typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
  8075. size_type n = 0;
  8076. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  8077. it = this->labels().begin();
  8078. it != this->labels().end(); ++it, ++n) {
  8079. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  8080. }
  8081. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  8082. ::google::protobuf::scoped_ptr<ListenRequest_LabelsEntry_DoNotUse> entry;
  8083. for (size_type i = 0; i < n; i++) {
  8084. entry.reset(labels_.NewEntryWrapper(
  8085. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  8086. target = ::google::protobuf::internal::WireFormatLite::
  8087. InternalWriteMessageNoVirtualToArray(
  8088. 4, *entry, deterministic, target);
  8089. ;
  8090. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  8091. }
  8092. } else {
  8093. ::google::protobuf::scoped_ptr<ListenRequest_LabelsEntry_DoNotUse> entry;
  8094. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  8095. it = this->labels().begin();
  8096. it != this->labels().end(); ++it) {
  8097. entry.reset(labels_.NewEntryWrapper(
  8098. it->first, it->second));
  8099. target = ::google::protobuf::internal::WireFormatLite::
  8100. InternalWriteMessageNoVirtualToArray(
  8101. 4, *entry, deterministic, target);
  8102. ;
  8103. Utf8Check::Check(&*it);
  8104. }
  8105. }
  8106. }
  8107. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  8108. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  8109. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  8110. }
  8111. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ListenRequest)
  8112. return target;
  8113. }
  8114. size_t ListenRequest::ByteSizeLong() const {
  8115. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ListenRequest)
  8116. size_t total_size = 0;
  8117. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  8118. total_size +=
  8119. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  8120. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  8121. }
  8122. // map<string, string> labels = 4;
  8123. total_size += 1 *
  8124. ::google::protobuf::internal::FromIntSize(this->labels_size());
  8125. {
  8126. ::google::protobuf::scoped_ptr<ListenRequest_LabelsEntry_DoNotUse> entry;
  8127. for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
  8128. it = this->labels().begin();
  8129. it != this->labels().end(); ++it) {
  8130. entry.reset(labels_.NewEntryWrapper(it->first, it->second));
  8131. total_size += ::google::protobuf::internal::WireFormatLite::
  8132. MessageSizeNoVirtual(*entry);
  8133. }
  8134. }
  8135. // string database = 1;
  8136. if (this->database().size() > 0) {
  8137. total_size += 1 +
  8138. ::google::protobuf::internal::WireFormatLite::StringSize(
  8139. this->database());
  8140. }
  8141. switch (target_change_case()) {
  8142. // .google.firestore.v1.Target add_target = 2;
  8143. case kAddTarget: {
  8144. total_size += 1 +
  8145. ::google::protobuf::internal::WireFormatLite::MessageSize(
  8146. *target_change_.add_target_);
  8147. break;
  8148. }
  8149. // int32 remove_target = 3;
  8150. case kRemoveTarget: {
  8151. total_size += 1 +
  8152. ::google::protobuf::internal::WireFormatLite::Int32Size(
  8153. this->remove_target());
  8154. break;
  8155. }
  8156. case TARGET_CHANGE_NOT_SET: {
  8157. break;
  8158. }
  8159. }
  8160. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  8161. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  8162. _cached_size_ = cached_size;
  8163. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  8164. return total_size;
  8165. }
  8166. void ListenRequest::MergeFrom(const ::google::protobuf::Message& from) {
  8167. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ListenRequest)
  8168. GOOGLE_DCHECK_NE(&from, this);
  8169. const ListenRequest* source =
  8170. ::google::protobuf::internal::DynamicCastToGenerated<const ListenRequest>(
  8171. &from);
  8172. if (source == NULL) {
  8173. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ListenRequest)
  8174. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  8175. } else {
  8176. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ListenRequest)
  8177. MergeFrom(*source);
  8178. }
  8179. }
  8180. void ListenRequest::MergeFrom(const ListenRequest& from) {
  8181. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ListenRequest)
  8182. GOOGLE_DCHECK_NE(&from, this);
  8183. _internal_metadata_.MergeFrom(from._internal_metadata_);
  8184. ::google::protobuf::uint32 cached_has_bits = 0;
  8185. (void) cached_has_bits;
  8186. labels_.MergeFrom(from.labels_);
  8187. if (from.database().size() > 0) {
  8188. database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_);
  8189. }
  8190. switch (from.target_change_case()) {
  8191. case kAddTarget: {
  8192. mutable_add_target()->::google::firestore::v1::Target::MergeFrom(from.add_target());
  8193. break;
  8194. }
  8195. case kRemoveTarget: {
  8196. set_remove_target(from.remove_target());
  8197. break;
  8198. }
  8199. case TARGET_CHANGE_NOT_SET: {
  8200. break;
  8201. }
  8202. }
  8203. }
  8204. void ListenRequest::CopyFrom(const ::google::protobuf::Message& from) {
  8205. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ListenRequest)
  8206. if (&from == this) return;
  8207. Clear();
  8208. MergeFrom(from);
  8209. }
  8210. void ListenRequest::CopyFrom(const ListenRequest& from) {
  8211. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ListenRequest)
  8212. if (&from == this) return;
  8213. Clear();
  8214. MergeFrom(from);
  8215. }
  8216. bool ListenRequest::IsInitialized() const {
  8217. return true;
  8218. }
  8219. void ListenRequest::Swap(ListenRequest* other) {
  8220. if (other == this) return;
  8221. InternalSwap(other);
  8222. }
  8223. void ListenRequest::InternalSwap(ListenRequest* other) {
  8224. using std::swap;
  8225. labels_.Swap(&other->labels_);
  8226. database_.Swap(&other->database_);
  8227. swap(target_change_, other->target_change_);
  8228. swap(_oneof_case_[0], other->_oneof_case_[0]);
  8229. _internal_metadata_.Swap(&other->_internal_metadata_);
  8230. swap(_cached_size_, other->_cached_size_);
  8231. }
  8232. ::google::protobuf::Metadata ListenRequest::GetMetadata() const {
  8233. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  8234. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  8235. }
  8236. // ===================================================================
  8237. void ListenResponse::InitAsDefaultInstance() {
  8238. ::google::firestore::v1::_ListenResponse_default_instance_.target_change_ = const_cast< ::google::firestore::v1::TargetChange*>(
  8239. ::google::firestore::v1::TargetChange::internal_default_instance());
  8240. ::google::firestore::v1::_ListenResponse_default_instance_.document_change_ = const_cast< ::google::firestore::v1::DocumentChange*>(
  8241. ::google::firestore::v1::DocumentChange::internal_default_instance());
  8242. ::google::firestore::v1::_ListenResponse_default_instance_.document_delete_ = const_cast< ::google::firestore::v1::DocumentDelete*>(
  8243. ::google::firestore::v1::DocumentDelete::internal_default_instance());
  8244. ::google::firestore::v1::_ListenResponse_default_instance_.document_remove_ = const_cast< ::google::firestore::v1::DocumentRemove*>(
  8245. ::google::firestore::v1::DocumentRemove::internal_default_instance());
  8246. ::google::firestore::v1::_ListenResponse_default_instance_.filter_ = const_cast< ::google::firestore::v1::ExistenceFilter*>(
  8247. ::google::firestore::v1::ExistenceFilter::internal_default_instance());
  8248. }
  8249. void ListenResponse::set_allocated_target_change(::google::firestore::v1::TargetChange* target_change) {
  8250. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  8251. clear_response_type();
  8252. if (target_change) {
  8253. ::google::protobuf::Arena* submessage_arena = NULL;
  8254. if (message_arena != submessage_arena) {
  8255. target_change = ::google::protobuf::internal::GetOwnedMessage(
  8256. message_arena, target_change, submessage_arena);
  8257. }
  8258. set_has_target_change();
  8259. response_type_.target_change_ = target_change;
  8260. }
  8261. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListenResponse.target_change)
  8262. }
  8263. void ListenResponse::set_allocated_document_change(::google::firestore::v1::DocumentChange* document_change) {
  8264. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  8265. clear_response_type();
  8266. if (document_change) {
  8267. ::google::protobuf::Arena* submessage_arena = NULL;
  8268. if (message_arena != submessage_arena) {
  8269. document_change = ::google::protobuf::internal::GetOwnedMessage(
  8270. message_arena, document_change, submessage_arena);
  8271. }
  8272. set_has_document_change();
  8273. response_type_.document_change_ = document_change;
  8274. }
  8275. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListenResponse.document_change)
  8276. }
  8277. void ListenResponse::clear_document_change() {
  8278. if (has_document_change()) {
  8279. delete response_type_.document_change_;
  8280. clear_has_response_type();
  8281. }
  8282. }
  8283. void ListenResponse::set_allocated_document_delete(::google::firestore::v1::DocumentDelete* document_delete) {
  8284. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  8285. clear_response_type();
  8286. if (document_delete) {
  8287. ::google::protobuf::Arena* submessage_arena = NULL;
  8288. if (message_arena != submessage_arena) {
  8289. document_delete = ::google::protobuf::internal::GetOwnedMessage(
  8290. message_arena, document_delete, submessage_arena);
  8291. }
  8292. set_has_document_delete();
  8293. response_type_.document_delete_ = document_delete;
  8294. }
  8295. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListenResponse.document_delete)
  8296. }
  8297. void ListenResponse::clear_document_delete() {
  8298. if (has_document_delete()) {
  8299. delete response_type_.document_delete_;
  8300. clear_has_response_type();
  8301. }
  8302. }
  8303. void ListenResponse::set_allocated_document_remove(::google::firestore::v1::DocumentRemove* document_remove) {
  8304. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  8305. clear_response_type();
  8306. if (document_remove) {
  8307. ::google::protobuf::Arena* submessage_arena = NULL;
  8308. if (message_arena != submessage_arena) {
  8309. document_remove = ::google::protobuf::internal::GetOwnedMessage(
  8310. message_arena, document_remove, submessage_arena);
  8311. }
  8312. set_has_document_remove();
  8313. response_type_.document_remove_ = document_remove;
  8314. }
  8315. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListenResponse.document_remove)
  8316. }
  8317. void ListenResponse::clear_document_remove() {
  8318. if (has_document_remove()) {
  8319. delete response_type_.document_remove_;
  8320. clear_has_response_type();
  8321. }
  8322. }
  8323. void ListenResponse::set_allocated_filter(::google::firestore::v1::ExistenceFilter* filter) {
  8324. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  8325. clear_response_type();
  8326. if (filter) {
  8327. ::google::protobuf::Arena* submessage_arena = NULL;
  8328. if (message_arena != submessage_arena) {
  8329. filter = ::google::protobuf::internal::GetOwnedMessage(
  8330. message_arena, filter, submessage_arena);
  8331. }
  8332. set_has_filter();
  8333. response_type_.filter_ = filter;
  8334. }
  8335. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListenResponse.filter)
  8336. }
  8337. void ListenResponse::clear_filter() {
  8338. if (has_filter()) {
  8339. delete response_type_.filter_;
  8340. clear_has_response_type();
  8341. }
  8342. }
  8343. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  8344. const int ListenResponse::kTargetChangeFieldNumber;
  8345. const int ListenResponse::kDocumentChangeFieldNumber;
  8346. const int ListenResponse::kDocumentDeleteFieldNumber;
  8347. const int ListenResponse::kDocumentRemoveFieldNumber;
  8348. const int ListenResponse::kFilterFieldNumber;
  8349. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  8350. ListenResponse::ListenResponse()
  8351. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  8352. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  8353. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListenResponse();
  8354. }
  8355. SharedCtor();
  8356. // @@protoc_insertion_point(constructor:google.firestore.v1.ListenResponse)
  8357. }
  8358. ListenResponse::ListenResponse(const ListenResponse& from)
  8359. : ::google::protobuf::Message(),
  8360. _internal_metadata_(NULL),
  8361. _cached_size_(0) {
  8362. _internal_metadata_.MergeFrom(from._internal_metadata_);
  8363. clear_has_response_type();
  8364. switch (from.response_type_case()) {
  8365. case kTargetChange: {
  8366. mutable_target_change()->::google::firestore::v1::TargetChange::MergeFrom(from.target_change());
  8367. break;
  8368. }
  8369. case kDocumentChange: {
  8370. mutable_document_change()->::google::firestore::v1::DocumentChange::MergeFrom(from.document_change());
  8371. break;
  8372. }
  8373. case kDocumentDelete: {
  8374. mutable_document_delete()->::google::firestore::v1::DocumentDelete::MergeFrom(from.document_delete());
  8375. break;
  8376. }
  8377. case kDocumentRemove: {
  8378. mutable_document_remove()->::google::firestore::v1::DocumentRemove::MergeFrom(from.document_remove());
  8379. break;
  8380. }
  8381. case kFilter: {
  8382. mutable_filter()->::google::firestore::v1::ExistenceFilter::MergeFrom(from.filter());
  8383. break;
  8384. }
  8385. case RESPONSE_TYPE_NOT_SET: {
  8386. break;
  8387. }
  8388. }
  8389. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ListenResponse)
  8390. }
  8391. void ListenResponse::SharedCtor() {
  8392. clear_has_response_type();
  8393. _cached_size_ = 0;
  8394. }
  8395. ListenResponse::~ListenResponse() {
  8396. // @@protoc_insertion_point(destructor:google.firestore.v1.ListenResponse)
  8397. SharedDtor();
  8398. }
  8399. void ListenResponse::SharedDtor() {
  8400. if (has_response_type()) {
  8401. clear_response_type();
  8402. }
  8403. }
  8404. void ListenResponse::SetCachedSize(int size) const {
  8405. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  8406. _cached_size_ = size;
  8407. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  8408. }
  8409. const ::google::protobuf::Descriptor* ListenResponse::descriptor() {
  8410. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  8411. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  8412. }
  8413. const ListenResponse& ListenResponse::default_instance() {
  8414. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListenResponse();
  8415. return *internal_default_instance();
  8416. }
  8417. ListenResponse* ListenResponse::New(::google::protobuf::Arena* arena) const {
  8418. ListenResponse* n = new ListenResponse;
  8419. if (arena != NULL) {
  8420. arena->Own(n);
  8421. }
  8422. return n;
  8423. }
  8424. void ListenResponse::clear_response_type() {
  8425. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.ListenResponse)
  8426. switch (response_type_case()) {
  8427. case kTargetChange: {
  8428. delete response_type_.target_change_;
  8429. break;
  8430. }
  8431. case kDocumentChange: {
  8432. delete response_type_.document_change_;
  8433. break;
  8434. }
  8435. case kDocumentDelete: {
  8436. delete response_type_.document_delete_;
  8437. break;
  8438. }
  8439. case kDocumentRemove: {
  8440. delete response_type_.document_remove_;
  8441. break;
  8442. }
  8443. case kFilter: {
  8444. delete response_type_.filter_;
  8445. break;
  8446. }
  8447. case RESPONSE_TYPE_NOT_SET: {
  8448. break;
  8449. }
  8450. }
  8451. _oneof_case_[0] = RESPONSE_TYPE_NOT_SET;
  8452. }
  8453. void ListenResponse::Clear() {
  8454. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.ListenResponse)
  8455. ::google::protobuf::uint32 cached_has_bits = 0;
  8456. // Prevent compiler warnings about cached_has_bits being unused
  8457. (void) cached_has_bits;
  8458. clear_response_type();
  8459. _internal_metadata_.Clear();
  8460. }
  8461. bool ListenResponse::MergePartialFromCodedStream(
  8462. ::google::protobuf::io::CodedInputStream* input) {
  8463. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  8464. ::google::protobuf::uint32 tag;
  8465. // @@protoc_insertion_point(parse_start:google.firestore.v1.ListenResponse)
  8466. for (;;) {
  8467. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  8468. tag = p.first;
  8469. if (!p.second) goto handle_unusual;
  8470. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  8471. // .google.firestore.v1.TargetChange target_change = 2;
  8472. case 2: {
  8473. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8474. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  8475. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  8476. input, mutable_target_change()));
  8477. } else {
  8478. goto handle_unusual;
  8479. }
  8480. break;
  8481. }
  8482. // .google.firestore.v1.DocumentChange document_change = 3;
  8483. case 3: {
  8484. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8485. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  8486. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  8487. input, mutable_document_change()));
  8488. } else {
  8489. goto handle_unusual;
  8490. }
  8491. break;
  8492. }
  8493. // .google.firestore.v1.DocumentDelete document_delete = 4;
  8494. case 4: {
  8495. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8496. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  8497. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  8498. input, mutable_document_delete()));
  8499. } else {
  8500. goto handle_unusual;
  8501. }
  8502. break;
  8503. }
  8504. // .google.firestore.v1.ExistenceFilter filter = 5;
  8505. case 5: {
  8506. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8507. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  8508. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  8509. input, mutable_filter()));
  8510. } else {
  8511. goto handle_unusual;
  8512. }
  8513. break;
  8514. }
  8515. // .google.firestore.v1.DocumentRemove document_remove = 6;
  8516. case 6: {
  8517. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8518. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  8519. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  8520. input, mutable_document_remove()));
  8521. } else {
  8522. goto handle_unusual;
  8523. }
  8524. break;
  8525. }
  8526. default: {
  8527. handle_unusual:
  8528. if (tag == 0) {
  8529. goto success;
  8530. }
  8531. DO_(::google::protobuf::internal::WireFormat::SkipField(
  8532. input, tag, _internal_metadata_.mutable_unknown_fields()));
  8533. break;
  8534. }
  8535. }
  8536. }
  8537. success:
  8538. // @@protoc_insertion_point(parse_success:google.firestore.v1.ListenResponse)
  8539. return true;
  8540. failure:
  8541. // @@protoc_insertion_point(parse_failure:google.firestore.v1.ListenResponse)
  8542. return false;
  8543. #undef DO_
  8544. }
  8545. void ListenResponse::SerializeWithCachedSizes(
  8546. ::google::protobuf::io::CodedOutputStream* output) const {
  8547. // @@protoc_insertion_point(serialize_start:google.firestore.v1.ListenResponse)
  8548. ::google::protobuf::uint32 cached_has_bits = 0;
  8549. (void) cached_has_bits;
  8550. // .google.firestore.v1.TargetChange target_change = 2;
  8551. if (has_target_change()) {
  8552. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  8553. 2, *response_type_.target_change_, output);
  8554. }
  8555. // .google.firestore.v1.DocumentChange document_change = 3;
  8556. if (has_document_change()) {
  8557. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  8558. 3, *response_type_.document_change_, output);
  8559. }
  8560. // .google.firestore.v1.DocumentDelete document_delete = 4;
  8561. if (has_document_delete()) {
  8562. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  8563. 4, *response_type_.document_delete_, output);
  8564. }
  8565. // .google.firestore.v1.ExistenceFilter filter = 5;
  8566. if (has_filter()) {
  8567. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  8568. 5, *response_type_.filter_, output);
  8569. }
  8570. // .google.firestore.v1.DocumentRemove document_remove = 6;
  8571. if (has_document_remove()) {
  8572. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  8573. 6, *response_type_.document_remove_, output);
  8574. }
  8575. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  8576. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  8577. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  8578. }
  8579. // @@protoc_insertion_point(serialize_end:google.firestore.v1.ListenResponse)
  8580. }
  8581. ::google::protobuf::uint8* ListenResponse::InternalSerializeWithCachedSizesToArray(
  8582. bool deterministic, ::google::protobuf::uint8* target) const {
  8583. (void)deterministic; // Unused
  8584. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ListenResponse)
  8585. ::google::protobuf::uint32 cached_has_bits = 0;
  8586. (void) cached_has_bits;
  8587. // .google.firestore.v1.TargetChange target_change = 2;
  8588. if (has_target_change()) {
  8589. target = ::google::protobuf::internal::WireFormatLite::
  8590. InternalWriteMessageToArray(
  8591. 2, *response_type_.target_change_, deterministic, target);
  8592. }
  8593. // .google.firestore.v1.DocumentChange document_change = 3;
  8594. if (has_document_change()) {
  8595. target = ::google::protobuf::internal::WireFormatLite::
  8596. InternalWriteMessageToArray(
  8597. 3, *response_type_.document_change_, deterministic, target);
  8598. }
  8599. // .google.firestore.v1.DocumentDelete document_delete = 4;
  8600. if (has_document_delete()) {
  8601. target = ::google::protobuf::internal::WireFormatLite::
  8602. InternalWriteMessageToArray(
  8603. 4, *response_type_.document_delete_, deterministic, target);
  8604. }
  8605. // .google.firestore.v1.ExistenceFilter filter = 5;
  8606. if (has_filter()) {
  8607. target = ::google::protobuf::internal::WireFormatLite::
  8608. InternalWriteMessageToArray(
  8609. 5, *response_type_.filter_, deterministic, target);
  8610. }
  8611. // .google.firestore.v1.DocumentRemove document_remove = 6;
  8612. if (has_document_remove()) {
  8613. target = ::google::protobuf::internal::WireFormatLite::
  8614. InternalWriteMessageToArray(
  8615. 6, *response_type_.document_remove_, deterministic, target);
  8616. }
  8617. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  8618. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  8619. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  8620. }
  8621. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ListenResponse)
  8622. return target;
  8623. }
  8624. size_t ListenResponse::ByteSizeLong() const {
  8625. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ListenResponse)
  8626. size_t total_size = 0;
  8627. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  8628. total_size +=
  8629. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  8630. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  8631. }
  8632. switch (response_type_case()) {
  8633. // .google.firestore.v1.TargetChange target_change = 2;
  8634. case kTargetChange: {
  8635. total_size += 1 +
  8636. ::google::protobuf::internal::WireFormatLite::MessageSize(
  8637. *response_type_.target_change_);
  8638. break;
  8639. }
  8640. // .google.firestore.v1.DocumentChange document_change = 3;
  8641. case kDocumentChange: {
  8642. total_size += 1 +
  8643. ::google::protobuf::internal::WireFormatLite::MessageSize(
  8644. *response_type_.document_change_);
  8645. break;
  8646. }
  8647. // .google.firestore.v1.DocumentDelete document_delete = 4;
  8648. case kDocumentDelete: {
  8649. total_size += 1 +
  8650. ::google::protobuf::internal::WireFormatLite::MessageSize(
  8651. *response_type_.document_delete_);
  8652. break;
  8653. }
  8654. // .google.firestore.v1.DocumentRemove document_remove = 6;
  8655. case kDocumentRemove: {
  8656. total_size += 1 +
  8657. ::google::protobuf::internal::WireFormatLite::MessageSize(
  8658. *response_type_.document_remove_);
  8659. break;
  8660. }
  8661. // .google.firestore.v1.ExistenceFilter filter = 5;
  8662. case kFilter: {
  8663. total_size += 1 +
  8664. ::google::protobuf::internal::WireFormatLite::MessageSize(
  8665. *response_type_.filter_);
  8666. break;
  8667. }
  8668. case RESPONSE_TYPE_NOT_SET: {
  8669. break;
  8670. }
  8671. }
  8672. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  8673. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  8674. _cached_size_ = cached_size;
  8675. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  8676. return total_size;
  8677. }
  8678. void ListenResponse::MergeFrom(const ::google::protobuf::Message& from) {
  8679. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ListenResponse)
  8680. GOOGLE_DCHECK_NE(&from, this);
  8681. const ListenResponse* source =
  8682. ::google::protobuf::internal::DynamicCastToGenerated<const ListenResponse>(
  8683. &from);
  8684. if (source == NULL) {
  8685. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ListenResponse)
  8686. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  8687. } else {
  8688. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ListenResponse)
  8689. MergeFrom(*source);
  8690. }
  8691. }
  8692. void ListenResponse::MergeFrom(const ListenResponse& from) {
  8693. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ListenResponse)
  8694. GOOGLE_DCHECK_NE(&from, this);
  8695. _internal_metadata_.MergeFrom(from._internal_metadata_);
  8696. ::google::protobuf::uint32 cached_has_bits = 0;
  8697. (void) cached_has_bits;
  8698. switch (from.response_type_case()) {
  8699. case kTargetChange: {
  8700. mutable_target_change()->::google::firestore::v1::TargetChange::MergeFrom(from.target_change());
  8701. break;
  8702. }
  8703. case kDocumentChange: {
  8704. mutable_document_change()->::google::firestore::v1::DocumentChange::MergeFrom(from.document_change());
  8705. break;
  8706. }
  8707. case kDocumentDelete: {
  8708. mutable_document_delete()->::google::firestore::v1::DocumentDelete::MergeFrom(from.document_delete());
  8709. break;
  8710. }
  8711. case kDocumentRemove: {
  8712. mutable_document_remove()->::google::firestore::v1::DocumentRemove::MergeFrom(from.document_remove());
  8713. break;
  8714. }
  8715. case kFilter: {
  8716. mutable_filter()->::google::firestore::v1::ExistenceFilter::MergeFrom(from.filter());
  8717. break;
  8718. }
  8719. case RESPONSE_TYPE_NOT_SET: {
  8720. break;
  8721. }
  8722. }
  8723. }
  8724. void ListenResponse::CopyFrom(const ::google::protobuf::Message& from) {
  8725. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ListenResponse)
  8726. if (&from == this) return;
  8727. Clear();
  8728. MergeFrom(from);
  8729. }
  8730. void ListenResponse::CopyFrom(const ListenResponse& from) {
  8731. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ListenResponse)
  8732. if (&from == this) return;
  8733. Clear();
  8734. MergeFrom(from);
  8735. }
  8736. bool ListenResponse::IsInitialized() const {
  8737. return true;
  8738. }
  8739. void ListenResponse::Swap(ListenResponse* other) {
  8740. if (other == this) return;
  8741. InternalSwap(other);
  8742. }
  8743. void ListenResponse::InternalSwap(ListenResponse* other) {
  8744. using std::swap;
  8745. swap(response_type_, other->response_type_);
  8746. swap(_oneof_case_[0], other->_oneof_case_[0]);
  8747. _internal_metadata_.Swap(&other->_internal_metadata_);
  8748. swap(_cached_size_, other->_cached_size_);
  8749. }
  8750. ::google::protobuf::Metadata ListenResponse::GetMetadata() const {
  8751. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  8752. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  8753. }
  8754. // ===================================================================
  8755. void Target_DocumentsTarget::InitAsDefaultInstance() {
  8756. }
  8757. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  8758. const int Target_DocumentsTarget::kDocumentsFieldNumber;
  8759. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  8760. Target_DocumentsTarget::Target_DocumentsTarget()
  8761. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  8762. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  8763. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsTarget_DocumentsTarget();
  8764. }
  8765. SharedCtor();
  8766. // @@protoc_insertion_point(constructor:google.firestore.v1.Target.DocumentsTarget)
  8767. }
  8768. Target_DocumentsTarget::Target_DocumentsTarget(const Target_DocumentsTarget& from)
  8769. : ::google::protobuf::Message(),
  8770. _internal_metadata_(NULL),
  8771. documents_(from.documents_),
  8772. _cached_size_(0) {
  8773. _internal_metadata_.MergeFrom(from._internal_metadata_);
  8774. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.Target.DocumentsTarget)
  8775. }
  8776. void Target_DocumentsTarget::SharedCtor() {
  8777. _cached_size_ = 0;
  8778. }
  8779. Target_DocumentsTarget::~Target_DocumentsTarget() {
  8780. // @@protoc_insertion_point(destructor:google.firestore.v1.Target.DocumentsTarget)
  8781. SharedDtor();
  8782. }
  8783. void Target_DocumentsTarget::SharedDtor() {
  8784. }
  8785. void Target_DocumentsTarget::SetCachedSize(int size) const {
  8786. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  8787. _cached_size_ = size;
  8788. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  8789. }
  8790. const ::google::protobuf::Descriptor* Target_DocumentsTarget::descriptor() {
  8791. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  8792. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  8793. }
  8794. const Target_DocumentsTarget& Target_DocumentsTarget::default_instance() {
  8795. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsTarget_DocumentsTarget();
  8796. return *internal_default_instance();
  8797. }
  8798. Target_DocumentsTarget* Target_DocumentsTarget::New(::google::protobuf::Arena* arena) const {
  8799. Target_DocumentsTarget* n = new Target_DocumentsTarget;
  8800. if (arena != NULL) {
  8801. arena->Own(n);
  8802. }
  8803. return n;
  8804. }
  8805. void Target_DocumentsTarget::Clear() {
  8806. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.Target.DocumentsTarget)
  8807. ::google::protobuf::uint32 cached_has_bits = 0;
  8808. // Prevent compiler warnings about cached_has_bits being unused
  8809. (void) cached_has_bits;
  8810. documents_.Clear();
  8811. _internal_metadata_.Clear();
  8812. }
  8813. bool Target_DocumentsTarget::MergePartialFromCodedStream(
  8814. ::google::protobuf::io::CodedInputStream* input) {
  8815. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  8816. ::google::protobuf::uint32 tag;
  8817. // @@protoc_insertion_point(parse_start:google.firestore.v1.Target.DocumentsTarget)
  8818. for (;;) {
  8819. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  8820. tag = p.first;
  8821. if (!p.second) goto handle_unusual;
  8822. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  8823. // repeated string documents = 2;
  8824. case 2: {
  8825. if (static_cast< ::google::protobuf::uint8>(tag) ==
  8826. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  8827. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  8828. input, this->add_documents()));
  8829. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  8830. this->documents(this->documents_size() - 1).data(),
  8831. static_cast<int>(this->documents(this->documents_size() - 1).length()),
  8832. ::google::protobuf::internal::WireFormatLite::PARSE,
  8833. "google.firestore.v1.Target.DocumentsTarget.documents"));
  8834. } else {
  8835. goto handle_unusual;
  8836. }
  8837. break;
  8838. }
  8839. default: {
  8840. handle_unusual:
  8841. if (tag == 0) {
  8842. goto success;
  8843. }
  8844. DO_(::google::protobuf::internal::WireFormat::SkipField(
  8845. input, tag, _internal_metadata_.mutable_unknown_fields()));
  8846. break;
  8847. }
  8848. }
  8849. }
  8850. success:
  8851. // @@protoc_insertion_point(parse_success:google.firestore.v1.Target.DocumentsTarget)
  8852. return true;
  8853. failure:
  8854. // @@protoc_insertion_point(parse_failure:google.firestore.v1.Target.DocumentsTarget)
  8855. return false;
  8856. #undef DO_
  8857. }
  8858. void Target_DocumentsTarget::SerializeWithCachedSizes(
  8859. ::google::protobuf::io::CodedOutputStream* output) const {
  8860. // @@protoc_insertion_point(serialize_start:google.firestore.v1.Target.DocumentsTarget)
  8861. ::google::protobuf::uint32 cached_has_bits = 0;
  8862. (void) cached_has_bits;
  8863. // repeated string documents = 2;
  8864. for (int i = 0, n = this->documents_size(); i < n; i++) {
  8865. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  8866. this->documents(i).data(), static_cast<int>(this->documents(i).length()),
  8867. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  8868. "google.firestore.v1.Target.DocumentsTarget.documents");
  8869. ::google::protobuf::internal::WireFormatLite::WriteString(
  8870. 2, this->documents(i), output);
  8871. }
  8872. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  8873. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  8874. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  8875. }
  8876. // @@protoc_insertion_point(serialize_end:google.firestore.v1.Target.DocumentsTarget)
  8877. }
  8878. ::google::protobuf::uint8* Target_DocumentsTarget::InternalSerializeWithCachedSizesToArray(
  8879. bool deterministic, ::google::protobuf::uint8* target) const {
  8880. (void)deterministic; // Unused
  8881. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Target.DocumentsTarget)
  8882. ::google::protobuf::uint32 cached_has_bits = 0;
  8883. (void) cached_has_bits;
  8884. // repeated string documents = 2;
  8885. for (int i = 0, n = this->documents_size(); i < n; i++) {
  8886. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  8887. this->documents(i).data(), static_cast<int>(this->documents(i).length()),
  8888. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  8889. "google.firestore.v1.Target.DocumentsTarget.documents");
  8890. target = ::google::protobuf::internal::WireFormatLite::
  8891. WriteStringToArray(2, this->documents(i), target);
  8892. }
  8893. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  8894. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  8895. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  8896. }
  8897. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Target.DocumentsTarget)
  8898. return target;
  8899. }
  8900. size_t Target_DocumentsTarget::ByteSizeLong() const {
  8901. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Target.DocumentsTarget)
  8902. size_t total_size = 0;
  8903. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  8904. total_size +=
  8905. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  8906. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  8907. }
  8908. // repeated string documents = 2;
  8909. total_size += 1 *
  8910. ::google::protobuf::internal::FromIntSize(this->documents_size());
  8911. for (int i = 0, n = this->documents_size(); i < n; i++) {
  8912. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  8913. this->documents(i));
  8914. }
  8915. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  8916. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  8917. _cached_size_ = cached_size;
  8918. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  8919. return total_size;
  8920. }
  8921. void Target_DocumentsTarget::MergeFrom(const ::google::protobuf::Message& from) {
  8922. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.Target.DocumentsTarget)
  8923. GOOGLE_DCHECK_NE(&from, this);
  8924. const Target_DocumentsTarget* source =
  8925. ::google::protobuf::internal::DynamicCastToGenerated<const Target_DocumentsTarget>(
  8926. &from);
  8927. if (source == NULL) {
  8928. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.Target.DocumentsTarget)
  8929. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  8930. } else {
  8931. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.Target.DocumentsTarget)
  8932. MergeFrom(*source);
  8933. }
  8934. }
  8935. void Target_DocumentsTarget::MergeFrom(const Target_DocumentsTarget& from) {
  8936. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.Target.DocumentsTarget)
  8937. GOOGLE_DCHECK_NE(&from, this);
  8938. _internal_metadata_.MergeFrom(from._internal_metadata_);
  8939. ::google::protobuf::uint32 cached_has_bits = 0;
  8940. (void) cached_has_bits;
  8941. documents_.MergeFrom(from.documents_);
  8942. }
  8943. void Target_DocumentsTarget::CopyFrom(const ::google::protobuf::Message& from) {
  8944. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.Target.DocumentsTarget)
  8945. if (&from == this) return;
  8946. Clear();
  8947. MergeFrom(from);
  8948. }
  8949. void Target_DocumentsTarget::CopyFrom(const Target_DocumentsTarget& from) {
  8950. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.Target.DocumentsTarget)
  8951. if (&from == this) return;
  8952. Clear();
  8953. MergeFrom(from);
  8954. }
  8955. bool Target_DocumentsTarget::IsInitialized() const {
  8956. return true;
  8957. }
  8958. void Target_DocumentsTarget::Swap(Target_DocumentsTarget* other) {
  8959. if (other == this) return;
  8960. InternalSwap(other);
  8961. }
  8962. void Target_DocumentsTarget::InternalSwap(Target_DocumentsTarget* other) {
  8963. using std::swap;
  8964. documents_.InternalSwap(&other->documents_);
  8965. _internal_metadata_.Swap(&other->_internal_metadata_);
  8966. swap(_cached_size_, other->_cached_size_);
  8967. }
  8968. ::google::protobuf::Metadata Target_DocumentsTarget::GetMetadata() const {
  8969. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  8970. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  8971. }
  8972. // ===================================================================
  8973. void Target_QueryTarget::InitAsDefaultInstance() {
  8974. ::google::firestore::v1::_Target_QueryTarget_default_instance_.structured_query_ = const_cast< ::google::firestore::v1::StructuredQuery*>(
  8975. ::google::firestore::v1::StructuredQuery::internal_default_instance());
  8976. }
  8977. void Target_QueryTarget::set_allocated_structured_query(::google::firestore::v1::StructuredQuery* structured_query) {
  8978. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  8979. clear_query_type();
  8980. if (structured_query) {
  8981. ::google::protobuf::Arena* submessage_arena = NULL;
  8982. if (message_arena != submessage_arena) {
  8983. structured_query = ::google::protobuf::internal::GetOwnedMessage(
  8984. message_arena, structured_query, submessage_arena);
  8985. }
  8986. set_has_structured_query();
  8987. query_type_.structured_query_ = structured_query;
  8988. }
  8989. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Target.QueryTarget.structured_query)
  8990. }
  8991. void Target_QueryTarget::clear_structured_query() {
  8992. if (has_structured_query()) {
  8993. delete query_type_.structured_query_;
  8994. clear_has_query_type();
  8995. }
  8996. }
  8997. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  8998. const int Target_QueryTarget::kParentFieldNumber;
  8999. const int Target_QueryTarget::kStructuredQueryFieldNumber;
  9000. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  9001. Target_QueryTarget::Target_QueryTarget()
  9002. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  9003. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  9004. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsTarget_QueryTarget();
  9005. }
  9006. SharedCtor();
  9007. // @@protoc_insertion_point(constructor:google.firestore.v1.Target.QueryTarget)
  9008. }
  9009. Target_QueryTarget::Target_QueryTarget(const Target_QueryTarget& from)
  9010. : ::google::protobuf::Message(),
  9011. _internal_metadata_(NULL),
  9012. _cached_size_(0) {
  9013. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9014. parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  9015. if (from.parent().size() > 0) {
  9016. parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  9017. }
  9018. clear_has_query_type();
  9019. switch (from.query_type_case()) {
  9020. case kStructuredQuery: {
  9021. mutable_structured_query()->::google::firestore::v1::StructuredQuery::MergeFrom(from.structured_query());
  9022. break;
  9023. }
  9024. case QUERY_TYPE_NOT_SET: {
  9025. break;
  9026. }
  9027. }
  9028. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.Target.QueryTarget)
  9029. }
  9030. void Target_QueryTarget::SharedCtor() {
  9031. parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  9032. clear_has_query_type();
  9033. _cached_size_ = 0;
  9034. }
  9035. Target_QueryTarget::~Target_QueryTarget() {
  9036. // @@protoc_insertion_point(destructor:google.firestore.v1.Target.QueryTarget)
  9037. SharedDtor();
  9038. }
  9039. void Target_QueryTarget::SharedDtor() {
  9040. parent_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  9041. if (has_query_type()) {
  9042. clear_query_type();
  9043. }
  9044. }
  9045. void Target_QueryTarget::SetCachedSize(int size) const {
  9046. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  9047. _cached_size_ = size;
  9048. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  9049. }
  9050. const ::google::protobuf::Descriptor* Target_QueryTarget::descriptor() {
  9051. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  9052. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  9053. }
  9054. const Target_QueryTarget& Target_QueryTarget::default_instance() {
  9055. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsTarget_QueryTarget();
  9056. return *internal_default_instance();
  9057. }
  9058. Target_QueryTarget* Target_QueryTarget::New(::google::protobuf::Arena* arena) const {
  9059. Target_QueryTarget* n = new Target_QueryTarget;
  9060. if (arena != NULL) {
  9061. arena->Own(n);
  9062. }
  9063. return n;
  9064. }
  9065. void Target_QueryTarget::clear_query_type() {
  9066. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.Target.QueryTarget)
  9067. switch (query_type_case()) {
  9068. case kStructuredQuery: {
  9069. delete query_type_.structured_query_;
  9070. break;
  9071. }
  9072. case QUERY_TYPE_NOT_SET: {
  9073. break;
  9074. }
  9075. }
  9076. _oneof_case_[0] = QUERY_TYPE_NOT_SET;
  9077. }
  9078. void Target_QueryTarget::Clear() {
  9079. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.Target.QueryTarget)
  9080. ::google::protobuf::uint32 cached_has_bits = 0;
  9081. // Prevent compiler warnings about cached_has_bits being unused
  9082. (void) cached_has_bits;
  9083. parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  9084. clear_query_type();
  9085. _internal_metadata_.Clear();
  9086. }
  9087. bool Target_QueryTarget::MergePartialFromCodedStream(
  9088. ::google::protobuf::io::CodedInputStream* input) {
  9089. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  9090. ::google::protobuf::uint32 tag;
  9091. // @@protoc_insertion_point(parse_start:google.firestore.v1.Target.QueryTarget)
  9092. for (;;) {
  9093. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  9094. tag = p.first;
  9095. if (!p.second) goto handle_unusual;
  9096. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  9097. // string parent = 1;
  9098. case 1: {
  9099. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9100. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  9101. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  9102. input, this->mutable_parent()));
  9103. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  9104. this->parent().data(), static_cast<int>(this->parent().length()),
  9105. ::google::protobuf::internal::WireFormatLite::PARSE,
  9106. "google.firestore.v1.Target.QueryTarget.parent"));
  9107. } else {
  9108. goto handle_unusual;
  9109. }
  9110. break;
  9111. }
  9112. // .google.firestore.v1.StructuredQuery structured_query = 2;
  9113. case 2: {
  9114. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9115. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  9116. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  9117. input, mutable_structured_query()));
  9118. } else {
  9119. goto handle_unusual;
  9120. }
  9121. break;
  9122. }
  9123. default: {
  9124. handle_unusual:
  9125. if (tag == 0) {
  9126. goto success;
  9127. }
  9128. DO_(::google::protobuf::internal::WireFormat::SkipField(
  9129. input, tag, _internal_metadata_.mutable_unknown_fields()));
  9130. break;
  9131. }
  9132. }
  9133. }
  9134. success:
  9135. // @@protoc_insertion_point(parse_success:google.firestore.v1.Target.QueryTarget)
  9136. return true;
  9137. failure:
  9138. // @@protoc_insertion_point(parse_failure:google.firestore.v1.Target.QueryTarget)
  9139. return false;
  9140. #undef DO_
  9141. }
  9142. void Target_QueryTarget::SerializeWithCachedSizes(
  9143. ::google::protobuf::io::CodedOutputStream* output) const {
  9144. // @@protoc_insertion_point(serialize_start:google.firestore.v1.Target.QueryTarget)
  9145. ::google::protobuf::uint32 cached_has_bits = 0;
  9146. (void) cached_has_bits;
  9147. // string parent = 1;
  9148. if (this->parent().size() > 0) {
  9149. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  9150. this->parent().data(), static_cast<int>(this->parent().length()),
  9151. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  9152. "google.firestore.v1.Target.QueryTarget.parent");
  9153. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  9154. 1, this->parent(), output);
  9155. }
  9156. // .google.firestore.v1.StructuredQuery structured_query = 2;
  9157. if (has_structured_query()) {
  9158. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  9159. 2, *query_type_.structured_query_, output);
  9160. }
  9161. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  9162. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  9163. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  9164. }
  9165. // @@protoc_insertion_point(serialize_end:google.firestore.v1.Target.QueryTarget)
  9166. }
  9167. ::google::protobuf::uint8* Target_QueryTarget::InternalSerializeWithCachedSizesToArray(
  9168. bool deterministic, ::google::protobuf::uint8* target) const {
  9169. (void)deterministic; // Unused
  9170. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Target.QueryTarget)
  9171. ::google::protobuf::uint32 cached_has_bits = 0;
  9172. (void) cached_has_bits;
  9173. // string parent = 1;
  9174. if (this->parent().size() > 0) {
  9175. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  9176. this->parent().data(), static_cast<int>(this->parent().length()),
  9177. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  9178. "google.firestore.v1.Target.QueryTarget.parent");
  9179. target =
  9180. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  9181. 1, this->parent(), target);
  9182. }
  9183. // .google.firestore.v1.StructuredQuery structured_query = 2;
  9184. if (has_structured_query()) {
  9185. target = ::google::protobuf::internal::WireFormatLite::
  9186. InternalWriteMessageToArray(
  9187. 2, *query_type_.structured_query_, deterministic, target);
  9188. }
  9189. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  9190. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  9191. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  9192. }
  9193. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Target.QueryTarget)
  9194. return target;
  9195. }
  9196. size_t Target_QueryTarget::ByteSizeLong() const {
  9197. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Target.QueryTarget)
  9198. size_t total_size = 0;
  9199. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  9200. total_size +=
  9201. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  9202. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  9203. }
  9204. // string parent = 1;
  9205. if (this->parent().size() > 0) {
  9206. total_size += 1 +
  9207. ::google::protobuf::internal::WireFormatLite::StringSize(
  9208. this->parent());
  9209. }
  9210. switch (query_type_case()) {
  9211. // .google.firestore.v1.StructuredQuery structured_query = 2;
  9212. case kStructuredQuery: {
  9213. total_size += 1 +
  9214. ::google::protobuf::internal::WireFormatLite::MessageSize(
  9215. *query_type_.structured_query_);
  9216. break;
  9217. }
  9218. case QUERY_TYPE_NOT_SET: {
  9219. break;
  9220. }
  9221. }
  9222. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  9223. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  9224. _cached_size_ = cached_size;
  9225. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  9226. return total_size;
  9227. }
  9228. void Target_QueryTarget::MergeFrom(const ::google::protobuf::Message& from) {
  9229. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.Target.QueryTarget)
  9230. GOOGLE_DCHECK_NE(&from, this);
  9231. const Target_QueryTarget* source =
  9232. ::google::protobuf::internal::DynamicCastToGenerated<const Target_QueryTarget>(
  9233. &from);
  9234. if (source == NULL) {
  9235. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.Target.QueryTarget)
  9236. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  9237. } else {
  9238. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.Target.QueryTarget)
  9239. MergeFrom(*source);
  9240. }
  9241. }
  9242. void Target_QueryTarget::MergeFrom(const Target_QueryTarget& from) {
  9243. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.Target.QueryTarget)
  9244. GOOGLE_DCHECK_NE(&from, this);
  9245. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9246. ::google::protobuf::uint32 cached_has_bits = 0;
  9247. (void) cached_has_bits;
  9248. if (from.parent().size() > 0) {
  9249. parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  9250. }
  9251. switch (from.query_type_case()) {
  9252. case kStructuredQuery: {
  9253. mutable_structured_query()->::google::firestore::v1::StructuredQuery::MergeFrom(from.structured_query());
  9254. break;
  9255. }
  9256. case QUERY_TYPE_NOT_SET: {
  9257. break;
  9258. }
  9259. }
  9260. }
  9261. void Target_QueryTarget::CopyFrom(const ::google::protobuf::Message& from) {
  9262. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.Target.QueryTarget)
  9263. if (&from == this) return;
  9264. Clear();
  9265. MergeFrom(from);
  9266. }
  9267. void Target_QueryTarget::CopyFrom(const Target_QueryTarget& from) {
  9268. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.Target.QueryTarget)
  9269. if (&from == this) return;
  9270. Clear();
  9271. MergeFrom(from);
  9272. }
  9273. bool Target_QueryTarget::IsInitialized() const {
  9274. return true;
  9275. }
  9276. void Target_QueryTarget::Swap(Target_QueryTarget* other) {
  9277. if (other == this) return;
  9278. InternalSwap(other);
  9279. }
  9280. void Target_QueryTarget::InternalSwap(Target_QueryTarget* other) {
  9281. using std::swap;
  9282. parent_.Swap(&other->parent_);
  9283. swap(query_type_, other->query_type_);
  9284. swap(_oneof_case_[0], other->_oneof_case_[0]);
  9285. _internal_metadata_.Swap(&other->_internal_metadata_);
  9286. swap(_cached_size_, other->_cached_size_);
  9287. }
  9288. ::google::protobuf::Metadata Target_QueryTarget::GetMetadata() const {
  9289. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  9290. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  9291. }
  9292. // ===================================================================
  9293. void Target::InitAsDefaultInstance() {
  9294. ::google::firestore::v1::_Target_default_instance_.query_ = const_cast< ::google::firestore::v1::Target_QueryTarget*>(
  9295. ::google::firestore::v1::Target_QueryTarget::internal_default_instance());
  9296. ::google::firestore::v1::_Target_default_instance_.documents_ = const_cast< ::google::firestore::v1::Target_DocumentsTarget*>(
  9297. ::google::firestore::v1::Target_DocumentsTarget::internal_default_instance());
  9298. ::google::firestore::v1::_Target_default_instance_.resume_token_.UnsafeSetDefault(
  9299. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  9300. ::google::firestore::v1::_Target_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>(
  9301. ::google::protobuf::Timestamp::internal_default_instance());
  9302. }
  9303. void Target::set_allocated_query(::google::firestore::v1::Target_QueryTarget* query) {
  9304. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  9305. clear_target_type();
  9306. if (query) {
  9307. ::google::protobuf::Arena* submessage_arena = NULL;
  9308. if (message_arena != submessage_arena) {
  9309. query = ::google::protobuf::internal::GetOwnedMessage(
  9310. message_arena, query, submessage_arena);
  9311. }
  9312. set_has_query();
  9313. target_type_.query_ = query;
  9314. }
  9315. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Target.query)
  9316. }
  9317. void Target::set_allocated_documents(::google::firestore::v1::Target_DocumentsTarget* documents) {
  9318. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  9319. clear_target_type();
  9320. if (documents) {
  9321. ::google::protobuf::Arena* submessage_arena = NULL;
  9322. if (message_arena != submessage_arena) {
  9323. documents = ::google::protobuf::internal::GetOwnedMessage(
  9324. message_arena, documents, submessage_arena);
  9325. }
  9326. set_has_documents();
  9327. target_type_.documents_ = documents;
  9328. }
  9329. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Target.documents)
  9330. }
  9331. void Target::set_allocated_read_time(::google::protobuf::Timestamp* read_time) {
  9332. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  9333. clear_resume_type();
  9334. if (read_time) {
  9335. ::google::protobuf::Arena* submessage_arena =
  9336. reinterpret_cast< ::google::protobuf::MessageLite*>(read_time)->GetArena();
  9337. if (message_arena != submessage_arena) {
  9338. read_time = ::google::protobuf::internal::GetOwnedMessage(
  9339. message_arena, read_time, submessage_arena);
  9340. }
  9341. set_has_read_time();
  9342. resume_type_.read_time_ = read_time;
  9343. }
  9344. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Target.read_time)
  9345. }
  9346. void Target::clear_read_time() {
  9347. if (has_read_time()) {
  9348. delete resume_type_.read_time_;
  9349. clear_has_resume_type();
  9350. }
  9351. }
  9352. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  9353. const int Target::kQueryFieldNumber;
  9354. const int Target::kDocumentsFieldNumber;
  9355. const int Target::kResumeTokenFieldNumber;
  9356. const int Target::kReadTimeFieldNumber;
  9357. const int Target::kTargetIdFieldNumber;
  9358. const int Target::kOnceFieldNumber;
  9359. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  9360. Target::Target()
  9361. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  9362. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  9363. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsTarget();
  9364. }
  9365. SharedCtor();
  9366. // @@protoc_insertion_point(constructor:google.firestore.v1.Target)
  9367. }
  9368. Target::Target(const Target& from)
  9369. : ::google::protobuf::Message(),
  9370. _internal_metadata_(NULL),
  9371. _cached_size_(0) {
  9372. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9373. ::memcpy(&target_id_, &from.target_id_,
  9374. static_cast<size_t>(reinterpret_cast<char*>(&once_) -
  9375. reinterpret_cast<char*>(&target_id_)) + sizeof(once_));
  9376. clear_has_target_type();
  9377. switch (from.target_type_case()) {
  9378. case kQuery: {
  9379. mutable_query()->::google::firestore::v1::Target_QueryTarget::MergeFrom(from.query());
  9380. break;
  9381. }
  9382. case kDocuments: {
  9383. mutable_documents()->::google::firestore::v1::Target_DocumentsTarget::MergeFrom(from.documents());
  9384. break;
  9385. }
  9386. case TARGET_TYPE_NOT_SET: {
  9387. break;
  9388. }
  9389. }
  9390. clear_has_resume_type();
  9391. switch (from.resume_type_case()) {
  9392. case kResumeToken: {
  9393. set_resume_token(from.resume_token());
  9394. break;
  9395. }
  9396. case kReadTime: {
  9397. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  9398. break;
  9399. }
  9400. case RESUME_TYPE_NOT_SET: {
  9401. break;
  9402. }
  9403. }
  9404. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.Target)
  9405. }
  9406. void Target::SharedCtor() {
  9407. ::memset(&target_id_, 0, static_cast<size_t>(
  9408. reinterpret_cast<char*>(&once_) -
  9409. reinterpret_cast<char*>(&target_id_)) + sizeof(once_));
  9410. clear_has_target_type();
  9411. clear_has_resume_type();
  9412. _cached_size_ = 0;
  9413. }
  9414. Target::~Target() {
  9415. // @@protoc_insertion_point(destructor:google.firestore.v1.Target)
  9416. SharedDtor();
  9417. }
  9418. void Target::SharedDtor() {
  9419. if (has_target_type()) {
  9420. clear_target_type();
  9421. }
  9422. if (has_resume_type()) {
  9423. clear_resume_type();
  9424. }
  9425. }
  9426. void Target::SetCachedSize(int size) const {
  9427. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  9428. _cached_size_ = size;
  9429. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  9430. }
  9431. const ::google::protobuf::Descriptor* Target::descriptor() {
  9432. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  9433. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  9434. }
  9435. const Target& Target::default_instance() {
  9436. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsTarget();
  9437. return *internal_default_instance();
  9438. }
  9439. Target* Target::New(::google::protobuf::Arena* arena) const {
  9440. Target* n = new Target;
  9441. if (arena != NULL) {
  9442. arena->Own(n);
  9443. }
  9444. return n;
  9445. }
  9446. void Target::clear_target_type() {
  9447. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.Target)
  9448. switch (target_type_case()) {
  9449. case kQuery: {
  9450. delete target_type_.query_;
  9451. break;
  9452. }
  9453. case kDocuments: {
  9454. delete target_type_.documents_;
  9455. break;
  9456. }
  9457. case TARGET_TYPE_NOT_SET: {
  9458. break;
  9459. }
  9460. }
  9461. _oneof_case_[0] = TARGET_TYPE_NOT_SET;
  9462. }
  9463. void Target::clear_resume_type() {
  9464. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.Target)
  9465. switch (resume_type_case()) {
  9466. case kResumeToken: {
  9467. resume_type_.resume_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  9468. break;
  9469. }
  9470. case kReadTime: {
  9471. delete resume_type_.read_time_;
  9472. break;
  9473. }
  9474. case RESUME_TYPE_NOT_SET: {
  9475. break;
  9476. }
  9477. }
  9478. _oneof_case_[1] = RESUME_TYPE_NOT_SET;
  9479. }
  9480. void Target::Clear() {
  9481. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.Target)
  9482. ::google::protobuf::uint32 cached_has_bits = 0;
  9483. // Prevent compiler warnings about cached_has_bits being unused
  9484. (void) cached_has_bits;
  9485. ::memset(&target_id_, 0, static_cast<size_t>(
  9486. reinterpret_cast<char*>(&once_) -
  9487. reinterpret_cast<char*>(&target_id_)) + sizeof(once_));
  9488. clear_target_type();
  9489. clear_resume_type();
  9490. _internal_metadata_.Clear();
  9491. }
  9492. bool Target::MergePartialFromCodedStream(
  9493. ::google::protobuf::io::CodedInputStream* input) {
  9494. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  9495. ::google::protobuf::uint32 tag;
  9496. // @@protoc_insertion_point(parse_start:google.firestore.v1.Target)
  9497. for (;;) {
  9498. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  9499. tag = p.first;
  9500. if (!p.second) goto handle_unusual;
  9501. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  9502. // .google.firestore.v1.Target.QueryTarget query = 2;
  9503. case 2: {
  9504. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9505. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  9506. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  9507. input, mutable_query()));
  9508. } else {
  9509. goto handle_unusual;
  9510. }
  9511. break;
  9512. }
  9513. // .google.firestore.v1.Target.DocumentsTarget documents = 3;
  9514. case 3: {
  9515. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9516. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  9517. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  9518. input, mutable_documents()));
  9519. } else {
  9520. goto handle_unusual;
  9521. }
  9522. break;
  9523. }
  9524. // bytes resume_token = 4;
  9525. case 4: {
  9526. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9527. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  9528. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  9529. input, this->mutable_resume_token()));
  9530. } else {
  9531. goto handle_unusual;
  9532. }
  9533. break;
  9534. }
  9535. // int32 target_id = 5;
  9536. case 5: {
  9537. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9538. static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
  9539. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  9540. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  9541. input, &target_id_)));
  9542. } else {
  9543. goto handle_unusual;
  9544. }
  9545. break;
  9546. }
  9547. // bool once = 6;
  9548. case 6: {
  9549. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9550. static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
  9551. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  9552. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  9553. input, &once_)));
  9554. } else {
  9555. goto handle_unusual;
  9556. }
  9557. break;
  9558. }
  9559. // .google.protobuf.Timestamp read_time = 11;
  9560. case 11: {
  9561. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9562. static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
  9563. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  9564. input, mutable_read_time()));
  9565. } else {
  9566. goto handle_unusual;
  9567. }
  9568. break;
  9569. }
  9570. default: {
  9571. handle_unusual:
  9572. if (tag == 0) {
  9573. goto success;
  9574. }
  9575. DO_(::google::protobuf::internal::WireFormat::SkipField(
  9576. input, tag, _internal_metadata_.mutable_unknown_fields()));
  9577. break;
  9578. }
  9579. }
  9580. }
  9581. success:
  9582. // @@protoc_insertion_point(parse_success:google.firestore.v1.Target)
  9583. return true;
  9584. failure:
  9585. // @@protoc_insertion_point(parse_failure:google.firestore.v1.Target)
  9586. return false;
  9587. #undef DO_
  9588. }
  9589. void Target::SerializeWithCachedSizes(
  9590. ::google::protobuf::io::CodedOutputStream* output) const {
  9591. // @@protoc_insertion_point(serialize_start:google.firestore.v1.Target)
  9592. ::google::protobuf::uint32 cached_has_bits = 0;
  9593. (void) cached_has_bits;
  9594. // .google.firestore.v1.Target.QueryTarget query = 2;
  9595. if (has_query()) {
  9596. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  9597. 2, *target_type_.query_, output);
  9598. }
  9599. // .google.firestore.v1.Target.DocumentsTarget documents = 3;
  9600. if (has_documents()) {
  9601. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  9602. 3, *target_type_.documents_, output);
  9603. }
  9604. // bytes resume_token = 4;
  9605. if (has_resume_token()) {
  9606. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  9607. 4, this->resume_token(), output);
  9608. }
  9609. // int32 target_id = 5;
  9610. if (this->target_id() != 0) {
  9611. ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->target_id(), output);
  9612. }
  9613. // bool once = 6;
  9614. if (this->once() != 0) {
  9615. ::google::protobuf::internal::WireFormatLite::WriteBool(6, this->once(), output);
  9616. }
  9617. // .google.protobuf.Timestamp read_time = 11;
  9618. if (has_read_time()) {
  9619. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  9620. 11, *resume_type_.read_time_, output);
  9621. }
  9622. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  9623. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  9624. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  9625. }
  9626. // @@protoc_insertion_point(serialize_end:google.firestore.v1.Target)
  9627. }
  9628. ::google::protobuf::uint8* Target::InternalSerializeWithCachedSizesToArray(
  9629. bool deterministic, ::google::protobuf::uint8* target) const {
  9630. (void)deterministic; // Unused
  9631. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Target)
  9632. ::google::protobuf::uint32 cached_has_bits = 0;
  9633. (void) cached_has_bits;
  9634. // .google.firestore.v1.Target.QueryTarget query = 2;
  9635. if (has_query()) {
  9636. target = ::google::protobuf::internal::WireFormatLite::
  9637. InternalWriteMessageToArray(
  9638. 2, *target_type_.query_, deterministic, target);
  9639. }
  9640. // .google.firestore.v1.Target.DocumentsTarget documents = 3;
  9641. if (has_documents()) {
  9642. target = ::google::protobuf::internal::WireFormatLite::
  9643. InternalWriteMessageToArray(
  9644. 3, *target_type_.documents_, deterministic, target);
  9645. }
  9646. // bytes resume_token = 4;
  9647. if (has_resume_token()) {
  9648. target =
  9649. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  9650. 4, this->resume_token(), target);
  9651. }
  9652. // int32 target_id = 5;
  9653. if (this->target_id() != 0) {
  9654. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->target_id(), target);
  9655. }
  9656. // bool once = 6;
  9657. if (this->once() != 0) {
  9658. target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(6, this->once(), target);
  9659. }
  9660. // .google.protobuf.Timestamp read_time = 11;
  9661. if (has_read_time()) {
  9662. target = ::google::protobuf::internal::WireFormatLite::
  9663. InternalWriteMessageToArray(
  9664. 11, *resume_type_.read_time_, deterministic, target);
  9665. }
  9666. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  9667. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  9668. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  9669. }
  9670. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Target)
  9671. return target;
  9672. }
  9673. size_t Target::ByteSizeLong() const {
  9674. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Target)
  9675. size_t total_size = 0;
  9676. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  9677. total_size +=
  9678. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  9679. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  9680. }
  9681. // int32 target_id = 5;
  9682. if (this->target_id() != 0) {
  9683. total_size += 1 +
  9684. ::google::protobuf::internal::WireFormatLite::Int32Size(
  9685. this->target_id());
  9686. }
  9687. // bool once = 6;
  9688. if (this->once() != 0) {
  9689. total_size += 1 + 1;
  9690. }
  9691. switch (target_type_case()) {
  9692. // .google.firestore.v1.Target.QueryTarget query = 2;
  9693. case kQuery: {
  9694. total_size += 1 +
  9695. ::google::protobuf::internal::WireFormatLite::MessageSize(
  9696. *target_type_.query_);
  9697. break;
  9698. }
  9699. // .google.firestore.v1.Target.DocumentsTarget documents = 3;
  9700. case kDocuments: {
  9701. total_size += 1 +
  9702. ::google::protobuf::internal::WireFormatLite::MessageSize(
  9703. *target_type_.documents_);
  9704. break;
  9705. }
  9706. case TARGET_TYPE_NOT_SET: {
  9707. break;
  9708. }
  9709. }
  9710. switch (resume_type_case()) {
  9711. // bytes resume_token = 4;
  9712. case kResumeToken: {
  9713. total_size += 1 +
  9714. ::google::protobuf::internal::WireFormatLite::BytesSize(
  9715. this->resume_token());
  9716. break;
  9717. }
  9718. // .google.protobuf.Timestamp read_time = 11;
  9719. case kReadTime: {
  9720. total_size += 1 +
  9721. ::google::protobuf::internal::WireFormatLite::MessageSize(
  9722. *resume_type_.read_time_);
  9723. break;
  9724. }
  9725. case RESUME_TYPE_NOT_SET: {
  9726. break;
  9727. }
  9728. }
  9729. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  9730. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  9731. _cached_size_ = cached_size;
  9732. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  9733. return total_size;
  9734. }
  9735. void Target::MergeFrom(const ::google::protobuf::Message& from) {
  9736. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.Target)
  9737. GOOGLE_DCHECK_NE(&from, this);
  9738. const Target* source =
  9739. ::google::protobuf::internal::DynamicCastToGenerated<const Target>(
  9740. &from);
  9741. if (source == NULL) {
  9742. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.Target)
  9743. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  9744. } else {
  9745. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.Target)
  9746. MergeFrom(*source);
  9747. }
  9748. }
  9749. void Target::MergeFrom(const Target& from) {
  9750. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.Target)
  9751. GOOGLE_DCHECK_NE(&from, this);
  9752. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9753. ::google::protobuf::uint32 cached_has_bits = 0;
  9754. (void) cached_has_bits;
  9755. if (from.target_id() != 0) {
  9756. set_target_id(from.target_id());
  9757. }
  9758. if (from.once() != 0) {
  9759. set_once(from.once());
  9760. }
  9761. switch (from.target_type_case()) {
  9762. case kQuery: {
  9763. mutable_query()->::google::firestore::v1::Target_QueryTarget::MergeFrom(from.query());
  9764. break;
  9765. }
  9766. case kDocuments: {
  9767. mutable_documents()->::google::firestore::v1::Target_DocumentsTarget::MergeFrom(from.documents());
  9768. break;
  9769. }
  9770. case TARGET_TYPE_NOT_SET: {
  9771. break;
  9772. }
  9773. }
  9774. switch (from.resume_type_case()) {
  9775. case kResumeToken: {
  9776. set_resume_token(from.resume_token());
  9777. break;
  9778. }
  9779. case kReadTime: {
  9780. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  9781. break;
  9782. }
  9783. case RESUME_TYPE_NOT_SET: {
  9784. break;
  9785. }
  9786. }
  9787. }
  9788. void Target::CopyFrom(const ::google::protobuf::Message& from) {
  9789. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.Target)
  9790. if (&from == this) return;
  9791. Clear();
  9792. MergeFrom(from);
  9793. }
  9794. void Target::CopyFrom(const Target& from) {
  9795. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.Target)
  9796. if (&from == this) return;
  9797. Clear();
  9798. MergeFrom(from);
  9799. }
  9800. bool Target::IsInitialized() const {
  9801. return true;
  9802. }
  9803. void Target::Swap(Target* other) {
  9804. if (other == this) return;
  9805. InternalSwap(other);
  9806. }
  9807. void Target::InternalSwap(Target* other) {
  9808. using std::swap;
  9809. swap(target_id_, other->target_id_);
  9810. swap(once_, other->once_);
  9811. swap(target_type_, other->target_type_);
  9812. swap(_oneof_case_[0], other->_oneof_case_[0]);
  9813. swap(resume_type_, other->resume_type_);
  9814. swap(_oneof_case_[1], other->_oneof_case_[1]);
  9815. _internal_metadata_.Swap(&other->_internal_metadata_);
  9816. swap(_cached_size_, other->_cached_size_);
  9817. }
  9818. ::google::protobuf::Metadata Target::GetMetadata() const {
  9819. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  9820. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  9821. }
  9822. // ===================================================================
  9823. void TargetChange::InitAsDefaultInstance() {
  9824. ::google::firestore::v1::_TargetChange_default_instance_._instance.get_mutable()->cause_ = const_cast< ::google::rpc::Status*>(
  9825. ::google::rpc::Status::internal_default_instance());
  9826. ::google::firestore::v1::_TargetChange_default_instance_._instance.get_mutable()->read_time_ = const_cast< ::google::protobuf::Timestamp*>(
  9827. ::google::protobuf::Timestamp::internal_default_instance());
  9828. }
  9829. void TargetChange::clear_cause() {
  9830. if (GetArenaNoVirtual() == NULL && cause_ != NULL) {
  9831. delete cause_;
  9832. }
  9833. cause_ = NULL;
  9834. }
  9835. void TargetChange::clear_read_time() {
  9836. if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
  9837. delete read_time_;
  9838. }
  9839. read_time_ = NULL;
  9840. }
  9841. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  9842. const int TargetChange::kTargetChangeTypeFieldNumber;
  9843. const int TargetChange::kTargetIdsFieldNumber;
  9844. const int TargetChange::kCauseFieldNumber;
  9845. const int TargetChange::kResumeTokenFieldNumber;
  9846. const int TargetChange::kReadTimeFieldNumber;
  9847. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  9848. TargetChange::TargetChange()
  9849. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  9850. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  9851. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsTargetChange();
  9852. }
  9853. SharedCtor();
  9854. // @@protoc_insertion_point(constructor:google.firestore.v1.TargetChange)
  9855. }
  9856. TargetChange::TargetChange(const TargetChange& from)
  9857. : ::google::protobuf::Message(),
  9858. _internal_metadata_(NULL),
  9859. target_ids_(from.target_ids_),
  9860. _cached_size_(0) {
  9861. _internal_metadata_.MergeFrom(from._internal_metadata_);
  9862. resume_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  9863. if (from.resume_token().size() > 0) {
  9864. resume_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.resume_token_);
  9865. }
  9866. if (from.has_cause()) {
  9867. cause_ = new ::google::rpc::Status(*from.cause_);
  9868. } else {
  9869. cause_ = NULL;
  9870. }
  9871. if (from.has_read_time()) {
  9872. read_time_ = new ::google::protobuf::Timestamp(*from.read_time_);
  9873. } else {
  9874. read_time_ = NULL;
  9875. }
  9876. target_change_type_ = from.target_change_type_;
  9877. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.TargetChange)
  9878. }
  9879. void TargetChange::SharedCtor() {
  9880. resume_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  9881. ::memset(&cause_, 0, static_cast<size_t>(
  9882. reinterpret_cast<char*>(&target_change_type_) -
  9883. reinterpret_cast<char*>(&cause_)) + sizeof(target_change_type_));
  9884. _cached_size_ = 0;
  9885. }
  9886. TargetChange::~TargetChange() {
  9887. // @@protoc_insertion_point(destructor:google.firestore.v1.TargetChange)
  9888. SharedDtor();
  9889. }
  9890. void TargetChange::SharedDtor() {
  9891. resume_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  9892. if (this != internal_default_instance()) delete cause_;
  9893. if (this != internal_default_instance()) delete read_time_;
  9894. }
  9895. void TargetChange::SetCachedSize(int size) const {
  9896. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  9897. _cached_size_ = size;
  9898. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  9899. }
  9900. const ::google::protobuf::Descriptor* TargetChange::descriptor() {
  9901. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  9902. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  9903. }
  9904. const TargetChange& TargetChange::default_instance() {
  9905. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsTargetChange();
  9906. return *internal_default_instance();
  9907. }
  9908. TargetChange* TargetChange::New(::google::protobuf::Arena* arena) const {
  9909. TargetChange* n = new TargetChange;
  9910. if (arena != NULL) {
  9911. arena->Own(n);
  9912. }
  9913. return n;
  9914. }
  9915. void TargetChange::Clear() {
  9916. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.TargetChange)
  9917. ::google::protobuf::uint32 cached_has_bits = 0;
  9918. // Prevent compiler warnings about cached_has_bits being unused
  9919. (void) cached_has_bits;
  9920. target_ids_.Clear();
  9921. resume_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  9922. if (GetArenaNoVirtual() == NULL && cause_ != NULL) {
  9923. delete cause_;
  9924. }
  9925. cause_ = NULL;
  9926. if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
  9927. delete read_time_;
  9928. }
  9929. read_time_ = NULL;
  9930. target_change_type_ = 0;
  9931. _internal_metadata_.Clear();
  9932. }
  9933. bool TargetChange::MergePartialFromCodedStream(
  9934. ::google::protobuf::io::CodedInputStream* input) {
  9935. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  9936. ::google::protobuf::uint32 tag;
  9937. // @@protoc_insertion_point(parse_start:google.firestore.v1.TargetChange)
  9938. for (;;) {
  9939. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  9940. tag = p.first;
  9941. if (!p.second) goto handle_unusual;
  9942. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  9943. // .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1;
  9944. case 1: {
  9945. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9946. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  9947. int value;
  9948. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  9949. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  9950. input, &value)));
  9951. set_target_change_type(static_cast< ::google::firestore::v1::TargetChange_TargetChangeType >(value));
  9952. } else {
  9953. goto handle_unusual;
  9954. }
  9955. break;
  9956. }
  9957. // repeated int32 target_ids = 2;
  9958. case 2: {
  9959. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9960. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  9961. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  9962. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  9963. input, this->mutable_target_ids())));
  9964. } else if (
  9965. static_cast< ::google::protobuf::uint8>(tag) ==
  9966. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  9967. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  9968. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  9969. 1, 18u, input, this->mutable_target_ids())));
  9970. } else {
  9971. goto handle_unusual;
  9972. }
  9973. break;
  9974. }
  9975. // .google.rpc.Status cause = 3;
  9976. case 3: {
  9977. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9978. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  9979. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  9980. input, mutable_cause()));
  9981. } else {
  9982. goto handle_unusual;
  9983. }
  9984. break;
  9985. }
  9986. // bytes resume_token = 4;
  9987. case 4: {
  9988. if (static_cast< ::google::protobuf::uint8>(tag) ==
  9989. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  9990. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  9991. input, this->mutable_resume_token()));
  9992. } else {
  9993. goto handle_unusual;
  9994. }
  9995. break;
  9996. }
  9997. // .google.protobuf.Timestamp read_time = 6;
  9998. case 6: {
  9999. if (static_cast< ::google::protobuf::uint8>(tag) ==
  10000. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  10001. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  10002. input, mutable_read_time()));
  10003. } else {
  10004. goto handle_unusual;
  10005. }
  10006. break;
  10007. }
  10008. default: {
  10009. handle_unusual:
  10010. if (tag == 0) {
  10011. goto success;
  10012. }
  10013. DO_(::google::protobuf::internal::WireFormat::SkipField(
  10014. input, tag, _internal_metadata_.mutable_unknown_fields()));
  10015. break;
  10016. }
  10017. }
  10018. }
  10019. success:
  10020. // @@protoc_insertion_point(parse_success:google.firestore.v1.TargetChange)
  10021. return true;
  10022. failure:
  10023. // @@protoc_insertion_point(parse_failure:google.firestore.v1.TargetChange)
  10024. return false;
  10025. #undef DO_
  10026. }
  10027. void TargetChange::SerializeWithCachedSizes(
  10028. ::google::protobuf::io::CodedOutputStream* output) const {
  10029. // @@protoc_insertion_point(serialize_start:google.firestore.v1.TargetChange)
  10030. ::google::protobuf::uint32 cached_has_bits = 0;
  10031. (void) cached_has_bits;
  10032. // .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1;
  10033. if (this->target_change_type() != 0) {
  10034. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  10035. 1, this->target_change_type(), output);
  10036. }
  10037. // repeated int32 target_ids = 2;
  10038. if (this->target_ids_size() > 0) {
  10039. ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  10040. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  10041. _target_ids_cached_byte_size_));
  10042. }
  10043. for (int i = 0, n = this->target_ids_size(); i < n; i++) {
  10044. ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
  10045. this->target_ids(i), output);
  10046. }
  10047. // .google.rpc.Status cause = 3;
  10048. if (this->has_cause()) {
  10049. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  10050. 3, *this->cause_, output);
  10051. }
  10052. // bytes resume_token = 4;
  10053. if (this->resume_token().size() > 0) {
  10054. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  10055. 4, this->resume_token(), output);
  10056. }
  10057. // .google.protobuf.Timestamp read_time = 6;
  10058. if (this->has_read_time()) {
  10059. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  10060. 6, *this->read_time_, output);
  10061. }
  10062. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  10063. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  10064. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  10065. }
  10066. // @@protoc_insertion_point(serialize_end:google.firestore.v1.TargetChange)
  10067. }
  10068. ::google::protobuf::uint8* TargetChange::InternalSerializeWithCachedSizesToArray(
  10069. bool deterministic, ::google::protobuf::uint8* target) const {
  10070. (void)deterministic; // Unused
  10071. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.TargetChange)
  10072. ::google::protobuf::uint32 cached_has_bits = 0;
  10073. (void) cached_has_bits;
  10074. // .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1;
  10075. if (this->target_change_type() != 0) {
  10076. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  10077. 1, this->target_change_type(), target);
  10078. }
  10079. // repeated int32 target_ids = 2;
  10080. if (this->target_ids_size() > 0) {
  10081. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  10082. 2,
  10083. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  10084. target);
  10085. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
  10086. static_cast< ::google::protobuf::int32>(
  10087. _target_ids_cached_byte_size_), target);
  10088. target = ::google::protobuf::internal::WireFormatLite::
  10089. WriteInt32NoTagToArray(this->target_ids_, target);
  10090. }
  10091. // .google.rpc.Status cause = 3;
  10092. if (this->has_cause()) {
  10093. target = ::google::protobuf::internal::WireFormatLite::
  10094. InternalWriteMessageToArray(
  10095. 3, *this->cause_, deterministic, target);
  10096. }
  10097. // bytes resume_token = 4;
  10098. if (this->resume_token().size() > 0) {
  10099. target =
  10100. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  10101. 4, this->resume_token(), target);
  10102. }
  10103. // .google.protobuf.Timestamp read_time = 6;
  10104. if (this->has_read_time()) {
  10105. target = ::google::protobuf::internal::WireFormatLite::
  10106. InternalWriteMessageToArray(
  10107. 6, *this->read_time_, deterministic, target);
  10108. }
  10109. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  10110. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  10111. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  10112. }
  10113. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.TargetChange)
  10114. return target;
  10115. }
  10116. size_t TargetChange::ByteSizeLong() const {
  10117. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.TargetChange)
  10118. size_t total_size = 0;
  10119. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  10120. total_size +=
  10121. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  10122. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  10123. }
  10124. // repeated int32 target_ids = 2;
  10125. {
  10126. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  10127. Int32Size(this->target_ids_);
  10128. if (data_size > 0) {
  10129. total_size += 1 +
  10130. ::google::protobuf::internal::WireFormatLite::Int32Size(
  10131. static_cast< ::google::protobuf::int32>(data_size));
  10132. }
  10133. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  10134. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  10135. _target_ids_cached_byte_size_ = cached_size;
  10136. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  10137. total_size += data_size;
  10138. }
  10139. // bytes resume_token = 4;
  10140. if (this->resume_token().size() > 0) {
  10141. total_size += 1 +
  10142. ::google::protobuf::internal::WireFormatLite::BytesSize(
  10143. this->resume_token());
  10144. }
  10145. // .google.rpc.Status cause = 3;
  10146. if (this->has_cause()) {
  10147. total_size += 1 +
  10148. ::google::protobuf::internal::WireFormatLite::MessageSize(
  10149. *this->cause_);
  10150. }
  10151. // .google.protobuf.Timestamp read_time = 6;
  10152. if (this->has_read_time()) {
  10153. total_size += 1 +
  10154. ::google::protobuf::internal::WireFormatLite::MessageSize(
  10155. *this->read_time_);
  10156. }
  10157. // .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1;
  10158. if (this->target_change_type() != 0) {
  10159. total_size += 1 +
  10160. ::google::protobuf::internal::WireFormatLite::EnumSize(this->target_change_type());
  10161. }
  10162. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  10163. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  10164. _cached_size_ = cached_size;
  10165. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  10166. return total_size;
  10167. }
  10168. void TargetChange::MergeFrom(const ::google::protobuf::Message& from) {
  10169. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.TargetChange)
  10170. GOOGLE_DCHECK_NE(&from, this);
  10171. const TargetChange* source =
  10172. ::google::protobuf::internal::DynamicCastToGenerated<const TargetChange>(
  10173. &from);
  10174. if (source == NULL) {
  10175. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.TargetChange)
  10176. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  10177. } else {
  10178. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.TargetChange)
  10179. MergeFrom(*source);
  10180. }
  10181. }
  10182. void TargetChange::MergeFrom(const TargetChange& from) {
  10183. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.TargetChange)
  10184. GOOGLE_DCHECK_NE(&from, this);
  10185. _internal_metadata_.MergeFrom(from._internal_metadata_);
  10186. ::google::protobuf::uint32 cached_has_bits = 0;
  10187. (void) cached_has_bits;
  10188. target_ids_.MergeFrom(from.target_ids_);
  10189. if (from.resume_token().size() > 0) {
  10190. resume_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.resume_token_);
  10191. }
  10192. if (from.has_cause()) {
  10193. mutable_cause()->::google::rpc::Status::MergeFrom(from.cause());
  10194. }
  10195. if (from.has_read_time()) {
  10196. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  10197. }
  10198. if (from.target_change_type() != 0) {
  10199. set_target_change_type(from.target_change_type());
  10200. }
  10201. }
  10202. void TargetChange::CopyFrom(const ::google::protobuf::Message& from) {
  10203. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.TargetChange)
  10204. if (&from == this) return;
  10205. Clear();
  10206. MergeFrom(from);
  10207. }
  10208. void TargetChange::CopyFrom(const TargetChange& from) {
  10209. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.TargetChange)
  10210. if (&from == this) return;
  10211. Clear();
  10212. MergeFrom(from);
  10213. }
  10214. bool TargetChange::IsInitialized() const {
  10215. return true;
  10216. }
  10217. void TargetChange::Swap(TargetChange* other) {
  10218. if (other == this) return;
  10219. InternalSwap(other);
  10220. }
  10221. void TargetChange::InternalSwap(TargetChange* other) {
  10222. using std::swap;
  10223. target_ids_.InternalSwap(&other->target_ids_);
  10224. resume_token_.Swap(&other->resume_token_);
  10225. swap(cause_, other->cause_);
  10226. swap(read_time_, other->read_time_);
  10227. swap(target_change_type_, other->target_change_type_);
  10228. _internal_metadata_.Swap(&other->_internal_metadata_);
  10229. swap(_cached_size_, other->_cached_size_);
  10230. }
  10231. ::google::protobuf::Metadata TargetChange::GetMetadata() const {
  10232. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  10233. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  10234. }
  10235. // ===================================================================
  10236. void ListCollectionIdsRequest::InitAsDefaultInstance() {
  10237. }
  10238. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  10239. const int ListCollectionIdsRequest::kParentFieldNumber;
  10240. const int ListCollectionIdsRequest::kPageSizeFieldNumber;
  10241. const int ListCollectionIdsRequest::kPageTokenFieldNumber;
  10242. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  10243. ListCollectionIdsRequest::ListCollectionIdsRequest()
  10244. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  10245. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  10246. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListCollectionIdsRequest();
  10247. }
  10248. SharedCtor();
  10249. // @@protoc_insertion_point(constructor:google.firestore.v1.ListCollectionIdsRequest)
  10250. }
  10251. ListCollectionIdsRequest::ListCollectionIdsRequest(const ListCollectionIdsRequest& from)
  10252. : ::google::protobuf::Message(),
  10253. _internal_metadata_(NULL),
  10254. _cached_size_(0) {
  10255. _internal_metadata_.MergeFrom(from._internal_metadata_);
  10256. parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  10257. if (from.parent().size() > 0) {
  10258. parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  10259. }
  10260. page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  10261. if (from.page_token().size() > 0) {
  10262. page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.page_token_);
  10263. }
  10264. page_size_ = from.page_size_;
  10265. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ListCollectionIdsRequest)
  10266. }
  10267. void ListCollectionIdsRequest::SharedCtor() {
  10268. parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  10269. page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  10270. page_size_ = 0;
  10271. _cached_size_ = 0;
  10272. }
  10273. ListCollectionIdsRequest::~ListCollectionIdsRequest() {
  10274. // @@protoc_insertion_point(destructor:google.firestore.v1.ListCollectionIdsRequest)
  10275. SharedDtor();
  10276. }
  10277. void ListCollectionIdsRequest::SharedDtor() {
  10278. parent_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  10279. page_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  10280. }
  10281. void ListCollectionIdsRequest::SetCachedSize(int size) const {
  10282. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  10283. _cached_size_ = size;
  10284. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  10285. }
  10286. const ::google::protobuf::Descriptor* ListCollectionIdsRequest::descriptor() {
  10287. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  10288. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  10289. }
  10290. const ListCollectionIdsRequest& ListCollectionIdsRequest::default_instance() {
  10291. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListCollectionIdsRequest();
  10292. return *internal_default_instance();
  10293. }
  10294. ListCollectionIdsRequest* ListCollectionIdsRequest::New(::google::protobuf::Arena* arena) const {
  10295. ListCollectionIdsRequest* n = new ListCollectionIdsRequest;
  10296. if (arena != NULL) {
  10297. arena->Own(n);
  10298. }
  10299. return n;
  10300. }
  10301. void ListCollectionIdsRequest::Clear() {
  10302. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.ListCollectionIdsRequest)
  10303. ::google::protobuf::uint32 cached_has_bits = 0;
  10304. // Prevent compiler warnings about cached_has_bits being unused
  10305. (void) cached_has_bits;
  10306. parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  10307. page_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  10308. page_size_ = 0;
  10309. _internal_metadata_.Clear();
  10310. }
  10311. bool ListCollectionIdsRequest::MergePartialFromCodedStream(
  10312. ::google::protobuf::io::CodedInputStream* input) {
  10313. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  10314. ::google::protobuf::uint32 tag;
  10315. // @@protoc_insertion_point(parse_start:google.firestore.v1.ListCollectionIdsRequest)
  10316. for (;;) {
  10317. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  10318. tag = p.first;
  10319. if (!p.second) goto handle_unusual;
  10320. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  10321. // string parent = 1;
  10322. case 1: {
  10323. if (static_cast< ::google::protobuf::uint8>(tag) ==
  10324. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  10325. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  10326. input, this->mutable_parent()));
  10327. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  10328. this->parent().data(), static_cast<int>(this->parent().length()),
  10329. ::google::protobuf::internal::WireFormatLite::PARSE,
  10330. "google.firestore.v1.ListCollectionIdsRequest.parent"));
  10331. } else {
  10332. goto handle_unusual;
  10333. }
  10334. break;
  10335. }
  10336. // int32 page_size = 2;
  10337. case 2: {
  10338. if (static_cast< ::google::protobuf::uint8>(tag) ==
  10339. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  10340. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  10341. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  10342. input, &page_size_)));
  10343. } else {
  10344. goto handle_unusual;
  10345. }
  10346. break;
  10347. }
  10348. // string page_token = 3;
  10349. case 3: {
  10350. if (static_cast< ::google::protobuf::uint8>(tag) ==
  10351. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  10352. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  10353. input, this->mutable_page_token()));
  10354. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  10355. this->page_token().data(), static_cast<int>(this->page_token().length()),
  10356. ::google::protobuf::internal::WireFormatLite::PARSE,
  10357. "google.firestore.v1.ListCollectionIdsRequest.page_token"));
  10358. } else {
  10359. goto handle_unusual;
  10360. }
  10361. break;
  10362. }
  10363. default: {
  10364. handle_unusual:
  10365. if (tag == 0) {
  10366. goto success;
  10367. }
  10368. DO_(::google::protobuf::internal::WireFormat::SkipField(
  10369. input, tag, _internal_metadata_.mutable_unknown_fields()));
  10370. break;
  10371. }
  10372. }
  10373. }
  10374. success:
  10375. // @@protoc_insertion_point(parse_success:google.firestore.v1.ListCollectionIdsRequest)
  10376. return true;
  10377. failure:
  10378. // @@protoc_insertion_point(parse_failure:google.firestore.v1.ListCollectionIdsRequest)
  10379. return false;
  10380. #undef DO_
  10381. }
  10382. void ListCollectionIdsRequest::SerializeWithCachedSizes(
  10383. ::google::protobuf::io::CodedOutputStream* output) const {
  10384. // @@protoc_insertion_point(serialize_start:google.firestore.v1.ListCollectionIdsRequest)
  10385. ::google::protobuf::uint32 cached_has_bits = 0;
  10386. (void) cached_has_bits;
  10387. // string parent = 1;
  10388. if (this->parent().size() > 0) {
  10389. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  10390. this->parent().data(), static_cast<int>(this->parent().length()),
  10391. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  10392. "google.firestore.v1.ListCollectionIdsRequest.parent");
  10393. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  10394. 1, this->parent(), output);
  10395. }
  10396. // int32 page_size = 2;
  10397. if (this->page_size() != 0) {
  10398. ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->page_size(), output);
  10399. }
  10400. // string page_token = 3;
  10401. if (this->page_token().size() > 0) {
  10402. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  10403. this->page_token().data(), static_cast<int>(this->page_token().length()),
  10404. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  10405. "google.firestore.v1.ListCollectionIdsRequest.page_token");
  10406. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  10407. 3, this->page_token(), output);
  10408. }
  10409. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  10410. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  10411. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  10412. }
  10413. // @@protoc_insertion_point(serialize_end:google.firestore.v1.ListCollectionIdsRequest)
  10414. }
  10415. ::google::protobuf::uint8* ListCollectionIdsRequest::InternalSerializeWithCachedSizesToArray(
  10416. bool deterministic, ::google::protobuf::uint8* target) const {
  10417. (void)deterministic; // Unused
  10418. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ListCollectionIdsRequest)
  10419. ::google::protobuf::uint32 cached_has_bits = 0;
  10420. (void) cached_has_bits;
  10421. // string parent = 1;
  10422. if (this->parent().size() > 0) {
  10423. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  10424. this->parent().data(), static_cast<int>(this->parent().length()),
  10425. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  10426. "google.firestore.v1.ListCollectionIdsRequest.parent");
  10427. target =
  10428. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  10429. 1, this->parent(), target);
  10430. }
  10431. // int32 page_size = 2;
  10432. if (this->page_size() != 0) {
  10433. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->page_size(), target);
  10434. }
  10435. // string page_token = 3;
  10436. if (this->page_token().size() > 0) {
  10437. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  10438. this->page_token().data(), static_cast<int>(this->page_token().length()),
  10439. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  10440. "google.firestore.v1.ListCollectionIdsRequest.page_token");
  10441. target =
  10442. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  10443. 3, this->page_token(), target);
  10444. }
  10445. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  10446. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  10447. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  10448. }
  10449. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ListCollectionIdsRequest)
  10450. return target;
  10451. }
  10452. size_t ListCollectionIdsRequest::ByteSizeLong() const {
  10453. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ListCollectionIdsRequest)
  10454. size_t total_size = 0;
  10455. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  10456. total_size +=
  10457. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  10458. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  10459. }
  10460. // string parent = 1;
  10461. if (this->parent().size() > 0) {
  10462. total_size += 1 +
  10463. ::google::protobuf::internal::WireFormatLite::StringSize(
  10464. this->parent());
  10465. }
  10466. // string page_token = 3;
  10467. if (this->page_token().size() > 0) {
  10468. total_size += 1 +
  10469. ::google::protobuf::internal::WireFormatLite::StringSize(
  10470. this->page_token());
  10471. }
  10472. // int32 page_size = 2;
  10473. if (this->page_size() != 0) {
  10474. total_size += 1 +
  10475. ::google::protobuf::internal::WireFormatLite::Int32Size(
  10476. this->page_size());
  10477. }
  10478. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  10479. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  10480. _cached_size_ = cached_size;
  10481. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  10482. return total_size;
  10483. }
  10484. void ListCollectionIdsRequest::MergeFrom(const ::google::protobuf::Message& from) {
  10485. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ListCollectionIdsRequest)
  10486. GOOGLE_DCHECK_NE(&from, this);
  10487. const ListCollectionIdsRequest* source =
  10488. ::google::protobuf::internal::DynamicCastToGenerated<const ListCollectionIdsRequest>(
  10489. &from);
  10490. if (source == NULL) {
  10491. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ListCollectionIdsRequest)
  10492. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  10493. } else {
  10494. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ListCollectionIdsRequest)
  10495. MergeFrom(*source);
  10496. }
  10497. }
  10498. void ListCollectionIdsRequest::MergeFrom(const ListCollectionIdsRequest& from) {
  10499. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ListCollectionIdsRequest)
  10500. GOOGLE_DCHECK_NE(&from, this);
  10501. _internal_metadata_.MergeFrom(from._internal_metadata_);
  10502. ::google::protobuf::uint32 cached_has_bits = 0;
  10503. (void) cached_has_bits;
  10504. if (from.parent().size() > 0) {
  10505. parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_);
  10506. }
  10507. if (from.page_token().size() > 0) {
  10508. page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.page_token_);
  10509. }
  10510. if (from.page_size() != 0) {
  10511. set_page_size(from.page_size());
  10512. }
  10513. }
  10514. void ListCollectionIdsRequest::CopyFrom(const ::google::protobuf::Message& from) {
  10515. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ListCollectionIdsRequest)
  10516. if (&from == this) return;
  10517. Clear();
  10518. MergeFrom(from);
  10519. }
  10520. void ListCollectionIdsRequest::CopyFrom(const ListCollectionIdsRequest& from) {
  10521. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ListCollectionIdsRequest)
  10522. if (&from == this) return;
  10523. Clear();
  10524. MergeFrom(from);
  10525. }
  10526. bool ListCollectionIdsRequest::IsInitialized() const {
  10527. return true;
  10528. }
  10529. void ListCollectionIdsRequest::Swap(ListCollectionIdsRequest* other) {
  10530. if (other == this) return;
  10531. InternalSwap(other);
  10532. }
  10533. void ListCollectionIdsRequest::InternalSwap(ListCollectionIdsRequest* other) {
  10534. using std::swap;
  10535. parent_.Swap(&other->parent_);
  10536. page_token_.Swap(&other->page_token_);
  10537. swap(page_size_, other->page_size_);
  10538. _internal_metadata_.Swap(&other->_internal_metadata_);
  10539. swap(_cached_size_, other->_cached_size_);
  10540. }
  10541. ::google::protobuf::Metadata ListCollectionIdsRequest::GetMetadata() const {
  10542. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  10543. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  10544. }
  10545. // ===================================================================
  10546. void ListCollectionIdsResponse::InitAsDefaultInstance() {
  10547. }
  10548. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  10549. const int ListCollectionIdsResponse::kCollectionIdsFieldNumber;
  10550. const int ListCollectionIdsResponse::kNextPageTokenFieldNumber;
  10551. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  10552. ListCollectionIdsResponse::ListCollectionIdsResponse()
  10553. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  10554. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  10555. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListCollectionIdsResponse();
  10556. }
  10557. SharedCtor();
  10558. // @@protoc_insertion_point(constructor:google.firestore.v1.ListCollectionIdsResponse)
  10559. }
  10560. ListCollectionIdsResponse::ListCollectionIdsResponse(const ListCollectionIdsResponse& from)
  10561. : ::google::protobuf::Message(),
  10562. _internal_metadata_(NULL),
  10563. collection_ids_(from.collection_ids_),
  10564. _cached_size_(0) {
  10565. _internal_metadata_.MergeFrom(from._internal_metadata_);
  10566. next_page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  10567. if (from.next_page_token().size() > 0) {
  10568. next_page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.next_page_token_);
  10569. }
  10570. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ListCollectionIdsResponse)
  10571. }
  10572. void ListCollectionIdsResponse::SharedCtor() {
  10573. next_page_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  10574. _cached_size_ = 0;
  10575. }
  10576. ListCollectionIdsResponse::~ListCollectionIdsResponse() {
  10577. // @@protoc_insertion_point(destructor:google.firestore.v1.ListCollectionIdsResponse)
  10578. SharedDtor();
  10579. }
  10580. void ListCollectionIdsResponse::SharedDtor() {
  10581. next_page_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  10582. }
  10583. void ListCollectionIdsResponse::SetCachedSize(int size) const {
  10584. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  10585. _cached_size_ = size;
  10586. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  10587. }
  10588. const ::google::protobuf::Descriptor* ListCollectionIdsResponse::descriptor() {
  10589. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  10590. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  10591. }
  10592. const ListCollectionIdsResponse& ListCollectionIdsResponse::default_instance() {
  10593. ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListCollectionIdsResponse();
  10594. return *internal_default_instance();
  10595. }
  10596. ListCollectionIdsResponse* ListCollectionIdsResponse::New(::google::protobuf::Arena* arena) const {
  10597. ListCollectionIdsResponse* n = new ListCollectionIdsResponse;
  10598. if (arena != NULL) {
  10599. arena->Own(n);
  10600. }
  10601. return n;
  10602. }
  10603. void ListCollectionIdsResponse::Clear() {
  10604. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.ListCollectionIdsResponse)
  10605. ::google::protobuf::uint32 cached_has_bits = 0;
  10606. // Prevent compiler warnings about cached_has_bits being unused
  10607. (void) cached_has_bits;
  10608. collection_ids_.Clear();
  10609. next_page_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  10610. _internal_metadata_.Clear();
  10611. }
  10612. bool ListCollectionIdsResponse::MergePartialFromCodedStream(
  10613. ::google::protobuf::io::CodedInputStream* input) {
  10614. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  10615. ::google::protobuf::uint32 tag;
  10616. // @@protoc_insertion_point(parse_start:google.firestore.v1.ListCollectionIdsResponse)
  10617. for (;;) {
  10618. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  10619. tag = p.first;
  10620. if (!p.second) goto handle_unusual;
  10621. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  10622. // repeated string collection_ids = 1;
  10623. case 1: {
  10624. if (static_cast< ::google::protobuf::uint8>(tag) ==
  10625. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  10626. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  10627. input, this->add_collection_ids()));
  10628. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  10629. this->collection_ids(this->collection_ids_size() - 1).data(),
  10630. static_cast<int>(this->collection_ids(this->collection_ids_size() - 1).length()),
  10631. ::google::protobuf::internal::WireFormatLite::PARSE,
  10632. "google.firestore.v1.ListCollectionIdsResponse.collection_ids"));
  10633. } else {
  10634. goto handle_unusual;
  10635. }
  10636. break;
  10637. }
  10638. // string next_page_token = 2;
  10639. case 2: {
  10640. if (static_cast< ::google::protobuf::uint8>(tag) ==
  10641. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  10642. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  10643. input, this->mutable_next_page_token()));
  10644. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  10645. this->next_page_token().data(), static_cast<int>(this->next_page_token().length()),
  10646. ::google::protobuf::internal::WireFormatLite::PARSE,
  10647. "google.firestore.v1.ListCollectionIdsResponse.next_page_token"));
  10648. } else {
  10649. goto handle_unusual;
  10650. }
  10651. break;
  10652. }
  10653. default: {
  10654. handle_unusual:
  10655. if (tag == 0) {
  10656. goto success;
  10657. }
  10658. DO_(::google::protobuf::internal::WireFormat::SkipField(
  10659. input, tag, _internal_metadata_.mutable_unknown_fields()));
  10660. break;
  10661. }
  10662. }
  10663. }
  10664. success:
  10665. // @@protoc_insertion_point(parse_success:google.firestore.v1.ListCollectionIdsResponse)
  10666. return true;
  10667. failure:
  10668. // @@protoc_insertion_point(parse_failure:google.firestore.v1.ListCollectionIdsResponse)
  10669. return false;
  10670. #undef DO_
  10671. }
  10672. void ListCollectionIdsResponse::SerializeWithCachedSizes(
  10673. ::google::protobuf::io::CodedOutputStream* output) const {
  10674. // @@protoc_insertion_point(serialize_start:google.firestore.v1.ListCollectionIdsResponse)
  10675. ::google::protobuf::uint32 cached_has_bits = 0;
  10676. (void) cached_has_bits;
  10677. // repeated string collection_ids = 1;
  10678. for (int i = 0, n = this->collection_ids_size(); i < n; i++) {
  10679. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  10680. this->collection_ids(i).data(), static_cast<int>(this->collection_ids(i).length()),
  10681. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  10682. "google.firestore.v1.ListCollectionIdsResponse.collection_ids");
  10683. ::google::protobuf::internal::WireFormatLite::WriteString(
  10684. 1, this->collection_ids(i), output);
  10685. }
  10686. // string next_page_token = 2;
  10687. if (this->next_page_token().size() > 0) {
  10688. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  10689. this->next_page_token().data(), static_cast<int>(this->next_page_token().length()),
  10690. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  10691. "google.firestore.v1.ListCollectionIdsResponse.next_page_token");
  10692. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  10693. 2, this->next_page_token(), output);
  10694. }
  10695. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  10696. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  10697. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  10698. }
  10699. // @@protoc_insertion_point(serialize_end:google.firestore.v1.ListCollectionIdsResponse)
  10700. }
  10701. ::google::protobuf::uint8* ListCollectionIdsResponse::InternalSerializeWithCachedSizesToArray(
  10702. bool deterministic, ::google::protobuf::uint8* target) const {
  10703. (void)deterministic; // Unused
  10704. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ListCollectionIdsResponse)
  10705. ::google::protobuf::uint32 cached_has_bits = 0;
  10706. (void) cached_has_bits;
  10707. // repeated string collection_ids = 1;
  10708. for (int i = 0, n = this->collection_ids_size(); i < n; i++) {
  10709. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  10710. this->collection_ids(i).data(), static_cast<int>(this->collection_ids(i).length()),
  10711. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  10712. "google.firestore.v1.ListCollectionIdsResponse.collection_ids");
  10713. target = ::google::protobuf::internal::WireFormatLite::
  10714. WriteStringToArray(1, this->collection_ids(i), target);
  10715. }
  10716. // string next_page_token = 2;
  10717. if (this->next_page_token().size() > 0) {
  10718. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  10719. this->next_page_token().data(), static_cast<int>(this->next_page_token().length()),
  10720. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  10721. "google.firestore.v1.ListCollectionIdsResponse.next_page_token");
  10722. target =
  10723. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  10724. 2, this->next_page_token(), target);
  10725. }
  10726. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  10727. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  10728. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  10729. }
  10730. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ListCollectionIdsResponse)
  10731. return target;
  10732. }
  10733. size_t ListCollectionIdsResponse::ByteSizeLong() const {
  10734. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ListCollectionIdsResponse)
  10735. size_t total_size = 0;
  10736. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  10737. total_size +=
  10738. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  10739. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  10740. }
  10741. // repeated string collection_ids = 1;
  10742. total_size += 1 *
  10743. ::google::protobuf::internal::FromIntSize(this->collection_ids_size());
  10744. for (int i = 0, n = this->collection_ids_size(); i < n; i++) {
  10745. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  10746. this->collection_ids(i));
  10747. }
  10748. // string next_page_token = 2;
  10749. if (this->next_page_token().size() > 0) {
  10750. total_size += 1 +
  10751. ::google::protobuf::internal::WireFormatLite::StringSize(
  10752. this->next_page_token());
  10753. }
  10754. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  10755. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  10756. _cached_size_ = cached_size;
  10757. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  10758. return total_size;
  10759. }
  10760. void ListCollectionIdsResponse::MergeFrom(const ::google::protobuf::Message& from) {
  10761. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ListCollectionIdsResponse)
  10762. GOOGLE_DCHECK_NE(&from, this);
  10763. const ListCollectionIdsResponse* source =
  10764. ::google::protobuf::internal::DynamicCastToGenerated<const ListCollectionIdsResponse>(
  10765. &from);
  10766. if (source == NULL) {
  10767. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ListCollectionIdsResponse)
  10768. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  10769. } else {
  10770. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ListCollectionIdsResponse)
  10771. MergeFrom(*source);
  10772. }
  10773. }
  10774. void ListCollectionIdsResponse::MergeFrom(const ListCollectionIdsResponse& from) {
  10775. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ListCollectionIdsResponse)
  10776. GOOGLE_DCHECK_NE(&from, this);
  10777. _internal_metadata_.MergeFrom(from._internal_metadata_);
  10778. ::google::protobuf::uint32 cached_has_bits = 0;
  10779. (void) cached_has_bits;
  10780. collection_ids_.MergeFrom(from.collection_ids_);
  10781. if (from.next_page_token().size() > 0) {
  10782. next_page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.next_page_token_);
  10783. }
  10784. }
  10785. void ListCollectionIdsResponse::CopyFrom(const ::google::protobuf::Message& from) {
  10786. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ListCollectionIdsResponse)
  10787. if (&from == this) return;
  10788. Clear();
  10789. MergeFrom(from);
  10790. }
  10791. void ListCollectionIdsResponse::CopyFrom(const ListCollectionIdsResponse& from) {
  10792. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ListCollectionIdsResponse)
  10793. if (&from == this) return;
  10794. Clear();
  10795. MergeFrom(from);
  10796. }
  10797. bool ListCollectionIdsResponse::IsInitialized() const {
  10798. return true;
  10799. }
  10800. void ListCollectionIdsResponse::Swap(ListCollectionIdsResponse* other) {
  10801. if (other == this) return;
  10802. InternalSwap(other);
  10803. }
  10804. void ListCollectionIdsResponse::InternalSwap(ListCollectionIdsResponse* other) {
  10805. using std::swap;
  10806. collection_ids_.InternalSwap(&other->collection_ids_);
  10807. next_page_token_.Swap(&other->next_page_token_);
  10808. _internal_metadata_.Swap(&other->_internal_metadata_);
  10809. swap(_cached_size_, other->_cached_size_);
  10810. }
  10811. ::google::protobuf::Metadata ListCollectionIdsResponse::GetMetadata() const {
  10812. protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce();
  10813. return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages];
  10814. }
  10815. // @@protoc_insertion_point(namespace_scope)
  10816. } // namespace v1
  10817. } // namespace firestore
  10818. } // namespace google
  10819. // @@protoc_insertion_point(global_scope)