query.pb.cc 157 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941
  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/query.proto
  18. #include "google/firestore/v1/query.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 StructuredQuery_CollectionSelectorDefaultTypeInternal {
  38. public:
  39. ::google::protobuf::internal::ExplicitlyConstructed<StructuredQuery_CollectionSelector>
  40. _instance;
  41. } _StructuredQuery_CollectionSelector_default_instance_;
  42. class StructuredQuery_FilterDefaultTypeInternal {
  43. public:
  44. ::google::protobuf::internal::ExplicitlyConstructed<StructuredQuery_Filter>
  45. _instance;
  46. const ::google::firestore::v1::StructuredQuery_CompositeFilter* composite_filter_;
  47. const ::google::firestore::v1::StructuredQuery_FieldFilter* field_filter_;
  48. const ::google::firestore::v1::StructuredQuery_UnaryFilter* unary_filter_;
  49. } _StructuredQuery_Filter_default_instance_;
  50. class StructuredQuery_CompositeFilterDefaultTypeInternal {
  51. public:
  52. ::google::protobuf::internal::ExplicitlyConstructed<StructuredQuery_CompositeFilter>
  53. _instance;
  54. } _StructuredQuery_CompositeFilter_default_instance_;
  55. class StructuredQuery_FieldFilterDefaultTypeInternal {
  56. public:
  57. ::google::protobuf::internal::ExplicitlyConstructed<StructuredQuery_FieldFilter>
  58. _instance;
  59. } _StructuredQuery_FieldFilter_default_instance_;
  60. class StructuredQuery_UnaryFilterDefaultTypeInternal {
  61. public:
  62. ::google::protobuf::internal::ExplicitlyConstructed<StructuredQuery_UnaryFilter>
  63. _instance;
  64. const ::google::firestore::v1::StructuredQuery_FieldReference* field_;
  65. } _StructuredQuery_UnaryFilter_default_instance_;
  66. class StructuredQuery_OrderDefaultTypeInternal {
  67. public:
  68. ::google::protobuf::internal::ExplicitlyConstructed<StructuredQuery_Order>
  69. _instance;
  70. } _StructuredQuery_Order_default_instance_;
  71. class StructuredQuery_FieldReferenceDefaultTypeInternal {
  72. public:
  73. ::google::protobuf::internal::ExplicitlyConstructed<StructuredQuery_FieldReference>
  74. _instance;
  75. } _StructuredQuery_FieldReference_default_instance_;
  76. class StructuredQuery_ProjectionDefaultTypeInternal {
  77. public:
  78. ::google::protobuf::internal::ExplicitlyConstructed<StructuredQuery_Projection>
  79. _instance;
  80. } _StructuredQuery_Projection_default_instance_;
  81. class StructuredQueryDefaultTypeInternal {
  82. public:
  83. ::google::protobuf::internal::ExplicitlyConstructed<StructuredQuery>
  84. _instance;
  85. } _StructuredQuery_default_instance_;
  86. class CursorDefaultTypeInternal {
  87. public:
  88. ::google::protobuf::internal::ExplicitlyConstructed<Cursor>
  89. _instance;
  90. } _Cursor_default_instance_;
  91. } // namespace v1
  92. } // namespace firestore
  93. } // namespace google
  94. namespace protobuf_google_2ffirestore_2fv1_2fquery_2eproto {
  95. void InitDefaultsStructuredQuery_CollectionSelectorImpl() {
  96. GOOGLE_PROTOBUF_VERIFY_VERSION;
  97. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  98. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  99. #else
  100. ::google::protobuf::internal::InitProtobufDefaults();
  101. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  102. {
  103. void* ptr = &::google::firestore::v1::_StructuredQuery_CollectionSelector_default_instance_;
  104. new (ptr) ::google::firestore::v1::StructuredQuery_CollectionSelector();
  105. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  106. }
  107. ::google::firestore::v1::StructuredQuery_CollectionSelector::InitAsDefaultInstance();
  108. }
  109. void InitDefaultsStructuredQuery_CollectionSelector() {
  110. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  111. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsStructuredQuery_CollectionSelectorImpl);
  112. }
  113. void InitDefaultsStructuredQuery_CompositeFilterImpl() {
  114. GOOGLE_PROTOBUF_VERIFY_VERSION;
  115. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  116. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  117. #else
  118. ::google::protobuf::internal::InitProtobufDefaults();
  119. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  120. protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldFilter();
  121. protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_UnaryFilter();
  122. {
  123. void* ptr = &::google::firestore::v1::_StructuredQuery_Filter_default_instance_;
  124. new (ptr) ::google::firestore::v1::StructuredQuery_Filter();
  125. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  126. }
  127. {
  128. void* ptr = &::google::firestore::v1::_StructuredQuery_CompositeFilter_default_instance_;
  129. new (ptr) ::google::firestore::v1::StructuredQuery_CompositeFilter();
  130. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  131. }
  132. ::google::firestore::v1::StructuredQuery_Filter::InitAsDefaultInstance();
  133. ::google::firestore::v1::StructuredQuery_CompositeFilter::InitAsDefaultInstance();
  134. }
  135. void InitDefaultsStructuredQuery_CompositeFilter() {
  136. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  137. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsStructuredQuery_CompositeFilterImpl);
  138. }
  139. void InitDefaultsStructuredQuery_FieldFilterImpl() {
  140. GOOGLE_PROTOBUF_VERIFY_VERSION;
  141. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  142. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  143. #else
  144. ::google::protobuf::internal::InitProtobufDefaults();
  145. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  146. protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldReference();
  147. protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsArrayValue();
  148. {
  149. void* ptr = &::google::firestore::v1::_StructuredQuery_FieldFilter_default_instance_;
  150. new (ptr) ::google::firestore::v1::StructuredQuery_FieldFilter();
  151. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  152. }
  153. ::google::firestore::v1::StructuredQuery_FieldFilter::InitAsDefaultInstance();
  154. }
  155. void InitDefaultsStructuredQuery_FieldFilter() {
  156. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  157. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsStructuredQuery_FieldFilterImpl);
  158. }
  159. void InitDefaultsStructuredQuery_UnaryFilterImpl() {
  160. GOOGLE_PROTOBUF_VERIFY_VERSION;
  161. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  162. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  163. #else
  164. ::google::protobuf::internal::InitProtobufDefaults();
  165. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  166. protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldReference();
  167. {
  168. void* ptr = &::google::firestore::v1::_StructuredQuery_UnaryFilter_default_instance_;
  169. new (ptr) ::google::firestore::v1::StructuredQuery_UnaryFilter();
  170. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  171. }
  172. ::google::firestore::v1::StructuredQuery_UnaryFilter::InitAsDefaultInstance();
  173. }
  174. void InitDefaultsStructuredQuery_UnaryFilter() {
  175. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  176. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsStructuredQuery_UnaryFilterImpl);
  177. }
  178. void InitDefaultsStructuredQuery_OrderImpl() {
  179. GOOGLE_PROTOBUF_VERIFY_VERSION;
  180. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  181. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  182. #else
  183. ::google::protobuf::internal::InitProtobufDefaults();
  184. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  185. protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldReference();
  186. {
  187. void* ptr = &::google::firestore::v1::_StructuredQuery_Order_default_instance_;
  188. new (ptr) ::google::firestore::v1::StructuredQuery_Order();
  189. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  190. }
  191. ::google::firestore::v1::StructuredQuery_Order::InitAsDefaultInstance();
  192. }
  193. void InitDefaultsStructuredQuery_Order() {
  194. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  195. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsStructuredQuery_OrderImpl);
  196. }
  197. void InitDefaultsStructuredQuery_FieldReferenceImpl() {
  198. GOOGLE_PROTOBUF_VERIFY_VERSION;
  199. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  200. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  201. #else
  202. ::google::protobuf::internal::InitProtobufDefaults();
  203. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  204. {
  205. void* ptr = &::google::firestore::v1::_StructuredQuery_FieldReference_default_instance_;
  206. new (ptr) ::google::firestore::v1::StructuredQuery_FieldReference();
  207. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  208. }
  209. ::google::firestore::v1::StructuredQuery_FieldReference::InitAsDefaultInstance();
  210. }
  211. void InitDefaultsStructuredQuery_FieldReference() {
  212. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  213. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsStructuredQuery_FieldReferenceImpl);
  214. }
  215. void InitDefaultsStructuredQuery_ProjectionImpl() {
  216. GOOGLE_PROTOBUF_VERIFY_VERSION;
  217. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  218. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  219. #else
  220. ::google::protobuf::internal::InitProtobufDefaults();
  221. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  222. protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldReference();
  223. {
  224. void* ptr = &::google::firestore::v1::_StructuredQuery_Projection_default_instance_;
  225. new (ptr) ::google::firestore::v1::StructuredQuery_Projection();
  226. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  227. }
  228. ::google::firestore::v1::StructuredQuery_Projection::InitAsDefaultInstance();
  229. }
  230. void InitDefaultsStructuredQuery_Projection() {
  231. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  232. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsStructuredQuery_ProjectionImpl);
  233. }
  234. void InitDefaultsStructuredQueryImpl() {
  235. GOOGLE_PROTOBUF_VERIFY_VERSION;
  236. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  237. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  238. #else
  239. ::google::protobuf::internal::InitProtobufDefaults();
  240. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  241. protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_Projection();
  242. protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_CollectionSelector();
  243. protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_CompositeFilter();
  244. protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_Order();
  245. protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsCursor();
  246. protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsInt32Value();
  247. {
  248. void* ptr = &::google::firestore::v1::_StructuredQuery_default_instance_;
  249. new (ptr) ::google::firestore::v1::StructuredQuery();
  250. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  251. }
  252. ::google::firestore::v1::StructuredQuery::InitAsDefaultInstance();
  253. }
  254. void InitDefaultsStructuredQuery() {
  255. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  256. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsStructuredQueryImpl);
  257. }
  258. void InitDefaultsCursorImpl() {
  259. GOOGLE_PROTOBUF_VERIFY_VERSION;
  260. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  261. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  262. #else
  263. ::google::protobuf::internal::InitProtobufDefaults();
  264. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  265. protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsArrayValue();
  266. {
  267. void* ptr = &::google::firestore::v1::_Cursor_default_instance_;
  268. new (ptr) ::google::firestore::v1::Cursor();
  269. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  270. }
  271. ::google::firestore::v1::Cursor::InitAsDefaultInstance();
  272. }
  273. void InitDefaultsCursor() {
  274. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  275. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsCursorImpl);
  276. }
  277. ::google::protobuf::Metadata file_level_metadata[10];
  278. const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[4];
  279. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  280. ~0u, // no _has_bits_
  281. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_CollectionSelector, _internal_metadata_),
  282. ~0u, // no _extensions_
  283. ~0u, // no _oneof_case_
  284. ~0u, // no _weak_field_map_
  285. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_CollectionSelector, collection_id_),
  286. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_CollectionSelector, all_descendants_),
  287. ~0u, // no _has_bits_
  288. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_Filter, _internal_metadata_),
  289. ~0u, // no _extensions_
  290. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_Filter, _oneof_case_[0]),
  291. ~0u, // no _weak_field_map_
  292. offsetof(::google::firestore::v1::StructuredQuery_FilterDefaultTypeInternal, composite_filter_),
  293. offsetof(::google::firestore::v1::StructuredQuery_FilterDefaultTypeInternal, field_filter_),
  294. offsetof(::google::firestore::v1::StructuredQuery_FilterDefaultTypeInternal, unary_filter_),
  295. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_Filter, filter_type_),
  296. ~0u, // no _has_bits_
  297. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_CompositeFilter, _internal_metadata_),
  298. ~0u, // no _extensions_
  299. ~0u, // no _oneof_case_
  300. ~0u, // no _weak_field_map_
  301. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_CompositeFilter, op_),
  302. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_CompositeFilter, filters_),
  303. ~0u, // no _has_bits_
  304. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_FieldFilter, _internal_metadata_),
  305. ~0u, // no _extensions_
  306. ~0u, // no _oneof_case_
  307. ~0u, // no _weak_field_map_
  308. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_FieldFilter, field_),
  309. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_FieldFilter, op_),
  310. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_FieldFilter, value_),
  311. ~0u, // no _has_bits_
  312. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_UnaryFilter, _internal_metadata_),
  313. ~0u, // no _extensions_
  314. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_UnaryFilter, _oneof_case_[0]),
  315. ~0u, // no _weak_field_map_
  316. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_UnaryFilter, op_),
  317. offsetof(::google::firestore::v1::StructuredQuery_UnaryFilterDefaultTypeInternal, field_),
  318. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_UnaryFilter, operand_type_),
  319. ~0u, // no _has_bits_
  320. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_Order, _internal_metadata_),
  321. ~0u, // no _extensions_
  322. ~0u, // no _oneof_case_
  323. ~0u, // no _weak_field_map_
  324. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_Order, field_),
  325. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_Order, direction_),
  326. ~0u, // no _has_bits_
  327. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_FieldReference, _internal_metadata_),
  328. ~0u, // no _extensions_
  329. ~0u, // no _oneof_case_
  330. ~0u, // no _weak_field_map_
  331. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_FieldReference, field_path_),
  332. ~0u, // no _has_bits_
  333. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_Projection, _internal_metadata_),
  334. ~0u, // no _extensions_
  335. ~0u, // no _oneof_case_
  336. ~0u, // no _weak_field_map_
  337. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_Projection, fields_),
  338. ~0u, // no _has_bits_
  339. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery, _internal_metadata_),
  340. ~0u, // no _extensions_
  341. ~0u, // no _oneof_case_
  342. ~0u, // no _weak_field_map_
  343. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery, select_),
  344. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery, from_),
  345. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery, where_),
  346. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery, order_by_),
  347. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery, start_at_),
  348. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery, end_at_),
  349. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery, offset_),
  350. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery, limit_),
  351. ~0u, // no _has_bits_
  352. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Cursor, _internal_metadata_),
  353. ~0u, // no _extensions_
  354. ~0u, // no _oneof_case_
  355. ~0u, // no _weak_field_map_
  356. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Cursor, values_),
  357. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Cursor, before_),
  358. };
  359. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  360. { 0, -1, sizeof(::google::firestore::v1::StructuredQuery_CollectionSelector)},
  361. { 7, -1, sizeof(::google::firestore::v1::StructuredQuery_Filter)},
  362. { 16, -1, sizeof(::google::firestore::v1::StructuredQuery_CompositeFilter)},
  363. { 23, -1, sizeof(::google::firestore::v1::StructuredQuery_FieldFilter)},
  364. { 31, -1, sizeof(::google::firestore::v1::StructuredQuery_UnaryFilter)},
  365. { 39, -1, sizeof(::google::firestore::v1::StructuredQuery_Order)},
  366. { 46, -1, sizeof(::google::firestore::v1::StructuredQuery_FieldReference)},
  367. { 52, -1, sizeof(::google::firestore::v1::StructuredQuery_Projection)},
  368. { 58, -1, sizeof(::google::firestore::v1::StructuredQuery)},
  369. { 71, -1, sizeof(::google::firestore::v1::Cursor)},
  370. };
  371. static ::google::protobuf::Message const * const file_default_instances[] = {
  372. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_StructuredQuery_CollectionSelector_default_instance_),
  373. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_StructuredQuery_Filter_default_instance_),
  374. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_StructuredQuery_CompositeFilter_default_instance_),
  375. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_StructuredQuery_FieldFilter_default_instance_),
  376. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_StructuredQuery_UnaryFilter_default_instance_),
  377. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_StructuredQuery_Order_default_instance_),
  378. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_StructuredQuery_FieldReference_default_instance_),
  379. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_StructuredQuery_Projection_default_instance_),
  380. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_StructuredQuery_default_instance_),
  381. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_Cursor_default_instance_),
  382. };
  383. void protobuf_AssignDescriptors() {
  384. AddDescriptors();
  385. ::google::protobuf::MessageFactory* factory = NULL;
  386. AssignDescriptors(
  387. "google/firestore/v1/query.proto", schemas, file_default_instances, TableStruct::offsets, factory,
  388. file_level_metadata, file_level_enum_descriptors, NULL);
  389. }
  390. void protobuf_AssignDescriptorsOnce() {
  391. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  392. ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
  393. }
  394. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  395. void protobuf_RegisterTypes(const ::std::string&) {
  396. protobuf_AssignDescriptorsOnce();
  397. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 10);
  398. }
  399. void AddDescriptorsImpl() {
  400. InitDefaults();
  401. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  402. "\n\037google/firestore/v1/query.proto\022\023googl"
  403. "e.firestore.v1\032\034google/api/annotations.p"
  404. "roto\032\"google/firestore/v1/document.proto"
  405. "\032\036google/protobuf/wrappers.proto\"\332\016\n\017Str"
  406. "ucturedQuery\022\?\n\006select\030\001 \001(\0132/.google.fi"
  407. "restore.v1.StructuredQuery.Projection\022E\n"
  408. "\004from\030\002 \003(\01327.google.firestore.v1.Struct"
  409. "uredQuery.CollectionSelector\022:\n\005where\030\003 "
  410. "\001(\0132+.google.firestore.v1.StructuredQuer"
  411. "y.Filter\022<\n\010order_by\030\004 \003(\0132*.google.fire"
  412. "store.v1.StructuredQuery.Order\022-\n\010start_"
  413. "at\030\007 \001(\0132\033.google.firestore.v1.Cursor\022+\n"
  414. "\006end_at\030\010 \001(\0132\033.google.firestore.v1.Curs"
  415. "or\022\016\n\006offset\030\006 \001(\005\022*\n\005limit\030\005 \001(\0132\033.goog"
  416. "le.protobuf.Int32Value\032D\n\022CollectionSele"
  417. "ctor\022\025\n\rcollection_id\030\002 \001(\t\022\027\n\017all_desce"
  418. "ndants\030\003 \001(\010\032\375\001\n\006Filter\022P\n\020composite_fil"
  419. "ter\030\001 \001(\01324.google.firestore.v1.Structur"
  420. "edQuery.CompositeFilterH\000\022H\n\014field_filte"
  421. "r\030\002 \001(\01320.google.firestore.v1.Structured"
  422. "Query.FieldFilterH\000\022H\n\014unary_filter\030\003 \001("
  423. "\01320.google.firestore.v1.StructuredQuery."
  424. "UnaryFilterH\000B\r\n\013filter_type\032\311\001\n\017Composi"
  425. "teFilter\022I\n\002op\030\001 \001(\0162=.google.firestore."
  426. "v1.StructuredQuery.CompositeFilter.Opera"
  427. "tor\022<\n\007filters\030\002 \003(\0132+.google.firestore."
  428. "v1.StructuredQuery.Filter\"-\n\010Operator\022\030\n"
  429. "\024OPERATOR_UNSPECIFIED\020\000\022\007\n\003AND\020\001\032\335\002\n\013Fie"
  430. "ldFilter\022B\n\005field\030\001 \001(\01323.google.firesto"
  431. "re.v1.StructuredQuery.FieldReference\022E\n\002"
  432. "op\030\002 \001(\01629.google.firestore.v1.Structure"
  433. "dQuery.FieldFilter.Operator\022)\n\005value\030\003 \001"
  434. "(\0132\032.google.firestore.v1.Value\"\227\001\n\010Opera"
  435. "tor\022\030\n\024OPERATOR_UNSPECIFIED\020\000\022\r\n\tLESS_TH"
  436. "AN\020\001\022\026\n\022LESS_THAN_OR_EQUAL\020\002\022\020\n\014GREATER_"
  437. "THAN\020\003\022\031\n\025GREATER_THAN_OR_EQUAL\020\004\022\t\n\005EQU"
  438. "AL\020\005\022\022\n\016ARRAY_CONTAINS\020\007\032\351\001\n\013UnaryFilter"
  439. "\022E\n\002op\030\001 \001(\01629.google.firestore.v1.Struc"
  440. "turedQuery.UnaryFilter.Operator\022D\n\005field"
  441. "\030\002 \001(\01323.google.firestore.v1.StructuredQ"
  442. "uery.FieldReferenceH\000\"=\n\010Operator\022\030\n\024OPE"
  443. "RATOR_UNSPECIFIED\020\000\022\n\n\006IS_NAN\020\002\022\013\n\007IS_NU"
  444. "LL\020\003B\016\n\014operand_type\032\216\001\n\005Order\022B\n\005field\030"
  445. "\001 \001(\01323.google.firestore.v1.StructuredQu"
  446. "ery.FieldReference\022A\n\tdirection\030\002 \001(\0162.."
  447. "google.firestore.v1.StructuredQuery.Dire"
  448. "ction\032$\n\016FieldReference\022\022\n\nfield_path\030\002 "
  449. "\001(\t\032Q\n\nProjection\022C\n\006fields\030\002 \003(\01323.goog"
  450. "le.firestore.v1.StructuredQuery.FieldRef"
  451. "erence\"E\n\tDirection\022\031\n\025DIRECTION_UNSPECI"
  452. "FIED\020\000\022\r\n\tASCENDING\020\001\022\016\n\nDESCENDING\020\002\"D\n"
  453. "\006Cursor\022*\n\006values\030\001 \003(\0132\032.google.firesto"
  454. "re.v1.Value\022\016\n\006before\030\002 \001(\010B\256\001\n\027com.goog"
  455. "le.firestore.v1B\nQueryProtoP\001Z<google.go"
  456. "lang.org/genproto/googleapis/firestore/v"
  457. "1;firestore\242\002\004GCFS\252\002\036Google.Cloud.Firest"
  458. "ore.V1Beta1\312\002\036Google\\Cloud\\Firestore\\V1b"
  459. "eta1b\006proto3"
  460. };
  461. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  462. descriptor, 2292);
  463. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  464. "google/firestore/v1/query.proto", &protobuf_RegisterTypes);
  465. ::protobuf_google_2fapi_2fannotations_2eproto::AddDescriptors();
  466. ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::AddDescriptors();
  467. ::protobuf_google_2fprotobuf_2fwrappers_2eproto::AddDescriptors();
  468. }
  469. void AddDescriptors() {
  470. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  471. ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
  472. }
  473. // Force AddDescriptors() to be called at dynamic initialization time.
  474. struct StaticDescriptorInitializer {
  475. StaticDescriptorInitializer() {
  476. AddDescriptors();
  477. }
  478. } static_descriptor_initializer;
  479. } // namespace protobuf_google_2ffirestore_2fv1_2fquery_2eproto
  480. namespace google {
  481. namespace firestore {
  482. namespace v1 {
  483. const ::google::protobuf::EnumDescriptor* StructuredQuery_CompositeFilter_Operator_descriptor() {
  484. protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce();
  485. return protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_enum_descriptors[0];
  486. }
  487. bool StructuredQuery_CompositeFilter_Operator_IsValid(int value) {
  488. switch (value) {
  489. case 0:
  490. case 1:
  491. return true;
  492. default:
  493. return false;
  494. }
  495. }
  496. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  497. const StructuredQuery_CompositeFilter_Operator StructuredQuery_CompositeFilter::OPERATOR_UNSPECIFIED;
  498. const StructuredQuery_CompositeFilter_Operator StructuredQuery_CompositeFilter::AND;
  499. const StructuredQuery_CompositeFilter_Operator StructuredQuery_CompositeFilter::Operator_MIN;
  500. const StructuredQuery_CompositeFilter_Operator StructuredQuery_CompositeFilter::Operator_MAX;
  501. const int StructuredQuery_CompositeFilter::Operator_ARRAYSIZE;
  502. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  503. const ::google::protobuf::EnumDescriptor* StructuredQuery_FieldFilter_Operator_descriptor() {
  504. protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce();
  505. return protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_enum_descriptors[1];
  506. }
  507. bool StructuredQuery_FieldFilter_Operator_IsValid(int value) {
  508. switch (value) {
  509. case 0:
  510. case 1:
  511. case 2:
  512. case 3:
  513. case 4:
  514. case 5:
  515. case 7:
  516. return true;
  517. default:
  518. return false;
  519. }
  520. }
  521. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  522. const StructuredQuery_FieldFilter_Operator StructuredQuery_FieldFilter::OPERATOR_UNSPECIFIED;
  523. const StructuredQuery_FieldFilter_Operator StructuredQuery_FieldFilter::LESS_THAN;
  524. const StructuredQuery_FieldFilter_Operator StructuredQuery_FieldFilter::LESS_THAN_OR_EQUAL;
  525. const StructuredQuery_FieldFilter_Operator StructuredQuery_FieldFilter::GREATER_THAN;
  526. const StructuredQuery_FieldFilter_Operator StructuredQuery_FieldFilter::GREATER_THAN_OR_EQUAL;
  527. const StructuredQuery_FieldFilter_Operator StructuredQuery_FieldFilter::EQUAL;
  528. const StructuredQuery_FieldFilter_Operator StructuredQuery_FieldFilter::ARRAY_CONTAINS;
  529. const StructuredQuery_FieldFilter_Operator StructuredQuery_FieldFilter::Operator_MIN;
  530. const StructuredQuery_FieldFilter_Operator StructuredQuery_FieldFilter::Operator_MAX;
  531. const int StructuredQuery_FieldFilter::Operator_ARRAYSIZE;
  532. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  533. const ::google::protobuf::EnumDescriptor* StructuredQuery_UnaryFilter_Operator_descriptor() {
  534. protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce();
  535. return protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_enum_descriptors[2];
  536. }
  537. bool StructuredQuery_UnaryFilter_Operator_IsValid(int value) {
  538. switch (value) {
  539. case 0:
  540. case 2:
  541. case 3:
  542. return true;
  543. default:
  544. return false;
  545. }
  546. }
  547. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  548. const StructuredQuery_UnaryFilter_Operator StructuredQuery_UnaryFilter::OPERATOR_UNSPECIFIED;
  549. const StructuredQuery_UnaryFilter_Operator StructuredQuery_UnaryFilter::IS_NAN;
  550. const StructuredQuery_UnaryFilter_Operator StructuredQuery_UnaryFilter::IS_NULL;
  551. const StructuredQuery_UnaryFilter_Operator StructuredQuery_UnaryFilter::Operator_MIN;
  552. const StructuredQuery_UnaryFilter_Operator StructuredQuery_UnaryFilter::Operator_MAX;
  553. const int StructuredQuery_UnaryFilter::Operator_ARRAYSIZE;
  554. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  555. const ::google::protobuf::EnumDescriptor* StructuredQuery_Direction_descriptor() {
  556. protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce();
  557. return protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_enum_descriptors[3];
  558. }
  559. bool StructuredQuery_Direction_IsValid(int value) {
  560. switch (value) {
  561. case 0:
  562. case 1:
  563. case 2:
  564. return true;
  565. default:
  566. return false;
  567. }
  568. }
  569. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  570. const StructuredQuery_Direction StructuredQuery::DIRECTION_UNSPECIFIED;
  571. const StructuredQuery_Direction StructuredQuery::ASCENDING;
  572. const StructuredQuery_Direction StructuredQuery::DESCENDING;
  573. const StructuredQuery_Direction StructuredQuery::Direction_MIN;
  574. const StructuredQuery_Direction StructuredQuery::Direction_MAX;
  575. const int StructuredQuery::Direction_ARRAYSIZE;
  576. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  577. // ===================================================================
  578. void StructuredQuery_CollectionSelector::InitAsDefaultInstance() {
  579. }
  580. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  581. const int StructuredQuery_CollectionSelector::kCollectionIdFieldNumber;
  582. const int StructuredQuery_CollectionSelector::kAllDescendantsFieldNumber;
  583. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  584. StructuredQuery_CollectionSelector::StructuredQuery_CollectionSelector()
  585. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  586. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  587. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_CollectionSelector();
  588. }
  589. SharedCtor();
  590. // @@protoc_insertion_point(constructor:google.firestore.v1.StructuredQuery.CollectionSelector)
  591. }
  592. StructuredQuery_CollectionSelector::StructuredQuery_CollectionSelector(const StructuredQuery_CollectionSelector& from)
  593. : ::google::protobuf::Message(),
  594. _internal_metadata_(NULL),
  595. _cached_size_(0) {
  596. _internal_metadata_.MergeFrom(from._internal_metadata_);
  597. collection_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  598. if (from.collection_id().size() > 0) {
  599. collection_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.collection_id_);
  600. }
  601. all_descendants_ = from.all_descendants_;
  602. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.StructuredQuery.CollectionSelector)
  603. }
  604. void StructuredQuery_CollectionSelector::SharedCtor() {
  605. collection_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  606. all_descendants_ = false;
  607. _cached_size_ = 0;
  608. }
  609. StructuredQuery_CollectionSelector::~StructuredQuery_CollectionSelector() {
  610. // @@protoc_insertion_point(destructor:google.firestore.v1.StructuredQuery.CollectionSelector)
  611. SharedDtor();
  612. }
  613. void StructuredQuery_CollectionSelector::SharedDtor() {
  614. collection_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  615. }
  616. void StructuredQuery_CollectionSelector::SetCachedSize(int size) const {
  617. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  618. _cached_size_ = size;
  619. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  620. }
  621. const ::google::protobuf::Descriptor* StructuredQuery_CollectionSelector::descriptor() {
  622. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce();
  623. return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  624. }
  625. const StructuredQuery_CollectionSelector& StructuredQuery_CollectionSelector::default_instance() {
  626. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_CollectionSelector();
  627. return *internal_default_instance();
  628. }
  629. StructuredQuery_CollectionSelector* StructuredQuery_CollectionSelector::New(::google::protobuf::Arena* arena) const {
  630. StructuredQuery_CollectionSelector* n = new StructuredQuery_CollectionSelector;
  631. if (arena != NULL) {
  632. arena->Own(n);
  633. }
  634. return n;
  635. }
  636. void StructuredQuery_CollectionSelector::Clear() {
  637. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.StructuredQuery.CollectionSelector)
  638. ::google::protobuf::uint32 cached_has_bits = 0;
  639. // Prevent compiler warnings about cached_has_bits being unused
  640. (void) cached_has_bits;
  641. collection_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  642. all_descendants_ = false;
  643. _internal_metadata_.Clear();
  644. }
  645. bool StructuredQuery_CollectionSelector::MergePartialFromCodedStream(
  646. ::google::protobuf::io::CodedInputStream* input) {
  647. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  648. ::google::protobuf::uint32 tag;
  649. // @@protoc_insertion_point(parse_start:google.firestore.v1.StructuredQuery.CollectionSelector)
  650. for (;;) {
  651. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  652. tag = p.first;
  653. if (!p.second) goto handle_unusual;
  654. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  655. // string collection_id = 2;
  656. case 2: {
  657. if (static_cast< ::google::protobuf::uint8>(tag) ==
  658. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  659. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  660. input, this->mutable_collection_id()));
  661. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  662. this->collection_id().data(), static_cast<int>(this->collection_id().length()),
  663. ::google::protobuf::internal::WireFormatLite::PARSE,
  664. "google.firestore.v1.StructuredQuery.CollectionSelector.collection_id"));
  665. } else {
  666. goto handle_unusual;
  667. }
  668. break;
  669. }
  670. // bool all_descendants = 3;
  671. case 3: {
  672. if (static_cast< ::google::protobuf::uint8>(tag) ==
  673. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  674. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  675. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  676. input, &all_descendants_)));
  677. } else {
  678. goto handle_unusual;
  679. }
  680. break;
  681. }
  682. default: {
  683. handle_unusual:
  684. if (tag == 0) {
  685. goto success;
  686. }
  687. DO_(::google::protobuf::internal::WireFormat::SkipField(
  688. input, tag, _internal_metadata_.mutable_unknown_fields()));
  689. break;
  690. }
  691. }
  692. }
  693. success:
  694. // @@protoc_insertion_point(parse_success:google.firestore.v1.StructuredQuery.CollectionSelector)
  695. return true;
  696. failure:
  697. // @@protoc_insertion_point(parse_failure:google.firestore.v1.StructuredQuery.CollectionSelector)
  698. return false;
  699. #undef DO_
  700. }
  701. void StructuredQuery_CollectionSelector::SerializeWithCachedSizes(
  702. ::google::protobuf::io::CodedOutputStream* output) const {
  703. // @@protoc_insertion_point(serialize_start:google.firestore.v1.StructuredQuery.CollectionSelector)
  704. ::google::protobuf::uint32 cached_has_bits = 0;
  705. (void) cached_has_bits;
  706. // string collection_id = 2;
  707. if (this->collection_id().size() > 0) {
  708. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  709. this->collection_id().data(), static_cast<int>(this->collection_id().length()),
  710. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  711. "google.firestore.v1.StructuredQuery.CollectionSelector.collection_id");
  712. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  713. 2, this->collection_id(), output);
  714. }
  715. // bool all_descendants = 3;
  716. if (this->all_descendants() != 0) {
  717. ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->all_descendants(), output);
  718. }
  719. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  720. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  721. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  722. }
  723. // @@protoc_insertion_point(serialize_end:google.firestore.v1.StructuredQuery.CollectionSelector)
  724. }
  725. ::google::protobuf::uint8* StructuredQuery_CollectionSelector::InternalSerializeWithCachedSizesToArray(
  726. bool deterministic, ::google::protobuf::uint8* target) const {
  727. (void)deterministic; // Unused
  728. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.StructuredQuery.CollectionSelector)
  729. ::google::protobuf::uint32 cached_has_bits = 0;
  730. (void) cached_has_bits;
  731. // string collection_id = 2;
  732. if (this->collection_id().size() > 0) {
  733. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  734. this->collection_id().data(), static_cast<int>(this->collection_id().length()),
  735. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  736. "google.firestore.v1.StructuredQuery.CollectionSelector.collection_id");
  737. target =
  738. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  739. 2, this->collection_id(), target);
  740. }
  741. // bool all_descendants = 3;
  742. if (this->all_descendants() != 0) {
  743. target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->all_descendants(), target);
  744. }
  745. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  746. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  747. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  748. }
  749. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.StructuredQuery.CollectionSelector)
  750. return target;
  751. }
  752. size_t StructuredQuery_CollectionSelector::ByteSizeLong() const {
  753. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.StructuredQuery.CollectionSelector)
  754. size_t total_size = 0;
  755. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  756. total_size +=
  757. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  758. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  759. }
  760. // string collection_id = 2;
  761. if (this->collection_id().size() > 0) {
  762. total_size += 1 +
  763. ::google::protobuf::internal::WireFormatLite::StringSize(
  764. this->collection_id());
  765. }
  766. // bool all_descendants = 3;
  767. if (this->all_descendants() != 0) {
  768. total_size += 1 + 1;
  769. }
  770. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  771. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  772. _cached_size_ = cached_size;
  773. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  774. return total_size;
  775. }
  776. void StructuredQuery_CollectionSelector::MergeFrom(const ::google::protobuf::Message& from) {
  777. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.StructuredQuery.CollectionSelector)
  778. GOOGLE_DCHECK_NE(&from, this);
  779. const StructuredQuery_CollectionSelector* source =
  780. ::google::protobuf::internal::DynamicCastToGenerated<const StructuredQuery_CollectionSelector>(
  781. &from);
  782. if (source == NULL) {
  783. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.StructuredQuery.CollectionSelector)
  784. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  785. } else {
  786. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.StructuredQuery.CollectionSelector)
  787. MergeFrom(*source);
  788. }
  789. }
  790. void StructuredQuery_CollectionSelector::MergeFrom(const StructuredQuery_CollectionSelector& from) {
  791. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.StructuredQuery.CollectionSelector)
  792. GOOGLE_DCHECK_NE(&from, this);
  793. _internal_metadata_.MergeFrom(from._internal_metadata_);
  794. ::google::protobuf::uint32 cached_has_bits = 0;
  795. (void) cached_has_bits;
  796. if (from.collection_id().size() > 0) {
  797. collection_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.collection_id_);
  798. }
  799. if (from.all_descendants() != 0) {
  800. set_all_descendants(from.all_descendants());
  801. }
  802. }
  803. void StructuredQuery_CollectionSelector::CopyFrom(const ::google::protobuf::Message& from) {
  804. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.StructuredQuery.CollectionSelector)
  805. if (&from == this) return;
  806. Clear();
  807. MergeFrom(from);
  808. }
  809. void StructuredQuery_CollectionSelector::CopyFrom(const StructuredQuery_CollectionSelector& from) {
  810. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.StructuredQuery.CollectionSelector)
  811. if (&from == this) return;
  812. Clear();
  813. MergeFrom(from);
  814. }
  815. bool StructuredQuery_CollectionSelector::IsInitialized() const {
  816. return true;
  817. }
  818. void StructuredQuery_CollectionSelector::Swap(StructuredQuery_CollectionSelector* other) {
  819. if (other == this) return;
  820. InternalSwap(other);
  821. }
  822. void StructuredQuery_CollectionSelector::InternalSwap(StructuredQuery_CollectionSelector* other) {
  823. using std::swap;
  824. collection_id_.Swap(&other->collection_id_);
  825. swap(all_descendants_, other->all_descendants_);
  826. _internal_metadata_.Swap(&other->_internal_metadata_);
  827. swap(_cached_size_, other->_cached_size_);
  828. }
  829. ::google::protobuf::Metadata StructuredQuery_CollectionSelector::GetMetadata() const {
  830. protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce();
  831. return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages];
  832. }
  833. // ===================================================================
  834. void StructuredQuery_Filter::InitAsDefaultInstance() {
  835. ::google::firestore::v1::_StructuredQuery_Filter_default_instance_.composite_filter_ = const_cast< ::google::firestore::v1::StructuredQuery_CompositeFilter*>(
  836. ::google::firestore::v1::StructuredQuery_CompositeFilter::internal_default_instance());
  837. ::google::firestore::v1::_StructuredQuery_Filter_default_instance_.field_filter_ = const_cast< ::google::firestore::v1::StructuredQuery_FieldFilter*>(
  838. ::google::firestore::v1::StructuredQuery_FieldFilter::internal_default_instance());
  839. ::google::firestore::v1::_StructuredQuery_Filter_default_instance_.unary_filter_ = const_cast< ::google::firestore::v1::StructuredQuery_UnaryFilter*>(
  840. ::google::firestore::v1::StructuredQuery_UnaryFilter::internal_default_instance());
  841. }
  842. void StructuredQuery_Filter::set_allocated_composite_filter(::google::firestore::v1::StructuredQuery_CompositeFilter* composite_filter) {
  843. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  844. clear_filter_type();
  845. if (composite_filter) {
  846. ::google::protobuf::Arena* submessage_arena = NULL;
  847. if (message_arena != submessage_arena) {
  848. composite_filter = ::google::protobuf::internal::GetOwnedMessage(
  849. message_arena, composite_filter, submessage_arena);
  850. }
  851. set_has_composite_filter();
  852. filter_type_.composite_filter_ = composite_filter;
  853. }
  854. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.Filter.composite_filter)
  855. }
  856. void StructuredQuery_Filter::set_allocated_field_filter(::google::firestore::v1::StructuredQuery_FieldFilter* field_filter) {
  857. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  858. clear_filter_type();
  859. if (field_filter) {
  860. ::google::protobuf::Arena* submessage_arena = NULL;
  861. if (message_arena != submessage_arena) {
  862. field_filter = ::google::protobuf::internal::GetOwnedMessage(
  863. message_arena, field_filter, submessage_arena);
  864. }
  865. set_has_field_filter();
  866. filter_type_.field_filter_ = field_filter;
  867. }
  868. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.Filter.field_filter)
  869. }
  870. void StructuredQuery_Filter::set_allocated_unary_filter(::google::firestore::v1::StructuredQuery_UnaryFilter* unary_filter) {
  871. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  872. clear_filter_type();
  873. if (unary_filter) {
  874. ::google::protobuf::Arena* submessage_arena = NULL;
  875. if (message_arena != submessage_arena) {
  876. unary_filter = ::google::protobuf::internal::GetOwnedMessage(
  877. message_arena, unary_filter, submessage_arena);
  878. }
  879. set_has_unary_filter();
  880. filter_type_.unary_filter_ = unary_filter;
  881. }
  882. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.Filter.unary_filter)
  883. }
  884. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  885. const int StructuredQuery_Filter::kCompositeFilterFieldNumber;
  886. const int StructuredQuery_Filter::kFieldFilterFieldNumber;
  887. const int StructuredQuery_Filter::kUnaryFilterFieldNumber;
  888. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  889. StructuredQuery_Filter::StructuredQuery_Filter()
  890. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  891. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  892. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_CompositeFilter();
  893. }
  894. SharedCtor();
  895. // @@protoc_insertion_point(constructor:google.firestore.v1.StructuredQuery.Filter)
  896. }
  897. StructuredQuery_Filter::StructuredQuery_Filter(const StructuredQuery_Filter& from)
  898. : ::google::protobuf::Message(),
  899. _internal_metadata_(NULL),
  900. _cached_size_(0) {
  901. _internal_metadata_.MergeFrom(from._internal_metadata_);
  902. clear_has_filter_type();
  903. switch (from.filter_type_case()) {
  904. case kCompositeFilter: {
  905. mutable_composite_filter()->::google::firestore::v1::StructuredQuery_CompositeFilter::MergeFrom(from.composite_filter());
  906. break;
  907. }
  908. case kFieldFilter: {
  909. mutable_field_filter()->::google::firestore::v1::StructuredQuery_FieldFilter::MergeFrom(from.field_filter());
  910. break;
  911. }
  912. case kUnaryFilter: {
  913. mutable_unary_filter()->::google::firestore::v1::StructuredQuery_UnaryFilter::MergeFrom(from.unary_filter());
  914. break;
  915. }
  916. case FILTER_TYPE_NOT_SET: {
  917. break;
  918. }
  919. }
  920. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.StructuredQuery.Filter)
  921. }
  922. void StructuredQuery_Filter::SharedCtor() {
  923. clear_has_filter_type();
  924. _cached_size_ = 0;
  925. }
  926. StructuredQuery_Filter::~StructuredQuery_Filter() {
  927. // @@protoc_insertion_point(destructor:google.firestore.v1.StructuredQuery.Filter)
  928. SharedDtor();
  929. }
  930. void StructuredQuery_Filter::SharedDtor() {
  931. if (has_filter_type()) {
  932. clear_filter_type();
  933. }
  934. }
  935. void StructuredQuery_Filter::SetCachedSize(int size) const {
  936. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  937. _cached_size_ = size;
  938. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  939. }
  940. const ::google::protobuf::Descriptor* StructuredQuery_Filter::descriptor() {
  941. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce();
  942. return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  943. }
  944. const StructuredQuery_Filter& StructuredQuery_Filter::default_instance() {
  945. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_CompositeFilter();
  946. return *internal_default_instance();
  947. }
  948. StructuredQuery_Filter* StructuredQuery_Filter::New(::google::protobuf::Arena* arena) const {
  949. StructuredQuery_Filter* n = new StructuredQuery_Filter;
  950. if (arena != NULL) {
  951. arena->Own(n);
  952. }
  953. return n;
  954. }
  955. void StructuredQuery_Filter::clear_filter_type() {
  956. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.StructuredQuery.Filter)
  957. switch (filter_type_case()) {
  958. case kCompositeFilter: {
  959. delete filter_type_.composite_filter_;
  960. break;
  961. }
  962. case kFieldFilter: {
  963. delete filter_type_.field_filter_;
  964. break;
  965. }
  966. case kUnaryFilter: {
  967. delete filter_type_.unary_filter_;
  968. break;
  969. }
  970. case FILTER_TYPE_NOT_SET: {
  971. break;
  972. }
  973. }
  974. _oneof_case_[0] = FILTER_TYPE_NOT_SET;
  975. }
  976. void StructuredQuery_Filter::Clear() {
  977. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.StructuredQuery.Filter)
  978. ::google::protobuf::uint32 cached_has_bits = 0;
  979. // Prevent compiler warnings about cached_has_bits being unused
  980. (void) cached_has_bits;
  981. clear_filter_type();
  982. _internal_metadata_.Clear();
  983. }
  984. bool StructuredQuery_Filter::MergePartialFromCodedStream(
  985. ::google::protobuf::io::CodedInputStream* input) {
  986. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  987. ::google::protobuf::uint32 tag;
  988. // @@protoc_insertion_point(parse_start:google.firestore.v1.StructuredQuery.Filter)
  989. for (;;) {
  990. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  991. tag = p.first;
  992. if (!p.second) goto handle_unusual;
  993. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  994. // .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1;
  995. case 1: {
  996. if (static_cast< ::google::protobuf::uint8>(tag) ==
  997. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  998. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  999. input, mutable_composite_filter()));
  1000. } else {
  1001. goto handle_unusual;
  1002. }
  1003. break;
  1004. }
  1005. // .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2;
  1006. case 2: {
  1007. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1008. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  1009. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1010. input, mutable_field_filter()));
  1011. } else {
  1012. goto handle_unusual;
  1013. }
  1014. break;
  1015. }
  1016. // .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3;
  1017. case 3: {
  1018. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1019. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  1020. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1021. input, mutable_unary_filter()));
  1022. } else {
  1023. goto handle_unusual;
  1024. }
  1025. break;
  1026. }
  1027. default: {
  1028. handle_unusual:
  1029. if (tag == 0) {
  1030. goto success;
  1031. }
  1032. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1033. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1034. break;
  1035. }
  1036. }
  1037. }
  1038. success:
  1039. // @@protoc_insertion_point(parse_success:google.firestore.v1.StructuredQuery.Filter)
  1040. return true;
  1041. failure:
  1042. // @@protoc_insertion_point(parse_failure:google.firestore.v1.StructuredQuery.Filter)
  1043. return false;
  1044. #undef DO_
  1045. }
  1046. void StructuredQuery_Filter::SerializeWithCachedSizes(
  1047. ::google::protobuf::io::CodedOutputStream* output) const {
  1048. // @@protoc_insertion_point(serialize_start:google.firestore.v1.StructuredQuery.Filter)
  1049. ::google::protobuf::uint32 cached_has_bits = 0;
  1050. (void) cached_has_bits;
  1051. // .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1;
  1052. if (has_composite_filter()) {
  1053. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1054. 1, *filter_type_.composite_filter_, output);
  1055. }
  1056. // .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2;
  1057. if (has_field_filter()) {
  1058. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1059. 2, *filter_type_.field_filter_, output);
  1060. }
  1061. // .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3;
  1062. if (has_unary_filter()) {
  1063. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1064. 3, *filter_type_.unary_filter_, output);
  1065. }
  1066. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1067. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1068. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1069. }
  1070. // @@protoc_insertion_point(serialize_end:google.firestore.v1.StructuredQuery.Filter)
  1071. }
  1072. ::google::protobuf::uint8* StructuredQuery_Filter::InternalSerializeWithCachedSizesToArray(
  1073. bool deterministic, ::google::protobuf::uint8* target) const {
  1074. (void)deterministic; // Unused
  1075. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.StructuredQuery.Filter)
  1076. ::google::protobuf::uint32 cached_has_bits = 0;
  1077. (void) cached_has_bits;
  1078. // .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1;
  1079. if (has_composite_filter()) {
  1080. target = ::google::protobuf::internal::WireFormatLite::
  1081. InternalWriteMessageToArray(
  1082. 1, *filter_type_.composite_filter_, deterministic, target);
  1083. }
  1084. // .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2;
  1085. if (has_field_filter()) {
  1086. target = ::google::protobuf::internal::WireFormatLite::
  1087. InternalWriteMessageToArray(
  1088. 2, *filter_type_.field_filter_, deterministic, target);
  1089. }
  1090. // .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3;
  1091. if (has_unary_filter()) {
  1092. target = ::google::protobuf::internal::WireFormatLite::
  1093. InternalWriteMessageToArray(
  1094. 3, *filter_type_.unary_filter_, deterministic, target);
  1095. }
  1096. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1097. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1098. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1099. }
  1100. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.StructuredQuery.Filter)
  1101. return target;
  1102. }
  1103. size_t StructuredQuery_Filter::ByteSizeLong() const {
  1104. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.StructuredQuery.Filter)
  1105. size_t total_size = 0;
  1106. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1107. total_size +=
  1108. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1109. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1110. }
  1111. switch (filter_type_case()) {
  1112. // .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1;
  1113. case kCompositeFilter: {
  1114. total_size += 1 +
  1115. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1116. *filter_type_.composite_filter_);
  1117. break;
  1118. }
  1119. // .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2;
  1120. case kFieldFilter: {
  1121. total_size += 1 +
  1122. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1123. *filter_type_.field_filter_);
  1124. break;
  1125. }
  1126. // .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3;
  1127. case kUnaryFilter: {
  1128. total_size += 1 +
  1129. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1130. *filter_type_.unary_filter_);
  1131. break;
  1132. }
  1133. case FILTER_TYPE_NOT_SET: {
  1134. break;
  1135. }
  1136. }
  1137. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1138. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1139. _cached_size_ = cached_size;
  1140. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1141. return total_size;
  1142. }
  1143. void StructuredQuery_Filter::MergeFrom(const ::google::protobuf::Message& from) {
  1144. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.StructuredQuery.Filter)
  1145. GOOGLE_DCHECK_NE(&from, this);
  1146. const StructuredQuery_Filter* source =
  1147. ::google::protobuf::internal::DynamicCastToGenerated<const StructuredQuery_Filter>(
  1148. &from);
  1149. if (source == NULL) {
  1150. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.StructuredQuery.Filter)
  1151. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1152. } else {
  1153. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.StructuredQuery.Filter)
  1154. MergeFrom(*source);
  1155. }
  1156. }
  1157. void StructuredQuery_Filter::MergeFrom(const StructuredQuery_Filter& from) {
  1158. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.StructuredQuery.Filter)
  1159. GOOGLE_DCHECK_NE(&from, this);
  1160. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1161. ::google::protobuf::uint32 cached_has_bits = 0;
  1162. (void) cached_has_bits;
  1163. switch (from.filter_type_case()) {
  1164. case kCompositeFilter: {
  1165. mutable_composite_filter()->::google::firestore::v1::StructuredQuery_CompositeFilter::MergeFrom(from.composite_filter());
  1166. break;
  1167. }
  1168. case kFieldFilter: {
  1169. mutable_field_filter()->::google::firestore::v1::StructuredQuery_FieldFilter::MergeFrom(from.field_filter());
  1170. break;
  1171. }
  1172. case kUnaryFilter: {
  1173. mutable_unary_filter()->::google::firestore::v1::StructuredQuery_UnaryFilter::MergeFrom(from.unary_filter());
  1174. break;
  1175. }
  1176. case FILTER_TYPE_NOT_SET: {
  1177. break;
  1178. }
  1179. }
  1180. }
  1181. void StructuredQuery_Filter::CopyFrom(const ::google::protobuf::Message& from) {
  1182. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.StructuredQuery.Filter)
  1183. if (&from == this) return;
  1184. Clear();
  1185. MergeFrom(from);
  1186. }
  1187. void StructuredQuery_Filter::CopyFrom(const StructuredQuery_Filter& from) {
  1188. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.StructuredQuery.Filter)
  1189. if (&from == this) return;
  1190. Clear();
  1191. MergeFrom(from);
  1192. }
  1193. bool StructuredQuery_Filter::IsInitialized() const {
  1194. return true;
  1195. }
  1196. void StructuredQuery_Filter::Swap(StructuredQuery_Filter* other) {
  1197. if (other == this) return;
  1198. InternalSwap(other);
  1199. }
  1200. void StructuredQuery_Filter::InternalSwap(StructuredQuery_Filter* other) {
  1201. using std::swap;
  1202. swap(filter_type_, other->filter_type_);
  1203. swap(_oneof_case_[0], other->_oneof_case_[0]);
  1204. _internal_metadata_.Swap(&other->_internal_metadata_);
  1205. swap(_cached_size_, other->_cached_size_);
  1206. }
  1207. ::google::protobuf::Metadata StructuredQuery_Filter::GetMetadata() const {
  1208. protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce();
  1209. return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages];
  1210. }
  1211. // ===================================================================
  1212. void StructuredQuery_CompositeFilter::InitAsDefaultInstance() {
  1213. }
  1214. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1215. const int StructuredQuery_CompositeFilter::kOpFieldNumber;
  1216. const int StructuredQuery_CompositeFilter::kFiltersFieldNumber;
  1217. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1218. StructuredQuery_CompositeFilter::StructuredQuery_CompositeFilter()
  1219. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1220. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  1221. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_CompositeFilter();
  1222. }
  1223. SharedCtor();
  1224. // @@protoc_insertion_point(constructor:google.firestore.v1.StructuredQuery.CompositeFilter)
  1225. }
  1226. StructuredQuery_CompositeFilter::StructuredQuery_CompositeFilter(const StructuredQuery_CompositeFilter& from)
  1227. : ::google::protobuf::Message(),
  1228. _internal_metadata_(NULL),
  1229. filters_(from.filters_),
  1230. _cached_size_(0) {
  1231. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1232. op_ = from.op_;
  1233. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.StructuredQuery.CompositeFilter)
  1234. }
  1235. void StructuredQuery_CompositeFilter::SharedCtor() {
  1236. op_ = 0;
  1237. _cached_size_ = 0;
  1238. }
  1239. StructuredQuery_CompositeFilter::~StructuredQuery_CompositeFilter() {
  1240. // @@protoc_insertion_point(destructor:google.firestore.v1.StructuredQuery.CompositeFilter)
  1241. SharedDtor();
  1242. }
  1243. void StructuredQuery_CompositeFilter::SharedDtor() {
  1244. }
  1245. void StructuredQuery_CompositeFilter::SetCachedSize(int size) const {
  1246. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1247. _cached_size_ = size;
  1248. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1249. }
  1250. const ::google::protobuf::Descriptor* StructuredQuery_CompositeFilter::descriptor() {
  1251. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce();
  1252. return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1253. }
  1254. const StructuredQuery_CompositeFilter& StructuredQuery_CompositeFilter::default_instance() {
  1255. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_CompositeFilter();
  1256. return *internal_default_instance();
  1257. }
  1258. StructuredQuery_CompositeFilter* StructuredQuery_CompositeFilter::New(::google::protobuf::Arena* arena) const {
  1259. StructuredQuery_CompositeFilter* n = new StructuredQuery_CompositeFilter;
  1260. if (arena != NULL) {
  1261. arena->Own(n);
  1262. }
  1263. return n;
  1264. }
  1265. void StructuredQuery_CompositeFilter::Clear() {
  1266. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.StructuredQuery.CompositeFilter)
  1267. ::google::protobuf::uint32 cached_has_bits = 0;
  1268. // Prevent compiler warnings about cached_has_bits being unused
  1269. (void) cached_has_bits;
  1270. filters_.Clear();
  1271. op_ = 0;
  1272. _internal_metadata_.Clear();
  1273. }
  1274. bool StructuredQuery_CompositeFilter::MergePartialFromCodedStream(
  1275. ::google::protobuf::io::CodedInputStream* input) {
  1276. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1277. ::google::protobuf::uint32 tag;
  1278. // @@protoc_insertion_point(parse_start:google.firestore.v1.StructuredQuery.CompositeFilter)
  1279. for (;;) {
  1280. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1281. tag = p.first;
  1282. if (!p.second) goto handle_unusual;
  1283. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1284. // .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1;
  1285. case 1: {
  1286. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1287. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  1288. int value;
  1289. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1290. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  1291. input, &value)));
  1292. set_op(static_cast< ::google::firestore::v1::StructuredQuery_CompositeFilter_Operator >(value));
  1293. } else {
  1294. goto handle_unusual;
  1295. }
  1296. break;
  1297. }
  1298. // repeated .google.firestore.v1.StructuredQuery.Filter filters = 2;
  1299. case 2: {
  1300. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1301. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  1302. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_filters()));
  1303. } else {
  1304. goto handle_unusual;
  1305. }
  1306. break;
  1307. }
  1308. default: {
  1309. handle_unusual:
  1310. if (tag == 0) {
  1311. goto success;
  1312. }
  1313. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1314. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1315. break;
  1316. }
  1317. }
  1318. }
  1319. success:
  1320. // @@protoc_insertion_point(parse_success:google.firestore.v1.StructuredQuery.CompositeFilter)
  1321. return true;
  1322. failure:
  1323. // @@protoc_insertion_point(parse_failure:google.firestore.v1.StructuredQuery.CompositeFilter)
  1324. return false;
  1325. #undef DO_
  1326. }
  1327. void StructuredQuery_CompositeFilter::SerializeWithCachedSizes(
  1328. ::google::protobuf::io::CodedOutputStream* output) const {
  1329. // @@protoc_insertion_point(serialize_start:google.firestore.v1.StructuredQuery.CompositeFilter)
  1330. ::google::protobuf::uint32 cached_has_bits = 0;
  1331. (void) cached_has_bits;
  1332. // .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1;
  1333. if (this->op() != 0) {
  1334. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  1335. 1, this->op(), output);
  1336. }
  1337. // repeated .google.firestore.v1.StructuredQuery.Filter filters = 2;
  1338. for (unsigned int i = 0,
  1339. n = static_cast<unsigned int>(this->filters_size()); i < n; i++) {
  1340. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1341. 2, this->filters(static_cast<int>(i)), output);
  1342. }
  1343. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1344. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1345. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1346. }
  1347. // @@protoc_insertion_point(serialize_end:google.firestore.v1.StructuredQuery.CompositeFilter)
  1348. }
  1349. ::google::protobuf::uint8* StructuredQuery_CompositeFilter::InternalSerializeWithCachedSizesToArray(
  1350. bool deterministic, ::google::protobuf::uint8* target) const {
  1351. (void)deterministic; // Unused
  1352. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.StructuredQuery.CompositeFilter)
  1353. ::google::protobuf::uint32 cached_has_bits = 0;
  1354. (void) cached_has_bits;
  1355. // .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1;
  1356. if (this->op() != 0) {
  1357. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  1358. 1, this->op(), target);
  1359. }
  1360. // repeated .google.firestore.v1.StructuredQuery.Filter filters = 2;
  1361. for (unsigned int i = 0,
  1362. n = static_cast<unsigned int>(this->filters_size()); i < n; i++) {
  1363. target = ::google::protobuf::internal::WireFormatLite::
  1364. InternalWriteMessageToArray(
  1365. 2, this->filters(static_cast<int>(i)), deterministic, target);
  1366. }
  1367. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1368. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1369. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1370. }
  1371. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.StructuredQuery.CompositeFilter)
  1372. return target;
  1373. }
  1374. size_t StructuredQuery_CompositeFilter::ByteSizeLong() const {
  1375. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.StructuredQuery.CompositeFilter)
  1376. size_t total_size = 0;
  1377. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1378. total_size +=
  1379. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1380. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1381. }
  1382. // repeated .google.firestore.v1.StructuredQuery.Filter filters = 2;
  1383. {
  1384. unsigned int count = static_cast<unsigned int>(this->filters_size());
  1385. total_size += 1UL * count;
  1386. for (unsigned int i = 0; i < count; i++) {
  1387. total_size +=
  1388. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1389. this->filters(static_cast<int>(i)));
  1390. }
  1391. }
  1392. // .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1;
  1393. if (this->op() != 0) {
  1394. total_size += 1 +
  1395. ::google::protobuf::internal::WireFormatLite::EnumSize(this->op());
  1396. }
  1397. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1398. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1399. _cached_size_ = cached_size;
  1400. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1401. return total_size;
  1402. }
  1403. void StructuredQuery_CompositeFilter::MergeFrom(const ::google::protobuf::Message& from) {
  1404. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.StructuredQuery.CompositeFilter)
  1405. GOOGLE_DCHECK_NE(&from, this);
  1406. const StructuredQuery_CompositeFilter* source =
  1407. ::google::protobuf::internal::DynamicCastToGenerated<const StructuredQuery_CompositeFilter>(
  1408. &from);
  1409. if (source == NULL) {
  1410. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.StructuredQuery.CompositeFilter)
  1411. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1412. } else {
  1413. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.StructuredQuery.CompositeFilter)
  1414. MergeFrom(*source);
  1415. }
  1416. }
  1417. void StructuredQuery_CompositeFilter::MergeFrom(const StructuredQuery_CompositeFilter& from) {
  1418. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.StructuredQuery.CompositeFilter)
  1419. GOOGLE_DCHECK_NE(&from, this);
  1420. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1421. ::google::protobuf::uint32 cached_has_bits = 0;
  1422. (void) cached_has_bits;
  1423. filters_.MergeFrom(from.filters_);
  1424. if (from.op() != 0) {
  1425. set_op(from.op());
  1426. }
  1427. }
  1428. void StructuredQuery_CompositeFilter::CopyFrom(const ::google::protobuf::Message& from) {
  1429. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.StructuredQuery.CompositeFilter)
  1430. if (&from == this) return;
  1431. Clear();
  1432. MergeFrom(from);
  1433. }
  1434. void StructuredQuery_CompositeFilter::CopyFrom(const StructuredQuery_CompositeFilter& from) {
  1435. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.StructuredQuery.CompositeFilter)
  1436. if (&from == this) return;
  1437. Clear();
  1438. MergeFrom(from);
  1439. }
  1440. bool StructuredQuery_CompositeFilter::IsInitialized() const {
  1441. return true;
  1442. }
  1443. void StructuredQuery_CompositeFilter::Swap(StructuredQuery_CompositeFilter* other) {
  1444. if (other == this) return;
  1445. InternalSwap(other);
  1446. }
  1447. void StructuredQuery_CompositeFilter::InternalSwap(StructuredQuery_CompositeFilter* other) {
  1448. using std::swap;
  1449. filters_.InternalSwap(&other->filters_);
  1450. swap(op_, other->op_);
  1451. _internal_metadata_.Swap(&other->_internal_metadata_);
  1452. swap(_cached_size_, other->_cached_size_);
  1453. }
  1454. ::google::protobuf::Metadata StructuredQuery_CompositeFilter::GetMetadata() const {
  1455. protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce();
  1456. return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages];
  1457. }
  1458. // ===================================================================
  1459. void StructuredQuery_FieldFilter::InitAsDefaultInstance() {
  1460. ::google::firestore::v1::_StructuredQuery_FieldFilter_default_instance_._instance.get_mutable()->field_ = const_cast< ::google::firestore::v1::StructuredQuery_FieldReference*>(
  1461. ::google::firestore::v1::StructuredQuery_FieldReference::internal_default_instance());
  1462. ::google::firestore::v1::_StructuredQuery_FieldFilter_default_instance_._instance.get_mutable()->value_ = const_cast< ::google::firestore::v1::Value*>(
  1463. ::google::firestore::v1::Value::internal_default_instance());
  1464. }
  1465. void StructuredQuery_FieldFilter::clear_value() {
  1466. if (GetArenaNoVirtual() == NULL && value_ != NULL) {
  1467. delete value_;
  1468. }
  1469. value_ = NULL;
  1470. }
  1471. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1472. const int StructuredQuery_FieldFilter::kFieldFieldNumber;
  1473. const int StructuredQuery_FieldFilter::kOpFieldNumber;
  1474. const int StructuredQuery_FieldFilter::kValueFieldNumber;
  1475. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1476. StructuredQuery_FieldFilter::StructuredQuery_FieldFilter()
  1477. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1478. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  1479. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldFilter();
  1480. }
  1481. SharedCtor();
  1482. // @@protoc_insertion_point(constructor:google.firestore.v1.StructuredQuery.FieldFilter)
  1483. }
  1484. StructuredQuery_FieldFilter::StructuredQuery_FieldFilter(const StructuredQuery_FieldFilter& from)
  1485. : ::google::protobuf::Message(),
  1486. _internal_metadata_(NULL),
  1487. _cached_size_(0) {
  1488. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1489. if (from.has_field()) {
  1490. field_ = new ::google::firestore::v1::StructuredQuery_FieldReference(*from.field_);
  1491. } else {
  1492. field_ = NULL;
  1493. }
  1494. if (from.has_value()) {
  1495. value_ = new ::google::firestore::v1::Value(*from.value_);
  1496. } else {
  1497. value_ = NULL;
  1498. }
  1499. op_ = from.op_;
  1500. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.StructuredQuery.FieldFilter)
  1501. }
  1502. void StructuredQuery_FieldFilter::SharedCtor() {
  1503. ::memset(&field_, 0, static_cast<size_t>(
  1504. reinterpret_cast<char*>(&op_) -
  1505. reinterpret_cast<char*>(&field_)) + sizeof(op_));
  1506. _cached_size_ = 0;
  1507. }
  1508. StructuredQuery_FieldFilter::~StructuredQuery_FieldFilter() {
  1509. // @@protoc_insertion_point(destructor:google.firestore.v1.StructuredQuery.FieldFilter)
  1510. SharedDtor();
  1511. }
  1512. void StructuredQuery_FieldFilter::SharedDtor() {
  1513. if (this != internal_default_instance()) delete field_;
  1514. if (this != internal_default_instance()) delete value_;
  1515. }
  1516. void StructuredQuery_FieldFilter::SetCachedSize(int size) const {
  1517. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1518. _cached_size_ = size;
  1519. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1520. }
  1521. const ::google::protobuf::Descriptor* StructuredQuery_FieldFilter::descriptor() {
  1522. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce();
  1523. return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1524. }
  1525. const StructuredQuery_FieldFilter& StructuredQuery_FieldFilter::default_instance() {
  1526. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldFilter();
  1527. return *internal_default_instance();
  1528. }
  1529. StructuredQuery_FieldFilter* StructuredQuery_FieldFilter::New(::google::protobuf::Arena* arena) const {
  1530. StructuredQuery_FieldFilter* n = new StructuredQuery_FieldFilter;
  1531. if (arena != NULL) {
  1532. arena->Own(n);
  1533. }
  1534. return n;
  1535. }
  1536. void StructuredQuery_FieldFilter::Clear() {
  1537. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.StructuredQuery.FieldFilter)
  1538. ::google::protobuf::uint32 cached_has_bits = 0;
  1539. // Prevent compiler warnings about cached_has_bits being unused
  1540. (void) cached_has_bits;
  1541. if (GetArenaNoVirtual() == NULL && field_ != NULL) {
  1542. delete field_;
  1543. }
  1544. field_ = NULL;
  1545. if (GetArenaNoVirtual() == NULL && value_ != NULL) {
  1546. delete value_;
  1547. }
  1548. value_ = NULL;
  1549. op_ = 0;
  1550. _internal_metadata_.Clear();
  1551. }
  1552. bool StructuredQuery_FieldFilter::MergePartialFromCodedStream(
  1553. ::google::protobuf::io::CodedInputStream* input) {
  1554. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1555. ::google::protobuf::uint32 tag;
  1556. // @@protoc_insertion_point(parse_start:google.firestore.v1.StructuredQuery.FieldFilter)
  1557. for (;;) {
  1558. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1559. tag = p.first;
  1560. if (!p.second) goto handle_unusual;
  1561. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1562. // .google.firestore.v1.StructuredQuery.FieldReference field = 1;
  1563. case 1: {
  1564. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1565. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1566. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1567. input, mutable_field()));
  1568. } else {
  1569. goto handle_unusual;
  1570. }
  1571. break;
  1572. }
  1573. // .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2;
  1574. case 2: {
  1575. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1576. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  1577. int value;
  1578. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1579. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  1580. input, &value)));
  1581. set_op(static_cast< ::google::firestore::v1::StructuredQuery_FieldFilter_Operator >(value));
  1582. } else {
  1583. goto handle_unusual;
  1584. }
  1585. break;
  1586. }
  1587. // .google.firestore.v1.Value value = 3;
  1588. case 3: {
  1589. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1590. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  1591. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1592. input, mutable_value()));
  1593. } else {
  1594. goto handle_unusual;
  1595. }
  1596. break;
  1597. }
  1598. default: {
  1599. handle_unusual:
  1600. if (tag == 0) {
  1601. goto success;
  1602. }
  1603. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1604. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1605. break;
  1606. }
  1607. }
  1608. }
  1609. success:
  1610. // @@protoc_insertion_point(parse_success:google.firestore.v1.StructuredQuery.FieldFilter)
  1611. return true;
  1612. failure:
  1613. // @@protoc_insertion_point(parse_failure:google.firestore.v1.StructuredQuery.FieldFilter)
  1614. return false;
  1615. #undef DO_
  1616. }
  1617. void StructuredQuery_FieldFilter::SerializeWithCachedSizes(
  1618. ::google::protobuf::io::CodedOutputStream* output) const {
  1619. // @@protoc_insertion_point(serialize_start:google.firestore.v1.StructuredQuery.FieldFilter)
  1620. ::google::protobuf::uint32 cached_has_bits = 0;
  1621. (void) cached_has_bits;
  1622. // .google.firestore.v1.StructuredQuery.FieldReference field = 1;
  1623. if (this->has_field()) {
  1624. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1625. 1, *this->field_, output);
  1626. }
  1627. // .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2;
  1628. if (this->op() != 0) {
  1629. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  1630. 2, this->op(), output);
  1631. }
  1632. // .google.firestore.v1.Value value = 3;
  1633. if (this->has_value()) {
  1634. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1635. 3, *this->value_, output);
  1636. }
  1637. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1638. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1639. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1640. }
  1641. // @@protoc_insertion_point(serialize_end:google.firestore.v1.StructuredQuery.FieldFilter)
  1642. }
  1643. ::google::protobuf::uint8* StructuredQuery_FieldFilter::InternalSerializeWithCachedSizesToArray(
  1644. bool deterministic, ::google::protobuf::uint8* target) const {
  1645. (void)deterministic; // Unused
  1646. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.StructuredQuery.FieldFilter)
  1647. ::google::protobuf::uint32 cached_has_bits = 0;
  1648. (void) cached_has_bits;
  1649. // .google.firestore.v1.StructuredQuery.FieldReference field = 1;
  1650. if (this->has_field()) {
  1651. target = ::google::protobuf::internal::WireFormatLite::
  1652. InternalWriteMessageToArray(
  1653. 1, *this->field_, deterministic, target);
  1654. }
  1655. // .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2;
  1656. if (this->op() != 0) {
  1657. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  1658. 2, this->op(), target);
  1659. }
  1660. // .google.firestore.v1.Value value = 3;
  1661. if (this->has_value()) {
  1662. target = ::google::protobuf::internal::WireFormatLite::
  1663. InternalWriteMessageToArray(
  1664. 3, *this->value_, deterministic, target);
  1665. }
  1666. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1667. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1668. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1669. }
  1670. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.StructuredQuery.FieldFilter)
  1671. return target;
  1672. }
  1673. size_t StructuredQuery_FieldFilter::ByteSizeLong() const {
  1674. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.StructuredQuery.FieldFilter)
  1675. size_t total_size = 0;
  1676. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1677. total_size +=
  1678. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1679. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1680. }
  1681. // .google.firestore.v1.StructuredQuery.FieldReference field = 1;
  1682. if (this->has_field()) {
  1683. total_size += 1 +
  1684. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1685. *this->field_);
  1686. }
  1687. // .google.firestore.v1.Value value = 3;
  1688. if (this->has_value()) {
  1689. total_size += 1 +
  1690. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1691. *this->value_);
  1692. }
  1693. // .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2;
  1694. if (this->op() != 0) {
  1695. total_size += 1 +
  1696. ::google::protobuf::internal::WireFormatLite::EnumSize(this->op());
  1697. }
  1698. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1699. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1700. _cached_size_ = cached_size;
  1701. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1702. return total_size;
  1703. }
  1704. void StructuredQuery_FieldFilter::MergeFrom(const ::google::protobuf::Message& from) {
  1705. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.StructuredQuery.FieldFilter)
  1706. GOOGLE_DCHECK_NE(&from, this);
  1707. const StructuredQuery_FieldFilter* source =
  1708. ::google::protobuf::internal::DynamicCastToGenerated<const StructuredQuery_FieldFilter>(
  1709. &from);
  1710. if (source == NULL) {
  1711. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.StructuredQuery.FieldFilter)
  1712. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1713. } else {
  1714. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.StructuredQuery.FieldFilter)
  1715. MergeFrom(*source);
  1716. }
  1717. }
  1718. void StructuredQuery_FieldFilter::MergeFrom(const StructuredQuery_FieldFilter& from) {
  1719. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.StructuredQuery.FieldFilter)
  1720. GOOGLE_DCHECK_NE(&from, this);
  1721. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1722. ::google::protobuf::uint32 cached_has_bits = 0;
  1723. (void) cached_has_bits;
  1724. if (from.has_field()) {
  1725. mutable_field()->::google::firestore::v1::StructuredQuery_FieldReference::MergeFrom(from.field());
  1726. }
  1727. if (from.has_value()) {
  1728. mutable_value()->::google::firestore::v1::Value::MergeFrom(from.value());
  1729. }
  1730. if (from.op() != 0) {
  1731. set_op(from.op());
  1732. }
  1733. }
  1734. void StructuredQuery_FieldFilter::CopyFrom(const ::google::protobuf::Message& from) {
  1735. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.StructuredQuery.FieldFilter)
  1736. if (&from == this) return;
  1737. Clear();
  1738. MergeFrom(from);
  1739. }
  1740. void StructuredQuery_FieldFilter::CopyFrom(const StructuredQuery_FieldFilter& from) {
  1741. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.StructuredQuery.FieldFilter)
  1742. if (&from == this) return;
  1743. Clear();
  1744. MergeFrom(from);
  1745. }
  1746. bool StructuredQuery_FieldFilter::IsInitialized() const {
  1747. return true;
  1748. }
  1749. void StructuredQuery_FieldFilter::Swap(StructuredQuery_FieldFilter* other) {
  1750. if (other == this) return;
  1751. InternalSwap(other);
  1752. }
  1753. void StructuredQuery_FieldFilter::InternalSwap(StructuredQuery_FieldFilter* other) {
  1754. using std::swap;
  1755. swap(field_, other->field_);
  1756. swap(value_, other->value_);
  1757. swap(op_, other->op_);
  1758. _internal_metadata_.Swap(&other->_internal_metadata_);
  1759. swap(_cached_size_, other->_cached_size_);
  1760. }
  1761. ::google::protobuf::Metadata StructuredQuery_FieldFilter::GetMetadata() const {
  1762. protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce();
  1763. return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages];
  1764. }
  1765. // ===================================================================
  1766. void StructuredQuery_UnaryFilter::InitAsDefaultInstance() {
  1767. ::google::firestore::v1::_StructuredQuery_UnaryFilter_default_instance_.field_ = const_cast< ::google::firestore::v1::StructuredQuery_FieldReference*>(
  1768. ::google::firestore::v1::StructuredQuery_FieldReference::internal_default_instance());
  1769. }
  1770. void StructuredQuery_UnaryFilter::set_allocated_field(::google::firestore::v1::StructuredQuery_FieldReference* field) {
  1771. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  1772. clear_operand_type();
  1773. if (field) {
  1774. ::google::protobuf::Arena* submessage_arena = NULL;
  1775. if (message_arena != submessage_arena) {
  1776. field = ::google::protobuf::internal::GetOwnedMessage(
  1777. message_arena, field, submessage_arena);
  1778. }
  1779. set_has_field();
  1780. operand_type_.field_ = field;
  1781. }
  1782. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.UnaryFilter.field)
  1783. }
  1784. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1785. const int StructuredQuery_UnaryFilter::kOpFieldNumber;
  1786. const int StructuredQuery_UnaryFilter::kFieldFieldNumber;
  1787. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1788. StructuredQuery_UnaryFilter::StructuredQuery_UnaryFilter()
  1789. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1790. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  1791. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_UnaryFilter();
  1792. }
  1793. SharedCtor();
  1794. // @@protoc_insertion_point(constructor:google.firestore.v1.StructuredQuery.UnaryFilter)
  1795. }
  1796. StructuredQuery_UnaryFilter::StructuredQuery_UnaryFilter(const StructuredQuery_UnaryFilter& from)
  1797. : ::google::protobuf::Message(),
  1798. _internal_metadata_(NULL),
  1799. _cached_size_(0) {
  1800. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1801. op_ = from.op_;
  1802. clear_has_operand_type();
  1803. switch (from.operand_type_case()) {
  1804. case kField: {
  1805. mutable_field()->::google::firestore::v1::StructuredQuery_FieldReference::MergeFrom(from.field());
  1806. break;
  1807. }
  1808. case OPERAND_TYPE_NOT_SET: {
  1809. break;
  1810. }
  1811. }
  1812. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.StructuredQuery.UnaryFilter)
  1813. }
  1814. void StructuredQuery_UnaryFilter::SharedCtor() {
  1815. op_ = 0;
  1816. clear_has_operand_type();
  1817. _cached_size_ = 0;
  1818. }
  1819. StructuredQuery_UnaryFilter::~StructuredQuery_UnaryFilter() {
  1820. // @@protoc_insertion_point(destructor:google.firestore.v1.StructuredQuery.UnaryFilter)
  1821. SharedDtor();
  1822. }
  1823. void StructuredQuery_UnaryFilter::SharedDtor() {
  1824. if (has_operand_type()) {
  1825. clear_operand_type();
  1826. }
  1827. }
  1828. void StructuredQuery_UnaryFilter::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* StructuredQuery_UnaryFilter::descriptor() {
  1834. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce();
  1835. return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1836. }
  1837. const StructuredQuery_UnaryFilter& StructuredQuery_UnaryFilter::default_instance() {
  1838. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_UnaryFilter();
  1839. return *internal_default_instance();
  1840. }
  1841. StructuredQuery_UnaryFilter* StructuredQuery_UnaryFilter::New(::google::protobuf::Arena* arena) const {
  1842. StructuredQuery_UnaryFilter* n = new StructuredQuery_UnaryFilter;
  1843. if (arena != NULL) {
  1844. arena->Own(n);
  1845. }
  1846. return n;
  1847. }
  1848. void StructuredQuery_UnaryFilter::clear_operand_type() {
  1849. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.StructuredQuery.UnaryFilter)
  1850. switch (operand_type_case()) {
  1851. case kField: {
  1852. delete operand_type_.field_;
  1853. break;
  1854. }
  1855. case OPERAND_TYPE_NOT_SET: {
  1856. break;
  1857. }
  1858. }
  1859. _oneof_case_[0] = OPERAND_TYPE_NOT_SET;
  1860. }
  1861. void StructuredQuery_UnaryFilter::Clear() {
  1862. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.StructuredQuery.UnaryFilter)
  1863. ::google::protobuf::uint32 cached_has_bits = 0;
  1864. // Prevent compiler warnings about cached_has_bits being unused
  1865. (void) cached_has_bits;
  1866. op_ = 0;
  1867. clear_operand_type();
  1868. _internal_metadata_.Clear();
  1869. }
  1870. bool StructuredQuery_UnaryFilter::MergePartialFromCodedStream(
  1871. ::google::protobuf::io::CodedInputStream* input) {
  1872. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1873. ::google::protobuf::uint32 tag;
  1874. // @@protoc_insertion_point(parse_start:google.firestore.v1.StructuredQuery.UnaryFilter)
  1875. for (;;) {
  1876. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1877. tag = p.first;
  1878. if (!p.second) goto handle_unusual;
  1879. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1880. // .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1;
  1881. case 1: {
  1882. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1883. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  1884. int value;
  1885. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1886. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  1887. input, &value)));
  1888. set_op(static_cast< ::google::firestore::v1::StructuredQuery_UnaryFilter_Operator >(value));
  1889. } else {
  1890. goto handle_unusual;
  1891. }
  1892. break;
  1893. }
  1894. // .google.firestore.v1.StructuredQuery.FieldReference field = 2;
  1895. case 2: {
  1896. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1897. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  1898. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1899. input, mutable_field()));
  1900. } else {
  1901. goto handle_unusual;
  1902. }
  1903. break;
  1904. }
  1905. default: {
  1906. handle_unusual:
  1907. if (tag == 0) {
  1908. goto success;
  1909. }
  1910. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1911. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1912. break;
  1913. }
  1914. }
  1915. }
  1916. success:
  1917. // @@protoc_insertion_point(parse_success:google.firestore.v1.StructuredQuery.UnaryFilter)
  1918. return true;
  1919. failure:
  1920. // @@protoc_insertion_point(parse_failure:google.firestore.v1.StructuredQuery.UnaryFilter)
  1921. return false;
  1922. #undef DO_
  1923. }
  1924. void StructuredQuery_UnaryFilter::SerializeWithCachedSizes(
  1925. ::google::protobuf::io::CodedOutputStream* output) const {
  1926. // @@protoc_insertion_point(serialize_start:google.firestore.v1.StructuredQuery.UnaryFilter)
  1927. ::google::protobuf::uint32 cached_has_bits = 0;
  1928. (void) cached_has_bits;
  1929. // .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1;
  1930. if (this->op() != 0) {
  1931. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  1932. 1, this->op(), output);
  1933. }
  1934. // .google.firestore.v1.StructuredQuery.FieldReference field = 2;
  1935. if (has_field()) {
  1936. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1937. 2, *operand_type_.field_, output);
  1938. }
  1939. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1940. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1941. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1942. }
  1943. // @@protoc_insertion_point(serialize_end:google.firestore.v1.StructuredQuery.UnaryFilter)
  1944. }
  1945. ::google::protobuf::uint8* StructuredQuery_UnaryFilter::InternalSerializeWithCachedSizesToArray(
  1946. bool deterministic, ::google::protobuf::uint8* target) const {
  1947. (void)deterministic; // Unused
  1948. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.StructuredQuery.UnaryFilter)
  1949. ::google::protobuf::uint32 cached_has_bits = 0;
  1950. (void) cached_has_bits;
  1951. // .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1;
  1952. if (this->op() != 0) {
  1953. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  1954. 1, this->op(), target);
  1955. }
  1956. // .google.firestore.v1.StructuredQuery.FieldReference field = 2;
  1957. if (has_field()) {
  1958. target = ::google::protobuf::internal::WireFormatLite::
  1959. InternalWriteMessageToArray(
  1960. 2, *operand_type_.field_, deterministic, target);
  1961. }
  1962. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1963. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1964. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1965. }
  1966. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.StructuredQuery.UnaryFilter)
  1967. return target;
  1968. }
  1969. size_t StructuredQuery_UnaryFilter::ByteSizeLong() const {
  1970. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.StructuredQuery.UnaryFilter)
  1971. size_t total_size = 0;
  1972. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1973. total_size +=
  1974. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1975. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1976. }
  1977. // .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1;
  1978. if (this->op() != 0) {
  1979. total_size += 1 +
  1980. ::google::protobuf::internal::WireFormatLite::EnumSize(this->op());
  1981. }
  1982. switch (operand_type_case()) {
  1983. // .google.firestore.v1.StructuredQuery.FieldReference field = 2;
  1984. case kField: {
  1985. total_size += 1 +
  1986. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1987. *operand_type_.field_);
  1988. break;
  1989. }
  1990. case OPERAND_TYPE_NOT_SET: {
  1991. break;
  1992. }
  1993. }
  1994. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1995. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1996. _cached_size_ = cached_size;
  1997. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1998. return total_size;
  1999. }
  2000. void StructuredQuery_UnaryFilter::MergeFrom(const ::google::protobuf::Message& from) {
  2001. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.StructuredQuery.UnaryFilter)
  2002. GOOGLE_DCHECK_NE(&from, this);
  2003. const StructuredQuery_UnaryFilter* source =
  2004. ::google::protobuf::internal::DynamicCastToGenerated<const StructuredQuery_UnaryFilter>(
  2005. &from);
  2006. if (source == NULL) {
  2007. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.StructuredQuery.UnaryFilter)
  2008. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2009. } else {
  2010. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.StructuredQuery.UnaryFilter)
  2011. MergeFrom(*source);
  2012. }
  2013. }
  2014. void StructuredQuery_UnaryFilter::MergeFrom(const StructuredQuery_UnaryFilter& from) {
  2015. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.StructuredQuery.UnaryFilter)
  2016. GOOGLE_DCHECK_NE(&from, this);
  2017. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2018. ::google::protobuf::uint32 cached_has_bits = 0;
  2019. (void) cached_has_bits;
  2020. if (from.op() != 0) {
  2021. set_op(from.op());
  2022. }
  2023. switch (from.operand_type_case()) {
  2024. case kField: {
  2025. mutable_field()->::google::firestore::v1::StructuredQuery_FieldReference::MergeFrom(from.field());
  2026. break;
  2027. }
  2028. case OPERAND_TYPE_NOT_SET: {
  2029. break;
  2030. }
  2031. }
  2032. }
  2033. void StructuredQuery_UnaryFilter::CopyFrom(const ::google::protobuf::Message& from) {
  2034. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.StructuredQuery.UnaryFilter)
  2035. if (&from == this) return;
  2036. Clear();
  2037. MergeFrom(from);
  2038. }
  2039. void StructuredQuery_UnaryFilter::CopyFrom(const StructuredQuery_UnaryFilter& from) {
  2040. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.StructuredQuery.UnaryFilter)
  2041. if (&from == this) return;
  2042. Clear();
  2043. MergeFrom(from);
  2044. }
  2045. bool StructuredQuery_UnaryFilter::IsInitialized() const {
  2046. return true;
  2047. }
  2048. void StructuredQuery_UnaryFilter::Swap(StructuredQuery_UnaryFilter* other) {
  2049. if (other == this) return;
  2050. InternalSwap(other);
  2051. }
  2052. void StructuredQuery_UnaryFilter::InternalSwap(StructuredQuery_UnaryFilter* other) {
  2053. using std::swap;
  2054. swap(op_, other->op_);
  2055. swap(operand_type_, other->operand_type_);
  2056. swap(_oneof_case_[0], other->_oneof_case_[0]);
  2057. _internal_metadata_.Swap(&other->_internal_metadata_);
  2058. swap(_cached_size_, other->_cached_size_);
  2059. }
  2060. ::google::protobuf::Metadata StructuredQuery_UnaryFilter::GetMetadata() const {
  2061. protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce();
  2062. return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages];
  2063. }
  2064. // ===================================================================
  2065. void StructuredQuery_Order::InitAsDefaultInstance() {
  2066. ::google::firestore::v1::_StructuredQuery_Order_default_instance_._instance.get_mutable()->field_ = const_cast< ::google::firestore::v1::StructuredQuery_FieldReference*>(
  2067. ::google::firestore::v1::StructuredQuery_FieldReference::internal_default_instance());
  2068. }
  2069. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2070. const int StructuredQuery_Order::kFieldFieldNumber;
  2071. const int StructuredQuery_Order::kDirectionFieldNumber;
  2072. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2073. StructuredQuery_Order::StructuredQuery_Order()
  2074. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2075. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  2076. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_Order();
  2077. }
  2078. SharedCtor();
  2079. // @@protoc_insertion_point(constructor:google.firestore.v1.StructuredQuery.Order)
  2080. }
  2081. StructuredQuery_Order::StructuredQuery_Order(const StructuredQuery_Order& from)
  2082. : ::google::protobuf::Message(),
  2083. _internal_metadata_(NULL),
  2084. _cached_size_(0) {
  2085. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2086. if (from.has_field()) {
  2087. field_ = new ::google::firestore::v1::StructuredQuery_FieldReference(*from.field_);
  2088. } else {
  2089. field_ = NULL;
  2090. }
  2091. direction_ = from.direction_;
  2092. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.StructuredQuery.Order)
  2093. }
  2094. void StructuredQuery_Order::SharedCtor() {
  2095. ::memset(&field_, 0, static_cast<size_t>(
  2096. reinterpret_cast<char*>(&direction_) -
  2097. reinterpret_cast<char*>(&field_)) + sizeof(direction_));
  2098. _cached_size_ = 0;
  2099. }
  2100. StructuredQuery_Order::~StructuredQuery_Order() {
  2101. // @@protoc_insertion_point(destructor:google.firestore.v1.StructuredQuery.Order)
  2102. SharedDtor();
  2103. }
  2104. void StructuredQuery_Order::SharedDtor() {
  2105. if (this != internal_default_instance()) delete field_;
  2106. }
  2107. void StructuredQuery_Order::SetCachedSize(int size) const {
  2108. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2109. _cached_size_ = size;
  2110. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2111. }
  2112. const ::google::protobuf::Descriptor* StructuredQuery_Order::descriptor() {
  2113. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce();
  2114. return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2115. }
  2116. const StructuredQuery_Order& StructuredQuery_Order::default_instance() {
  2117. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_Order();
  2118. return *internal_default_instance();
  2119. }
  2120. StructuredQuery_Order* StructuredQuery_Order::New(::google::protobuf::Arena* arena) const {
  2121. StructuredQuery_Order* n = new StructuredQuery_Order;
  2122. if (arena != NULL) {
  2123. arena->Own(n);
  2124. }
  2125. return n;
  2126. }
  2127. void StructuredQuery_Order::Clear() {
  2128. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.StructuredQuery.Order)
  2129. ::google::protobuf::uint32 cached_has_bits = 0;
  2130. // Prevent compiler warnings about cached_has_bits being unused
  2131. (void) cached_has_bits;
  2132. if (GetArenaNoVirtual() == NULL && field_ != NULL) {
  2133. delete field_;
  2134. }
  2135. field_ = NULL;
  2136. direction_ = 0;
  2137. _internal_metadata_.Clear();
  2138. }
  2139. bool StructuredQuery_Order::MergePartialFromCodedStream(
  2140. ::google::protobuf::io::CodedInputStream* input) {
  2141. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2142. ::google::protobuf::uint32 tag;
  2143. // @@protoc_insertion_point(parse_start:google.firestore.v1.StructuredQuery.Order)
  2144. for (;;) {
  2145. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2146. tag = p.first;
  2147. if (!p.second) goto handle_unusual;
  2148. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2149. // .google.firestore.v1.StructuredQuery.FieldReference field = 1;
  2150. case 1: {
  2151. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2152. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  2153. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2154. input, mutable_field()));
  2155. } else {
  2156. goto handle_unusual;
  2157. }
  2158. break;
  2159. }
  2160. // .google.firestore.v1.StructuredQuery.Direction direction = 2;
  2161. case 2: {
  2162. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2163. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  2164. int value;
  2165. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2166. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  2167. input, &value)));
  2168. set_direction(static_cast< ::google::firestore::v1::StructuredQuery_Direction >(value));
  2169. } else {
  2170. goto handle_unusual;
  2171. }
  2172. break;
  2173. }
  2174. default: {
  2175. handle_unusual:
  2176. if (tag == 0) {
  2177. goto success;
  2178. }
  2179. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2180. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2181. break;
  2182. }
  2183. }
  2184. }
  2185. success:
  2186. // @@protoc_insertion_point(parse_success:google.firestore.v1.StructuredQuery.Order)
  2187. return true;
  2188. failure:
  2189. // @@protoc_insertion_point(parse_failure:google.firestore.v1.StructuredQuery.Order)
  2190. return false;
  2191. #undef DO_
  2192. }
  2193. void StructuredQuery_Order::SerializeWithCachedSizes(
  2194. ::google::protobuf::io::CodedOutputStream* output) const {
  2195. // @@protoc_insertion_point(serialize_start:google.firestore.v1.StructuredQuery.Order)
  2196. ::google::protobuf::uint32 cached_has_bits = 0;
  2197. (void) cached_has_bits;
  2198. // .google.firestore.v1.StructuredQuery.FieldReference field = 1;
  2199. if (this->has_field()) {
  2200. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2201. 1, *this->field_, output);
  2202. }
  2203. // .google.firestore.v1.StructuredQuery.Direction direction = 2;
  2204. if (this->direction() != 0) {
  2205. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  2206. 2, this->direction(), output);
  2207. }
  2208. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2209. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2210. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2211. }
  2212. // @@protoc_insertion_point(serialize_end:google.firestore.v1.StructuredQuery.Order)
  2213. }
  2214. ::google::protobuf::uint8* StructuredQuery_Order::InternalSerializeWithCachedSizesToArray(
  2215. bool deterministic, ::google::protobuf::uint8* target) const {
  2216. (void)deterministic; // Unused
  2217. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.StructuredQuery.Order)
  2218. ::google::protobuf::uint32 cached_has_bits = 0;
  2219. (void) cached_has_bits;
  2220. // .google.firestore.v1.StructuredQuery.FieldReference field = 1;
  2221. if (this->has_field()) {
  2222. target = ::google::protobuf::internal::WireFormatLite::
  2223. InternalWriteMessageToArray(
  2224. 1, *this->field_, deterministic, target);
  2225. }
  2226. // .google.firestore.v1.StructuredQuery.Direction direction = 2;
  2227. if (this->direction() != 0) {
  2228. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  2229. 2, this->direction(), target);
  2230. }
  2231. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2232. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2233. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2234. }
  2235. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.StructuredQuery.Order)
  2236. return target;
  2237. }
  2238. size_t StructuredQuery_Order::ByteSizeLong() const {
  2239. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.StructuredQuery.Order)
  2240. size_t total_size = 0;
  2241. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2242. total_size +=
  2243. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2244. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2245. }
  2246. // .google.firestore.v1.StructuredQuery.FieldReference field = 1;
  2247. if (this->has_field()) {
  2248. total_size += 1 +
  2249. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2250. *this->field_);
  2251. }
  2252. // .google.firestore.v1.StructuredQuery.Direction direction = 2;
  2253. if (this->direction() != 0) {
  2254. total_size += 1 +
  2255. ::google::protobuf::internal::WireFormatLite::EnumSize(this->direction());
  2256. }
  2257. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2258. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2259. _cached_size_ = cached_size;
  2260. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2261. return total_size;
  2262. }
  2263. void StructuredQuery_Order::MergeFrom(const ::google::protobuf::Message& from) {
  2264. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.StructuredQuery.Order)
  2265. GOOGLE_DCHECK_NE(&from, this);
  2266. const StructuredQuery_Order* source =
  2267. ::google::protobuf::internal::DynamicCastToGenerated<const StructuredQuery_Order>(
  2268. &from);
  2269. if (source == NULL) {
  2270. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.StructuredQuery.Order)
  2271. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2272. } else {
  2273. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.StructuredQuery.Order)
  2274. MergeFrom(*source);
  2275. }
  2276. }
  2277. void StructuredQuery_Order::MergeFrom(const StructuredQuery_Order& from) {
  2278. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.StructuredQuery.Order)
  2279. GOOGLE_DCHECK_NE(&from, this);
  2280. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2281. ::google::protobuf::uint32 cached_has_bits = 0;
  2282. (void) cached_has_bits;
  2283. if (from.has_field()) {
  2284. mutable_field()->::google::firestore::v1::StructuredQuery_FieldReference::MergeFrom(from.field());
  2285. }
  2286. if (from.direction() != 0) {
  2287. set_direction(from.direction());
  2288. }
  2289. }
  2290. void StructuredQuery_Order::CopyFrom(const ::google::protobuf::Message& from) {
  2291. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.StructuredQuery.Order)
  2292. if (&from == this) return;
  2293. Clear();
  2294. MergeFrom(from);
  2295. }
  2296. void StructuredQuery_Order::CopyFrom(const StructuredQuery_Order& from) {
  2297. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.StructuredQuery.Order)
  2298. if (&from == this) return;
  2299. Clear();
  2300. MergeFrom(from);
  2301. }
  2302. bool StructuredQuery_Order::IsInitialized() const {
  2303. return true;
  2304. }
  2305. void StructuredQuery_Order::Swap(StructuredQuery_Order* other) {
  2306. if (other == this) return;
  2307. InternalSwap(other);
  2308. }
  2309. void StructuredQuery_Order::InternalSwap(StructuredQuery_Order* other) {
  2310. using std::swap;
  2311. swap(field_, other->field_);
  2312. swap(direction_, other->direction_);
  2313. _internal_metadata_.Swap(&other->_internal_metadata_);
  2314. swap(_cached_size_, other->_cached_size_);
  2315. }
  2316. ::google::protobuf::Metadata StructuredQuery_Order::GetMetadata() const {
  2317. protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce();
  2318. return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages];
  2319. }
  2320. // ===================================================================
  2321. void StructuredQuery_FieldReference::InitAsDefaultInstance() {
  2322. }
  2323. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2324. const int StructuredQuery_FieldReference::kFieldPathFieldNumber;
  2325. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2326. StructuredQuery_FieldReference::StructuredQuery_FieldReference()
  2327. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2328. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  2329. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldReference();
  2330. }
  2331. SharedCtor();
  2332. // @@protoc_insertion_point(constructor:google.firestore.v1.StructuredQuery.FieldReference)
  2333. }
  2334. StructuredQuery_FieldReference::StructuredQuery_FieldReference(const StructuredQuery_FieldReference& from)
  2335. : ::google::protobuf::Message(),
  2336. _internal_metadata_(NULL),
  2337. _cached_size_(0) {
  2338. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2339. field_path_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2340. if (from.field_path().size() > 0) {
  2341. field_path_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.field_path_);
  2342. }
  2343. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.StructuredQuery.FieldReference)
  2344. }
  2345. void StructuredQuery_FieldReference::SharedCtor() {
  2346. field_path_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2347. _cached_size_ = 0;
  2348. }
  2349. StructuredQuery_FieldReference::~StructuredQuery_FieldReference() {
  2350. // @@protoc_insertion_point(destructor:google.firestore.v1.StructuredQuery.FieldReference)
  2351. SharedDtor();
  2352. }
  2353. void StructuredQuery_FieldReference::SharedDtor() {
  2354. field_path_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2355. }
  2356. void StructuredQuery_FieldReference::SetCachedSize(int size) const {
  2357. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2358. _cached_size_ = size;
  2359. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2360. }
  2361. const ::google::protobuf::Descriptor* StructuredQuery_FieldReference::descriptor() {
  2362. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce();
  2363. return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2364. }
  2365. const StructuredQuery_FieldReference& StructuredQuery_FieldReference::default_instance() {
  2366. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldReference();
  2367. return *internal_default_instance();
  2368. }
  2369. StructuredQuery_FieldReference* StructuredQuery_FieldReference::New(::google::protobuf::Arena* arena) const {
  2370. StructuredQuery_FieldReference* n = new StructuredQuery_FieldReference;
  2371. if (arena != NULL) {
  2372. arena->Own(n);
  2373. }
  2374. return n;
  2375. }
  2376. void StructuredQuery_FieldReference::Clear() {
  2377. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.StructuredQuery.FieldReference)
  2378. ::google::protobuf::uint32 cached_has_bits = 0;
  2379. // Prevent compiler warnings about cached_has_bits being unused
  2380. (void) cached_has_bits;
  2381. field_path_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2382. _internal_metadata_.Clear();
  2383. }
  2384. bool StructuredQuery_FieldReference::MergePartialFromCodedStream(
  2385. ::google::protobuf::io::CodedInputStream* input) {
  2386. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2387. ::google::protobuf::uint32 tag;
  2388. // @@protoc_insertion_point(parse_start:google.firestore.v1.StructuredQuery.FieldReference)
  2389. for (;;) {
  2390. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2391. tag = p.first;
  2392. if (!p.second) goto handle_unusual;
  2393. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2394. // string field_path = 2;
  2395. case 2: {
  2396. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2397. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  2398. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  2399. input, this->mutable_field_path()));
  2400. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2401. this->field_path().data(), static_cast<int>(this->field_path().length()),
  2402. ::google::protobuf::internal::WireFormatLite::PARSE,
  2403. "google.firestore.v1.StructuredQuery.FieldReference.field_path"));
  2404. } else {
  2405. goto handle_unusual;
  2406. }
  2407. break;
  2408. }
  2409. default: {
  2410. handle_unusual:
  2411. if (tag == 0) {
  2412. goto success;
  2413. }
  2414. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2415. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2416. break;
  2417. }
  2418. }
  2419. }
  2420. success:
  2421. // @@protoc_insertion_point(parse_success:google.firestore.v1.StructuredQuery.FieldReference)
  2422. return true;
  2423. failure:
  2424. // @@protoc_insertion_point(parse_failure:google.firestore.v1.StructuredQuery.FieldReference)
  2425. return false;
  2426. #undef DO_
  2427. }
  2428. void StructuredQuery_FieldReference::SerializeWithCachedSizes(
  2429. ::google::protobuf::io::CodedOutputStream* output) const {
  2430. // @@protoc_insertion_point(serialize_start:google.firestore.v1.StructuredQuery.FieldReference)
  2431. ::google::protobuf::uint32 cached_has_bits = 0;
  2432. (void) cached_has_bits;
  2433. // string field_path = 2;
  2434. if (this->field_path().size() > 0) {
  2435. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2436. this->field_path().data(), static_cast<int>(this->field_path().length()),
  2437. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2438. "google.firestore.v1.StructuredQuery.FieldReference.field_path");
  2439. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  2440. 2, this->field_path(), output);
  2441. }
  2442. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2443. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2444. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2445. }
  2446. // @@protoc_insertion_point(serialize_end:google.firestore.v1.StructuredQuery.FieldReference)
  2447. }
  2448. ::google::protobuf::uint8* StructuredQuery_FieldReference::InternalSerializeWithCachedSizesToArray(
  2449. bool deterministic, ::google::protobuf::uint8* target) const {
  2450. (void)deterministic; // Unused
  2451. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.StructuredQuery.FieldReference)
  2452. ::google::protobuf::uint32 cached_has_bits = 0;
  2453. (void) cached_has_bits;
  2454. // string field_path = 2;
  2455. if (this->field_path().size() > 0) {
  2456. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2457. this->field_path().data(), static_cast<int>(this->field_path().length()),
  2458. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2459. "google.firestore.v1.StructuredQuery.FieldReference.field_path");
  2460. target =
  2461. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  2462. 2, this->field_path(), target);
  2463. }
  2464. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2465. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2466. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2467. }
  2468. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.StructuredQuery.FieldReference)
  2469. return target;
  2470. }
  2471. size_t StructuredQuery_FieldReference::ByteSizeLong() const {
  2472. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.StructuredQuery.FieldReference)
  2473. size_t total_size = 0;
  2474. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2475. total_size +=
  2476. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2477. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2478. }
  2479. // string field_path = 2;
  2480. if (this->field_path().size() > 0) {
  2481. total_size += 1 +
  2482. ::google::protobuf::internal::WireFormatLite::StringSize(
  2483. this->field_path());
  2484. }
  2485. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2486. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2487. _cached_size_ = cached_size;
  2488. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2489. return total_size;
  2490. }
  2491. void StructuredQuery_FieldReference::MergeFrom(const ::google::protobuf::Message& from) {
  2492. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.StructuredQuery.FieldReference)
  2493. GOOGLE_DCHECK_NE(&from, this);
  2494. const StructuredQuery_FieldReference* source =
  2495. ::google::protobuf::internal::DynamicCastToGenerated<const StructuredQuery_FieldReference>(
  2496. &from);
  2497. if (source == NULL) {
  2498. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.StructuredQuery.FieldReference)
  2499. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2500. } else {
  2501. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.StructuredQuery.FieldReference)
  2502. MergeFrom(*source);
  2503. }
  2504. }
  2505. void StructuredQuery_FieldReference::MergeFrom(const StructuredQuery_FieldReference& from) {
  2506. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.StructuredQuery.FieldReference)
  2507. GOOGLE_DCHECK_NE(&from, this);
  2508. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2509. ::google::protobuf::uint32 cached_has_bits = 0;
  2510. (void) cached_has_bits;
  2511. if (from.field_path().size() > 0) {
  2512. field_path_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.field_path_);
  2513. }
  2514. }
  2515. void StructuredQuery_FieldReference::CopyFrom(const ::google::protobuf::Message& from) {
  2516. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.StructuredQuery.FieldReference)
  2517. if (&from == this) return;
  2518. Clear();
  2519. MergeFrom(from);
  2520. }
  2521. void StructuredQuery_FieldReference::CopyFrom(const StructuredQuery_FieldReference& from) {
  2522. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.StructuredQuery.FieldReference)
  2523. if (&from == this) return;
  2524. Clear();
  2525. MergeFrom(from);
  2526. }
  2527. bool StructuredQuery_FieldReference::IsInitialized() const {
  2528. return true;
  2529. }
  2530. void StructuredQuery_FieldReference::Swap(StructuredQuery_FieldReference* other) {
  2531. if (other == this) return;
  2532. InternalSwap(other);
  2533. }
  2534. void StructuredQuery_FieldReference::InternalSwap(StructuredQuery_FieldReference* other) {
  2535. using std::swap;
  2536. field_path_.Swap(&other->field_path_);
  2537. _internal_metadata_.Swap(&other->_internal_metadata_);
  2538. swap(_cached_size_, other->_cached_size_);
  2539. }
  2540. ::google::protobuf::Metadata StructuredQuery_FieldReference::GetMetadata() const {
  2541. protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce();
  2542. return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages];
  2543. }
  2544. // ===================================================================
  2545. void StructuredQuery_Projection::InitAsDefaultInstance() {
  2546. }
  2547. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2548. const int StructuredQuery_Projection::kFieldsFieldNumber;
  2549. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2550. StructuredQuery_Projection::StructuredQuery_Projection()
  2551. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2552. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  2553. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_Projection();
  2554. }
  2555. SharedCtor();
  2556. // @@protoc_insertion_point(constructor:google.firestore.v1.StructuredQuery.Projection)
  2557. }
  2558. StructuredQuery_Projection::StructuredQuery_Projection(const StructuredQuery_Projection& from)
  2559. : ::google::protobuf::Message(),
  2560. _internal_metadata_(NULL),
  2561. fields_(from.fields_),
  2562. _cached_size_(0) {
  2563. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2564. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.StructuredQuery.Projection)
  2565. }
  2566. void StructuredQuery_Projection::SharedCtor() {
  2567. _cached_size_ = 0;
  2568. }
  2569. StructuredQuery_Projection::~StructuredQuery_Projection() {
  2570. // @@protoc_insertion_point(destructor:google.firestore.v1.StructuredQuery.Projection)
  2571. SharedDtor();
  2572. }
  2573. void StructuredQuery_Projection::SharedDtor() {
  2574. }
  2575. void StructuredQuery_Projection::SetCachedSize(int size) const {
  2576. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2577. _cached_size_ = size;
  2578. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2579. }
  2580. const ::google::protobuf::Descriptor* StructuredQuery_Projection::descriptor() {
  2581. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce();
  2582. return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2583. }
  2584. const StructuredQuery_Projection& StructuredQuery_Projection::default_instance() {
  2585. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_Projection();
  2586. return *internal_default_instance();
  2587. }
  2588. StructuredQuery_Projection* StructuredQuery_Projection::New(::google::protobuf::Arena* arena) const {
  2589. StructuredQuery_Projection* n = new StructuredQuery_Projection;
  2590. if (arena != NULL) {
  2591. arena->Own(n);
  2592. }
  2593. return n;
  2594. }
  2595. void StructuredQuery_Projection::Clear() {
  2596. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.StructuredQuery.Projection)
  2597. ::google::protobuf::uint32 cached_has_bits = 0;
  2598. // Prevent compiler warnings about cached_has_bits being unused
  2599. (void) cached_has_bits;
  2600. fields_.Clear();
  2601. _internal_metadata_.Clear();
  2602. }
  2603. bool StructuredQuery_Projection::MergePartialFromCodedStream(
  2604. ::google::protobuf::io::CodedInputStream* input) {
  2605. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2606. ::google::protobuf::uint32 tag;
  2607. // @@protoc_insertion_point(parse_start:google.firestore.v1.StructuredQuery.Projection)
  2608. for (;;) {
  2609. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2610. tag = p.first;
  2611. if (!p.second) goto handle_unusual;
  2612. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2613. // repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2;
  2614. case 2: {
  2615. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2616. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  2617. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_fields()));
  2618. } else {
  2619. goto handle_unusual;
  2620. }
  2621. break;
  2622. }
  2623. default: {
  2624. handle_unusual:
  2625. if (tag == 0) {
  2626. goto success;
  2627. }
  2628. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2629. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2630. break;
  2631. }
  2632. }
  2633. }
  2634. success:
  2635. // @@protoc_insertion_point(parse_success:google.firestore.v1.StructuredQuery.Projection)
  2636. return true;
  2637. failure:
  2638. // @@protoc_insertion_point(parse_failure:google.firestore.v1.StructuredQuery.Projection)
  2639. return false;
  2640. #undef DO_
  2641. }
  2642. void StructuredQuery_Projection::SerializeWithCachedSizes(
  2643. ::google::protobuf::io::CodedOutputStream* output) const {
  2644. // @@protoc_insertion_point(serialize_start:google.firestore.v1.StructuredQuery.Projection)
  2645. ::google::protobuf::uint32 cached_has_bits = 0;
  2646. (void) cached_has_bits;
  2647. // repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2;
  2648. for (unsigned int i = 0,
  2649. n = static_cast<unsigned int>(this->fields_size()); i < n; i++) {
  2650. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2651. 2, this->fields(static_cast<int>(i)), output);
  2652. }
  2653. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2654. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2655. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2656. }
  2657. // @@protoc_insertion_point(serialize_end:google.firestore.v1.StructuredQuery.Projection)
  2658. }
  2659. ::google::protobuf::uint8* StructuredQuery_Projection::InternalSerializeWithCachedSizesToArray(
  2660. bool deterministic, ::google::protobuf::uint8* target) const {
  2661. (void)deterministic; // Unused
  2662. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.StructuredQuery.Projection)
  2663. ::google::protobuf::uint32 cached_has_bits = 0;
  2664. (void) cached_has_bits;
  2665. // repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2;
  2666. for (unsigned int i = 0,
  2667. n = static_cast<unsigned int>(this->fields_size()); i < n; i++) {
  2668. target = ::google::protobuf::internal::WireFormatLite::
  2669. InternalWriteMessageToArray(
  2670. 2, this->fields(static_cast<int>(i)), deterministic, target);
  2671. }
  2672. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2673. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2674. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2675. }
  2676. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.StructuredQuery.Projection)
  2677. return target;
  2678. }
  2679. size_t StructuredQuery_Projection::ByteSizeLong() const {
  2680. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.StructuredQuery.Projection)
  2681. size_t total_size = 0;
  2682. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2683. total_size +=
  2684. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2685. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2686. }
  2687. // repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2;
  2688. {
  2689. unsigned int count = static_cast<unsigned int>(this->fields_size());
  2690. total_size += 1UL * count;
  2691. for (unsigned int i = 0; i < count; i++) {
  2692. total_size +=
  2693. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2694. this->fields(static_cast<int>(i)));
  2695. }
  2696. }
  2697. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2698. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2699. _cached_size_ = cached_size;
  2700. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2701. return total_size;
  2702. }
  2703. void StructuredQuery_Projection::MergeFrom(const ::google::protobuf::Message& from) {
  2704. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.StructuredQuery.Projection)
  2705. GOOGLE_DCHECK_NE(&from, this);
  2706. const StructuredQuery_Projection* source =
  2707. ::google::protobuf::internal::DynamicCastToGenerated<const StructuredQuery_Projection>(
  2708. &from);
  2709. if (source == NULL) {
  2710. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.StructuredQuery.Projection)
  2711. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2712. } else {
  2713. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.StructuredQuery.Projection)
  2714. MergeFrom(*source);
  2715. }
  2716. }
  2717. void StructuredQuery_Projection::MergeFrom(const StructuredQuery_Projection& from) {
  2718. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.StructuredQuery.Projection)
  2719. GOOGLE_DCHECK_NE(&from, this);
  2720. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2721. ::google::protobuf::uint32 cached_has_bits = 0;
  2722. (void) cached_has_bits;
  2723. fields_.MergeFrom(from.fields_);
  2724. }
  2725. void StructuredQuery_Projection::CopyFrom(const ::google::protobuf::Message& from) {
  2726. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.StructuredQuery.Projection)
  2727. if (&from == this) return;
  2728. Clear();
  2729. MergeFrom(from);
  2730. }
  2731. void StructuredQuery_Projection::CopyFrom(const StructuredQuery_Projection& from) {
  2732. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.StructuredQuery.Projection)
  2733. if (&from == this) return;
  2734. Clear();
  2735. MergeFrom(from);
  2736. }
  2737. bool StructuredQuery_Projection::IsInitialized() const {
  2738. return true;
  2739. }
  2740. void StructuredQuery_Projection::Swap(StructuredQuery_Projection* other) {
  2741. if (other == this) return;
  2742. InternalSwap(other);
  2743. }
  2744. void StructuredQuery_Projection::InternalSwap(StructuredQuery_Projection* other) {
  2745. using std::swap;
  2746. fields_.InternalSwap(&other->fields_);
  2747. _internal_metadata_.Swap(&other->_internal_metadata_);
  2748. swap(_cached_size_, other->_cached_size_);
  2749. }
  2750. ::google::protobuf::Metadata StructuredQuery_Projection::GetMetadata() const {
  2751. protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce();
  2752. return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages];
  2753. }
  2754. // ===================================================================
  2755. void StructuredQuery::InitAsDefaultInstance() {
  2756. ::google::firestore::v1::_StructuredQuery_default_instance_._instance.get_mutable()->select_ = const_cast< ::google::firestore::v1::StructuredQuery_Projection*>(
  2757. ::google::firestore::v1::StructuredQuery_Projection::internal_default_instance());
  2758. ::google::firestore::v1::_StructuredQuery_default_instance_._instance.get_mutable()->where_ = const_cast< ::google::firestore::v1::StructuredQuery_Filter*>(
  2759. ::google::firestore::v1::StructuredQuery_Filter::internal_default_instance());
  2760. ::google::firestore::v1::_StructuredQuery_default_instance_._instance.get_mutable()->start_at_ = const_cast< ::google::firestore::v1::Cursor*>(
  2761. ::google::firestore::v1::Cursor::internal_default_instance());
  2762. ::google::firestore::v1::_StructuredQuery_default_instance_._instance.get_mutable()->end_at_ = const_cast< ::google::firestore::v1::Cursor*>(
  2763. ::google::firestore::v1::Cursor::internal_default_instance());
  2764. ::google::firestore::v1::_StructuredQuery_default_instance_._instance.get_mutable()->limit_ = const_cast< ::google::protobuf::Int32Value*>(
  2765. ::google::protobuf::Int32Value::internal_default_instance());
  2766. }
  2767. void StructuredQuery::clear_limit() {
  2768. if (GetArenaNoVirtual() == NULL && limit_ != NULL) {
  2769. delete limit_;
  2770. }
  2771. limit_ = NULL;
  2772. }
  2773. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2774. const int StructuredQuery::kSelectFieldNumber;
  2775. const int StructuredQuery::kFromFieldNumber;
  2776. const int StructuredQuery::kWhereFieldNumber;
  2777. const int StructuredQuery::kOrderByFieldNumber;
  2778. const int StructuredQuery::kStartAtFieldNumber;
  2779. const int StructuredQuery::kEndAtFieldNumber;
  2780. const int StructuredQuery::kOffsetFieldNumber;
  2781. const int StructuredQuery::kLimitFieldNumber;
  2782. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2783. StructuredQuery::StructuredQuery()
  2784. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2785. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  2786. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery();
  2787. }
  2788. SharedCtor();
  2789. // @@protoc_insertion_point(constructor:google.firestore.v1.StructuredQuery)
  2790. }
  2791. StructuredQuery::StructuredQuery(const StructuredQuery& from)
  2792. : ::google::protobuf::Message(),
  2793. _internal_metadata_(NULL),
  2794. from_(from.from_),
  2795. order_by_(from.order_by_),
  2796. _cached_size_(0) {
  2797. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2798. if (from.has_select()) {
  2799. select_ = new ::google::firestore::v1::StructuredQuery_Projection(*from.select_);
  2800. } else {
  2801. select_ = NULL;
  2802. }
  2803. if (from.has_where()) {
  2804. where_ = new ::google::firestore::v1::StructuredQuery_Filter(*from.where_);
  2805. } else {
  2806. where_ = NULL;
  2807. }
  2808. if (from.has_limit()) {
  2809. limit_ = new ::google::protobuf::Int32Value(*from.limit_);
  2810. } else {
  2811. limit_ = NULL;
  2812. }
  2813. if (from.has_start_at()) {
  2814. start_at_ = new ::google::firestore::v1::Cursor(*from.start_at_);
  2815. } else {
  2816. start_at_ = NULL;
  2817. }
  2818. if (from.has_end_at()) {
  2819. end_at_ = new ::google::firestore::v1::Cursor(*from.end_at_);
  2820. } else {
  2821. end_at_ = NULL;
  2822. }
  2823. offset_ = from.offset_;
  2824. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.StructuredQuery)
  2825. }
  2826. void StructuredQuery::SharedCtor() {
  2827. ::memset(&select_, 0, static_cast<size_t>(
  2828. reinterpret_cast<char*>(&offset_) -
  2829. reinterpret_cast<char*>(&select_)) + sizeof(offset_));
  2830. _cached_size_ = 0;
  2831. }
  2832. StructuredQuery::~StructuredQuery() {
  2833. // @@protoc_insertion_point(destructor:google.firestore.v1.StructuredQuery)
  2834. SharedDtor();
  2835. }
  2836. void StructuredQuery::SharedDtor() {
  2837. if (this != internal_default_instance()) delete select_;
  2838. if (this != internal_default_instance()) delete where_;
  2839. if (this != internal_default_instance()) delete limit_;
  2840. if (this != internal_default_instance()) delete start_at_;
  2841. if (this != internal_default_instance()) delete end_at_;
  2842. }
  2843. void StructuredQuery::SetCachedSize(int size) const {
  2844. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2845. _cached_size_ = size;
  2846. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2847. }
  2848. const ::google::protobuf::Descriptor* StructuredQuery::descriptor() {
  2849. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce();
  2850. return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2851. }
  2852. const StructuredQuery& StructuredQuery::default_instance() {
  2853. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery();
  2854. return *internal_default_instance();
  2855. }
  2856. StructuredQuery* StructuredQuery::New(::google::protobuf::Arena* arena) const {
  2857. StructuredQuery* n = new StructuredQuery;
  2858. if (arena != NULL) {
  2859. arena->Own(n);
  2860. }
  2861. return n;
  2862. }
  2863. void StructuredQuery::Clear() {
  2864. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.StructuredQuery)
  2865. ::google::protobuf::uint32 cached_has_bits = 0;
  2866. // Prevent compiler warnings about cached_has_bits being unused
  2867. (void) cached_has_bits;
  2868. from_.Clear();
  2869. order_by_.Clear();
  2870. if (GetArenaNoVirtual() == NULL && select_ != NULL) {
  2871. delete select_;
  2872. }
  2873. select_ = NULL;
  2874. if (GetArenaNoVirtual() == NULL && where_ != NULL) {
  2875. delete where_;
  2876. }
  2877. where_ = NULL;
  2878. if (GetArenaNoVirtual() == NULL && limit_ != NULL) {
  2879. delete limit_;
  2880. }
  2881. limit_ = NULL;
  2882. if (GetArenaNoVirtual() == NULL && start_at_ != NULL) {
  2883. delete start_at_;
  2884. }
  2885. start_at_ = NULL;
  2886. if (GetArenaNoVirtual() == NULL && end_at_ != NULL) {
  2887. delete end_at_;
  2888. }
  2889. end_at_ = NULL;
  2890. offset_ = 0;
  2891. _internal_metadata_.Clear();
  2892. }
  2893. bool StructuredQuery::MergePartialFromCodedStream(
  2894. ::google::protobuf::io::CodedInputStream* input) {
  2895. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2896. ::google::protobuf::uint32 tag;
  2897. // @@protoc_insertion_point(parse_start:google.firestore.v1.StructuredQuery)
  2898. for (;;) {
  2899. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2900. tag = p.first;
  2901. if (!p.second) goto handle_unusual;
  2902. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2903. // .google.firestore.v1.StructuredQuery.Projection select = 1;
  2904. case 1: {
  2905. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2906. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  2907. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2908. input, mutable_select()));
  2909. } else {
  2910. goto handle_unusual;
  2911. }
  2912. break;
  2913. }
  2914. // repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2;
  2915. case 2: {
  2916. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2917. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  2918. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_from()));
  2919. } else {
  2920. goto handle_unusual;
  2921. }
  2922. break;
  2923. }
  2924. // .google.firestore.v1.StructuredQuery.Filter where = 3;
  2925. case 3: {
  2926. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2927. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  2928. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2929. input, mutable_where()));
  2930. } else {
  2931. goto handle_unusual;
  2932. }
  2933. break;
  2934. }
  2935. // repeated .google.firestore.v1.StructuredQuery.Order order_by = 4;
  2936. case 4: {
  2937. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2938. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  2939. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_order_by()));
  2940. } else {
  2941. goto handle_unusual;
  2942. }
  2943. break;
  2944. }
  2945. // .google.protobuf.Int32Value limit = 5;
  2946. case 5: {
  2947. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2948. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  2949. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2950. input, mutable_limit()));
  2951. } else {
  2952. goto handle_unusual;
  2953. }
  2954. break;
  2955. }
  2956. // int32 offset = 6;
  2957. case 6: {
  2958. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2959. static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
  2960. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  2961. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  2962. input, &offset_)));
  2963. } else {
  2964. goto handle_unusual;
  2965. }
  2966. break;
  2967. }
  2968. // .google.firestore.v1.Cursor start_at = 7;
  2969. case 7: {
  2970. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2971. static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
  2972. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2973. input, mutable_start_at()));
  2974. } else {
  2975. goto handle_unusual;
  2976. }
  2977. break;
  2978. }
  2979. // .google.firestore.v1.Cursor end_at = 8;
  2980. case 8: {
  2981. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2982. static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
  2983. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2984. input, mutable_end_at()));
  2985. } else {
  2986. goto handle_unusual;
  2987. }
  2988. break;
  2989. }
  2990. default: {
  2991. handle_unusual:
  2992. if (tag == 0) {
  2993. goto success;
  2994. }
  2995. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2996. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2997. break;
  2998. }
  2999. }
  3000. }
  3001. success:
  3002. // @@protoc_insertion_point(parse_success:google.firestore.v1.StructuredQuery)
  3003. return true;
  3004. failure:
  3005. // @@protoc_insertion_point(parse_failure:google.firestore.v1.StructuredQuery)
  3006. return false;
  3007. #undef DO_
  3008. }
  3009. void StructuredQuery::SerializeWithCachedSizes(
  3010. ::google::protobuf::io::CodedOutputStream* output) const {
  3011. // @@protoc_insertion_point(serialize_start:google.firestore.v1.StructuredQuery)
  3012. ::google::protobuf::uint32 cached_has_bits = 0;
  3013. (void) cached_has_bits;
  3014. // .google.firestore.v1.StructuredQuery.Projection select = 1;
  3015. if (this->has_select()) {
  3016. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3017. 1, *this->select_, output);
  3018. }
  3019. // repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2;
  3020. for (unsigned int i = 0,
  3021. n = static_cast<unsigned int>(this->from_size()); i < n; i++) {
  3022. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3023. 2, this->from(static_cast<int>(i)), output);
  3024. }
  3025. // .google.firestore.v1.StructuredQuery.Filter where = 3;
  3026. if (this->has_where()) {
  3027. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3028. 3, *this->where_, output);
  3029. }
  3030. // repeated .google.firestore.v1.StructuredQuery.Order order_by = 4;
  3031. for (unsigned int i = 0,
  3032. n = static_cast<unsigned int>(this->order_by_size()); i < n; i++) {
  3033. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3034. 4, this->order_by(static_cast<int>(i)), output);
  3035. }
  3036. // .google.protobuf.Int32Value limit = 5;
  3037. if (this->has_limit()) {
  3038. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3039. 5, *this->limit_, output);
  3040. }
  3041. // int32 offset = 6;
  3042. if (this->offset() != 0) {
  3043. ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->offset(), output);
  3044. }
  3045. // .google.firestore.v1.Cursor start_at = 7;
  3046. if (this->has_start_at()) {
  3047. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3048. 7, *this->start_at_, output);
  3049. }
  3050. // .google.firestore.v1.Cursor end_at = 8;
  3051. if (this->has_end_at()) {
  3052. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3053. 8, *this->end_at_, output);
  3054. }
  3055. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3056. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  3057. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  3058. }
  3059. // @@protoc_insertion_point(serialize_end:google.firestore.v1.StructuredQuery)
  3060. }
  3061. ::google::protobuf::uint8* StructuredQuery::InternalSerializeWithCachedSizesToArray(
  3062. bool deterministic, ::google::protobuf::uint8* target) const {
  3063. (void)deterministic; // Unused
  3064. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.StructuredQuery)
  3065. ::google::protobuf::uint32 cached_has_bits = 0;
  3066. (void) cached_has_bits;
  3067. // .google.firestore.v1.StructuredQuery.Projection select = 1;
  3068. if (this->has_select()) {
  3069. target = ::google::protobuf::internal::WireFormatLite::
  3070. InternalWriteMessageToArray(
  3071. 1, *this->select_, deterministic, target);
  3072. }
  3073. // repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2;
  3074. for (unsigned int i = 0,
  3075. n = static_cast<unsigned int>(this->from_size()); i < n; i++) {
  3076. target = ::google::protobuf::internal::WireFormatLite::
  3077. InternalWriteMessageToArray(
  3078. 2, this->from(static_cast<int>(i)), deterministic, target);
  3079. }
  3080. // .google.firestore.v1.StructuredQuery.Filter where = 3;
  3081. if (this->has_where()) {
  3082. target = ::google::protobuf::internal::WireFormatLite::
  3083. InternalWriteMessageToArray(
  3084. 3, *this->where_, deterministic, target);
  3085. }
  3086. // repeated .google.firestore.v1.StructuredQuery.Order order_by = 4;
  3087. for (unsigned int i = 0,
  3088. n = static_cast<unsigned int>(this->order_by_size()); i < n; i++) {
  3089. target = ::google::protobuf::internal::WireFormatLite::
  3090. InternalWriteMessageToArray(
  3091. 4, this->order_by(static_cast<int>(i)), deterministic, target);
  3092. }
  3093. // .google.protobuf.Int32Value limit = 5;
  3094. if (this->has_limit()) {
  3095. target = ::google::protobuf::internal::WireFormatLite::
  3096. InternalWriteMessageToArray(
  3097. 5, *this->limit_, deterministic, target);
  3098. }
  3099. // int32 offset = 6;
  3100. if (this->offset() != 0) {
  3101. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->offset(), target);
  3102. }
  3103. // .google.firestore.v1.Cursor start_at = 7;
  3104. if (this->has_start_at()) {
  3105. target = ::google::protobuf::internal::WireFormatLite::
  3106. InternalWriteMessageToArray(
  3107. 7, *this->start_at_, deterministic, target);
  3108. }
  3109. // .google.firestore.v1.Cursor end_at = 8;
  3110. if (this->has_end_at()) {
  3111. target = ::google::protobuf::internal::WireFormatLite::
  3112. InternalWriteMessageToArray(
  3113. 8, *this->end_at_, deterministic, target);
  3114. }
  3115. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3116. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  3117. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  3118. }
  3119. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.StructuredQuery)
  3120. return target;
  3121. }
  3122. size_t StructuredQuery::ByteSizeLong() const {
  3123. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.StructuredQuery)
  3124. size_t total_size = 0;
  3125. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3126. total_size +=
  3127. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  3128. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  3129. }
  3130. // repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2;
  3131. {
  3132. unsigned int count = static_cast<unsigned int>(this->from_size());
  3133. total_size += 1UL * count;
  3134. for (unsigned int i = 0; i < count; i++) {
  3135. total_size +=
  3136. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3137. this->from(static_cast<int>(i)));
  3138. }
  3139. }
  3140. // repeated .google.firestore.v1.StructuredQuery.Order order_by = 4;
  3141. {
  3142. unsigned int count = static_cast<unsigned int>(this->order_by_size());
  3143. total_size += 1UL * count;
  3144. for (unsigned int i = 0; i < count; i++) {
  3145. total_size +=
  3146. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3147. this->order_by(static_cast<int>(i)));
  3148. }
  3149. }
  3150. // .google.firestore.v1.StructuredQuery.Projection select = 1;
  3151. if (this->has_select()) {
  3152. total_size += 1 +
  3153. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3154. *this->select_);
  3155. }
  3156. // .google.firestore.v1.StructuredQuery.Filter where = 3;
  3157. if (this->has_where()) {
  3158. total_size += 1 +
  3159. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3160. *this->where_);
  3161. }
  3162. // .google.protobuf.Int32Value limit = 5;
  3163. if (this->has_limit()) {
  3164. total_size += 1 +
  3165. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3166. *this->limit_);
  3167. }
  3168. // .google.firestore.v1.Cursor start_at = 7;
  3169. if (this->has_start_at()) {
  3170. total_size += 1 +
  3171. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3172. *this->start_at_);
  3173. }
  3174. // .google.firestore.v1.Cursor end_at = 8;
  3175. if (this->has_end_at()) {
  3176. total_size += 1 +
  3177. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3178. *this->end_at_);
  3179. }
  3180. // int32 offset = 6;
  3181. if (this->offset() != 0) {
  3182. total_size += 1 +
  3183. ::google::protobuf::internal::WireFormatLite::Int32Size(
  3184. this->offset());
  3185. }
  3186. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  3187. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  3188. _cached_size_ = cached_size;
  3189. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  3190. return total_size;
  3191. }
  3192. void StructuredQuery::MergeFrom(const ::google::protobuf::Message& from) {
  3193. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.StructuredQuery)
  3194. GOOGLE_DCHECK_NE(&from, this);
  3195. const StructuredQuery* source =
  3196. ::google::protobuf::internal::DynamicCastToGenerated<const StructuredQuery>(
  3197. &from);
  3198. if (source == NULL) {
  3199. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.StructuredQuery)
  3200. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  3201. } else {
  3202. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.StructuredQuery)
  3203. MergeFrom(*source);
  3204. }
  3205. }
  3206. void StructuredQuery::MergeFrom(const StructuredQuery& from) {
  3207. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.StructuredQuery)
  3208. GOOGLE_DCHECK_NE(&from, this);
  3209. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3210. ::google::protobuf::uint32 cached_has_bits = 0;
  3211. (void) cached_has_bits;
  3212. from_.MergeFrom(from.from_);
  3213. order_by_.MergeFrom(from.order_by_);
  3214. if (from.has_select()) {
  3215. mutable_select()->::google::firestore::v1::StructuredQuery_Projection::MergeFrom(from.select());
  3216. }
  3217. if (from.has_where()) {
  3218. mutable_where()->::google::firestore::v1::StructuredQuery_Filter::MergeFrom(from.where());
  3219. }
  3220. if (from.has_limit()) {
  3221. mutable_limit()->::google::protobuf::Int32Value::MergeFrom(from.limit());
  3222. }
  3223. if (from.has_start_at()) {
  3224. mutable_start_at()->::google::firestore::v1::Cursor::MergeFrom(from.start_at());
  3225. }
  3226. if (from.has_end_at()) {
  3227. mutable_end_at()->::google::firestore::v1::Cursor::MergeFrom(from.end_at());
  3228. }
  3229. if (from.offset() != 0) {
  3230. set_offset(from.offset());
  3231. }
  3232. }
  3233. void StructuredQuery::CopyFrom(const ::google::protobuf::Message& from) {
  3234. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.StructuredQuery)
  3235. if (&from == this) return;
  3236. Clear();
  3237. MergeFrom(from);
  3238. }
  3239. void StructuredQuery::CopyFrom(const StructuredQuery& from) {
  3240. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.StructuredQuery)
  3241. if (&from == this) return;
  3242. Clear();
  3243. MergeFrom(from);
  3244. }
  3245. bool StructuredQuery::IsInitialized() const {
  3246. return true;
  3247. }
  3248. void StructuredQuery::Swap(StructuredQuery* other) {
  3249. if (other == this) return;
  3250. InternalSwap(other);
  3251. }
  3252. void StructuredQuery::InternalSwap(StructuredQuery* other) {
  3253. using std::swap;
  3254. from_.InternalSwap(&other->from_);
  3255. order_by_.InternalSwap(&other->order_by_);
  3256. swap(select_, other->select_);
  3257. swap(where_, other->where_);
  3258. swap(limit_, other->limit_);
  3259. swap(start_at_, other->start_at_);
  3260. swap(end_at_, other->end_at_);
  3261. swap(offset_, other->offset_);
  3262. _internal_metadata_.Swap(&other->_internal_metadata_);
  3263. swap(_cached_size_, other->_cached_size_);
  3264. }
  3265. ::google::protobuf::Metadata StructuredQuery::GetMetadata() const {
  3266. protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce();
  3267. return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages];
  3268. }
  3269. // ===================================================================
  3270. void Cursor::InitAsDefaultInstance() {
  3271. }
  3272. void Cursor::clear_values() {
  3273. values_.Clear();
  3274. }
  3275. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3276. const int Cursor::kValuesFieldNumber;
  3277. const int Cursor::kBeforeFieldNumber;
  3278. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3279. Cursor::Cursor()
  3280. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  3281. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  3282. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsCursor();
  3283. }
  3284. SharedCtor();
  3285. // @@protoc_insertion_point(constructor:google.firestore.v1.Cursor)
  3286. }
  3287. Cursor::Cursor(const Cursor& from)
  3288. : ::google::protobuf::Message(),
  3289. _internal_metadata_(NULL),
  3290. values_(from.values_),
  3291. _cached_size_(0) {
  3292. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3293. before_ = from.before_;
  3294. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.Cursor)
  3295. }
  3296. void Cursor::SharedCtor() {
  3297. before_ = false;
  3298. _cached_size_ = 0;
  3299. }
  3300. Cursor::~Cursor() {
  3301. // @@protoc_insertion_point(destructor:google.firestore.v1.Cursor)
  3302. SharedDtor();
  3303. }
  3304. void Cursor::SharedDtor() {
  3305. }
  3306. void Cursor::SetCachedSize(int size) const {
  3307. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  3308. _cached_size_ = size;
  3309. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  3310. }
  3311. const ::google::protobuf::Descriptor* Cursor::descriptor() {
  3312. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce();
  3313. return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  3314. }
  3315. const Cursor& Cursor::default_instance() {
  3316. ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsCursor();
  3317. return *internal_default_instance();
  3318. }
  3319. Cursor* Cursor::New(::google::protobuf::Arena* arena) const {
  3320. Cursor* n = new Cursor;
  3321. if (arena != NULL) {
  3322. arena->Own(n);
  3323. }
  3324. return n;
  3325. }
  3326. void Cursor::Clear() {
  3327. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.Cursor)
  3328. ::google::protobuf::uint32 cached_has_bits = 0;
  3329. // Prevent compiler warnings about cached_has_bits being unused
  3330. (void) cached_has_bits;
  3331. values_.Clear();
  3332. before_ = false;
  3333. _internal_metadata_.Clear();
  3334. }
  3335. bool Cursor::MergePartialFromCodedStream(
  3336. ::google::protobuf::io::CodedInputStream* input) {
  3337. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3338. ::google::protobuf::uint32 tag;
  3339. // @@protoc_insertion_point(parse_start:google.firestore.v1.Cursor)
  3340. for (;;) {
  3341. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3342. tag = p.first;
  3343. if (!p.second) goto handle_unusual;
  3344. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3345. // repeated .google.firestore.v1.Value values = 1;
  3346. case 1: {
  3347. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3348. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  3349. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_values()));
  3350. } else {
  3351. goto handle_unusual;
  3352. }
  3353. break;
  3354. }
  3355. // bool before = 2;
  3356. case 2: {
  3357. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3358. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  3359. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  3360. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  3361. input, &before_)));
  3362. } else {
  3363. goto handle_unusual;
  3364. }
  3365. break;
  3366. }
  3367. default: {
  3368. handle_unusual:
  3369. if (tag == 0) {
  3370. goto success;
  3371. }
  3372. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3373. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3374. break;
  3375. }
  3376. }
  3377. }
  3378. success:
  3379. // @@protoc_insertion_point(parse_success:google.firestore.v1.Cursor)
  3380. return true;
  3381. failure:
  3382. // @@protoc_insertion_point(parse_failure:google.firestore.v1.Cursor)
  3383. return false;
  3384. #undef DO_
  3385. }
  3386. void Cursor::SerializeWithCachedSizes(
  3387. ::google::protobuf::io::CodedOutputStream* output) const {
  3388. // @@protoc_insertion_point(serialize_start:google.firestore.v1.Cursor)
  3389. ::google::protobuf::uint32 cached_has_bits = 0;
  3390. (void) cached_has_bits;
  3391. // repeated .google.firestore.v1.Value values = 1;
  3392. for (unsigned int i = 0,
  3393. n = static_cast<unsigned int>(this->values_size()); i < n; i++) {
  3394. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  3395. 1, this->values(static_cast<int>(i)), output);
  3396. }
  3397. // bool before = 2;
  3398. if (this->before() != 0) {
  3399. ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->before(), output);
  3400. }
  3401. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3402. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  3403. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  3404. }
  3405. // @@protoc_insertion_point(serialize_end:google.firestore.v1.Cursor)
  3406. }
  3407. ::google::protobuf::uint8* Cursor::InternalSerializeWithCachedSizesToArray(
  3408. bool deterministic, ::google::protobuf::uint8* target) const {
  3409. (void)deterministic; // Unused
  3410. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Cursor)
  3411. ::google::protobuf::uint32 cached_has_bits = 0;
  3412. (void) cached_has_bits;
  3413. // repeated .google.firestore.v1.Value values = 1;
  3414. for (unsigned int i = 0,
  3415. n = static_cast<unsigned int>(this->values_size()); i < n; i++) {
  3416. target = ::google::protobuf::internal::WireFormatLite::
  3417. InternalWriteMessageToArray(
  3418. 1, this->values(static_cast<int>(i)), deterministic, target);
  3419. }
  3420. // bool before = 2;
  3421. if (this->before() != 0) {
  3422. target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->before(), target);
  3423. }
  3424. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3425. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  3426. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  3427. }
  3428. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Cursor)
  3429. return target;
  3430. }
  3431. size_t Cursor::ByteSizeLong() const {
  3432. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Cursor)
  3433. size_t total_size = 0;
  3434. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3435. total_size +=
  3436. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  3437. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  3438. }
  3439. // repeated .google.firestore.v1.Value values = 1;
  3440. {
  3441. unsigned int count = static_cast<unsigned int>(this->values_size());
  3442. total_size += 1UL * count;
  3443. for (unsigned int i = 0; i < count; i++) {
  3444. total_size +=
  3445. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3446. this->values(static_cast<int>(i)));
  3447. }
  3448. }
  3449. // bool before = 2;
  3450. if (this->before() != 0) {
  3451. total_size += 1 + 1;
  3452. }
  3453. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  3454. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  3455. _cached_size_ = cached_size;
  3456. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  3457. return total_size;
  3458. }
  3459. void Cursor::MergeFrom(const ::google::protobuf::Message& from) {
  3460. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.Cursor)
  3461. GOOGLE_DCHECK_NE(&from, this);
  3462. const Cursor* source =
  3463. ::google::protobuf::internal::DynamicCastToGenerated<const Cursor>(
  3464. &from);
  3465. if (source == NULL) {
  3466. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.Cursor)
  3467. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  3468. } else {
  3469. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.Cursor)
  3470. MergeFrom(*source);
  3471. }
  3472. }
  3473. void Cursor::MergeFrom(const Cursor& from) {
  3474. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.Cursor)
  3475. GOOGLE_DCHECK_NE(&from, this);
  3476. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3477. ::google::protobuf::uint32 cached_has_bits = 0;
  3478. (void) cached_has_bits;
  3479. values_.MergeFrom(from.values_);
  3480. if (from.before() != 0) {
  3481. set_before(from.before());
  3482. }
  3483. }
  3484. void Cursor::CopyFrom(const ::google::protobuf::Message& from) {
  3485. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.Cursor)
  3486. if (&from == this) return;
  3487. Clear();
  3488. MergeFrom(from);
  3489. }
  3490. void Cursor::CopyFrom(const Cursor& from) {
  3491. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.Cursor)
  3492. if (&from == this) return;
  3493. Clear();
  3494. MergeFrom(from);
  3495. }
  3496. bool Cursor::IsInitialized() const {
  3497. return true;
  3498. }
  3499. void Cursor::Swap(Cursor* other) {
  3500. if (other == this) return;
  3501. InternalSwap(other);
  3502. }
  3503. void Cursor::InternalSwap(Cursor* other) {
  3504. using std::swap;
  3505. values_.InternalSwap(&other->values_);
  3506. swap(before_, other->before_);
  3507. _internal_metadata_.Swap(&other->_internal_metadata_);
  3508. swap(_cached_size_, other->_cached_size_);
  3509. }
  3510. ::google::protobuf::Metadata Cursor::GetMetadata() const {
  3511. protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce();
  3512. return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages];
  3513. }
  3514. // @@protoc_insertion_point(namespace_scope)
  3515. } // namespace v1
  3516. } // namespace firestore
  3517. } // namespace google
  3518. // @@protoc_insertion_point(global_scope)