bundle.pb.cc 77 KB

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