document.pb.cc 71 KB

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