document.pb.cc 66 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698
  1. /*
  2. * Copyright 2024 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: google/firestore/v1/document.proto
  18. #include "google/firestore/v1/document.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 google {
  36. namespace firestore {
  37. namespace v1 {
  38. inline constexpr ArrayValue::Impl_::Impl_(
  39. ::_pbi::ConstantInitialized) noexcept
  40. : values_{},
  41. _cached_size_{0} {}
  42. template <typename>
  43. PROTOBUF_CONSTEXPR ArrayValue::ArrayValue(::_pbi::ConstantInitialized)
  44. : _impl_(::_pbi::ConstantInitialized()) {}
  45. struct ArrayValueDefaultTypeInternal {
  46. PROTOBUF_CONSTEXPR ArrayValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  47. ~ArrayValueDefaultTypeInternal() {}
  48. union {
  49. ArrayValue _instance;
  50. };
  51. };
  52. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  53. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ArrayValueDefaultTypeInternal _ArrayValue_default_instance_;
  54. inline constexpr MapValue::Impl_::Impl_(
  55. ::_pbi::ConstantInitialized) noexcept
  56. : fields_{},
  57. _cached_size_{0} {}
  58. template <typename>
  59. PROTOBUF_CONSTEXPR MapValue::MapValue(::_pbi::ConstantInitialized)
  60. : _impl_(::_pbi::ConstantInitialized()) {}
  61. struct MapValueDefaultTypeInternal {
  62. PROTOBUF_CONSTEXPR MapValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  63. ~MapValueDefaultTypeInternal() {}
  64. union {
  65. MapValue _instance;
  66. };
  67. };
  68. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  69. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MapValueDefaultTypeInternal _MapValue_default_instance_;
  70. template <typename>
  71. PROTOBUF_CONSTEXPR MapValue_FieldsEntry_DoNotUse::MapValue_FieldsEntry_DoNotUse(::_pbi::ConstantInitialized) {}
  72. struct MapValue_FieldsEntry_DoNotUseDefaultTypeInternal {
  73. PROTOBUF_CONSTEXPR MapValue_FieldsEntry_DoNotUseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  74. ~MapValue_FieldsEntry_DoNotUseDefaultTypeInternal() {}
  75. union {
  76. MapValue_FieldsEntry_DoNotUse _instance;
  77. };
  78. };
  79. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  80. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MapValue_FieldsEntry_DoNotUseDefaultTypeInternal _MapValue_FieldsEntry_DoNotUse_default_instance_;
  81. inline constexpr Value::Impl_::Impl_(
  82. ::_pbi::ConstantInitialized) noexcept
  83. : value_type_{},
  84. _cached_size_{0},
  85. _oneof_case_{} {}
  86. template <typename>
  87. PROTOBUF_CONSTEXPR Value::Value(::_pbi::ConstantInitialized)
  88. : _impl_(::_pbi::ConstantInitialized()) {}
  89. struct ValueDefaultTypeInternal {
  90. PROTOBUF_CONSTEXPR ValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  91. ~ValueDefaultTypeInternal() {}
  92. union {
  93. Value _instance;
  94. };
  95. };
  96. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  97. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ValueDefaultTypeInternal _Value_default_instance_;
  98. template <typename>
  99. PROTOBUF_CONSTEXPR Document_FieldsEntry_DoNotUse::Document_FieldsEntry_DoNotUse(::_pbi::ConstantInitialized) {}
  100. struct Document_FieldsEntry_DoNotUseDefaultTypeInternal {
  101. PROTOBUF_CONSTEXPR Document_FieldsEntry_DoNotUseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  102. ~Document_FieldsEntry_DoNotUseDefaultTypeInternal() {}
  103. union {
  104. Document_FieldsEntry_DoNotUse _instance;
  105. };
  106. };
  107. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  108. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Document_FieldsEntry_DoNotUseDefaultTypeInternal _Document_FieldsEntry_DoNotUse_default_instance_;
  109. inline constexpr Document::Impl_::Impl_(
  110. ::_pbi::ConstantInitialized) noexcept
  111. : _cached_size_{0},
  112. fields_{},
  113. name_(
  114. &::google::protobuf::internal::fixed_address_empty_string,
  115. ::_pbi::ConstantInitialized()),
  116. create_time_{nullptr},
  117. update_time_{nullptr} {}
  118. template <typename>
  119. PROTOBUF_CONSTEXPR Document::Document(::_pbi::ConstantInitialized)
  120. : _impl_(::_pbi::ConstantInitialized()) {}
  121. struct DocumentDefaultTypeInternal {
  122. PROTOBUF_CONSTEXPR DocumentDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  123. ~DocumentDefaultTypeInternal() {}
  124. union {
  125. Document _instance;
  126. };
  127. };
  128. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  129. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DocumentDefaultTypeInternal _Document_default_instance_;
  130. } // namespace v1
  131. } // namespace firestore
  132. } // namespace google
  133. static ::_pb::Metadata file_level_metadata_google_2ffirestore_2fv1_2fdocument_2eproto[6];
  134. static constexpr const ::_pb::EnumDescriptor**
  135. file_level_enum_descriptors_google_2ffirestore_2fv1_2fdocument_2eproto = nullptr;
  136. static constexpr const ::_pb::ServiceDescriptor**
  137. file_level_service_descriptors_google_2ffirestore_2fv1_2fdocument_2eproto = nullptr;
  138. const ::uint32_t TableStruct_google_2ffirestore_2fv1_2fdocument_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(
  139. protodesc_cold) = {
  140. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Document_FieldsEntry_DoNotUse, _has_bits_),
  141. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Document_FieldsEntry_DoNotUse, _internal_metadata_),
  142. ~0u, // no _extensions_
  143. ~0u, // no _oneof_case_
  144. ~0u, // no _weak_field_map_
  145. ~0u, // no _inlined_string_donated_
  146. ~0u, // no _split_
  147. ~0u, // no sizeof(Split)
  148. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Document_FieldsEntry_DoNotUse, key_),
  149. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Document_FieldsEntry_DoNotUse, value_),
  150. 0,
  151. 1,
  152. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Document, _impl_._has_bits_),
  153. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Document, _internal_metadata_),
  154. ~0u, // no _extensions_
  155. ~0u, // no _oneof_case_
  156. ~0u, // no _weak_field_map_
  157. ~0u, // no _inlined_string_donated_
  158. ~0u, // no _split_
  159. ~0u, // no sizeof(Split)
  160. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Document, _impl_.name_),
  161. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Document, _impl_.fields_),
  162. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Document, _impl_.create_time_),
  163. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Document, _impl_.update_time_),
  164. ~0u,
  165. ~0u,
  166. 0,
  167. 1,
  168. ~0u, // no _has_bits_
  169. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Value, _internal_metadata_),
  170. ~0u, // no _extensions_
  171. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Value, _impl_._oneof_case_[0]),
  172. ~0u, // no _weak_field_map_
  173. ~0u, // no _inlined_string_donated_
  174. ~0u, // no _split_
  175. ~0u, // no sizeof(Split)
  176. ::_pbi::kInvalidFieldOffsetTag,
  177. ::_pbi::kInvalidFieldOffsetTag,
  178. ::_pbi::kInvalidFieldOffsetTag,
  179. ::_pbi::kInvalidFieldOffsetTag,
  180. ::_pbi::kInvalidFieldOffsetTag,
  181. ::_pbi::kInvalidFieldOffsetTag,
  182. ::_pbi::kInvalidFieldOffsetTag,
  183. ::_pbi::kInvalidFieldOffsetTag,
  184. ::_pbi::kInvalidFieldOffsetTag,
  185. ::_pbi::kInvalidFieldOffsetTag,
  186. ::_pbi::kInvalidFieldOffsetTag,
  187. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Value, _impl_.value_type_),
  188. ~0u, // no _has_bits_
  189. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ArrayValue, _internal_metadata_),
  190. ~0u, // no _extensions_
  191. ~0u, // no _oneof_case_
  192. ~0u, // no _weak_field_map_
  193. ~0u, // no _inlined_string_donated_
  194. ~0u, // no _split_
  195. ~0u, // no sizeof(Split)
  196. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ArrayValue, _impl_.values_),
  197. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::MapValue_FieldsEntry_DoNotUse, _has_bits_),
  198. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::MapValue_FieldsEntry_DoNotUse, _internal_metadata_),
  199. ~0u, // no _extensions_
  200. ~0u, // no _oneof_case_
  201. ~0u, // no _weak_field_map_
  202. ~0u, // no _inlined_string_donated_
  203. ~0u, // no _split_
  204. ~0u, // no sizeof(Split)
  205. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::MapValue_FieldsEntry_DoNotUse, key_),
  206. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::MapValue_FieldsEntry_DoNotUse, value_),
  207. 0,
  208. 1,
  209. ~0u, // no _has_bits_
  210. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::MapValue, _internal_metadata_),
  211. ~0u, // no _extensions_
  212. ~0u, // no _oneof_case_
  213. ~0u, // no _weak_field_map_
  214. ~0u, // no _inlined_string_donated_
  215. ~0u, // no _split_
  216. ~0u, // no sizeof(Split)
  217. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::MapValue, _impl_.fields_),
  218. };
  219. static const ::_pbi::MigrationSchema
  220. schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  221. {0, 10, -1, sizeof(::google::firestore::v1::Document_FieldsEntry_DoNotUse)},
  222. {12, 24, -1, sizeof(::google::firestore::v1::Document)},
  223. {28, -1, -1, sizeof(::google::firestore::v1::Value)},
  224. {48, -1, -1, sizeof(::google::firestore::v1::ArrayValue)},
  225. {57, 67, -1, sizeof(::google::firestore::v1::MapValue_FieldsEntry_DoNotUse)},
  226. {69, -1, -1, sizeof(::google::firestore::v1::MapValue)},
  227. };
  228. static const ::_pb::Message* const file_default_instances[] = {
  229. &::google::firestore::v1::_Document_FieldsEntry_DoNotUse_default_instance_._instance,
  230. &::google::firestore::v1::_Document_default_instance_._instance,
  231. &::google::firestore::v1::_Value_default_instance_._instance,
  232. &::google::firestore::v1::_ArrayValue_default_instance_._instance,
  233. &::google::firestore::v1::_MapValue_FieldsEntry_DoNotUse_default_instance_._instance,
  234. &::google::firestore::v1::_MapValue_default_instance_._instance,
  235. };
  236. const char descriptor_table_protodef_google_2ffirestore_2fv1_2fdocument_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  237. "\n\"google/firestore/v1/document.proto\022\023go"
  238. "ogle.firestore.v1\032\034google/protobuf/struc"
  239. "t.proto\032\037google/protobuf/timestamp.proto"
  240. "\032\030google/type/latlng.proto\"\200\002\n\010Document\022"
  241. "\014\n\004name\030\001 \001(\t\0229\n\006fields\030\002 \003(\0132).google.f"
  242. "irestore.v1.Document.FieldsEntry\022/\n\013crea"
  243. "te_time\030\003 \001(\0132\032.google.protobuf.Timestam"
  244. "p\022/\n\013update_time\030\004 \001(\0132\032.google.protobuf"
  245. ".Timestamp\032I\n\013FieldsEntry\022\013\n\003key\030\001 \001(\t\022)"
  246. "\n\005value\030\002 \001(\0132\032.google.firestore.v1.Valu"
  247. "e:\0028\001\"\256\003\n\005Value\0220\n\nnull_value\030\013 \001(\0162\032.go"
  248. "ogle.protobuf.NullValueH\000\022\027\n\rboolean_val"
  249. "ue\030\001 \001(\010H\000\022\027\n\rinteger_value\030\002 \001(\003H\000\022\026\n\014d"
  250. "ouble_value\030\003 \001(\001H\000\0225\n\017timestamp_value\030\n"
  251. " \001(\0132\032.google.protobuf.TimestampH\000\022\026\n\014st"
  252. "ring_value\030\021 \001(\tH\000\022\025\n\013bytes_value\030\022 \001(\014H"
  253. "\000\022\031\n\017reference_value\030\005 \001(\tH\000\022.\n\017geo_poin"
  254. "t_value\030\010 \001(\0132\023.google.type.LatLngH\000\0226\n\013"
  255. "array_value\030\t \001(\0132\037.google.firestore.v1."
  256. "ArrayValueH\000\0222\n\tmap_value\030\006 \001(\0132\035.google"
  257. ".firestore.v1.MapValueH\000B\014\n\nvalue_type\"8"
  258. "\n\nArrayValue\022*\n\006values\030\001 \003(\0132\032.google.fi"
  259. "restore.v1.Value\"\220\001\n\010MapValue\0229\n\006fields\030"
  260. "\001 \003(\0132).google.firestore.v1.MapValue.Fie"
  261. "ldsEntry\032I\n\013FieldsEntry\022\013\n\003key\030\001 \001(\t\022)\n\005"
  262. "value\030\002 \001(\0132\032.google.firestore.v1.Value:"
  263. "\0028\001B\261\001\n\027com.google.firestore.v1B\rDocumen"
  264. "tProtoP\001Z<google.golang.org/genproto/goo"
  265. "gleapis/firestore/v1;firestore\242\002\004GCFS\252\002\036"
  266. "Google.Cloud.Firestore.V1Beta1\312\002\036Google\\"
  267. "Cloud\\Firestore\\V1beta1b\006proto3"
  268. };
  269. static const ::_pbi::DescriptorTable* const descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto_deps[3] =
  270. {
  271. &::descriptor_table_google_2fprotobuf_2fstruct_2eproto,
  272. &::descriptor_table_google_2fprotobuf_2ftimestamp_2eproto,
  273. &::descriptor_table_google_2ftype_2flatlng_2eproto,
  274. };
  275. static ::absl::once_flag descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto_once;
  276. const ::_pbi::DescriptorTable descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto = {
  277. false,
  278. false,
  279. 1231,
  280. descriptor_table_protodef_google_2ffirestore_2fv1_2fdocument_2eproto,
  281. "google/firestore/v1/document.proto",
  282. &descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto_once,
  283. descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto_deps,
  284. 3,
  285. 6,
  286. schemas,
  287. file_default_instances,
  288. TableStruct_google_2ffirestore_2fv1_2fdocument_2eproto::offsets,
  289. file_level_metadata_google_2ffirestore_2fv1_2fdocument_2eproto,
  290. file_level_enum_descriptors_google_2ffirestore_2fv1_2fdocument_2eproto,
  291. file_level_service_descriptors_google_2ffirestore_2fv1_2fdocument_2eproto,
  292. };
  293. // This function exists to be marked as weak.
  294. // It can significantly speed up compilation by breaking up LLVM's SCC
  295. // in the .pb.cc translation units. Large translation units see a
  296. // reduction of more than 35% of walltime for optimized builds. Without
  297. // the weak attribute all the messages in the file, including all the
  298. // vtables and everything they use become part of the same SCC through
  299. // a cycle like:
  300. // GetMetadata -> descriptor table -> default instances ->
  301. // vtables -> GetMetadata
  302. // By adding a weak function here we break the connection from the
  303. // individual vtables back into the descriptor table.
  304. PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto_getter() {
  305. return &descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto;
  306. }
  307. // Force running AddDescriptors() at dynamic initialization time.
  308. PROTOBUF_ATTRIBUTE_INIT_PRIORITY2
  309. static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_google_2ffirestore_2fv1_2fdocument_2eproto(&descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto);
  310. namespace google {
  311. namespace firestore {
  312. namespace v1 {
  313. // ===================================================================
  314. Document_FieldsEntry_DoNotUse::Document_FieldsEntry_DoNotUse() {}
  315. Document_FieldsEntry_DoNotUse::Document_FieldsEntry_DoNotUse(::google::protobuf::Arena* arena)
  316. : SuperType(arena) {}
  317. ::google::protobuf::Metadata Document_FieldsEntry_DoNotUse::GetMetadata() const {
  318. return ::_pbi::AssignDescriptors(
  319. &descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto_getter, &descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto_once,
  320. file_level_metadata_google_2ffirestore_2fv1_2fdocument_2eproto[0]);
  321. }
  322. // ===================================================================
  323. class Document::_Internal {
  324. public:
  325. using HasBits = decltype(std::declval<Document>()._impl_._has_bits_);
  326. static constexpr ::int32_t kHasBitsOffset =
  327. 8 * PROTOBUF_FIELD_OFFSET(Document, _impl_._has_bits_);
  328. static const ::google::protobuf::Timestamp& create_time(const Document* msg);
  329. static void set_has_create_time(HasBits* has_bits) {
  330. (*has_bits)[0] |= 1u;
  331. }
  332. static const ::google::protobuf::Timestamp& update_time(const Document* msg);
  333. static void set_has_update_time(HasBits* has_bits) {
  334. (*has_bits)[0] |= 2u;
  335. }
  336. };
  337. const ::google::protobuf::Timestamp& Document::_Internal::create_time(const Document* msg) {
  338. return *msg->_impl_.create_time_;
  339. }
  340. const ::google::protobuf::Timestamp& Document::_Internal::update_time(const Document* msg) {
  341. return *msg->_impl_.update_time_;
  342. }
  343. void Document::clear_create_time() {
  344. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  345. if (_impl_.create_time_ != nullptr) _impl_.create_time_->Clear();
  346. _impl_._has_bits_[0] &= ~0x00000001u;
  347. }
  348. void Document::clear_update_time() {
  349. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  350. if (_impl_.update_time_ != nullptr) _impl_.update_time_->Clear();
  351. _impl_._has_bits_[0] &= ~0x00000002u;
  352. }
  353. Document::Document(::google::protobuf::Arena* arena)
  354. : ::google::protobuf::Message(arena) {
  355. SharedCtor(arena);
  356. // @@protoc_insertion_point(arena_constructor:google.firestore.v1.Document)
  357. }
  358. inline PROTOBUF_NDEBUG_INLINE Document::Impl_::Impl_(
  359. ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
  360. const Impl_& from)
  361. : _has_bits_{from._has_bits_},
  362. _cached_size_{0},
  363. fields_{visibility, arena, from.fields_},
  364. name_(arena, from.name_) {}
  365. Document::Document(
  366. ::google::protobuf::Arena* arena,
  367. const Document& from)
  368. : ::google::protobuf::Message(arena) {
  369. Document* const _this = this;
  370. (void)_this;
  371. _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
  372. from._internal_metadata_);
  373. new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
  374. ::uint32_t cached_has_bits = _impl_._has_bits_[0];
  375. _impl_.create_time_ = (cached_has_bits & 0x00000001u)
  376. ? CreateMaybeMessage<::google::protobuf::Timestamp>(arena, *from._impl_.create_time_)
  377. : nullptr;
  378. _impl_.update_time_ = (cached_has_bits & 0x00000002u)
  379. ? CreateMaybeMessage<::google::protobuf::Timestamp>(arena, *from._impl_.update_time_)
  380. : nullptr;
  381. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.Document)
  382. }
  383. inline PROTOBUF_NDEBUG_INLINE Document::Impl_::Impl_(
  384. ::google::protobuf::internal::InternalVisibility visibility,
  385. ::google::protobuf::Arena* arena)
  386. : _cached_size_{0},
  387. fields_{visibility, arena},
  388. name_(arena) {}
  389. inline void Document::SharedCtor(::_pb::Arena* arena) {
  390. new (&_impl_) Impl_(internal_visibility(), arena);
  391. ::memset(reinterpret_cast<char *>(&_impl_) +
  392. offsetof(Impl_, create_time_),
  393. 0,
  394. offsetof(Impl_, update_time_) -
  395. offsetof(Impl_, create_time_) +
  396. sizeof(Impl_::update_time_));
  397. }
  398. Document::~Document() {
  399. // @@protoc_insertion_point(destructor:google.firestore.v1.Document)
  400. _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  401. SharedDtor();
  402. }
  403. inline void Document::SharedDtor() {
  404. ABSL_DCHECK(GetArena() == nullptr);
  405. _impl_.name_.Destroy();
  406. delete _impl_.create_time_;
  407. delete _impl_.update_time_;
  408. _impl_.~Impl_();
  409. }
  410. PROTOBUF_NOINLINE void Document::Clear() {
  411. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.Document)
  412. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  413. ::uint32_t cached_has_bits = 0;
  414. // Prevent compiler warnings about cached_has_bits being unused
  415. (void) cached_has_bits;
  416. _impl_.fields_.Clear();
  417. _impl_.name_.ClearToEmpty();
  418. cached_has_bits = _impl_._has_bits_[0];
  419. if (cached_has_bits & 0x00000003u) {
  420. if (cached_has_bits & 0x00000001u) {
  421. ABSL_DCHECK(_impl_.create_time_ != nullptr);
  422. _impl_.create_time_->Clear();
  423. }
  424. if (cached_has_bits & 0x00000002u) {
  425. ABSL_DCHECK(_impl_.update_time_ != nullptr);
  426. _impl_.update_time_->Clear();
  427. }
  428. }
  429. _impl_._has_bits_.Clear();
  430. _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
  431. }
  432. const char* Document::_InternalParse(
  433. const char* ptr, ::_pbi::ParseContext* ctx) {
  434. ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  435. return ptr;
  436. }
  437. PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
  438. const ::_pbi::TcParseTable<2, 4, 4, 47, 2> Document::_table_ = {
  439. {
  440. PROTOBUF_FIELD_OFFSET(Document, _impl_._has_bits_),
  441. 0, // no _extensions_
  442. 4, 24, // max_field_number, fast_idx_mask
  443. offsetof(decltype(_table_), field_lookup_table),
  444. 4294967280, // skipmap
  445. offsetof(decltype(_table_), field_entries),
  446. 4, // num_field_entries
  447. 4, // num_aux_entries
  448. offsetof(decltype(_table_), aux_entries),
  449. &_Document_default_instance_._instance,
  450. ::_pbi::TcParser::GenericFallback, // fallback
  451. }, {{
  452. // .google.protobuf.Timestamp update_time = 4;
  453. {::_pbi::TcParser::FastMtS1,
  454. {34, 1, 3, PROTOBUF_FIELD_OFFSET(Document, _impl_.update_time_)}},
  455. // string name = 1;
  456. {::_pbi::TcParser::FastUS1,
  457. {10, 63, 0, PROTOBUF_FIELD_OFFSET(Document, _impl_.name_)}},
  458. {::_pbi::TcParser::MiniParse, {}},
  459. // .google.protobuf.Timestamp create_time = 3;
  460. {::_pbi::TcParser::FastMtS1,
  461. {26, 0, 2, PROTOBUF_FIELD_OFFSET(Document, _impl_.create_time_)}},
  462. }}, {{
  463. 65535, 65535
  464. }}, {{
  465. // string name = 1;
  466. {PROTOBUF_FIELD_OFFSET(Document, _impl_.name_), -1, 0,
  467. (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
  468. // map<string, .google.firestore.v1.Value> fields = 2;
  469. {PROTOBUF_FIELD_OFFSET(Document, _impl_.fields_), -1, 0,
  470. (0 | ::_fl::kFcRepeated | ::_fl::kMap)},
  471. // .google.protobuf.Timestamp create_time = 3;
  472. {PROTOBUF_FIELD_OFFSET(Document, _impl_.create_time_), _Internal::kHasBitsOffset + 0, 2,
  473. (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
  474. // .google.protobuf.Timestamp update_time = 4;
  475. {PROTOBUF_FIELD_OFFSET(Document, _impl_.update_time_), _Internal::kHasBitsOffset + 1, 3,
  476. (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
  477. }}, {{
  478. {::_pbi::TcParser::GetMapAuxInfo<
  479. decltype(Document()._impl_.fields_)>(
  480. 1, 0, 0, 9,
  481. 11)},
  482. {::_pbi::TcParser::CreateInArenaStorageCb<::google::firestore::v1::Value>},
  483. {::_pbi::TcParser::GetTable<::google::protobuf::Timestamp>()},
  484. {::_pbi::TcParser::GetTable<::google::protobuf::Timestamp>()},
  485. }}, {{
  486. "\34\4\6\0\0\0\0\0"
  487. "google.firestore.v1.Document"
  488. "name"
  489. "fields"
  490. }},
  491. };
  492. ::uint8_t* Document::_InternalSerialize(
  493. ::uint8_t* target,
  494. ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  495. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Document)
  496. ::uint32_t cached_has_bits = 0;
  497. (void)cached_has_bits;
  498. // string name = 1;
  499. if (!this->_internal_name().empty()) {
  500. const std::string& _s = this->_internal_name();
  501. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  502. _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.firestore.v1.Document.name");
  503. target = stream->WriteStringMaybeAliased(1, _s, target);
  504. }
  505. // map<string, .google.firestore.v1.Value> fields = 2;
  506. if (!_internal_fields().empty()) {
  507. using MapType = ::google::protobuf::Map<std::string, ::google::firestore::v1::Value>;
  508. using WireHelper = _pbi::MapEntryFuncs<std::string, ::google::firestore::v1::Value,
  509. _pbi::WireFormatLite::TYPE_STRING,
  510. _pbi::WireFormatLite::TYPE_MESSAGE>;
  511. const auto& field = _internal_fields();
  512. if (stream->IsSerializationDeterministic() && field.size() > 1) {
  513. for (const auto& entry : ::google::protobuf::internal::MapSorterPtr<MapType>(field)) {
  514. target = WireHelper::InternalSerialize(
  515. 2, entry.first, entry.second, target, stream);
  516. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  517. entry.first.data(), static_cast<int>(entry.first.length()),
  518. ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.firestore.v1.Document.fields");
  519. }
  520. } else {
  521. for (const auto& entry : field) {
  522. target = WireHelper::InternalSerialize(
  523. 2, entry.first, entry.second, target, stream);
  524. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  525. entry.first.data(), static_cast<int>(entry.first.length()),
  526. ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.firestore.v1.Document.fields");
  527. }
  528. }
  529. }
  530. cached_has_bits = _impl_._has_bits_[0];
  531. // .google.protobuf.Timestamp create_time = 3;
  532. if (cached_has_bits & 0x00000001u) {
  533. target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
  534. 3, _Internal::create_time(this),
  535. _Internal::create_time(this).GetCachedSize(), target, stream);
  536. }
  537. // .google.protobuf.Timestamp update_time = 4;
  538. if (cached_has_bits & 0x00000002u) {
  539. target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
  540. 4, _Internal::update_time(this),
  541. _Internal::update_time(this).GetCachedSize(), target, stream);
  542. }
  543. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  544. target =
  545. ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  546. _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  547. }
  548. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Document)
  549. return target;
  550. }
  551. ::size_t Document::ByteSizeLong() const {
  552. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Document)
  553. ::size_t total_size = 0;
  554. ::uint32_t cached_has_bits = 0;
  555. // Prevent compiler warnings about cached_has_bits being unused
  556. (void) cached_has_bits;
  557. // map<string, .google.firestore.v1.Value> fields = 2;
  558. total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_fields_size());
  559. for (const auto& entry : _internal_fields()) {
  560. total_size += _pbi::MapEntryFuncs<std::string, ::google::firestore::v1::Value,
  561. _pbi::WireFormatLite::TYPE_STRING,
  562. _pbi::WireFormatLite::TYPE_MESSAGE>::ByteSizeLong(entry.first, entry.second);
  563. }
  564. // string name = 1;
  565. if (!this->_internal_name().empty()) {
  566. total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
  567. this->_internal_name());
  568. }
  569. cached_has_bits = _impl_._has_bits_[0];
  570. if (cached_has_bits & 0x00000003u) {
  571. // .google.protobuf.Timestamp create_time = 3;
  572. if (cached_has_bits & 0x00000001u) {
  573. total_size +=
  574. 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.create_time_);
  575. }
  576. // .google.protobuf.Timestamp update_time = 4;
  577. if (cached_has_bits & 0x00000002u) {
  578. total_size +=
  579. 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.update_time_);
  580. }
  581. }
  582. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  583. }
  584. const ::google::protobuf::Message::ClassData Document::_class_data_ = {
  585. Document::MergeImpl,
  586. nullptr, // OnDemandRegisterArenaDtor
  587. };
  588. const ::google::protobuf::Message::ClassData* Document::GetClassData() const {
  589. return &_class_data_;
  590. }
  591. void Document::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
  592. auto* const _this = static_cast<Document*>(&to_msg);
  593. auto& from = static_cast<const Document&>(from_msg);
  594. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.Document)
  595. ABSL_DCHECK_NE(&from, _this);
  596. ::uint32_t cached_has_bits = 0;
  597. (void) cached_has_bits;
  598. _this->_impl_.fields_.MergeFrom(from._impl_.fields_);
  599. if (!from._internal_name().empty()) {
  600. _this->_internal_set_name(from._internal_name());
  601. }
  602. cached_has_bits = from._impl_._has_bits_[0];
  603. if (cached_has_bits & 0x00000003u) {
  604. if (cached_has_bits & 0x00000001u) {
  605. _this->_internal_mutable_create_time()->::google::protobuf::Timestamp::MergeFrom(
  606. from._internal_create_time());
  607. }
  608. if (cached_has_bits & 0x00000002u) {
  609. _this->_internal_mutable_update_time()->::google::protobuf::Timestamp::MergeFrom(
  610. from._internal_update_time());
  611. }
  612. }
  613. _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
  614. }
  615. void Document::CopyFrom(const Document& from) {
  616. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.Document)
  617. if (&from == this) return;
  618. Clear();
  619. MergeFrom(from);
  620. }
  621. PROTOBUF_NOINLINE bool Document::IsInitialized() const {
  622. return true;
  623. }
  624. ::_pbi::CachedSize* Document::AccessCachedSize() const {
  625. return &_impl_._cached_size_;
  626. }
  627. void Document::InternalSwap(Document* PROTOBUF_RESTRICT other) {
  628. using std::swap;
  629. auto* arena = GetArena();
  630. ABSL_DCHECK_EQ(arena, other->GetArena());
  631. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  632. swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  633. _impl_.fields_.InternalSwap(&other->_impl_.fields_);
  634. ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena);
  635. ::google::protobuf::internal::memswap<
  636. PROTOBUF_FIELD_OFFSET(Document, _impl_.update_time_)
  637. + sizeof(Document::_impl_.update_time_)
  638. - PROTOBUF_FIELD_OFFSET(Document, _impl_.create_time_)>(
  639. reinterpret_cast<char*>(&_impl_.create_time_),
  640. reinterpret_cast<char*>(&other->_impl_.create_time_));
  641. }
  642. ::google::protobuf::Metadata Document::GetMetadata() const {
  643. return ::_pbi::AssignDescriptors(
  644. &descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto_getter, &descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto_once,
  645. file_level_metadata_google_2ffirestore_2fv1_2fdocument_2eproto[1]);
  646. }
  647. // ===================================================================
  648. class Value::_Internal {
  649. public:
  650. static constexpr ::int32_t kOneofCaseOffset =
  651. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Value, _impl_._oneof_case_);
  652. static const ::google::protobuf::Timestamp& timestamp_value(const Value* msg);
  653. static const ::google::type::LatLng& geo_point_value(const Value* msg);
  654. static const ::google::firestore::v1::ArrayValue& array_value(const Value* msg);
  655. static const ::google::firestore::v1::MapValue& map_value(const Value* msg);
  656. };
  657. const ::google::protobuf::Timestamp& Value::_Internal::timestamp_value(const Value* msg) {
  658. return *msg->_impl_.value_type_.timestamp_value_;
  659. }
  660. const ::google::type::LatLng& Value::_Internal::geo_point_value(const Value* msg) {
  661. return *msg->_impl_.value_type_.geo_point_value_;
  662. }
  663. const ::google::firestore::v1::ArrayValue& Value::_Internal::array_value(const Value* msg) {
  664. return *msg->_impl_.value_type_.array_value_;
  665. }
  666. const ::google::firestore::v1::MapValue& Value::_Internal::map_value(const Value* msg) {
  667. return *msg->_impl_.value_type_.map_value_;
  668. }
  669. void Value::set_allocated_timestamp_value(::google::protobuf::Timestamp* timestamp_value) {
  670. ::google::protobuf::Arena* message_arena = GetArena();
  671. clear_value_type();
  672. if (timestamp_value) {
  673. ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(timestamp_value)->GetArena();
  674. if (message_arena != submessage_arena) {
  675. timestamp_value = ::google::protobuf::internal::GetOwnedMessage(message_arena, timestamp_value, submessage_arena);
  676. }
  677. set_has_timestamp_value();
  678. _impl_.value_type_.timestamp_value_ = timestamp_value;
  679. }
  680. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Value.timestamp_value)
  681. }
  682. void Value::clear_timestamp_value() {
  683. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  684. if (value_type_case() == kTimestampValue) {
  685. if (GetArena() == nullptr) {
  686. delete _impl_.value_type_.timestamp_value_;
  687. }
  688. clear_has_value_type();
  689. }
  690. }
  691. void Value::set_allocated_geo_point_value(::google::type::LatLng* geo_point_value) {
  692. ::google::protobuf::Arena* message_arena = GetArena();
  693. clear_value_type();
  694. if (geo_point_value) {
  695. ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(geo_point_value)->GetArena();
  696. if (message_arena != submessage_arena) {
  697. geo_point_value = ::google::protobuf::internal::GetOwnedMessage(message_arena, geo_point_value, submessage_arena);
  698. }
  699. set_has_geo_point_value();
  700. _impl_.value_type_.geo_point_value_ = geo_point_value;
  701. }
  702. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Value.geo_point_value)
  703. }
  704. void Value::clear_geo_point_value() {
  705. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  706. if (value_type_case() == kGeoPointValue) {
  707. if (GetArena() == nullptr) {
  708. delete _impl_.value_type_.geo_point_value_;
  709. }
  710. clear_has_value_type();
  711. }
  712. }
  713. void Value::set_allocated_array_value(::google::firestore::v1::ArrayValue* array_value) {
  714. ::google::protobuf::Arena* message_arena = GetArena();
  715. clear_value_type();
  716. if (array_value) {
  717. ::google::protobuf::Arena* submessage_arena = array_value->GetArena();
  718. if (message_arena != submessage_arena) {
  719. array_value = ::google::protobuf::internal::GetOwnedMessage(message_arena, array_value, submessage_arena);
  720. }
  721. set_has_array_value();
  722. _impl_.value_type_.array_value_ = array_value;
  723. }
  724. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Value.array_value)
  725. }
  726. void Value::set_allocated_map_value(::google::firestore::v1::MapValue* map_value) {
  727. ::google::protobuf::Arena* message_arena = GetArena();
  728. clear_value_type();
  729. if (map_value) {
  730. ::google::protobuf::Arena* submessage_arena = map_value->GetArena();
  731. if (message_arena != submessage_arena) {
  732. map_value = ::google::protobuf::internal::GetOwnedMessage(message_arena, map_value, submessage_arena);
  733. }
  734. set_has_map_value();
  735. _impl_.value_type_.map_value_ = map_value;
  736. }
  737. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Value.map_value)
  738. }
  739. Value::Value(::google::protobuf::Arena* arena)
  740. : ::google::protobuf::Message(arena) {
  741. SharedCtor(arena);
  742. // @@protoc_insertion_point(arena_constructor:google.firestore.v1.Value)
  743. }
  744. inline PROTOBUF_NDEBUG_INLINE Value::Impl_::Impl_(
  745. ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
  746. const Impl_& from)
  747. : value_type_{},
  748. _cached_size_{0},
  749. _oneof_case_{from._oneof_case_[0]} {}
  750. Value::Value(
  751. ::google::protobuf::Arena* arena,
  752. const Value& from)
  753. : ::google::protobuf::Message(arena) {
  754. Value* const _this = this;
  755. (void)_this;
  756. _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
  757. from._internal_metadata_);
  758. new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
  759. switch (value_type_case()) {
  760. case VALUE_TYPE_NOT_SET:
  761. break;
  762. case kNullValue:
  763. _impl_.value_type_.null_value_ = from._impl_.value_type_.null_value_;
  764. break;
  765. case kBooleanValue:
  766. _impl_.value_type_.boolean_value_ = from._impl_.value_type_.boolean_value_;
  767. break;
  768. case kIntegerValue:
  769. _impl_.value_type_.integer_value_ = from._impl_.value_type_.integer_value_;
  770. break;
  771. case kDoubleValue:
  772. _impl_.value_type_.double_value_ = from._impl_.value_type_.double_value_;
  773. break;
  774. case kTimestampValue:
  775. _impl_.value_type_.timestamp_value_ = CreateMaybeMessage<::google::protobuf::Timestamp>(arena, *from._impl_.value_type_.timestamp_value_);
  776. break;
  777. case kStringValue:
  778. new (&_impl_.value_type_.string_value_) decltype(_impl_.value_type_.string_value_){arena, from._impl_.value_type_.string_value_};
  779. break;
  780. case kBytesValue:
  781. new (&_impl_.value_type_.bytes_value_) decltype(_impl_.value_type_.bytes_value_){arena, from._impl_.value_type_.bytes_value_};
  782. break;
  783. case kReferenceValue:
  784. new (&_impl_.value_type_.reference_value_) decltype(_impl_.value_type_.reference_value_){arena, from._impl_.value_type_.reference_value_};
  785. break;
  786. case kGeoPointValue:
  787. _impl_.value_type_.geo_point_value_ = CreateMaybeMessage<::google::type::LatLng>(arena, *from._impl_.value_type_.geo_point_value_);
  788. break;
  789. case kArrayValue:
  790. _impl_.value_type_.array_value_ = CreateMaybeMessage<::google::firestore::v1::ArrayValue>(arena, *from._impl_.value_type_.array_value_);
  791. break;
  792. case kMapValue:
  793. _impl_.value_type_.map_value_ = CreateMaybeMessage<::google::firestore::v1::MapValue>(arena, *from._impl_.value_type_.map_value_);
  794. break;
  795. }
  796. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.Value)
  797. }
  798. inline PROTOBUF_NDEBUG_INLINE Value::Impl_::Impl_(
  799. ::google::protobuf::internal::InternalVisibility visibility,
  800. ::google::protobuf::Arena* arena)
  801. : value_type_{},
  802. _cached_size_{0},
  803. _oneof_case_{} {}
  804. inline void Value::SharedCtor(::_pb::Arena* arena) {
  805. new (&_impl_) Impl_(internal_visibility(), arena);
  806. }
  807. Value::~Value() {
  808. // @@protoc_insertion_point(destructor:google.firestore.v1.Value)
  809. _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  810. SharedDtor();
  811. }
  812. inline void Value::SharedDtor() {
  813. ABSL_DCHECK(GetArena() == nullptr);
  814. if (has_value_type()) {
  815. clear_value_type();
  816. }
  817. _impl_.~Impl_();
  818. }
  819. void Value::clear_value_type() {
  820. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.Value)
  821. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  822. switch (value_type_case()) {
  823. case kNullValue: {
  824. // No need to clear
  825. break;
  826. }
  827. case kBooleanValue: {
  828. // No need to clear
  829. break;
  830. }
  831. case kIntegerValue: {
  832. // No need to clear
  833. break;
  834. }
  835. case kDoubleValue: {
  836. // No need to clear
  837. break;
  838. }
  839. case kTimestampValue: {
  840. if (GetArena() == nullptr) {
  841. delete _impl_.value_type_.timestamp_value_;
  842. }
  843. break;
  844. }
  845. case kStringValue: {
  846. _impl_.value_type_.string_value_.Destroy();
  847. break;
  848. }
  849. case kBytesValue: {
  850. _impl_.value_type_.bytes_value_.Destroy();
  851. break;
  852. }
  853. case kReferenceValue: {
  854. _impl_.value_type_.reference_value_.Destroy();
  855. break;
  856. }
  857. case kGeoPointValue: {
  858. if (GetArena() == nullptr) {
  859. delete _impl_.value_type_.geo_point_value_;
  860. }
  861. break;
  862. }
  863. case kArrayValue: {
  864. if (GetArena() == nullptr) {
  865. delete _impl_.value_type_.array_value_;
  866. }
  867. break;
  868. }
  869. case kMapValue: {
  870. if (GetArena() == nullptr) {
  871. delete _impl_.value_type_.map_value_;
  872. }
  873. break;
  874. }
  875. case VALUE_TYPE_NOT_SET: {
  876. break;
  877. }
  878. }
  879. _impl_._oneof_case_[0] = VALUE_TYPE_NOT_SET;
  880. }
  881. PROTOBUF_NOINLINE void Value::Clear() {
  882. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.Value)
  883. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  884. ::uint32_t cached_has_bits = 0;
  885. // Prevent compiler warnings about cached_has_bits being unused
  886. (void) cached_has_bits;
  887. clear_value_type();
  888. _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
  889. }
  890. const char* Value::_InternalParse(
  891. const char* ptr, ::_pbi::ParseContext* ctx) {
  892. ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  893. return ptr;
  894. }
  895. PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
  896. const ::_pbi::TcParseTable<0, 11, 4, 69, 2> Value::_table_ = {
  897. {
  898. 0, // no _has_bits_
  899. 0, // no _extensions_
  900. 18, 0, // max_field_number, fast_idx_mask
  901. offsetof(decltype(_table_), field_lookup_table),
  902. 4294768712, // skipmap
  903. offsetof(decltype(_table_), field_entries),
  904. 11, // num_field_entries
  905. 4, // num_aux_entries
  906. offsetof(decltype(_table_), aux_entries),
  907. &_Value_default_instance_._instance,
  908. ::_pbi::TcParser::GenericFallback, // fallback
  909. }, {{
  910. {::_pbi::TcParser::MiniParse, {}},
  911. }}, {{
  912. 65535, 65535
  913. }}, {{
  914. // bool boolean_value = 1;
  915. {PROTOBUF_FIELD_OFFSET(Value, _impl_.value_type_.boolean_value_), _Internal::kOneofCaseOffset + 0, 0,
  916. (0 | ::_fl::kFcOneof | ::_fl::kBool)},
  917. // int64 integer_value = 2;
  918. {PROTOBUF_FIELD_OFFSET(Value, _impl_.value_type_.integer_value_), _Internal::kOneofCaseOffset + 0, 0,
  919. (0 | ::_fl::kFcOneof | ::_fl::kInt64)},
  920. // double double_value = 3;
  921. {PROTOBUF_FIELD_OFFSET(Value, _impl_.value_type_.double_value_), _Internal::kOneofCaseOffset + 0, 0,
  922. (0 | ::_fl::kFcOneof | ::_fl::kDouble)},
  923. // string reference_value = 5;
  924. {PROTOBUF_FIELD_OFFSET(Value, _impl_.value_type_.reference_value_), _Internal::kOneofCaseOffset + 0, 0,
  925. (0 | ::_fl::kFcOneof | ::_fl::kUtf8String | ::_fl::kRepAString)},
  926. // .google.firestore.v1.MapValue map_value = 6;
  927. {PROTOBUF_FIELD_OFFSET(Value, _impl_.value_type_.map_value_), _Internal::kOneofCaseOffset + 0, 0,
  928. (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
  929. // .google.type.LatLng geo_point_value = 8;
  930. {PROTOBUF_FIELD_OFFSET(Value, _impl_.value_type_.geo_point_value_), _Internal::kOneofCaseOffset + 0, 1,
  931. (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
  932. // .google.firestore.v1.ArrayValue array_value = 9;
  933. {PROTOBUF_FIELD_OFFSET(Value, _impl_.value_type_.array_value_), _Internal::kOneofCaseOffset + 0, 2,
  934. (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
  935. // .google.protobuf.Timestamp timestamp_value = 10;
  936. {PROTOBUF_FIELD_OFFSET(Value, _impl_.value_type_.timestamp_value_), _Internal::kOneofCaseOffset + 0, 3,
  937. (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
  938. // .google.protobuf.NullValue null_value = 11;
  939. {PROTOBUF_FIELD_OFFSET(Value, _impl_.value_type_.null_value_), _Internal::kOneofCaseOffset + 0, 0,
  940. (0 | ::_fl::kFcOneof | ::_fl::kOpenEnum)},
  941. // string string_value = 17;
  942. {PROTOBUF_FIELD_OFFSET(Value, _impl_.value_type_.string_value_), _Internal::kOneofCaseOffset + 0, 0,
  943. (0 | ::_fl::kFcOneof | ::_fl::kUtf8String | ::_fl::kRepAString)},
  944. // bytes bytes_value = 18;
  945. {PROTOBUF_FIELD_OFFSET(Value, _impl_.value_type_.bytes_value_), _Internal::kOneofCaseOffset + 0, 0,
  946. (0 | ::_fl::kFcOneof | ::_fl::kBytes | ::_fl::kRepAString)},
  947. }}, {{
  948. {::_pbi::TcParser::GetTable<::google::firestore::v1::MapValue>()},
  949. {::_pbi::TcParser::GetTable<::google::type::LatLng>()},
  950. {::_pbi::TcParser::GetTable<::google::firestore::v1::ArrayValue>()},
  951. {::_pbi::TcParser::GetTable<::google::protobuf::Timestamp>()},
  952. }}, {{
  953. "\31\0\0\0\17\0\0\0\0\0\14\0\0\0\0\0"
  954. "google.firestore.v1.Value"
  955. "reference_value"
  956. "string_value"
  957. }},
  958. };
  959. ::uint8_t* Value::_InternalSerialize(
  960. ::uint8_t* target,
  961. ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  962. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Value)
  963. ::uint32_t cached_has_bits = 0;
  964. (void)cached_has_bits;
  965. switch (value_type_case()) {
  966. case kBooleanValue: {
  967. target = stream->EnsureSpace(target);
  968. target = ::_pbi::WireFormatLite::WriteBoolToArray(
  969. 1, this->_internal_boolean_value(), target);
  970. break;
  971. }
  972. case kIntegerValue: {
  973. target = ::google::protobuf::internal::WireFormatLite::
  974. WriteInt64ToArrayWithField<2>(
  975. stream, this->_internal_integer_value(), target);
  976. break;
  977. }
  978. case kDoubleValue: {
  979. target = stream->EnsureSpace(target);
  980. target = ::_pbi::WireFormatLite::WriteDoubleToArray(
  981. 3, this->_internal_double_value(), target);
  982. break;
  983. }
  984. case kReferenceValue: {
  985. const std::string& _s = this->_internal_reference_value();
  986. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  987. _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.firestore.v1.Value.reference_value");
  988. target = stream->WriteStringMaybeAliased(5, _s, target);
  989. break;
  990. }
  991. case kMapValue: {
  992. target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
  993. 6, _Internal::map_value(this),
  994. _Internal::map_value(this).GetCachedSize(), target, stream);
  995. break;
  996. }
  997. case kGeoPointValue: {
  998. target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
  999. 8, _Internal::geo_point_value(this),
  1000. _Internal::geo_point_value(this).GetCachedSize(), target, stream);
  1001. break;
  1002. }
  1003. case kArrayValue: {
  1004. target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
  1005. 9, _Internal::array_value(this),
  1006. _Internal::array_value(this).GetCachedSize(), target, stream);
  1007. break;
  1008. }
  1009. case kTimestampValue: {
  1010. target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
  1011. 10, _Internal::timestamp_value(this),
  1012. _Internal::timestamp_value(this).GetCachedSize(), target, stream);
  1013. break;
  1014. }
  1015. case kNullValue: {
  1016. target = stream->EnsureSpace(target);
  1017. target = ::_pbi::WireFormatLite::WriteEnumToArray(
  1018. 11, this->_internal_null_value(), target);
  1019. break;
  1020. }
  1021. case kStringValue: {
  1022. const std::string& _s = this->_internal_string_value();
  1023. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1024. _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.firestore.v1.Value.string_value");
  1025. target = stream->WriteStringMaybeAliased(17, _s, target);
  1026. break;
  1027. }
  1028. case kBytesValue: {
  1029. const std::string& _s = this->_internal_bytes_value();
  1030. target = stream->WriteBytesMaybeAliased(18, _s, target);
  1031. break;
  1032. }
  1033. default:
  1034. break;
  1035. }
  1036. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  1037. target =
  1038. ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  1039. _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  1040. }
  1041. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Value)
  1042. return target;
  1043. }
  1044. ::size_t Value::ByteSizeLong() const {
  1045. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Value)
  1046. ::size_t total_size = 0;
  1047. ::uint32_t cached_has_bits = 0;
  1048. // Prevent compiler warnings about cached_has_bits being unused
  1049. (void) cached_has_bits;
  1050. switch (value_type_case()) {
  1051. // .google.protobuf.NullValue null_value = 11;
  1052. case kNullValue: {
  1053. total_size += 1 +
  1054. ::_pbi::WireFormatLite::EnumSize(this->_internal_null_value());
  1055. break;
  1056. }
  1057. // bool boolean_value = 1;
  1058. case kBooleanValue: {
  1059. total_size += 2;
  1060. break;
  1061. }
  1062. // int64 integer_value = 2;
  1063. case kIntegerValue: {
  1064. total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
  1065. this->_internal_integer_value());
  1066. break;
  1067. }
  1068. // double double_value = 3;
  1069. case kDoubleValue: {
  1070. total_size += 9;
  1071. break;
  1072. }
  1073. // .google.protobuf.Timestamp timestamp_value = 10;
  1074. case kTimestampValue: {
  1075. total_size +=
  1076. 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.value_type_.timestamp_value_);
  1077. break;
  1078. }
  1079. // string string_value = 17;
  1080. case kStringValue: {
  1081. total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize(
  1082. this->_internal_string_value());
  1083. break;
  1084. }
  1085. // bytes bytes_value = 18;
  1086. case kBytesValue: {
  1087. total_size += 2 + ::google::protobuf::internal::WireFormatLite::BytesSize(
  1088. this->_internal_bytes_value());
  1089. break;
  1090. }
  1091. // string reference_value = 5;
  1092. case kReferenceValue: {
  1093. total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
  1094. this->_internal_reference_value());
  1095. break;
  1096. }
  1097. // .google.type.LatLng geo_point_value = 8;
  1098. case kGeoPointValue: {
  1099. total_size +=
  1100. 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.value_type_.geo_point_value_);
  1101. break;
  1102. }
  1103. // .google.firestore.v1.ArrayValue array_value = 9;
  1104. case kArrayValue: {
  1105. total_size +=
  1106. 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.value_type_.array_value_);
  1107. break;
  1108. }
  1109. // .google.firestore.v1.MapValue map_value = 6;
  1110. case kMapValue: {
  1111. total_size +=
  1112. 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.value_type_.map_value_);
  1113. break;
  1114. }
  1115. case VALUE_TYPE_NOT_SET: {
  1116. break;
  1117. }
  1118. }
  1119. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  1120. }
  1121. const ::google::protobuf::Message::ClassData Value::_class_data_ = {
  1122. Value::MergeImpl,
  1123. nullptr, // OnDemandRegisterArenaDtor
  1124. };
  1125. const ::google::protobuf::Message::ClassData* Value::GetClassData() const {
  1126. return &_class_data_;
  1127. }
  1128. void Value::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
  1129. auto* const _this = static_cast<Value*>(&to_msg);
  1130. auto& from = static_cast<const Value&>(from_msg);
  1131. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.Value)
  1132. ABSL_DCHECK_NE(&from, _this);
  1133. ::uint32_t cached_has_bits = 0;
  1134. (void) cached_has_bits;
  1135. switch (from.value_type_case()) {
  1136. case kNullValue: {
  1137. _this->_internal_set_null_value(from._internal_null_value());
  1138. break;
  1139. }
  1140. case kBooleanValue: {
  1141. _this->_internal_set_boolean_value(from._internal_boolean_value());
  1142. break;
  1143. }
  1144. case kIntegerValue: {
  1145. _this->_internal_set_integer_value(from._internal_integer_value());
  1146. break;
  1147. }
  1148. case kDoubleValue: {
  1149. _this->_internal_set_double_value(from._internal_double_value());
  1150. break;
  1151. }
  1152. case kTimestampValue: {
  1153. _this->_internal_mutable_timestamp_value()->::google::protobuf::Timestamp::MergeFrom(
  1154. from._internal_timestamp_value());
  1155. break;
  1156. }
  1157. case kStringValue: {
  1158. _this->_internal_set_string_value(from._internal_string_value());
  1159. break;
  1160. }
  1161. case kBytesValue: {
  1162. _this->_internal_set_bytes_value(from._internal_bytes_value());
  1163. break;
  1164. }
  1165. case kReferenceValue: {
  1166. _this->_internal_set_reference_value(from._internal_reference_value());
  1167. break;
  1168. }
  1169. case kGeoPointValue: {
  1170. _this->_internal_mutable_geo_point_value()->::google::type::LatLng::MergeFrom(
  1171. from._internal_geo_point_value());
  1172. break;
  1173. }
  1174. case kArrayValue: {
  1175. _this->_internal_mutable_array_value()->::google::firestore::v1::ArrayValue::MergeFrom(
  1176. from._internal_array_value());
  1177. break;
  1178. }
  1179. case kMapValue: {
  1180. _this->_internal_mutable_map_value()->::google::firestore::v1::MapValue::MergeFrom(
  1181. from._internal_map_value());
  1182. break;
  1183. }
  1184. case VALUE_TYPE_NOT_SET: {
  1185. break;
  1186. }
  1187. }
  1188. _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
  1189. }
  1190. void Value::CopyFrom(const Value& from) {
  1191. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.Value)
  1192. if (&from == this) return;
  1193. Clear();
  1194. MergeFrom(from);
  1195. }
  1196. PROTOBUF_NOINLINE bool Value::IsInitialized() const {
  1197. return true;
  1198. }
  1199. ::_pbi::CachedSize* Value::AccessCachedSize() const {
  1200. return &_impl_._cached_size_;
  1201. }
  1202. void Value::InternalSwap(Value* PROTOBUF_RESTRICT other) {
  1203. using std::swap;
  1204. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  1205. swap(_impl_.value_type_, other->_impl_.value_type_);
  1206. swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
  1207. }
  1208. ::google::protobuf::Metadata Value::GetMetadata() const {
  1209. return ::_pbi::AssignDescriptors(
  1210. &descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto_getter, &descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto_once,
  1211. file_level_metadata_google_2ffirestore_2fv1_2fdocument_2eproto[2]);
  1212. }
  1213. // ===================================================================
  1214. class ArrayValue::_Internal {
  1215. public:
  1216. };
  1217. ArrayValue::ArrayValue(::google::protobuf::Arena* arena)
  1218. : ::google::protobuf::Message(arena) {
  1219. SharedCtor(arena);
  1220. // @@protoc_insertion_point(arena_constructor:google.firestore.v1.ArrayValue)
  1221. }
  1222. inline PROTOBUF_NDEBUG_INLINE ArrayValue::Impl_::Impl_(
  1223. ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
  1224. const Impl_& from)
  1225. : values_{visibility, arena, from.values_},
  1226. _cached_size_{0} {}
  1227. ArrayValue::ArrayValue(
  1228. ::google::protobuf::Arena* arena,
  1229. const ArrayValue& from)
  1230. : ::google::protobuf::Message(arena) {
  1231. ArrayValue* const _this = this;
  1232. (void)_this;
  1233. _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
  1234. from._internal_metadata_);
  1235. new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
  1236. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ArrayValue)
  1237. }
  1238. inline PROTOBUF_NDEBUG_INLINE ArrayValue::Impl_::Impl_(
  1239. ::google::protobuf::internal::InternalVisibility visibility,
  1240. ::google::protobuf::Arena* arena)
  1241. : values_{visibility, arena},
  1242. _cached_size_{0} {}
  1243. inline void ArrayValue::SharedCtor(::_pb::Arena* arena) {
  1244. new (&_impl_) Impl_(internal_visibility(), arena);
  1245. }
  1246. ArrayValue::~ArrayValue() {
  1247. // @@protoc_insertion_point(destructor:google.firestore.v1.ArrayValue)
  1248. _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  1249. SharedDtor();
  1250. }
  1251. inline void ArrayValue::SharedDtor() {
  1252. ABSL_DCHECK(GetArena() == nullptr);
  1253. _impl_.~Impl_();
  1254. }
  1255. PROTOBUF_NOINLINE void ArrayValue::Clear() {
  1256. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.ArrayValue)
  1257. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  1258. ::uint32_t cached_has_bits = 0;
  1259. // Prevent compiler warnings about cached_has_bits being unused
  1260. (void) cached_has_bits;
  1261. _impl_.values_.Clear();
  1262. _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
  1263. }
  1264. const char* ArrayValue::_InternalParse(
  1265. const char* ptr, ::_pbi::ParseContext* ctx) {
  1266. ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  1267. return ptr;
  1268. }
  1269. PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
  1270. const ::_pbi::TcParseTable<0, 1, 1, 0, 2> ArrayValue::_table_ = {
  1271. {
  1272. 0, // no _has_bits_
  1273. 0, // no _extensions_
  1274. 1, 0, // max_field_number, fast_idx_mask
  1275. offsetof(decltype(_table_), field_lookup_table),
  1276. 4294967294, // skipmap
  1277. offsetof(decltype(_table_), field_entries),
  1278. 1, // num_field_entries
  1279. 1, // num_aux_entries
  1280. offsetof(decltype(_table_), aux_entries),
  1281. &_ArrayValue_default_instance_._instance,
  1282. ::_pbi::TcParser::GenericFallback, // fallback
  1283. }, {{
  1284. // repeated .google.firestore.v1.Value values = 1;
  1285. {::_pbi::TcParser::FastMtR1,
  1286. {10, 63, 0, PROTOBUF_FIELD_OFFSET(ArrayValue, _impl_.values_)}},
  1287. }}, {{
  1288. 65535, 65535
  1289. }}, {{
  1290. // repeated .google.firestore.v1.Value values = 1;
  1291. {PROTOBUF_FIELD_OFFSET(ArrayValue, _impl_.values_), 0, 0,
  1292. (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
  1293. }}, {{
  1294. {::_pbi::TcParser::GetTable<::google::firestore::v1::Value>()},
  1295. }}, {{
  1296. }},
  1297. };
  1298. ::uint8_t* ArrayValue::_InternalSerialize(
  1299. ::uint8_t* target,
  1300. ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  1301. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ArrayValue)
  1302. ::uint32_t cached_has_bits = 0;
  1303. (void)cached_has_bits;
  1304. // repeated .google.firestore.v1.Value values = 1;
  1305. for (unsigned i = 0,
  1306. n = static_cast<unsigned>(this->_internal_values_size()); i < n; i++) {
  1307. const auto& repfield = this->_internal_values().Get(i);
  1308. target = ::google::protobuf::internal::WireFormatLite::
  1309. InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
  1310. }
  1311. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  1312. target =
  1313. ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  1314. _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  1315. }
  1316. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ArrayValue)
  1317. return target;
  1318. }
  1319. ::size_t ArrayValue::ByteSizeLong() const {
  1320. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ArrayValue)
  1321. ::size_t total_size = 0;
  1322. ::uint32_t cached_has_bits = 0;
  1323. // Prevent compiler warnings about cached_has_bits being unused
  1324. (void) cached_has_bits;
  1325. // repeated .google.firestore.v1.Value values = 1;
  1326. total_size += 1UL * this->_internal_values_size();
  1327. for (const auto& msg : this->_internal_values()) {
  1328. total_size +=
  1329. ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
  1330. }
  1331. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  1332. }
  1333. const ::google::protobuf::Message::ClassData ArrayValue::_class_data_ = {
  1334. ArrayValue::MergeImpl,
  1335. nullptr, // OnDemandRegisterArenaDtor
  1336. };
  1337. const ::google::protobuf::Message::ClassData* ArrayValue::GetClassData() const {
  1338. return &_class_data_;
  1339. }
  1340. void ArrayValue::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
  1341. auto* const _this = static_cast<ArrayValue*>(&to_msg);
  1342. auto& from = static_cast<const ArrayValue&>(from_msg);
  1343. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ArrayValue)
  1344. ABSL_DCHECK_NE(&from, _this);
  1345. ::uint32_t cached_has_bits = 0;
  1346. (void) cached_has_bits;
  1347. _this->_internal_mutable_values()->MergeFrom(
  1348. from._internal_values());
  1349. _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
  1350. }
  1351. void ArrayValue::CopyFrom(const ArrayValue& from) {
  1352. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ArrayValue)
  1353. if (&from == this) return;
  1354. Clear();
  1355. MergeFrom(from);
  1356. }
  1357. PROTOBUF_NOINLINE bool ArrayValue::IsInitialized() const {
  1358. return true;
  1359. }
  1360. ::_pbi::CachedSize* ArrayValue::AccessCachedSize() const {
  1361. return &_impl_._cached_size_;
  1362. }
  1363. void ArrayValue::InternalSwap(ArrayValue* PROTOBUF_RESTRICT other) {
  1364. using std::swap;
  1365. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  1366. _impl_.values_.InternalSwap(&other->_impl_.values_);
  1367. }
  1368. ::google::protobuf::Metadata ArrayValue::GetMetadata() const {
  1369. return ::_pbi::AssignDescriptors(
  1370. &descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto_getter, &descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto_once,
  1371. file_level_metadata_google_2ffirestore_2fv1_2fdocument_2eproto[3]);
  1372. }
  1373. // ===================================================================
  1374. MapValue_FieldsEntry_DoNotUse::MapValue_FieldsEntry_DoNotUse() {}
  1375. MapValue_FieldsEntry_DoNotUse::MapValue_FieldsEntry_DoNotUse(::google::protobuf::Arena* arena)
  1376. : SuperType(arena) {}
  1377. ::google::protobuf::Metadata MapValue_FieldsEntry_DoNotUse::GetMetadata() const {
  1378. return ::_pbi::AssignDescriptors(
  1379. &descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto_getter, &descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto_once,
  1380. file_level_metadata_google_2ffirestore_2fv1_2fdocument_2eproto[4]);
  1381. }
  1382. // ===================================================================
  1383. class MapValue::_Internal {
  1384. public:
  1385. };
  1386. MapValue::MapValue(::google::protobuf::Arena* arena)
  1387. : ::google::protobuf::Message(arena) {
  1388. SharedCtor(arena);
  1389. // @@protoc_insertion_point(arena_constructor:google.firestore.v1.MapValue)
  1390. }
  1391. inline PROTOBUF_NDEBUG_INLINE MapValue::Impl_::Impl_(
  1392. ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
  1393. const Impl_& from)
  1394. : fields_{visibility, arena, from.fields_},
  1395. _cached_size_{0} {}
  1396. MapValue::MapValue(
  1397. ::google::protobuf::Arena* arena,
  1398. const MapValue& from)
  1399. : ::google::protobuf::Message(arena) {
  1400. MapValue* const _this = this;
  1401. (void)_this;
  1402. _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
  1403. from._internal_metadata_);
  1404. new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
  1405. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.MapValue)
  1406. }
  1407. inline PROTOBUF_NDEBUG_INLINE MapValue::Impl_::Impl_(
  1408. ::google::protobuf::internal::InternalVisibility visibility,
  1409. ::google::protobuf::Arena* arena)
  1410. : fields_{visibility, arena},
  1411. _cached_size_{0} {}
  1412. inline void MapValue::SharedCtor(::_pb::Arena* arena) {
  1413. new (&_impl_) Impl_(internal_visibility(), arena);
  1414. }
  1415. MapValue::~MapValue() {
  1416. // @@protoc_insertion_point(destructor:google.firestore.v1.MapValue)
  1417. _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  1418. SharedDtor();
  1419. }
  1420. inline void MapValue::SharedDtor() {
  1421. ABSL_DCHECK(GetArena() == nullptr);
  1422. _impl_.~Impl_();
  1423. }
  1424. PROTOBUF_NOINLINE void MapValue::Clear() {
  1425. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.MapValue)
  1426. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  1427. ::uint32_t cached_has_bits = 0;
  1428. // Prevent compiler warnings about cached_has_bits being unused
  1429. (void) cached_has_bits;
  1430. _impl_.fields_.Clear();
  1431. _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
  1432. }
  1433. const char* MapValue::_InternalParse(
  1434. const char* ptr, ::_pbi::ParseContext* ctx) {
  1435. ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  1436. return ptr;
  1437. }
  1438. PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
  1439. const ::_pbi::TcParseTable<0, 1, 2, 43, 2> MapValue::_table_ = {
  1440. {
  1441. 0, // no _has_bits_
  1442. 0, // no _extensions_
  1443. 1, 0, // max_field_number, fast_idx_mask
  1444. offsetof(decltype(_table_), field_lookup_table),
  1445. 4294967294, // skipmap
  1446. offsetof(decltype(_table_), field_entries),
  1447. 1, // num_field_entries
  1448. 2, // num_aux_entries
  1449. offsetof(decltype(_table_), aux_entries),
  1450. &_MapValue_default_instance_._instance,
  1451. ::_pbi::TcParser::GenericFallback, // fallback
  1452. }, {{
  1453. {::_pbi::TcParser::MiniParse, {}},
  1454. }}, {{
  1455. 65535, 65535
  1456. }}, {{
  1457. // map<string, .google.firestore.v1.Value> fields = 1;
  1458. {PROTOBUF_FIELD_OFFSET(MapValue, _impl_.fields_), 0, 0,
  1459. (0 | ::_fl::kFcRepeated | ::_fl::kMap)},
  1460. }}, {{
  1461. {::_pbi::TcParser::GetMapAuxInfo<
  1462. decltype(MapValue()._impl_.fields_)>(
  1463. 1, 0, 0, 9,
  1464. 11)},
  1465. {::_pbi::TcParser::CreateInArenaStorageCb<::google::firestore::v1::Value>},
  1466. }}, {{
  1467. "\34\6\0\0\0\0\0\0"
  1468. "google.firestore.v1.MapValue"
  1469. "fields"
  1470. }},
  1471. };
  1472. ::uint8_t* MapValue::_InternalSerialize(
  1473. ::uint8_t* target,
  1474. ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  1475. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.MapValue)
  1476. ::uint32_t cached_has_bits = 0;
  1477. (void)cached_has_bits;
  1478. // map<string, .google.firestore.v1.Value> fields = 1;
  1479. if (!_internal_fields().empty()) {
  1480. using MapType = ::google::protobuf::Map<std::string, ::google::firestore::v1::Value>;
  1481. using WireHelper = _pbi::MapEntryFuncs<std::string, ::google::firestore::v1::Value,
  1482. _pbi::WireFormatLite::TYPE_STRING,
  1483. _pbi::WireFormatLite::TYPE_MESSAGE>;
  1484. const auto& field = _internal_fields();
  1485. if (stream->IsSerializationDeterministic() && field.size() > 1) {
  1486. for (const auto& entry : ::google::protobuf::internal::MapSorterPtr<MapType>(field)) {
  1487. target = WireHelper::InternalSerialize(
  1488. 1, entry.first, entry.second, target, stream);
  1489. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1490. entry.first.data(), static_cast<int>(entry.first.length()),
  1491. ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.firestore.v1.MapValue.fields");
  1492. }
  1493. } else {
  1494. for (const auto& entry : field) {
  1495. target = WireHelper::InternalSerialize(
  1496. 1, entry.first, entry.second, target, stream);
  1497. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1498. entry.first.data(), static_cast<int>(entry.first.length()),
  1499. ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.firestore.v1.MapValue.fields");
  1500. }
  1501. }
  1502. }
  1503. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  1504. target =
  1505. ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  1506. _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  1507. }
  1508. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.MapValue)
  1509. return target;
  1510. }
  1511. ::size_t MapValue::ByteSizeLong() const {
  1512. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.MapValue)
  1513. ::size_t total_size = 0;
  1514. ::uint32_t cached_has_bits = 0;
  1515. // Prevent compiler warnings about cached_has_bits being unused
  1516. (void) cached_has_bits;
  1517. // map<string, .google.firestore.v1.Value> fields = 1;
  1518. total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_fields_size());
  1519. for (const auto& entry : _internal_fields()) {
  1520. total_size += _pbi::MapEntryFuncs<std::string, ::google::firestore::v1::Value,
  1521. _pbi::WireFormatLite::TYPE_STRING,
  1522. _pbi::WireFormatLite::TYPE_MESSAGE>::ByteSizeLong(entry.first, entry.second);
  1523. }
  1524. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  1525. }
  1526. const ::google::protobuf::Message::ClassData MapValue::_class_data_ = {
  1527. MapValue::MergeImpl,
  1528. nullptr, // OnDemandRegisterArenaDtor
  1529. };
  1530. const ::google::protobuf::Message::ClassData* MapValue::GetClassData() const {
  1531. return &_class_data_;
  1532. }
  1533. void MapValue::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
  1534. auto* const _this = static_cast<MapValue*>(&to_msg);
  1535. auto& from = static_cast<const MapValue&>(from_msg);
  1536. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.MapValue)
  1537. ABSL_DCHECK_NE(&from, _this);
  1538. ::uint32_t cached_has_bits = 0;
  1539. (void) cached_has_bits;
  1540. _this->_impl_.fields_.MergeFrom(from._impl_.fields_);
  1541. _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
  1542. }
  1543. void MapValue::CopyFrom(const MapValue& from) {
  1544. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.MapValue)
  1545. if (&from == this) return;
  1546. Clear();
  1547. MergeFrom(from);
  1548. }
  1549. PROTOBUF_NOINLINE bool MapValue::IsInitialized() const {
  1550. return true;
  1551. }
  1552. ::_pbi::CachedSize* MapValue::AccessCachedSize() const {
  1553. return &_impl_._cached_size_;
  1554. }
  1555. void MapValue::InternalSwap(MapValue* PROTOBUF_RESTRICT other) {
  1556. using std::swap;
  1557. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  1558. _impl_.fields_.InternalSwap(&other->_impl_.fields_);
  1559. }
  1560. ::google::protobuf::Metadata MapValue::GetMetadata() const {
  1561. return ::_pbi::AssignDescriptors(
  1562. &descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto_getter, &descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto_once,
  1563. file_level_metadata_google_2ffirestore_2fv1_2fdocument_2eproto[5]);
  1564. }
  1565. // @@protoc_insertion_point(namespace_scope)
  1566. } // namespace v1
  1567. } // namespace firestore
  1568. } // namespace google
  1569. namespace google {
  1570. namespace protobuf {
  1571. } // namespace protobuf
  1572. } // namespace google
  1573. // @@protoc_insertion_point(global_scope)
  1574. #include "google/protobuf/port_undef.inc"