document.pb.cc 71 KB

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