query.pb.cc 158 KB

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