bundle.pb.cc 77 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988
  1. /*
  2. * Copyright 2021 Google LLC
  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: firestore/bundle.proto
  18. #include "firestore/bundle.pb.h"
  19. #include <algorithm>
  20. #include <google/protobuf/io/coded_stream.h>
  21. #include <google/protobuf/extension_set.h>
  22. #include <google/protobuf/wire_format_lite.h>
  23. #include <google/protobuf/descriptor.h>
  24. #include <google/protobuf/generated_message_reflection.h>
  25. #include <google/protobuf/reflection_ops.h>
  26. #include <google/protobuf/wire_format.h>
  27. // @@protoc_insertion_point(includes)
  28. #include <google/protobuf/port_def.inc>
  29. extern PROTOBUF_INTERNAL_EXPORT_firestore_2fbundle_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_BundleMetadata_firestore_2fbundle_2eproto;
  30. extern PROTOBUF_INTERNAL_EXPORT_firestore_2fbundle_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_BundledDocumentMetadata_firestore_2fbundle_2eproto;
  31. extern PROTOBUF_INTERNAL_EXPORT_firestore_2fbundle_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_BundledQuery_firestore_2fbundle_2eproto;
  32. extern PROTOBUF_INTERNAL_EXPORT_firestore_2fbundle_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_NamedQuery_firestore_2fbundle_2eproto;
  33. extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fdocument_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_Document_google_2ffirestore_2fv1_2fdocument_2eproto;
  34. extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fquery_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<6> scc_info_StructuredQuery_google_2ffirestore_2fv1_2fquery_2eproto;
  35. extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftimestamp_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto;
  36. namespace firestore {
  37. class BundledQueryDefaultTypeInternal {
  38. public:
  39. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<BundledQuery> _instance;
  40. const ::google::firestore::v1::StructuredQuery* structured_query_;
  41. } _BundledQuery_default_instance_;
  42. class NamedQueryDefaultTypeInternal {
  43. public:
  44. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<NamedQuery> _instance;
  45. } _NamedQuery_default_instance_;
  46. class BundledDocumentMetadataDefaultTypeInternal {
  47. public:
  48. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<BundledDocumentMetadata> _instance;
  49. } _BundledDocumentMetadata_default_instance_;
  50. class BundleMetadataDefaultTypeInternal {
  51. public:
  52. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<BundleMetadata> _instance;
  53. } _BundleMetadata_default_instance_;
  54. class BundleElementDefaultTypeInternal {
  55. public:
  56. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<BundleElement> _instance;
  57. const ::firestore::BundleMetadata* metadata_;
  58. const ::firestore::NamedQuery* named_query_;
  59. const ::firestore::BundledDocumentMetadata* document_metadata_;
  60. const ::google::firestore::v1::Document* document_;
  61. } _BundleElement_default_instance_;
  62. } // namespace firestore
  63. static void InitDefaultsscc_info_BundleElement_firestore_2fbundle_2eproto() {
  64. GOOGLE_PROTOBUF_VERIFY_VERSION;
  65. {
  66. void* ptr = &::firestore::_BundleElement_default_instance_;
  67. new (ptr) ::firestore::BundleElement();
  68. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  69. }
  70. ::firestore::BundleElement::InitAsDefaultInstance();
  71. }
  72. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<4> scc_info_BundleElement_firestore_2fbundle_2eproto =
  73. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 4, 0, InitDefaultsscc_info_BundleElement_firestore_2fbundle_2eproto}, {
  74. &scc_info_BundleMetadata_firestore_2fbundle_2eproto.base,
  75. &scc_info_NamedQuery_firestore_2fbundle_2eproto.base,
  76. &scc_info_BundledDocumentMetadata_firestore_2fbundle_2eproto.base,
  77. &scc_info_Document_google_2ffirestore_2fv1_2fdocument_2eproto.base,}};
  78. static void InitDefaultsscc_info_BundleMetadata_firestore_2fbundle_2eproto() {
  79. GOOGLE_PROTOBUF_VERIFY_VERSION;
  80. {
  81. void* ptr = &::firestore::_BundleMetadata_default_instance_;
  82. new (ptr) ::firestore::BundleMetadata();
  83. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  84. }
  85. ::firestore::BundleMetadata::InitAsDefaultInstance();
  86. }
  87. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_BundleMetadata_firestore_2fbundle_2eproto =
  88. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_BundleMetadata_firestore_2fbundle_2eproto}, {
  89. &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};
  90. static void InitDefaultsscc_info_BundledDocumentMetadata_firestore_2fbundle_2eproto() {
  91. GOOGLE_PROTOBUF_VERIFY_VERSION;
  92. {
  93. void* ptr = &::firestore::_BundledDocumentMetadata_default_instance_;
  94. new (ptr) ::firestore::BundledDocumentMetadata();
  95. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  96. }
  97. ::firestore::BundledDocumentMetadata::InitAsDefaultInstance();
  98. }
  99. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_BundledDocumentMetadata_firestore_2fbundle_2eproto =
  100. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_BundledDocumentMetadata_firestore_2fbundle_2eproto}, {
  101. &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};
  102. static void InitDefaultsscc_info_BundledQuery_firestore_2fbundle_2eproto() {
  103. GOOGLE_PROTOBUF_VERIFY_VERSION;
  104. {
  105. void* ptr = &::firestore::_BundledQuery_default_instance_;
  106. new (ptr) ::firestore::BundledQuery();
  107. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  108. }
  109. ::firestore::BundledQuery::InitAsDefaultInstance();
  110. }
  111. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_BundledQuery_firestore_2fbundle_2eproto =
  112. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_BundledQuery_firestore_2fbundle_2eproto}, {
  113. &scc_info_StructuredQuery_google_2ffirestore_2fv1_2fquery_2eproto.base,}};
  114. static void InitDefaultsscc_info_NamedQuery_firestore_2fbundle_2eproto() {
  115. GOOGLE_PROTOBUF_VERIFY_VERSION;
  116. {
  117. void* ptr = &::firestore::_NamedQuery_default_instance_;
  118. new (ptr) ::firestore::NamedQuery();
  119. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  120. }
  121. ::firestore::NamedQuery::InitAsDefaultInstance();
  122. }
  123. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_NamedQuery_firestore_2fbundle_2eproto =
  124. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_NamedQuery_firestore_2fbundle_2eproto}, {
  125. &scc_info_BundledQuery_firestore_2fbundle_2eproto.base,
  126. &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};
  127. static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_firestore_2fbundle_2eproto[5];
  128. static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_firestore_2fbundle_2eproto[1];
  129. static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_firestore_2fbundle_2eproto = nullptr;
  130. const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_firestore_2fbundle_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  131. ~0u, // no _has_bits_
  132. PROTOBUF_FIELD_OFFSET(::firestore::BundledQuery, _internal_metadata_),
  133. ~0u, // no _extensions_
  134. PROTOBUF_FIELD_OFFSET(::firestore::BundledQuery, _oneof_case_[0]),
  135. ~0u, // no _weak_field_map_
  136. PROTOBUF_FIELD_OFFSET(::firestore::BundledQuery, parent_),
  137. offsetof(::firestore::BundledQueryDefaultTypeInternal, structured_query_),
  138. PROTOBUF_FIELD_OFFSET(::firestore::BundledQuery, limit_type_),
  139. PROTOBUF_FIELD_OFFSET(::firestore::BundledQuery, query_type_),
  140. ~0u, // no _has_bits_
  141. PROTOBUF_FIELD_OFFSET(::firestore::NamedQuery, _internal_metadata_),
  142. ~0u, // no _extensions_
  143. ~0u, // no _oneof_case_
  144. ~0u, // no _weak_field_map_
  145. PROTOBUF_FIELD_OFFSET(::firestore::NamedQuery, name_),
  146. PROTOBUF_FIELD_OFFSET(::firestore::NamedQuery, bundled_query_),
  147. PROTOBUF_FIELD_OFFSET(::firestore::NamedQuery, read_time_),
  148. ~0u, // no _has_bits_
  149. PROTOBUF_FIELD_OFFSET(::firestore::BundledDocumentMetadata, _internal_metadata_),
  150. ~0u, // no _extensions_
  151. ~0u, // no _oneof_case_
  152. ~0u, // no _weak_field_map_
  153. PROTOBUF_FIELD_OFFSET(::firestore::BundledDocumentMetadata, name_),
  154. PROTOBUF_FIELD_OFFSET(::firestore::BundledDocumentMetadata, read_time_),
  155. PROTOBUF_FIELD_OFFSET(::firestore::BundledDocumentMetadata, exists_),
  156. PROTOBUF_FIELD_OFFSET(::firestore::BundledDocumentMetadata, queries_),
  157. ~0u, // no _has_bits_
  158. PROTOBUF_FIELD_OFFSET(::firestore::BundleMetadata, _internal_metadata_),
  159. ~0u, // no _extensions_
  160. ~0u, // no _oneof_case_
  161. ~0u, // no _weak_field_map_
  162. PROTOBUF_FIELD_OFFSET(::firestore::BundleMetadata, id_),
  163. PROTOBUF_FIELD_OFFSET(::firestore::BundleMetadata, create_time_),
  164. PROTOBUF_FIELD_OFFSET(::firestore::BundleMetadata, version_),
  165. PROTOBUF_FIELD_OFFSET(::firestore::BundleMetadata, total_documents_),
  166. PROTOBUF_FIELD_OFFSET(::firestore::BundleMetadata, total_bytes_),
  167. ~0u, // no _has_bits_
  168. PROTOBUF_FIELD_OFFSET(::firestore::BundleElement, _internal_metadata_),
  169. ~0u, // no _extensions_
  170. PROTOBUF_FIELD_OFFSET(::firestore::BundleElement, _oneof_case_[0]),
  171. ~0u, // no _weak_field_map_
  172. offsetof(::firestore::BundleElementDefaultTypeInternal, metadata_),
  173. offsetof(::firestore::BundleElementDefaultTypeInternal, named_query_),
  174. offsetof(::firestore::BundleElementDefaultTypeInternal, document_metadata_),
  175. offsetof(::firestore::BundleElementDefaultTypeInternal, document_),
  176. PROTOBUF_FIELD_OFFSET(::firestore::BundleElement, element_type_),
  177. };
  178. static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  179. { 0, -1, sizeof(::firestore::BundledQuery)},
  180. { 9, -1, sizeof(::firestore::NamedQuery)},
  181. { 17, -1, sizeof(::firestore::BundledDocumentMetadata)},
  182. { 26, -1, sizeof(::firestore::BundleMetadata)},
  183. { 36, -1, sizeof(::firestore::BundleElement)},
  184. };
  185. static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
  186. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::firestore::_BundledQuery_default_instance_),
  187. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::firestore::_NamedQuery_default_instance_),
  188. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::firestore::_BundledDocumentMetadata_default_instance_),
  189. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::firestore::_BundleMetadata_default_instance_),
  190. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::firestore::_BundleElement_default_instance_),
  191. };
  192. const char descriptor_table_protodef_firestore_2fbundle_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  193. "\n\026firestore/bundle.proto\022\tfirestore\032\"goo"
  194. "gle/firestore/v1/document.proto\032\037google/"
  195. "firestore/v1/query.proto\032\037google/protobu"
  196. "f/timestamp.proto\"\307\001\n\014BundledQuery\022\016\n\006pa"
  197. "rent\030\001 \001(\t\022@\n\020structured_query\030\002 \001(\0132$.g"
  198. "oogle.firestore.v1.StructuredQueryH\000\0225\n\n"
  199. "limit_type\030\003 \001(\0162!.firestore.BundledQuer"
  200. "y.LimitType\" \n\tLimitType\022\t\n\005FIRST\020\000\022\010\n\004L"
  201. "AST\020\001B\014\n\nquery_type\"y\n\nNamedQuery\022\014\n\004nam"
  202. "e\030\001 \001(\t\022.\n\rbundled_query\030\002 \001(\0132\027.firesto"
  203. "re.BundledQuery\022-\n\tread_time\030\003 \001(\0132\032.goo"
  204. "gle.protobuf.Timestamp\"w\n\027BundledDocumen"
  205. "tMetadata\022\014\n\004name\030\001 \001(\t\022-\n\tread_time\030\002 \001"
  206. "(\0132\032.google.protobuf.Timestamp\022\016\n\006exists"
  207. "\030\003 \001(\010\022\017\n\007queries\030\004 \003(\t\"\214\001\n\016BundleMetada"
  208. "ta\022\n\n\002id\030\001 \001(\t\022/\n\013create_time\030\002 \001(\0132\032.go"
  209. "ogle.protobuf.Timestamp\022\017\n\007version\030\003 \001(\r"
  210. "\022\027\n\017total_documents\030\004 \001(\r\022\023\n\013total_bytes"
  211. "\030\005 \001(\004\"\360\001\n\rBundleElement\022-\n\010metadata\030\001 \001"
  212. "(\0132\031.firestore.BundleMetadataH\000\022,\n\013named"
  213. "_query\030\002 \001(\0132\025.firestore.NamedQueryH\000\022\?\n"
  214. "\021document_metadata\030\003 \001(\0132\".firestore.Bun"
  215. "dledDocumentMetadataH\000\0221\n\010document\030\004 \001(\013"
  216. "2\035.google.firestore.v1.DocumentH\000B\016\n\014ele"
  217. "ment_typeB\215\001\n\032com.google.firestore.proto"
  218. "B\013BundleProtoP\001Z4google.golang.org/genpr"
  219. "oto/firestore/proto;firestore\242\002\005FSTPB\252\002\017"
  220. "Firestore.Proto\312\002\017Firestore\\Protob\006proto"
  221. "3"
  222. ;
  223. static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_firestore_2fbundle_2eproto_deps[3] = {
  224. &::descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto,
  225. &::descriptor_table_google_2ffirestore_2fv1_2fquery_2eproto,
  226. &::descriptor_table_google_2fprotobuf_2ftimestamp_2eproto,
  227. };
  228. static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_firestore_2fbundle_2eproto_sccs[5] = {
  229. &scc_info_BundleElement_firestore_2fbundle_2eproto.base,
  230. &scc_info_BundleMetadata_firestore_2fbundle_2eproto.base,
  231. &scc_info_BundledDocumentMetadata_firestore_2fbundle_2eproto.base,
  232. &scc_info_BundledQuery_firestore_2fbundle_2eproto.base,
  233. &scc_info_NamedQuery_firestore_2fbundle_2eproto.base,
  234. };
  235. static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_firestore_2fbundle_2eproto_once;
  236. static bool descriptor_table_firestore_2fbundle_2eproto_initialized = false;
  237. const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_firestore_2fbundle_2eproto = {
  238. &descriptor_table_firestore_2fbundle_2eproto_initialized, descriptor_table_protodef_firestore_2fbundle_2eproto, "firestore/bundle.proto", 1121,
  239. &descriptor_table_firestore_2fbundle_2eproto_once, descriptor_table_firestore_2fbundle_2eproto_sccs, descriptor_table_firestore_2fbundle_2eproto_deps, 5, 3,
  240. schemas, file_default_instances, TableStruct_firestore_2fbundle_2eproto::offsets,
  241. file_level_metadata_firestore_2fbundle_2eproto, 5, file_level_enum_descriptors_firestore_2fbundle_2eproto, file_level_service_descriptors_firestore_2fbundle_2eproto,
  242. };
  243. // Force running AddDescriptors() at dynamic initialization time.
  244. static bool dynamic_init_dummy_firestore_2fbundle_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_firestore_2fbundle_2eproto), true);
  245. namespace firestore {
  246. const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* BundledQuery_LimitType_descriptor() {
  247. ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_firestore_2fbundle_2eproto);
  248. return file_level_enum_descriptors_firestore_2fbundle_2eproto[0];
  249. }
  250. bool BundledQuery_LimitType_IsValid(int value) {
  251. switch (value) {
  252. case 0:
  253. case 1:
  254. return true;
  255. default:
  256. return false;
  257. }
  258. }
  259. #if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
  260. constexpr BundledQuery_LimitType BundledQuery::FIRST;
  261. constexpr BundledQuery_LimitType BundledQuery::LAST;
  262. constexpr BundledQuery_LimitType BundledQuery::LimitType_MIN;
  263. constexpr BundledQuery_LimitType BundledQuery::LimitType_MAX;
  264. constexpr int BundledQuery::LimitType_ARRAYSIZE;
  265. #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
  266. // ===================================================================
  267. void BundledQuery::InitAsDefaultInstance() {
  268. ::firestore::_BundledQuery_default_instance_.structured_query_ = const_cast< ::google::firestore::v1::StructuredQuery*>(
  269. ::google::firestore::v1::StructuredQuery::internal_default_instance());
  270. }
  271. class BundledQuery::_Internal {
  272. public:
  273. static const ::google::firestore::v1::StructuredQuery& structured_query(const BundledQuery* msg);
  274. };
  275. const ::google::firestore::v1::StructuredQuery&
  276. BundledQuery::_Internal::structured_query(const BundledQuery* msg) {
  277. return *msg->query_type_.structured_query_;
  278. }
  279. void BundledQuery::set_allocated_structured_query(::google::firestore::v1::StructuredQuery* structured_query) {
  280. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  281. clear_query_type();
  282. if (structured_query) {
  283. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
  284. if (message_arena != submessage_arena) {
  285. structured_query = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  286. message_arena, structured_query, submessage_arena);
  287. }
  288. set_has_structured_query();
  289. query_type_.structured_query_ = structured_query;
  290. }
  291. // @@protoc_insertion_point(field_set_allocated:firestore.BundledQuery.structured_query)
  292. }
  293. void BundledQuery::clear_structured_query() {
  294. if (_internal_has_structured_query()) {
  295. delete query_type_.structured_query_;
  296. clear_has_query_type();
  297. }
  298. }
  299. BundledQuery::BundledQuery()
  300. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  301. SharedCtor();
  302. // @@protoc_insertion_point(constructor:firestore.BundledQuery)
  303. }
  304. BundledQuery::BundledQuery(const BundledQuery& from)
  305. : ::PROTOBUF_NAMESPACE_ID::Message(),
  306. _internal_metadata_(nullptr) {
  307. _internal_metadata_.MergeFrom(from._internal_metadata_);
  308. parent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  309. if (!from._internal_parent().empty()) {
  310. parent_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parent_);
  311. }
  312. limit_type_ = from.limit_type_;
  313. clear_has_query_type();
  314. switch (from.query_type_case()) {
  315. case kStructuredQuery: {
  316. _internal_mutable_structured_query()->::google::firestore::v1::StructuredQuery::MergeFrom(from._internal_structured_query());
  317. break;
  318. }
  319. case QUERY_TYPE_NOT_SET: {
  320. break;
  321. }
  322. }
  323. // @@protoc_insertion_point(copy_constructor:firestore.BundledQuery)
  324. }
  325. void BundledQuery::SharedCtor() {
  326. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_BundledQuery_firestore_2fbundle_2eproto.base);
  327. parent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  328. limit_type_ = 0;
  329. clear_has_query_type();
  330. }
  331. BundledQuery::~BundledQuery() {
  332. // @@protoc_insertion_point(destructor:firestore.BundledQuery)
  333. SharedDtor();
  334. }
  335. void BundledQuery::SharedDtor() {
  336. parent_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  337. if (has_query_type()) {
  338. clear_query_type();
  339. }
  340. }
  341. void BundledQuery::SetCachedSize(int size) const {
  342. _cached_size_.Set(size);
  343. }
  344. const BundledQuery& BundledQuery::default_instance() {
  345. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_BundledQuery_firestore_2fbundle_2eproto.base);
  346. return *internal_default_instance();
  347. }
  348. void BundledQuery::clear_query_type() {
  349. // @@protoc_insertion_point(one_of_clear_start:firestore.BundledQuery)
  350. switch (query_type_case()) {
  351. case kStructuredQuery: {
  352. delete query_type_.structured_query_;
  353. break;
  354. }
  355. case QUERY_TYPE_NOT_SET: {
  356. break;
  357. }
  358. }
  359. _oneof_case_[0] = QUERY_TYPE_NOT_SET;
  360. }
  361. void BundledQuery::Clear() {
  362. // @@protoc_insertion_point(message_clear_start:firestore.BundledQuery)
  363. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  364. // Prevent compiler warnings about cached_has_bits being unused
  365. (void) cached_has_bits;
  366. parent_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  367. limit_type_ = 0;
  368. clear_query_type();
  369. _internal_metadata_.Clear();
  370. }
  371. const char* BundledQuery::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  372. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  373. while (!ctx->Done(&ptr)) {
  374. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  375. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  376. CHK_(ptr);
  377. switch (tag >> 3) {
  378. // string parent = 1;
  379. case 1:
  380. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  381. auto str = _internal_mutable_parent();
  382. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  383. CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "firestore.BundledQuery.parent"));
  384. CHK_(ptr);
  385. } else goto handle_unusual;
  386. continue;
  387. // .google.firestore.v1.StructuredQuery structured_query = 2;
  388. case 2:
  389. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  390. ptr = ctx->ParseMessage(_internal_mutable_structured_query(), ptr);
  391. CHK_(ptr);
  392. } else goto handle_unusual;
  393. continue;
  394. // .firestore.BundledQuery.LimitType limit_type = 3;
  395. case 3:
  396. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
  397. ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
  398. CHK_(ptr);
  399. _internal_set_limit_type(static_cast<::firestore::BundledQuery_LimitType>(val));
  400. } else goto handle_unusual;
  401. continue;
  402. default: {
  403. handle_unusual:
  404. if ((tag & 7) == 4 || tag == 0) {
  405. ctx->SetLastTag(tag);
  406. goto success;
  407. }
  408. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  409. CHK_(ptr != nullptr);
  410. continue;
  411. }
  412. } // switch
  413. } // while
  414. success:
  415. return ptr;
  416. failure:
  417. ptr = nullptr;
  418. goto success;
  419. #undef CHK_
  420. }
  421. ::PROTOBUF_NAMESPACE_ID::uint8* BundledQuery::_InternalSerialize(
  422. ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  423. // @@protoc_insertion_point(serialize_to_array_start:firestore.BundledQuery)
  424. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  425. (void) cached_has_bits;
  426. // string parent = 1;
  427. if (this->parent().size() > 0) {
  428. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  429. this->_internal_parent().data(), static_cast<int>(this->_internal_parent().length()),
  430. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  431. "firestore.BundledQuery.parent");
  432. target = stream->WriteStringMaybeAliased(
  433. 1, this->_internal_parent(), target);
  434. }
  435. // .google.firestore.v1.StructuredQuery structured_query = 2;
  436. if (_internal_has_structured_query()) {
  437. target = stream->EnsureSpace(target);
  438. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  439. InternalWriteMessage(
  440. 2, _Internal::structured_query(this), target, stream);
  441. }
  442. // .firestore.BundledQuery.LimitType limit_type = 3;
  443. if (this->limit_type() != 0) {
  444. target = stream->EnsureSpace(target);
  445. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
  446. 3, this->_internal_limit_type(), target);
  447. }
  448. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  449. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  450. _internal_metadata_.unknown_fields(), target, stream);
  451. }
  452. // @@protoc_insertion_point(serialize_to_array_end:firestore.BundledQuery)
  453. return target;
  454. }
  455. size_t BundledQuery::ByteSizeLong() const {
  456. // @@protoc_insertion_point(message_byte_size_start:firestore.BundledQuery)
  457. size_t total_size = 0;
  458. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  459. // Prevent compiler warnings about cached_has_bits being unused
  460. (void) cached_has_bits;
  461. // string parent = 1;
  462. if (this->parent().size() > 0) {
  463. total_size += 1 +
  464. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  465. this->_internal_parent());
  466. }
  467. // .firestore.BundledQuery.LimitType limit_type = 3;
  468. if (this->limit_type() != 0) {
  469. total_size += 1 +
  470. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_limit_type());
  471. }
  472. switch (query_type_case()) {
  473. // .google.firestore.v1.StructuredQuery structured_query = 2;
  474. case kStructuredQuery: {
  475. total_size += 1 +
  476. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  477. *query_type_.structured_query_);
  478. break;
  479. }
  480. case QUERY_TYPE_NOT_SET: {
  481. break;
  482. }
  483. }
  484. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  485. return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
  486. _internal_metadata_, total_size, &_cached_size_);
  487. }
  488. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  489. SetCachedSize(cached_size);
  490. return total_size;
  491. }
  492. void BundledQuery::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  493. // @@protoc_insertion_point(generalized_merge_from_start:firestore.BundledQuery)
  494. GOOGLE_DCHECK_NE(&from, this);
  495. const BundledQuery* source =
  496. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<BundledQuery>(
  497. &from);
  498. if (source == nullptr) {
  499. // @@protoc_insertion_point(generalized_merge_from_cast_fail:firestore.BundledQuery)
  500. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  501. } else {
  502. // @@protoc_insertion_point(generalized_merge_from_cast_success:firestore.BundledQuery)
  503. MergeFrom(*source);
  504. }
  505. }
  506. void BundledQuery::MergeFrom(const BundledQuery& from) {
  507. // @@protoc_insertion_point(class_specific_merge_from_start:firestore.BundledQuery)
  508. GOOGLE_DCHECK_NE(&from, this);
  509. _internal_metadata_.MergeFrom(from._internal_metadata_);
  510. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  511. (void) cached_has_bits;
  512. if (from.parent().size() > 0) {
  513. parent_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parent_);
  514. }
  515. if (from.limit_type() != 0) {
  516. _internal_set_limit_type(from._internal_limit_type());
  517. }
  518. switch (from.query_type_case()) {
  519. case kStructuredQuery: {
  520. _internal_mutable_structured_query()->::google::firestore::v1::StructuredQuery::MergeFrom(from._internal_structured_query());
  521. break;
  522. }
  523. case QUERY_TYPE_NOT_SET: {
  524. break;
  525. }
  526. }
  527. }
  528. void BundledQuery::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  529. // @@protoc_insertion_point(generalized_copy_from_start:firestore.BundledQuery)
  530. if (&from == this) return;
  531. Clear();
  532. MergeFrom(from);
  533. }
  534. void BundledQuery::CopyFrom(const BundledQuery& from) {
  535. // @@protoc_insertion_point(class_specific_copy_from_start:firestore.BundledQuery)
  536. if (&from == this) return;
  537. Clear();
  538. MergeFrom(from);
  539. }
  540. bool BundledQuery::IsInitialized() const {
  541. return true;
  542. }
  543. void BundledQuery::InternalSwap(BundledQuery* other) {
  544. using std::swap;
  545. _internal_metadata_.Swap(&other->_internal_metadata_);
  546. parent_.Swap(&other->parent_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  547. GetArenaNoVirtual());
  548. swap(limit_type_, other->limit_type_);
  549. swap(query_type_, other->query_type_);
  550. swap(_oneof_case_[0], other->_oneof_case_[0]);
  551. }
  552. ::PROTOBUF_NAMESPACE_ID::Metadata BundledQuery::GetMetadata() const {
  553. return GetMetadataStatic();
  554. }
  555. // ===================================================================
  556. void NamedQuery::InitAsDefaultInstance() {
  557. ::firestore::_NamedQuery_default_instance_._instance.get_mutable()->bundled_query_ = const_cast< ::firestore::BundledQuery*>(
  558. ::firestore::BundledQuery::internal_default_instance());
  559. ::firestore::_NamedQuery_default_instance_._instance.get_mutable()->read_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
  560. PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
  561. }
  562. class NamedQuery::_Internal {
  563. public:
  564. static const ::firestore::BundledQuery& bundled_query(const NamedQuery* msg);
  565. static const PROTOBUF_NAMESPACE_ID::Timestamp& read_time(const NamedQuery* msg);
  566. };
  567. const ::firestore::BundledQuery&
  568. NamedQuery::_Internal::bundled_query(const NamedQuery* msg) {
  569. return *msg->bundled_query_;
  570. }
  571. const PROTOBUF_NAMESPACE_ID::Timestamp&
  572. NamedQuery::_Internal::read_time(const NamedQuery* msg) {
  573. return *msg->read_time_;
  574. }
  575. void NamedQuery::clear_read_time() {
  576. if (GetArenaNoVirtual() == nullptr && read_time_ != nullptr) {
  577. delete read_time_;
  578. }
  579. read_time_ = nullptr;
  580. }
  581. NamedQuery::NamedQuery()
  582. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  583. SharedCtor();
  584. // @@protoc_insertion_point(constructor:firestore.NamedQuery)
  585. }
  586. NamedQuery::NamedQuery(const NamedQuery& from)
  587. : ::PROTOBUF_NAMESPACE_ID::Message(),
  588. _internal_metadata_(nullptr) {
  589. _internal_metadata_.MergeFrom(from._internal_metadata_);
  590. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  591. if (!from._internal_name().empty()) {
  592. name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
  593. }
  594. if (from._internal_has_bundled_query()) {
  595. bundled_query_ = new ::firestore::BundledQuery(*from.bundled_query_);
  596. } else {
  597. bundled_query_ = nullptr;
  598. }
  599. if (from._internal_has_read_time()) {
  600. read_time_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.read_time_);
  601. } else {
  602. read_time_ = nullptr;
  603. }
  604. // @@protoc_insertion_point(copy_constructor:firestore.NamedQuery)
  605. }
  606. void NamedQuery::SharedCtor() {
  607. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_NamedQuery_firestore_2fbundle_2eproto.base);
  608. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  609. ::memset(&bundled_query_, 0, static_cast<size_t>(
  610. reinterpret_cast<char*>(&read_time_) -
  611. reinterpret_cast<char*>(&bundled_query_)) + sizeof(read_time_));
  612. }
  613. NamedQuery::~NamedQuery() {
  614. // @@protoc_insertion_point(destructor:firestore.NamedQuery)
  615. SharedDtor();
  616. }
  617. void NamedQuery::SharedDtor() {
  618. name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  619. if (this != internal_default_instance()) delete bundled_query_;
  620. if (this != internal_default_instance()) delete read_time_;
  621. }
  622. void NamedQuery::SetCachedSize(int size) const {
  623. _cached_size_.Set(size);
  624. }
  625. const NamedQuery& NamedQuery::default_instance() {
  626. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_NamedQuery_firestore_2fbundle_2eproto.base);
  627. return *internal_default_instance();
  628. }
  629. void NamedQuery::Clear() {
  630. // @@protoc_insertion_point(message_clear_start:firestore.NamedQuery)
  631. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  632. // Prevent compiler warnings about cached_has_bits being unused
  633. (void) cached_has_bits;
  634. name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  635. if (GetArenaNoVirtual() == nullptr && bundled_query_ != nullptr) {
  636. delete bundled_query_;
  637. }
  638. bundled_query_ = nullptr;
  639. if (GetArenaNoVirtual() == nullptr && read_time_ != nullptr) {
  640. delete read_time_;
  641. }
  642. read_time_ = nullptr;
  643. _internal_metadata_.Clear();
  644. }
  645. const char* NamedQuery::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  646. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  647. while (!ctx->Done(&ptr)) {
  648. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  649. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  650. CHK_(ptr);
  651. switch (tag >> 3) {
  652. // string name = 1;
  653. case 1:
  654. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  655. auto str = _internal_mutable_name();
  656. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  657. CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "firestore.NamedQuery.name"));
  658. CHK_(ptr);
  659. } else goto handle_unusual;
  660. continue;
  661. // .firestore.BundledQuery bundled_query = 2;
  662. case 2:
  663. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  664. ptr = ctx->ParseMessage(_internal_mutable_bundled_query(), ptr);
  665. CHK_(ptr);
  666. } else goto handle_unusual;
  667. continue;
  668. // .google.protobuf.Timestamp read_time = 3;
  669. case 3:
  670. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
  671. ptr = ctx->ParseMessage(_internal_mutable_read_time(), ptr);
  672. CHK_(ptr);
  673. } else goto handle_unusual;
  674. continue;
  675. default: {
  676. handle_unusual:
  677. if ((tag & 7) == 4 || tag == 0) {
  678. ctx->SetLastTag(tag);
  679. goto success;
  680. }
  681. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  682. CHK_(ptr != nullptr);
  683. continue;
  684. }
  685. } // switch
  686. } // while
  687. success:
  688. return ptr;
  689. failure:
  690. ptr = nullptr;
  691. goto success;
  692. #undef CHK_
  693. }
  694. ::PROTOBUF_NAMESPACE_ID::uint8* NamedQuery::_InternalSerialize(
  695. ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  696. // @@protoc_insertion_point(serialize_to_array_start:firestore.NamedQuery)
  697. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  698. (void) cached_has_bits;
  699. // string name = 1;
  700. if (this->name().size() > 0) {
  701. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  702. this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
  703. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  704. "firestore.NamedQuery.name");
  705. target = stream->WriteStringMaybeAliased(
  706. 1, this->_internal_name(), target);
  707. }
  708. // .firestore.BundledQuery bundled_query = 2;
  709. if (this->has_bundled_query()) {
  710. target = stream->EnsureSpace(target);
  711. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  712. InternalWriteMessage(
  713. 2, _Internal::bundled_query(this), target, stream);
  714. }
  715. // .google.protobuf.Timestamp read_time = 3;
  716. if (this->has_read_time()) {
  717. target = stream->EnsureSpace(target);
  718. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  719. InternalWriteMessage(
  720. 3, _Internal::read_time(this), target, stream);
  721. }
  722. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  723. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  724. _internal_metadata_.unknown_fields(), target, stream);
  725. }
  726. // @@protoc_insertion_point(serialize_to_array_end:firestore.NamedQuery)
  727. return target;
  728. }
  729. size_t NamedQuery::ByteSizeLong() const {
  730. // @@protoc_insertion_point(message_byte_size_start:firestore.NamedQuery)
  731. size_t total_size = 0;
  732. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  733. // Prevent compiler warnings about cached_has_bits being unused
  734. (void) cached_has_bits;
  735. // string name = 1;
  736. if (this->name().size() > 0) {
  737. total_size += 1 +
  738. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  739. this->_internal_name());
  740. }
  741. // .firestore.BundledQuery bundled_query = 2;
  742. if (this->has_bundled_query()) {
  743. total_size += 1 +
  744. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  745. *bundled_query_);
  746. }
  747. // .google.protobuf.Timestamp read_time = 3;
  748. if (this->has_read_time()) {
  749. total_size += 1 +
  750. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  751. *read_time_);
  752. }
  753. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  754. return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
  755. _internal_metadata_, total_size, &_cached_size_);
  756. }
  757. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  758. SetCachedSize(cached_size);
  759. return total_size;
  760. }
  761. void NamedQuery::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  762. // @@protoc_insertion_point(generalized_merge_from_start:firestore.NamedQuery)
  763. GOOGLE_DCHECK_NE(&from, this);
  764. const NamedQuery* source =
  765. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<NamedQuery>(
  766. &from);
  767. if (source == nullptr) {
  768. // @@protoc_insertion_point(generalized_merge_from_cast_fail:firestore.NamedQuery)
  769. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  770. } else {
  771. // @@protoc_insertion_point(generalized_merge_from_cast_success:firestore.NamedQuery)
  772. MergeFrom(*source);
  773. }
  774. }
  775. void NamedQuery::MergeFrom(const NamedQuery& from) {
  776. // @@protoc_insertion_point(class_specific_merge_from_start:firestore.NamedQuery)
  777. GOOGLE_DCHECK_NE(&from, this);
  778. _internal_metadata_.MergeFrom(from._internal_metadata_);
  779. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  780. (void) cached_has_bits;
  781. if (from.name().size() > 0) {
  782. name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
  783. }
  784. if (from.has_bundled_query()) {
  785. _internal_mutable_bundled_query()->::firestore::BundledQuery::MergeFrom(from._internal_bundled_query());
  786. }
  787. if (from.has_read_time()) {
  788. _internal_mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_read_time());
  789. }
  790. }
  791. void NamedQuery::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  792. // @@protoc_insertion_point(generalized_copy_from_start:firestore.NamedQuery)
  793. if (&from == this) return;
  794. Clear();
  795. MergeFrom(from);
  796. }
  797. void NamedQuery::CopyFrom(const NamedQuery& from) {
  798. // @@protoc_insertion_point(class_specific_copy_from_start:firestore.NamedQuery)
  799. if (&from == this) return;
  800. Clear();
  801. MergeFrom(from);
  802. }
  803. bool NamedQuery::IsInitialized() const {
  804. return true;
  805. }
  806. void NamedQuery::InternalSwap(NamedQuery* other) {
  807. using std::swap;
  808. _internal_metadata_.Swap(&other->_internal_metadata_);
  809. name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  810. GetArenaNoVirtual());
  811. swap(bundled_query_, other->bundled_query_);
  812. swap(read_time_, other->read_time_);
  813. }
  814. ::PROTOBUF_NAMESPACE_ID::Metadata NamedQuery::GetMetadata() const {
  815. return GetMetadataStatic();
  816. }
  817. // ===================================================================
  818. void BundledDocumentMetadata::InitAsDefaultInstance() {
  819. ::firestore::_BundledDocumentMetadata_default_instance_._instance.get_mutable()->read_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
  820. PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
  821. }
  822. class BundledDocumentMetadata::_Internal {
  823. public:
  824. static const PROTOBUF_NAMESPACE_ID::Timestamp& read_time(const BundledDocumentMetadata* msg);
  825. };
  826. const PROTOBUF_NAMESPACE_ID::Timestamp&
  827. BundledDocumentMetadata::_Internal::read_time(const BundledDocumentMetadata* msg) {
  828. return *msg->read_time_;
  829. }
  830. void BundledDocumentMetadata::clear_read_time() {
  831. if (GetArenaNoVirtual() == nullptr && read_time_ != nullptr) {
  832. delete read_time_;
  833. }
  834. read_time_ = nullptr;
  835. }
  836. BundledDocumentMetadata::BundledDocumentMetadata()
  837. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  838. SharedCtor();
  839. // @@protoc_insertion_point(constructor:firestore.BundledDocumentMetadata)
  840. }
  841. BundledDocumentMetadata::BundledDocumentMetadata(const BundledDocumentMetadata& from)
  842. : ::PROTOBUF_NAMESPACE_ID::Message(),
  843. _internal_metadata_(nullptr),
  844. queries_(from.queries_) {
  845. _internal_metadata_.MergeFrom(from._internal_metadata_);
  846. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  847. if (!from._internal_name().empty()) {
  848. name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
  849. }
  850. if (from._internal_has_read_time()) {
  851. read_time_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.read_time_);
  852. } else {
  853. read_time_ = nullptr;
  854. }
  855. exists_ = from.exists_;
  856. // @@protoc_insertion_point(copy_constructor:firestore.BundledDocumentMetadata)
  857. }
  858. void BundledDocumentMetadata::SharedCtor() {
  859. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_BundledDocumentMetadata_firestore_2fbundle_2eproto.base);
  860. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  861. ::memset(&read_time_, 0, static_cast<size_t>(
  862. reinterpret_cast<char*>(&exists_) -
  863. reinterpret_cast<char*>(&read_time_)) + sizeof(exists_));
  864. }
  865. BundledDocumentMetadata::~BundledDocumentMetadata() {
  866. // @@protoc_insertion_point(destructor:firestore.BundledDocumentMetadata)
  867. SharedDtor();
  868. }
  869. void BundledDocumentMetadata::SharedDtor() {
  870. name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  871. if (this != internal_default_instance()) delete read_time_;
  872. }
  873. void BundledDocumentMetadata::SetCachedSize(int size) const {
  874. _cached_size_.Set(size);
  875. }
  876. const BundledDocumentMetadata& BundledDocumentMetadata::default_instance() {
  877. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_BundledDocumentMetadata_firestore_2fbundle_2eproto.base);
  878. return *internal_default_instance();
  879. }
  880. void BundledDocumentMetadata::Clear() {
  881. // @@protoc_insertion_point(message_clear_start:firestore.BundledDocumentMetadata)
  882. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  883. // Prevent compiler warnings about cached_has_bits being unused
  884. (void) cached_has_bits;
  885. queries_.Clear();
  886. name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  887. if (GetArenaNoVirtual() == nullptr && read_time_ != nullptr) {
  888. delete read_time_;
  889. }
  890. read_time_ = nullptr;
  891. exists_ = false;
  892. _internal_metadata_.Clear();
  893. }
  894. const char* BundledDocumentMetadata::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  895. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  896. while (!ctx->Done(&ptr)) {
  897. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  898. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  899. CHK_(ptr);
  900. switch (tag >> 3) {
  901. // string name = 1;
  902. case 1:
  903. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  904. auto str = _internal_mutable_name();
  905. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  906. CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "firestore.BundledDocumentMetadata.name"));
  907. CHK_(ptr);
  908. } else goto handle_unusual;
  909. continue;
  910. // .google.protobuf.Timestamp read_time = 2;
  911. case 2:
  912. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  913. ptr = ctx->ParseMessage(_internal_mutable_read_time(), ptr);
  914. CHK_(ptr);
  915. } else goto handle_unusual;
  916. continue;
  917. // bool exists = 3;
  918. case 3:
  919. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
  920. exists_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
  921. CHK_(ptr);
  922. } else goto handle_unusual;
  923. continue;
  924. // repeated string queries = 4;
  925. case 4:
  926. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
  927. ptr -= 1;
  928. do {
  929. ptr += 1;
  930. auto str = _internal_add_queries();
  931. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  932. CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "firestore.BundledDocumentMetadata.queries"));
  933. CHK_(ptr);
  934. if (!ctx->DataAvailable(ptr)) break;
  935. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
  936. } else goto handle_unusual;
  937. continue;
  938. default: {
  939. handle_unusual:
  940. if ((tag & 7) == 4 || tag == 0) {
  941. ctx->SetLastTag(tag);
  942. goto success;
  943. }
  944. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  945. CHK_(ptr != nullptr);
  946. continue;
  947. }
  948. } // switch
  949. } // while
  950. success:
  951. return ptr;
  952. failure:
  953. ptr = nullptr;
  954. goto success;
  955. #undef CHK_
  956. }
  957. ::PROTOBUF_NAMESPACE_ID::uint8* BundledDocumentMetadata::_InternalSerialize(
  958. ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  959. // @@protoc_insertion_point(serialize_to_array_start:firestore.BundledDocumentMetadata)
  960. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  961. (void) cached_has_bits;
  962. // string name = 1;
  963. if (this->name().size() > 0) {
  964. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  965. this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
  966. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  967. "firestore.BundledDocumentMetadata.name");
  968. target = stream->WriteStringMaybeAliased(
  969. 1, this->_internal_name(), target);
  970. }
  971. // .google.protobuf.Timestamp read_time = 2;
  972. if (this->has_read_time()) {
  973. target = stream->EnsureSpace(target);
  974. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  975. InternalWriteMessage(
  976. 2, _Internal::read_time(this), target, stream);
  977. }
  978. // bool exists = 3;
  979. if (this->exists() != 0) {
  980. target = stream->EnsureSpace(target);
  981. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_exists(), target);
  982. }
  983. // repeated string queries = 4;
  984. for (int i = 0, n = this->_internal_queries_size(); i < n; i++) {
  985. const auto& s = this->_internal_queries(i);
  986. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  987. s.data(), static_cast<int>(s.length()),
  988. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  989. "firestore.BundledDocumentMetadata.queries");
  990. target = stream->WriteString(4, s, target);
  991. }
  992. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  993. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  994. _internal_metadata_.unknown_fields(), target, stream);
  995. }
  996. // @@protoc_insertion_point(serialize_to_array_end:firestore.BundledDocumentMetadata)
  997. return target;
  998. }
  999. size_t BundledDocumentMetadata::ByteSizeLong() const {
  1000. // @@protoc_insertion_point(message_byte_size_start:firestore.BundledDocumentMetadata)
  1001. size_t total_size = 0;
  1002. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1003. // Prevent compiler warnings about cached_has_bits being unused
  1004. (void) cached_has_bits;
  1005. // repeated string queries = 4;
  1006. total_size += 1 *
  1007. ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(queries_.size());
  1008. for (int i = 0, n = queries_.size(); i < n; i++) {
  1009. total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  1010. queries_.Get(i));
  1011. }
  1012. // string name = 1;
  1013. if (this->name().size() > 0) {
  1014. total_size += 1 +
  1015. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  1016. this->_internal_name());
  1017. }
  1018. // .google.protobuf.Timestamp read_time = 2;
  1019. if (this->has_read_time()) {
  1020. total_size += 1 +
  1021. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  1022. *read_time_);
  1023. }
  1024. // bool exists = 3;
  1025. if (this->exists() != 0) {
  1026. total_size += 1 + 1;
  1027. }
  1028. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  1029. return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
  1030. _internal_metadata_, total_size, &_cached_size_);
  1031. }
  1032. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  1033. SetCachedSize(cached_size);
  1034. return total_size;
  1035. }
  1036. void BundledDocumentMetadata::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  1037. // @@protoc_insertion_point(generalized_merge_from_start:firestore.BundledDocumentMetadata)
  1038. GOOGLE_DCHECK_NE(&from, this);
  1039. const BundledDocumentMetadata* source =
  1040. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<BundledDocumentMetadata>(
  1041. &from);
  1042. if (source == nullptr) {
  1043. // @@protoc_insertion_point(generalized_merge_from_cast_fail:firestore.BundledDocumentMetadata)
  1044. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  1045. } else {
  1046. // @@protoc_insertion_point(generalized_merge_from_cast_success:firestore.BundledDocumentMetadata)
  1047. MergeFrom(*source);
  1048. }
  1049. }
  1050. void BundledDocumentMetadata::MergeFrom(const BundledDocumentMetadata& from) {
  1051. // @@protoc_insertion_point(class_specific_merge_from_start:firestore.BundledDocumentMetadata)
  1052. GOOGLE_DCHECK_NE(&from, this);
  1053. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1054. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1055. (void) cached_has_bits;
  1056. queries_.MergeFrom(from.queries_);
  1057. if (from.name().size() > 0) {
  1058. name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
  1059. }
  1060. if (from.has_read_time()) {
  1061. _internal_mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_read_time());
  1062. }
  1063. if (from.exists() != 0) {
  1064. _internal_set_exists(from._internal_exists());
  1065. }
  1066. }
  1067. void BundledDocumentMetadata::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  1068. // @@protoc_insertion_point(generalized_copy_from_start:firestore.BundledDocumentMetadata)
  1069. if (&from == this) return;
  1070. Clear();
  1071. MergeFrom(from);
  1072. }
  1073. void BundledDocumentMetadata::CopyFrom(const BundledDocumentMetadata& from) {
  1074. // @@protoc_insertion_point(class_specific_copy_from_start:firestore.BundledDocumentMetadata)
  1075. if (&from == this) return;
  1076. Clear();
  1077. MergeFrom(from);
  1078. }
  1079. bool BundledDocumentMetadata::IsInitialized() const {
  1080. return true;
  1081. }
  1082. void BundledDocumentMetadata::InternalSwap(BundledDocumentMetadata* other) {
  1083. using std::swap;
  1084. _internal_metadata_.Swap(&other->_internal_metadata_);
  1085. queries_.InternalSwap(&other->queries_);
  1086. name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  1087. GetArenaNoVirtual());
  1088. swap(read_time_, other->read_time_);
  1089. swap(exists_, other->exists_);
  1090. }
  1091. ::PROTOBUF_NAMESPACE_ID::Metadata BundledDocumentMetadata::GetMetadata() const {
  1092. return GetMetadataStatic();
  1093. }
  1094. // ===================================================================
  1095. void BundleMetadata::InitAsDefaultInstance() {
  1096. ::firestore::_BundleMetadata_default_instance_._instance.get_mutable()->create_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
  1097. PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
  1098. }
  1099. class BundleMetadata::_Internal {
  1100. public:
  1101. static const PROTOBUF_NAMESPACE_ID::Timestamp& create_time(const BundleMetadata* msg);
  1102. };
  1103. const PROTOBUF_NAMESPACE_ID::Timestamp&
  1104. BundleMetadata::_Internal::create_time(const BundleMetadata* msg) {
  1105. return *msg->create_time_;
  1106. }
  1107. void BundleMetadata::clear_create_time() {
  1108. if (GetArenaNoVirtual() == nullptr && create_time_ != nullptr) {
  1109. delete create_time_;
  1110. }
  1111. create_time_ = nullptr;
  1112. }
  1113. BundleMetadata::BundleMetadata()
  1114. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  1115. SharedCtor();
  1116. // @@protoc_insertion_point(constructor:firestore.BundleMetadata)
  1117. }
  1118. BundleMetadata::BundleMetadata(const BundleMetadata& from)
  1119. : ::PROTOBUF_NAMESPACE_ID::Message(),
  1120. _internal_metadata_(nullptr) {
  1121. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1122. id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1123. if (!from._internal_id().empty()) {
  1124. id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.id_);
  1125. }
  1126. if (from._internal_has_create_time()) {
  1127. create_time_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.create_time_);
  1128. } else {
  1129. create_time_ = nullptr;
  1130. }
  1131. ::memcpy(&version_, &from.version_,
  1132. static_cast<size_t>(reinterpret_cast<char*>(&total_bytes_) -
  1133. reinterpret_cast<char*>(&version_)) + sizeof(total_bytes_));
  1134. // @@protoc_insertion_point(copy_constructor:firestore.BundleMetadata)
  1135. }
  1136. void BundleMetadata::SharedCtor() {
  1137. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_BundleMetadata_firestore_2fbundle_2eproto.base);
  1138. id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1139. ::memset(&create_time_, 0, static_cast<size_t>(
  1140. reinterpret_cast<char*>(&total_bytes_) -
  1141. reinterpret_cast<char*>(&create_time_)) + sizeof(total_bytes_));
  1142. }
  1143. BundleMetadata::~BundleMetadata() {
  1144. // @@protoc_insertion_point(destructor:firestore.BundleMetadata)
  1145. SharedDtor();
  1146. }
  1147. void BundleMetadata::SharedDtor() {
  1148. id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1149. if (this != internal_default_instance()) delete create_time_;
  1150. }
  1151. void BundleMetadata::SetCachedSize(int size) const {
  1152. _cached_size_.Set(size);
  1153. }
  1154. const BundleMetadata& BundleMetadata::default_instance() {
  1155. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_BundleMetadata_firestore_2fbundle_2eproto.base);
  1156. return *internal_default_instance();
  1157. }
  1158. void BundleMetadata::Clear() {
  1159. // @@protoc_insertion_point(message_clear_start:firestore.BundleMetadata)
  1160. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1161. // Prevent compiler warnings about cached_has_bits being unused
  1162. (void) cached_has_bits;
  1163. id_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1164. if (GetArenaNoVirtual() == nullptr && create_time_ != nullptr) {
  1165. delete create_time_;
  1166. }
  1167. create_time_ = nullptr;
  1168. ::memset(&version_, 0, static_cast<size_t>(
  1169. reinterpret_cast<char*>(&total_bytes_) -
  1170. reinterpret_cast<char*>(&version_)) + sizeof(total_bytes_));
  1171. _internal_metadata_.Clear();
  1172. }
  1173. const char* BundleMetadata::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  1174. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  1175. while (!ctx->Done(&ptr)) {
  1176. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  1177. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  1178. CHK_(ptr);
  1179. switch (tag >> 3) {
  1180. // string id = 1;
  1181. case 1:
  1182. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  1183. auto str = _internal_mutable_id();
  1184. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  1185. CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "firestore.BundleMetadata.id"));
  1186. CHK_(ptr);
  1187. } else goto handle_unusual;
  1188. continue;
  1189. // .google.protobuf.Timestamp create_time = 2;
  1190. case 2:
  1191. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  1192. ptr = ctx->ParseMessage(_internal_mutable_create_time(), ptr);
  1193. CHK_(ptr);
  1194. } else goto handle_unusual;
  1195. continue;
  1196. // uint32 version = 3;
  1197. case 3:
  1198. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
  1199. version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
  1200. CHK_(ptr);
  1201. } else goto handle_unusual;
  1202. continue;
  1203. // uint32 total_documents = 4;
  1204. case 4:
  1205. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
  1206. total_documents_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
  1207. CHK_(ptr);
  1208. } else goto handle_unusual;
  1209. continue;
  1210. // uint64 total_bytes = 5;
  1211. case 5:
  1212. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
  1213. total_bytes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
  1214. CHK_(ptr);
  1215. } else goto handle_unusual;
  1216. continue;
  1217. default: {
  1218. handle_unusual:
  1219. if ((tag & 7) == 4 || tag == 0) {
  1220. ctx->SetLastTag(tag);
  1221. goto success;
  1222. }
  1223. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  1224. CHK_(ptr != nullptr);
  1225. continue;
  1226. }
  1227. } // switch
  1228. } // while
  1229. success:
  1230. return ptr;
  1231. failure:
  1232. ptr = nullptr;
  1233. goto success;
  1234. #undef CHK_
  1235. }
  1236. ::PROTOBUF_NAMESPACE_ID::uint8* BundleMetadata::_InternalSerialize(
  1237. ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  1238. // @@protoc_insertion_point(serialize_to_array_start:firestore.BundleMetadata)
  1239. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1240. (void) cached_has_bits;
  1241. // string id = 1;
  1242. if (this->id().size() > 0) {
  1243. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  1244. this->_internal_id().data(), static_cast<int>(this->_internal_id().length()),
  1245. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  1246. "firestore.BundleMetadata.id");
  1247. target = stream->WriteStringMaybeAliased(
  1248. 1, this->_internal_id(), target);
  1249. }
  1250. // .google.protobuf.Timestamp create_time = 2;
  1251. if (this->has_create_time()) {
  1252. target = stream->EnsureSpace(target);
  1253. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  1254. InternalWriteMessage(
  1255. 2, _Internal::create_time(this), target, stream);
  1256. }
  1257. // uint32 version = 3;
  1258. if (this->version() != 0) {
  1259. target = stream->EnsureSpace(target);
  1260. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(3, this->_internal_version(), target);
  1261. }
  1262. // uint32 total_documents = 4;
  1263. if (this->total_documents() != 0) {
  1264. target = stream->EnsureSpace(target);
  1265. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(4, this->_internal_total_documents(), target);
  1266. }
  1267. // uint64 total_bytes = 5;
  1268. if (this->total_bytes() != 0) {
  1269. target = stream->EnsureSpace(target);
  1270. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(5, this->_internal_total_bytes(), target);
  1271. }
  1272. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  1273. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  1274. _internal_metadata_.unknown_fields(), target, stream);
  1275. }
  1276. // @@protoc_insertion_point(serialize_to_array_end:firestore.BundleMetadata)
  1277. return target;
  1278. }
  1279. size_t BundleMetadata::ByteSizeLong() const {
  1280. // @@protoc_insertion_point(message_byte_size_start:firestore.BundleMetadata)
  1281. size_t total_size = 0;
  1282. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1283. // Prevent compiler warnings about cached_has_bits being unused
  1284. (void) cached_has_bits;
  1285. // string id = 1;
  1286. if (this->id().size() > 0) {
  1287. total_size += 1 +
  1288. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  1289. this->_internal_id());
  1290. }
  1291. // .google.protobuf.Timestamp create_time = 2;
  1292. if (this->has_create_time()) {
  1293. total_size += 1 +
  1294. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  1295. *create_time_);
  1296. }
  1297. // uint32 version = 3;
  1298. if (this->version() != 0) {
  1299. total_size += 1 +
  1300. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
  1301. this->_internal_version());
  1302. }
  1303. // uint32 total_documents = 4;
  1304. if (this->total_documents() != 0) {
  1305. total_size += 1 +
  1306. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
  1307. this->_internal_total_documents());
  1308. }
  1309. // uint64 total_bytes = 5;
  1310. if (this->total_bytes() != 0) {
  1311. total_size += 1 +
  1312. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size(
  1313. this->_internal_total_bytes());
  1314. }
  1315. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  1316. return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
  1317. _internal_metadata_, total_size, &_cached_size_);
  1318. }
  1319. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  1320. SetCachedSize(cached_size);
  1321. return total_size;
  1322. }
  1323. void BundleMetadata::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  1324. // @@protoc_insertion_point(generalized_merge_from_start:firestore.BundleMetadata)
  1325. GOOGLE_DCHECK_NE(&from, this);
  1326. const BundleMetadata* source =
  1327. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<BundleMetadata>(
  1328. &from);
  1329. if (source == nullptr) {
  1330. // @@protoc_insertion_point(generalized_merge_from_cast_fail:firestore.BundleMetadata)
  1331. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  1332. } else {
  1333. // @@protoc_insertion_point(generalized_merge_from_cast_success:firestore.BundleMetadata)
  1334. MergeFrom(*source);
  1335. }
  1336. }
  1337. void BundleMetadata::MergeFrom(const BundleMetadata& from) {
  1338. // @@protoc_insertion_point(class_specific_merge_from_start:firestore.BundleMetadata)
  1339. GOOGLE_DCHECK_NE(&from, this);
  1340. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1341. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1342. (void) cached_has_bits;
  1343. if (from.id().size() > 0) {
  1344. id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.id_);
  1345. }
  1346. if (from.has_create_time()) {
  1347. _internal_mutable_create_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_create_time());
  1348. }
  1349. if (from.version() != 0) {
  1350. _internal_set_version(from._internal_version());
  1351. }
  1352. if (from.total_documents() != 0) {
  1353. _internal_set_total_documents(from._internal_total_documents());
  1354. }
  1355. if (from.total_bytes() != 0) {
  1356. _internal_set_total_bytes(from._internal_total_bytes());
  1357. }
  1358. }
  1359. void BundleMetadata::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  1360. // @@protoc_insertion_point(generalized_copy_from_start:firestore.BundleMetadata)
  1361. if (&from == this) return;
  1362. Clear();
  1363. MergeFrom(from);
  1364. }
  1365. void BundleMetadata::CopyFrom(const BundleMetadata& from) {
  1366. // @@protoc_insertion_point(class_specific_copy_from_start:firestore.BundleMetadata)
  1367. if (&from == this) return;
  1368. Clear();
  1369. MergeFrom(from);
  1370. }
  1371. bool BundleMetadata::IsInitialized() const {
  1372. return true;
  1373. }
  1374. void BundleMetadata::InternalSwap(BundleMetadata* other) {
  1375. using std::swap;
  1376. _internal_metadata_.Swap(&other->_internal_metadata_);
  1377. id_.Swap(&other->id_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  1378. GetArenaNoVirtual());
  1379. swap(create_time_, other->create_time_);
  1380. swap(version_, other->version_);
  1381. swap(total_documents_, other->total_documents_);
  1382. swap(total_bytes_, other->total_bytes_);
  1383. }
  1384. ::PROTOBUF_NAMESPACE_ID::Metadata BundleMetadata::GetMetadata() const {
  1385. return GetMetadataStatic();
  1386. }
  1387. // ===================================================================
  1388. void BundleElement::InitAsDefaultInstance() {
  1389. ::firestore::_BundleElement_default_instance_.metadata_ = const_cast< ::firestore::BundleMetadata*>(
  1390. ::firestore::BundleMetadata::internal_default_instance());
  1391. ::firestore::_BundleElement_default_instance_.named_query_ = const_cast< ::firestore::NamedQuery*>(
  1392. ::firestore::NamedQuery::internal_default_instance());
  1393. ::firestore::_BundleElement_default_instance_.document_metadata_ = const_cast< ::firestore::BundledDocumentMetadata*>(
  1394. ::firestore::BundledDocumentMetadata::internal_default_instance());
  1395. ::firestore::_BundleElement_default_instance_.document_ = const_cast< ::google::firestore::v1::Document*>(
  1396. ::google::firestore::v1::Document::internal_default_instance());
  1397. }
  1398. class BundleElement::_Internal {
  1399. public:
  1400. static const ::firestore::BundleMetadata& metadata(const BundleElement* msg);
  1401. static const ::firestore::NamedQuery& named_query(const BundleElement* msg);
  1402. static const ::firestore::BundledDocumentMetadata& document_metadata(const BundleElement* msg);
  1403. static const ::google::firestore::v1::Document& document(const BundleElement* msg);
  1404. };
  1405. const ::firestore::BundleMetadata&
  1406. BundleElement::_Internal::metadata(const BundleElement* msg) {
  1407. return *msg->element_type_.metadata_;
  1408. }
  1409. const ::firestore::NamedQuery&
  1410. BundleElement::_Internal::named_query(const BundleElement* msg) {
  1411. return *msg->element_type_.named_query_;
  1412. }
  1413. const ::firestore::BundledDocumentMetadata&
  1414. BundleElement::_Internal::document_metadata(const BundleElement* msg) {
  1415. return *msg->element_type_.document_metadata_;
  1416. }
  1417. const ::google::firestore::v1::Document&
  1418. BundleElement::_Internal::document(const BundleElement* msg) {
  1419. return *msg->element_type_.document_;
  1420. }
  1421. void BundleElement::set_allocated_metadata(::firestore::BundleMetadata* metadata) {
  1422. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  1423. clear_element_type();
  1424. if (metadata) {
  1425. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
  1426. if (message_arena != submessage_arena) {
  1427. metadata = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  1428. message_arena, metadata, submessage_arena);
  1429. }
  1430. set_has_metadata();
  1431. element_type_.metadata_ = metadata;
  1432. }
  1433. // @@protoc_insertion_point(field_set_allocated:firestore.BundleElement.metadata)
  1434. }
  1435. void BundleElement::set_allocated_named_query(::firestore::NamedQuery* named_query) {
  1436. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  1437. clear_element_type();
  1438. if (named_query) {
  1439. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
  1440. if (message_arena != submessage_arena) {
  1441. named_query = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  1442. message_arena, named_query, submessage_arena);
  1443. }
  1444. set_has_named_query();
  1445. element_type_.named_query_ = named_query;
  1446. }
  1447. // @@protoc_insertion_point(field_set_allocated:firestore.BundleElement.named_query)
  1448. }
  1449. void BundleElement::set_allocated_document_metadata(::firestore::BundledDocumentMetadata* document_metadata) {
  1450. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  1451. clear_element_type();
  1452. if (document_metadata) {
  1453. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
  1454. if (message_arena != submessage_arena) {
  1455. document_metadata = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  1456. message_arena, document_metadata, submessage_arena);
  1457. }
  1458. set_has_document_metadata();
  1459. element_type_.document_metadata_ = document_metadata;
  1460. }
  1461. // @@protoc_insertion_point(field_set_allocated:firestore.BundleElement.document_metadata)
  1462. }
  1463. void BundleElement::set_allocated_document(::google::firestore::v1::Document* document) {
  1464. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  1465. clear_element_type();
  1466. if (document) {
  1467. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
  1468. if (message_arena != submessage_arena) {
  1469. document = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  1470. message_arena, document, submessage_arena);
  1471. }
  1472. set_has_document();
  1473. element_type_.document_ = document;
  1474. }
  1475. // @@protoc_insertion_point(field_set_allocated:firestore.BundleElement.document)
  1476. }
  1477. void BundleElement::clear_document() {
  1478. if (_internal_has_document()) {
  1479. delete element_type_.document_;
  1480. clear_has_element_type();
  1481. }
  1482. }
  1483. BundleElement::BundleElement()
  1484. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  1485. SharedCtor();
  1486. // @@protoc_insertion_point(constructor:firestore.BundleElement)
  1487. }
  1488. BundleElement::BundleElement(const BundleElement& from)
  1489. : ::PROTOBUF_NAMESPACE_ID::Message(),
  1490. _internal_metadata_(nullptr) {
  1491. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1492. clear_has_element_type();
  1493. switch (from.element_type_case()) {
  1494. case kMetadata: {
  1495. _internal_mutable_metadata()->::firestore::BundleMetadata::MergeFrom(from._internal_metadata());
  1496. break;
  1497. }
  1498. case kNamedQuery: {
  1499. _internal_mutable_named_query()->::firestore::NamedQuery::MergeFrom(from._internal_named_query());
  1500. break;
  1501. }
  1502. case kDocumentMetadata: {
  1503. _internal_mutable_document_metadata()->::firestore::BundledDocumentMetadata::MergeFrom(from._internal_document_metadata());
  1504. break;
  1505. }
  1506. case kDocument: {
  1507. _internal_mutable_document()->::google::firestore::v1::Document::MergeFrom(from._internal_document());
  1508. break;
  1509. }
  1510. case ELEMENT_TYPE_NOT_SET: {
  1511. break;
  1512. }
  1513. }
  1514. // @@protoc_insertion_point(copy_constructor:firestore.BundleElement)
  1515. }
  1516. void BundleElement::SharedCtor() {
  1517. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_BundleElement_firestore_2fbundle_2eproto.base);
  1518. clear_has_element_type();
  1519. }
  1520. BundleElement::~BundleElement() {
  1521. // @@protoc_insertion_point(destructor:firestore.BundleElement)
  1522. SharedDtor();
  1523. }
  1524. void BundleElement::SharedDtor() {
  1525. if (has_element_type()) {
  1526. clear_element_type();
  1527. }
  1528. }
  1529. void BundleElement::SetCachedSize(int size) const {
  1530. _cached_size_.Set(size);
  1531. }
  1532. const BundleElement& BundleElement::default_instance() {
  1533. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_BundleElement_firestore_2fbundle_2eproto.base);
  1534. return *internal_default_instance();
  1535. }
  1536. void BundleElement::clear_element_type() {
  1537. // @@protoc_insertion_point(one_of_clear_start:firestore.BundleElement)
  1538. switch (element_type_case()) {
  1539. case kMetadata: {
  1540. delete element_type_.metadata_;
  1541. break;
  1542. }
  1543. case kNamedQuery: {
  1544. delete element_type_.named_query_;
  1545. break;
  1546. }
  1547. case kDocumentMetadata: {
  1548. delete element_type_.document_metadata_;
  1549. break;
  1550. }
  1551. case kDocument: {
  1552. delete element_type_.document_;
  1553. break;
  1554. }
  1555. case ELEMENT_TYPE_NOT_SET: {
  1556. break;
  1557. }
  1558. }
  1559. _oneof_case_[0] = ELEMENT_TYPE_NOT_SET;
  1560. }
  1561. void BundleElement::Clear() {
  1562. // @@protoc_insertion_point(message_clear_start:firestore.BundleElement)
  1563. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1564. // Prevent compiler warnings about cached_has_bits being unused
  1565. (void) cached_has_bits;
  1566. clear_element_type();
  1567. _internal_metadata_.Clear();
  1568. }
  1569. const char* BundleElement::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  1570. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  1571. while (!ctx->Done(&ptr)) {
  1572. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  1573. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  1574. CHK_(ptr);
  1575. switch (tag >> 3) {
  1576. // .firestore.BundleMetadata metadata = 1;
  1577. case 1:
  1578. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  1579. ptr = ctx->ParseMessage(_internal_mutable_metadata(), ptr);
  1580. CHK_(ptr);
  1581. } else goto handle_unusual;
  1582. continue;
  1583. // .firestore.NamedQuery named_query = 2;
  1584. case 2:
  1585. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  1586. ptr = ctx->ParseMessage(_internal_mutable_named_query(), ptr);
  1587. CHK_(ptr);
  1588. } else goto handle_unusual;
  1589. continue;
  1590. // .firestore.BundledDocumentMetadata document_metadata = 3;
  1591. case 3:
  1592. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
  1593. ptr = ctx->ParseMessage(_internal_mutable_document_metadata(), ptr);
  1594. CHK_(ptr);
  1595. } else goto handle_unusual;
  1596. continue;
  1597. // .google.firestore.v1.Document document = 4;
  1598. case 4:
  1599. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
  1600. ptr = ctx->ParseMessage(_internal_mutable_document(), ptr);
  1601. CHK_(ptr);
  1602. } else goto handle_unusual;
  1603. continue;
  1604. default: {
  1605. handle_unusual:
  1606. if ((tag & 7) == 4 || tag == 0) {
  1607. ctx->SetLastTag(tag);
  1608. goto success;
  1609. }
  1610. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  1611. CHK_(ptr != nullptr);
  1612. continue;
  1613. }
  1614. } // switch
  1615. } // while
  1616. success:
  1617. return ptr;
  1618. failure:
  1619. ptr = nullptr;
  1620. goto success;
  1621. #undef CHK_
  1622. }
  1623. ::PROTOBUF_NAMESPACE_ID::uint8* BundleElement::_InternalSerialize(
  1624. ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  1625. // @@protoc_insertion_point(serialize_to_array_start:firestore.BundleElement)
  1626. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1627. (void) cached_has_bits;
  1628. // .firestore.BundleMetadata metadata = 1;
  1629. if (_internal_has_metadata()) {
  1630. target = stream->EnsureSpace(target);
  1631. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  1632. InternalWriteMessage(
  1633. 1, _Internal::metadata(this), target, stream);
  1634. }
  1635. // .firestore.NamedQuery named_query = 2;
  1636. if (_internal_has_named_query()) {
  1637. target = stream->EnsureSpace(target);
  1638. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  1639. InternalWriteMessage(
  1640. 2, _Internal::named_query(this), target, stream);
  1641. }
  1642. // .firestore.BundledDocumentMetadata document_metadata = 3;
  1643. if (_internal_has_document_metadata()) {
  1644. target = stream->EnsureSpace(target);
  1645. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  1646. InternalWriteMessage(
  1647. 3, _Internal::document_metadata(this), target, stream);
  1648. }
  1649. // .google.firestore.v1.Document document = 4;
  1650. if (_internal_has_document()) {
  1651. target = stream->EnsureSpace(target);
  1652. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  1653. InternalWriteMessage(
  1654. 4, _Internal::document(this), target, stream);
  1655. }
  1656. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  1657. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  1658. _internal_metadata_.unknown_fields(), target, stream);
  1659. }
  1660. // @@protoc_insertion_point(serialize_to_array_end:firestore.BundleElement)
  1661. return target;
  1662. }
  1663. size_t BundleElement::ByteSizeLong() const {
  1664. // @@protoc_insertion_point(message_byte_size_start:firestore.BundleElement)
  1665. size_t total_size = 0;
  1666. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1667. // Prevent compiler warnings about cached_has_bits being unused
  1668. (void) cached_has_bits;
  1669. switch (element_type_case()) {
  1670. // .firestore.BundleMetadata metadata = 1;
  1671. case kMetadata: {
  1672. total_size += 1 +
  1673. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  1674. *element_type_.metadata_);
  1675. break;
  1676. }
  1677. // .firestore.NamedQuery named_query = 2;
  1678. case kNamedQuery: {
  1679. total_size += 1 +
  1680. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  1681. *element_type_.named_query_);
  1682. break;
  1683. }
  1684. // .firestore.BundledDocumentMetadata document_metadata = 3;
  1685. case kDocumentMetadata: {
  1686. total_size += 1 +
  1687. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  1688. *element_type_.document_metadata_);
  1689. break;
  1690. }
  1691. // .google.firestore.v1.Document document = 4;
  1692. case kDocument: {
  1693. total_size += 1 +
  1694. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  1695. *element_type_.document_);
  1696. break;
  1697. }
  1698. case ELEMENT_TYPE_NOT_SET: {
  1699. break;
  1700. }
  1701. }
  1702. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  1703. return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
  1704. _internal_metadata_, total_size, &_cached_size_);
  1705. }
  1706. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  1707. SetCachedSize(cached_size);
  1708. return total_size;
  1709. }
  1710. void BundleElement::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  1711. // @@protoc_insertion_point(generalized_merge_from_start:firestore.BundleElement)
  1712. GOOGLE_DCHECK_NE(&from, this);
  1713. const BundleElement* source =
  1714. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<BundleElement>(
  1715. &from);
  1716. if (source == nullptr) {
  1717. // @@protoc_insertion_point(generalized_merge_from_cast_fail:firestore.BundleElement)
  1718. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  1719. } else {
  1720. // @@protoc_insertion_point(generalized_merge_from_cast_success:firestore.BundleElement)
  1721. MergeFrom(*source);
  1722. }
  1723. }
  1724. void BundleElement::MergeFrom(const BundleElement& from) {
  1725. // @@protoc_insertion_point(class_specific_merge_from_start:firestore.BundleElement)
  1726. GOOGLE_DCHECK_NE(&from, this);
  1727. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1728. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1729. (void) cached_has_bits;
  1730. switch (from.element_type_case()) {
  1731. case kMetadata: {
  1732. _internal_mutable_metadata()->::firestore::BundleMetadata::MergeFrom(from._internal_metadata());
  1733. break;
  1734. }
  1735. case kNamedQuery: {
  1736. _internal_mutable_named_query()->::firestore::NamedQuery::MergeFrom(from._internal_named_query());
  1737. break;
  1738. }
  1739. case kDocumentMetadata: {
  1740. _internal_mutable_document_metadata()->::firestore::BundledDocumentMetadata::MergeFrom(from._internal_document_metadata());
  1741. break;
  1742. }
  1743. case kDocument: {
  1744. _internal_mutable_document()->::google::firestore::v1::Document::MergeFrom(from._internal_document());
  1745. break;
  1746. }
  1747. case ELEMENT_TYPE_NOT_SET: {
  1748. break;
  1749. }
  1750. }
  1751. }
  1752. void BundleElement::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  1753. // @@protoc_insertion_point(generalized_copy_from_start:firestore.BundleElement)
  1754. if (&from == this) return;
  1755. Clear();
  1756. MergeFrom(from);
  1757. }
  1758. void BundleElement::CopyFrom(const BundleElement& from) {
  1759. // @@protoc_insertion_point(class_specific_copy_from_start:firestore.BundleElement)
  1760. if (&from == this) return;
  1761. Clear();
  1762. MergeFrom(from);
  1763. }
  1764. bool BundleElement::IsInitialized() const {
  1765. return true;
  1766. }
  1767. void BundleElement::InternalSwap(BundleElement* other) {
  1768. using std::swap;
  1769. _internal_metadata_.Swap(&other->_internal_metadata_);
  1770. swap(element_type_, other->element_type_);
  1771. swap(_oneof_case_[0], other->_oneof_case_[0]);
  1772. }
  1773. ::PROTOBUF_NAMESPACE_ID::Metadata BundleElement::GetMetadata() const {
  1774. return GetMetadataStatic();
  1775. }
  1776. // @@protoc_insertion_point(namespace_scope)
  1777. } // namespace firestore
  1778. PROTOBUF_NAMESPACE_OPEN
  1779. template<> PROTOBUF_NOINLINE ::firestore::BundledQuery* Arena::CreateMaybeMessage< ::firestore::BundledQuery >(Arena* arena) {
  1780. return Arena::CreateInternal< ::firestore::BundledQuery >(arena);
  1781. }
  1782. template<> PROTOBUF_NOINLINE ::firestore::NamedQuery* Arena::CreateMaybeMessage< ::firestore::NamedQuery >(Arena* arena) {
  1783. return Arena::CreateInternal< ::firestore::NamedQuery >(arena);
  1784. }
  1785. template<> PROTOBUF_NOINLINE ::firestore::BundledDocumentMetadata* Arena::CreateMaybeMessage< ::firestore::BundledDocumentMetadata >(Arena* arena) {
  1786. return Arena::CreateInternal< ::firestore::BundledDocumentMetadata >(arena);
  1787. }
  1788. template<> PROTOBUF_NOINLINE ::firestore::BundleMetadata* Arena::CreateMaybeMessage< ::firestore::BundleMetadata >(Arena* arena) {
  1789. return Arena::CreateInternal< ::firestore::BundleMetadata >(arena);
  1790. }
  1791. template<> PROTOBUF_NOINLINE ::firestore::BundleElement* Arena::CreateMaybeMessage< ::firestore::BundleElement >(Arena* arena) {
  1792. return Arena::CreateInternal< ::firestore::BundleElement >(arena);
  1793. }
  1794. PROTOBUF_NAMESPACE_CLOSE
  1795. // @@protoc_insertion_point(global_scope)
  1796. #include <google/protobuf/port_undef.inc>