document.pb.cc 87 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300
  1. /*
  2. * Copyright 2018 Google
  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/stubs/common.h>
  21. #include <google/protobuf/stubs/port.h>
  22. #include <google/protobuf/stubs/once.h>
  23. #include <google/protobuf/io/coded_stream.h>
  24. #include <google/protobuf/wire_format_lite_inl.h>
  25. #include <google/protobuf/descriptor.h>
  26. #include <google/protobuf/generated_message_reflection.h>
  27. #include <google/protobuf/reflection_ops.h>
  28. #include <google/protobuf/wire_format.h>
  29. // This is a temporary google only hack
  30. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  31. #include "third_party/protobuf/version.h"
  32. #endif
  33. // @@protoc_insertion_point(includes)
  34. namespace google {
  35. namespace firestore {
  36. namespace v1 {
  37. class Document_FieldsEntry_DoNotUseDefaultTypeInternal {
  38. public:
  39. ::google::protobuf::internal::ExplicitlyConstructed<Document_FieldsEntry_DoNotUse>
  40. _instance;
  41. } _Document_FieldsEntry_DoNotUse_default_instance_;
  42. class DocumentDefaultTypeInternal {
  43. public:
  44. ::google::protobuf::internal::ExplicitlyConstructed<Document>
  45. _instance;
  46. } _Document_default_instance_;
  47. class ValueDefaultTypeInternal {
  48. public:
  49. ::google::protobuf::internal::ExplicitlyConstructed<Value>
  50. _instance;
  51. int null_value_;
  52. bool boolean_value_;
  53. ::google::protobuf::int64 integer_value_;
  54. double double_value_;
  55. const ::google::protobuf::Timestamp* timestamp_value_;
  56. ::google::protobuf::internal::ArenaStringPtr string_value_;
  57. ::google::protobuf::internal::ArenaStringPtr bytes_value_;
  58. ::google::protobuf::internal::ArenaStringPtr reference_value_;
  59. const ::google::type::LatLng* geo_point_value_;
  60. const ::google::firestore::v1::ArrayValue* array_value_;
  61. const ::google::firestore::v1::MapValue* map_value_;
  62. } _Value_default_instance_;
  63. class ArrayValueDefaultTypeInternal {
  64. public:
  65. ::google::protobuf::internal::ExplicitlyConstructed<ArrayValue>
  66. _instance;
  67. } _ArrayValue_default_instance_;
  68. class MapValue_FieldsEntry_DoNotUseDefaultTypeInternal {
  69. public:
  70. ::google::protobuf::internal::ExplicitlyConstructed<MapValue_FieldsEntry_DoNotUse>
  71. _instance;
  72. } _MapValue_FieldsEntry_DoNotUse_default_instance_;
  73. class MapValueDefaultTypeInternal {
  74. public:
  75. ::google::protobuf::internal::ExplicitlyConstructed<MapValue>
  76. _instance;
  77. } _MapValue_default_instance_;
  78. } // namespace v1
  79. } // namespace firestore
  80. } // namespace google
  81. namespace protobuf_google_2ffirestore_2fv1_2fdocument_2eproto {
  82. void InitDefaultsDocument_FieldsEntry_DoNotUseImpl() {
  83. GOOGLE_PROTOBUF_VERIFY_VERSION;
  84. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  85. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  86. #else
  87. ::google::protobuf::internal::InitProtobufDefaults();
  88. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  89. protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsArrayValue();
  90. {
  91. void* ptr = &::google::firestore::v1::_Document_FieldsEntry_DoNotUse_default_instance_;
  92. new (ptr) ::google::firestore::v1::Document_FieldsEntry_DoNotUse();
  93. }
  94. ::google::firestore::v1::Document_FieldsEntry_DoNotUse::InitAsDefaultInstance();
  95. }
  96. void InitDefaultsDocument_FieldsEntry_DoNotUse() {
  97. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  98. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsDocument_FieldsEntry_DoNotUseImpl);
  99. }
  100. void InitDefaultsDocumentImpl() {
  101. GOOGLE_PROTOBUF_VERIFY_VERSION;
  102. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  103. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  104. #else
  105. ::google::protobuf::internal::InitProtobufDefaults();
  106. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  107. protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsDocument_FieldsEntry_DoNotUse();
  108. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  109. {
  110. void* ptr = &::google::firestore::v1::_Document_default_instance_;
  111. new (ptr) ::google::firestore::v1::Document();
  112. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  113. }
  114. ::google::firestore::v1::Document::InitAsDefaultInstance();
  115. }
  116. void InitDefaultsDocument() {
  117. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  118. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsDocumentImpl);
  119. }
  120. void InitDefaultsArrayValueImpl() {
  121. GOOGLE_PROTOBUF_VERIFY_VERSION;
  122. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  123. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  124. #else
  125. ::google::protobuf::internal::InitProtobufDefaults();
  126. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  127. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  128. protobuf_google_2ftype_2flatlng_2eproto::InitDefaultsLatLng();
  129. {
  130. void* ptr = &::google::firestore::v1::_Value_default_instance_;
  131. new (ptr) ::google::firestore::v1::Value();
  132. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  133. }
  134. {
  135. void* ptr = &::google::firestore::v1::_ArrayValue_default_instance_;
  136. new (ptr) ::google::firestore::v1::ArrayValue();
  137. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  138. }
  139. {
  140. void* ptr = &::google::firestore::v1::_MapValue_FieldsEntry_DoNotUse_default_instance_;
  141. new (ptr) ::google::firestore::v1::MapValue_FieldsEntry_DoNotUse();
  142. }
  143. {
  144. void* ptr = &::google::firestore::v1::_MapValue_default_instance_;
  145. new (ptr) ::google::firestore::v1::MapValue();
  146. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  147. }
  148. ::google::firestore::v1::Value::InitAsDefaultInstance();
  149. ::google::firestore::v1::ArrayValue::InitAsDefaultInstance();
  150. ::google::firestore::v1::MapValue_FieldsEntry_DoNotUse::InitAsDefaultInstance();
  151. ::google::firestore::v1::MapValue::InitAsDefaultInstance();
  152. }
  153. void InitDefaultsArrayValue() {
  154. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  155. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsArrayValueImpl);
  156. }
  157. ::google::protobuf::Metadata file_level_metadata[6];
  158. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  159. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Document_FieldsEntry_DoNotUse, _has_bits_),
  160. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Document_FieldsEntry_DoNotUse, _internal_metadata_),
  161. ~0u, // no _extensions_
  162. ~0u, // no _oneof_case_
  163. ~0u, // no _weak_field_map_
  164. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Document_FieldsEntry_DoNotUse, key_),
  165. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Document_FieldsEntry_DoNotUse, value_),
  166. 0,
  167. 1,
  168. ~0u, // no _has_bits_
  169. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Document, _internal_metadata_),
  170. ~0u, // no _extensions_
  171. ~0u, // no _oneof_case_
  172. ~0u, // no _weak_field_map_
  173. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Document, name_),
  174. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Document, fields_),
  175. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Document, create_time_),
  176. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Document, update_time_),
  177. ~0u, // no _has_bits_
  178. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Value, _internal_metadata_),
  179. ~0u, // no _extensions_
  180. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Value, _oneof_case_[0]),
  181. ~0u, // no _weak_field_map_
  182. offsetof(::google::firestore::v1::ValueDefaultTypeInternal, null_value_),
  183. offsetof(::google::firestore::v1::ValueDefaultTypeInternal, boolean_value_),
  184. offsetof(::google::firestore::v1::ValueDefaultTypeInternal, integer_value_),
  185. offsetof(::google::firestore::v1::ValueDefaultTypeInternal, double_value_),
  186. offsetof(::google::firestore::v1::ValueDefaultTypeInternal, timestamp_value_),
  187. offsetof(::google::firestore::v1::ValueDefaultTypeInternal, string_value_),
  188. offsetof(::google::firestore::v1::ValueDefaultTypeInternal, bytes_value_),
  189. offsetof(::google::firestore::v1::ValueDefaultTypeInternal, reference_value_),
  190. offsetof(::google::firestore::v1::ValueDefaultTypeInternal, geo_point_value_),
  191. offsetof(::google::firestore::v1::ValueDefaultTypeInternal, array_value_),
  192. offsetof(::google::firestore::v1::ValueDefaultTypeInternal, map_value_),
  193. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Value, value_type_),
  194. ~0u, // no _has_bits_
  195. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ArrayValue, _internal_metadata_),
  196. ~0u, // no _extensions_
  197. ~0u, // no _oneof_case_
  198. ~0u, // no _weak_field_map_
  199. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ArrayValue, values_),
  200. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::MapValue_FieldsEntry_DoNotUse, _has_bits_),
  201. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::MapValue_FieldsEntry_DoNotUse, _internal_metadata_),
  202. ~0u, // no _extensions_
  203. ~0u, // no _oneof_case_
  204. ~0u, // no _weak_field_map_
  205. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::MapValue_FieldsEntry_DoNotUse, key_),
  206. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::MapValue_FieldsEntry_DoNotUse, value_),
  207. 0,
  208. 1,
  209. ~0u, // no _has_bits_
  210. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::MapValue, _internal_metadata_),
  211. ~0u, // no _extensions_
  212. ~0u, // no _oneof_case_
  213. ~0u, // no _weak_field_map_
  214. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::MapValue, fields_),
  215. };
  216. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  217. { 0, 7, sizeof(::google::firestore::v1::Document_FieldsEntry_DoNotUse)},
  218. { 9, -1, sizeof(::google::firestore::v1::Document)},
  219. { 18, -1, sizeof(::google::firestore::v1::Value)},
  220. { 35, -1, sizeof(::google::firestore::v1::ArrayValue)},
  221. { 41, 48, sizeof(::google::firestore::v1::MapValue_FieldsEntry_DoNotUse)},
  222. { 50, -1, sizeof(::google::firestore::v1::MapValue)},
  223. };
  224. static ::google::protobuf::Message const * const file_default_instances[] = {
  225. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_Document_FieldsEntry_DoNotUse_default_instance_),
  226. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_Document_default_instance_),
  227. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_Value_default_instance_),
  228. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_ArrayValue_default_instance_),
  229. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_MapValue_FieldsEntry_DoNotUse_default_instance_),
  230. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_MapValue_default_instance_),
  231. };
  232. void protobuf_AssignDescriptors() {
  233. AddDescriptors();
  234. ::google::protobuf::MessageFactory* factory = NULL;
  235. AssignDescriptors(
  236. "google/firestore/v1/document.proto", schemas, file_default_instances, TableStruct::offsets, factory,
  237. file_level_metadata, NULL, NULL);
  238. }
  239. void protobuf_AssignDescriptorsOnce() {
  240. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  241. ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
  242. }
  243. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  244. void protobuf_RegisterTypes(const ::std::string&) {
  245. protobuf_AssignDescriptorsOnce();
  246. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 6);
  247. }
  248. void AddDescriptorsImpl() {
  249. InitDefaults();
  250. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  251. "\n\"google/firestore/v1/document.proto\022\023go"
  252. "ogle.firestore.v1\032\034google/api/annotation"
  253. "s.proto\032\034google/protobuf/struct.proto\032\037g"
  254. "oogle/protobuf/timestamp.proto\032\030google/t"
  255. "ype/latlng.proto\"\200\002\n\010Document\022\014\n\004name\030\001 "
  256. "\001(\t\0229\n\006fields\030\002 \003(\0132).google.firestore.v"
  257. "1.Document.FieldsEntry\022/\n\013create_time\030\003 "
  258. "\001(\0132\032.google.protobuf.Timestamp\022/\n\013updat"
  259. "e_time\030\004 \001(\0132\032.google.protobuf.Timestamp"
  260. "\032I\n\013FieldsEntry\022\013\n\003key\030\001 \001(\t\022)\n\005value\030\002 "
  261. "\001(\0132\032.google.firestore.v1.Value:\0028\001\"\256\003\n\005"
  262. "Value\0220\n\nnull_value\030\013 \001(\0162\032.google.proto"
  263. "buf.NullValueH\000\022\027\n\rboolean_value\030\001 \001(\010H\000"
  264. "\022\027\n\rinteger_value\030\002 \001(\003H\000\022\026\n\014double_valu"
  265. "e\030\003 \001(\001H\000\0225\n\017timestamp_value\030\n \001(\0132\032.goo"
  266. "gle.protobuf.TimestampH\000\022\026\n\014string_value"
  267. "\030\021 \001(\tH\000\022\025\n\013bytes_value\030\022 \001(\014H\000\022\031\n\017refer"
  268. "ence_value\030\005 \001(\tH\000\022.\n\017geo_point_value\030\010 "
  269. "\001(\0132\023.google.type.LatLngH\000\0226\n\013array_valu"
  270. "e\030\t \001(\0132\037.google.firestore.v1.ArrayValue"
  271. "H\000\0222\n\tmap_value\030\006 \001(\0132\035.google.firestore"
  272. ".v1.MapValueH\000B\014\n\nvalue_type\"8\n\nArrayVal"
  273. "ue\022*\n\006values\030\001 \003(\0132\032.google.firestore.v1"
  274. ".Value\"\220\001\n\010MapValue\0229\n\006fields\030\001 \003(\0132).go"
  275. "ogle.firestore.v1.MapValue.FieldsEntry\032I"
  276. "\n\013FieldsEntry\022\013\n\003key\030\001 \001(\t\022)\n\005value\030\002 \001("
  277. "\0132\032.google.firestore.v1.Value:\0028\001B\261\001\n\027co"
  278. "m.google.firestore.v1B\rDocumentProtoP\001Z<"
  279. "google.golang.org/genproto/googleapis/fi"
  280. "restore/v1;firestore\242\002\004GCFS\252\002\036Google.Clo"
  281. "ud.Firestore.V1Beta1\312\002\036Google\\Cloud\\Fire"
  282. "store\\V1beta1b\006proto3"
  283. };
  284. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  285. descriptor, 1261);
  286. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  287. "google/firestore/v1/document.proto", &protobuf_RegisterTypes);
  288. ::protobuf_google_2fapi_2fannotations_2eproto::AddDescriptors();
  289. ::protobuf_google_2fprotobuf_2fstruct_2eproto::AddDescriptors();
  290. ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::AddDescriptors();
  291. ::protobuf_google_2ftype_2flatlng_2eproto::AddDescriptors();
  292. }
  293. void AddDescriptors() {
  294. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  295. ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
  296. }
  297. // Force AddDescriptors() to be called at dynamic initialization time.
  298. struct StaticDescriptorInitializer {
  299. StaticDescriptorInitializer() {
  300. AddDescriptors();
  301. }
  302. } static_descriptor_initializer;
  303. } // namespace protobuf_google_2ffirestore_2fv1_2fdocument_2eproto
  304. namespace google {
  305. namespace firestore {
  306. namespace v1 {
  307. // ===================================================================
  308. Document_FieldsEntry_DoNotUse::Document_FieldsEntry_DoNotUse() {}
  309. Document_FieldsEntry_DoNotUse::Document_FieldsEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  310. void Document_FieldsEntry_DoNotUse::MergeFrom(const Document_FieldsEntry_DoNotUse& other) {
  311. MergeFromInternal(other);
  312. }
  313. ::google::protobuf::Metadata Document_FieldsEntry_DoNotUse::GetMetadata() const {
  314. ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce();
  315. return ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::file_level_metadata[0];
  316. }
  317. void Document_FieldsEntry_DoNotUse::MergeFrom(
  318. const ::google::protobuf::Message& other) {
  319. ::google::protobuf::Message::MergeFrom(other);
  320. }
  321. // ===================================================================
  322. void Document::InitAsDefaultInstance() {
  323. ::google::firestore::v1::_Document_default_instance_._instance.get_mutable()->create_time_ = const_cast< ::google::protobuf::Timestamp*>(
  324. ::google::protobuf::Timestamp::internal_default_instance());
  325. ::google::firestore::v1::_Document_default_instance_._instance.get_mutable()->update_time_ = const_cast< ::google::protobuf::Timestamp*>(
  326. ::google::protobuf::Timestamp::internal_default_instance());
  327. }
  328. void Document::clear_create_time() {
  329. if (GetArenaNoVirtual() == NULL && create_time_ != NULL) {
  330. delete create_time_;
  331. }
  332. create_time_ = NULL;
  333. }
  334. void Document::clear_update_time() {
  335. if (GetArenaNoVirtual() == NULL && update_time_ != NULL) {
  336. delete update_time_;
  337. }
  338. update_time_ = NULL;
  339. }
  340. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  341. const int Document::kNameFieldNumber;
  342. const int Document::kFieldsFieldNumber;
  343. const int Document::kCreateTimeFieldNumber;
  344. const int Document::kUpdateTimeFieldNumber;
  345. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  346. Document::Document()
  347. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  348. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  349. ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsDocument();
  350. }
  351. SharedCtor();
  352. // @@protoc_insertion_point(constructor:google.firestore.v1.Document)
  353. }
  354. Document::Document(const Document& from)
  355. : ::google::protobuf::Message(),
  356. _internal_metadata_(NULL),
  357. _cached_size_(0) {
  358. _internal_metadata_.MergeFrom(from._internal_metadata_);
  359. fields_.MergeFrom(from.fields_);
  360. name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  361. if (from.name().size() > 0) {
  362. name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  363. }
  364. if (from.has_create_time()) {
  365. create_time_ = new ::google::protobuf::Timestamp(*from.create_time_);
  366. } else {
  367. create_time_ = NULL;
  368. }
  369. if (from.has_update_time()) {
  370. update_time_ = new ::google::protobuf::Timestamp(*from.update_time_);
  371. } else {
  372. update_time_ = NULL;
  373. }
  374. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.Document)
  375. }
  376. void Document::SharedCtor() {
  377. name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  378. ::memset(&create_time_, 0, static_cast<size_t>(
  379. reinterpret_cast<char*>(&update_time_) -
  380. reinterpret_cast<char*>(&create_time_)) + sizeof(update_time_));
  381. _cached_size_ = 0;
  382. }
  383. Document::~Document() {
  384. // @@protoc_insertion_point(destructor:google.firestore.v1.Document)
  385. SharedDtor();
  386. }
  387. void Document::SharedDtor() {
  388. name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  389. if (this != internal_default_instance()) delete create_time_;
  390. if (this != internal_default_instance()) delete update_time_;
  391. }
  392. void Document::SetCachedSize(int size) const {
  393. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  394. _cached_size_ = size;
  395. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  396. }
  397. const ::google::protobuf::Descriptor* Document::descriptor() {
  398. ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce();
  399. return ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  400. }
  401. const Document& Document::default_instance() {
  402. ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsDocument();
  403. return *internal_default_instance();
  404. }
  405. Document* Document::New(::google::protobuf::Arena* arena) const {
  406. Document* n = new Document;
  407. if (arena != NULL) {
  408. arena->Own(n);
  409. }
  410. return n;
  411. }
  412. void Document::Clear() {
  413. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.Document)
  414. ::google::protobuf::uint32 cached_has_bits = 0;
  415. // Prevent compiler warnings about cached_has_bits being unused
  416. (void) cached_has_bits;
  417. fields_.Clear();
  418. name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  419. if (GetArenaNoVirtual() == NULL && create_time_ != NULL) {
  420. delete create_time_;
  421. }
  422. create_time_ = NULL;
  423. if (GetArenaNoVirtual() == NULL && update_time_ != NULL) {
  424. delete update_time_;
  425. }
  426. update_time_ = NULL;
  427. _internal_metadata_.Clear();
  428. }
  429. bool Document::MergePartialFromCodedStream(
  430. ::google::protobuf::io::CodedInputStream* input) {
  431. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  432. ::google::protobuf::uint32 tag;
  433. // @@protoc_insertion_point(parse_start:google.firestore.v1.Document)
  434. for (;;) {
  435. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  436. tag = p.first;
  437. if (!p.second) goto handle_unusual;
  438. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  439. // string name = 1;
  440. case 1: {
  441. if (static_cast< ::google::protobuf::uint8>(tag) ==
  442. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  443. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  444. input, this->mutable_name()));
  445. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  446. this->name().data(), static_cast<int>(this->name().length()),
  447. ::google::protobuf::internal::WireFormatLite::PARSE,
  448. "google.firestore.v1.Document.name"));
  449. } else {
  450. goto handle_unusual;
  451. }
  452. break;
  453. }
  454. // map<string, .google.firestore.v1.Value> fields = 2;
  455. case 2: {
  456. if (static_cast< ::google::protobuf::uint8>(tag) ==
  457. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  458. Document_FieldsEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  459. Document_FieldsEntry_DoNotUse,
  460. ::std::string, ::google::firestore::v1::Value,
  461. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  462. ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
  463. 0 >,
  464. ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value > > parser(&fields_);
  465. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  466. input, &parser));
  467. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  468. parser.key().data(), static_cast<int>(parser.key().length()),
  469. ::google::protobuf::internal::WireFormatLite::PARSE,
  470. "google.firestore.v1.Document.FieldsEntry.key"));
  471. } else {
  472. goto handle_unusual;
  473. }
  474. break;
  475. }
  476. // .google.protobuf.Timestamp create_time = 3;
  477. case 3: {
  478. if (static_cast< ::google::protobuf::uint8>(tag) ==
  479. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  480. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  481. input, mutable_create_time()));
  482. } else {
  483. goto handle_unusual;
  484. }
  485. break;
  486. }
  487. // .google.protobuf.Timestamp update_time = 4;
  488. case 4: {
  489. if (static_cast< ::google::protobuf::uint8>(tag) ==
  490. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  491. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  492. input, mutable_update_time()));
  493. } else {
  494. goto handle_unusual;
  495. }
  496. break;
  497. }
  498. default: {
  499. handle_unusual:
  500. if (tag == 0) {
  501. goto success;
  502. }
  503. DO_(::google::protobuf::internal::WireFormat::SkipField(
  504. input, tag, _internal_metadata_.mutable_unknown_fields()));
  505. break;
  506. }
  507. }
  508. }
  509. success:
  510. // @@protoc_insertion_point(parse_success:google.firestore.v1.Document)
  511. return true;
  512. failure:
  513. // @@protoc_insertion_point(parse_failure:google.firestore.v1.Document)
  514. return false;
  515. #undef DO_
  516. }
  517. void Document::SerializeWithCachedSizes(
  518. ::google::protobuf::io::CodedOutputStream* output) const {
  519. // @@protoc_insertion_point(serialize_start:google.firestore.v1.Document)
  520. ::google::protobuf::uint32 cached_has_bits = 0;
  521. (void) cached_has_bits;
  522. // string name = 1;
  523. if (this->name().size() > 0) {
  524. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  525. this->name().data(), static_cast<int>(this->name().length()),
  526. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  527. "google.firestore.v1.Document.name");
  528. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  529. 1, this->name(), output);
  530. }
  531. // map<string, .google.firestore.v1.Value> fields = 2;
  532. if (!this->fields().empty()) {
  533. typedef ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_pointer
  534. ConstPtr;
  535. typedef ConstPtr SortItem;
  536. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  537. struct Utf8Check {
  538. static void Check(ConstPtr p) {
  539. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  540. p->first.data(), static_cast<int>(p->first.length()),
  541. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  542. "google.firestore.v1.Document.FieldsEntry.key");
  543. }
  544. };
  545. if (output->IsSerializationDeterministic() &&
  546. this->fields().size() > 1) {
  547. ::google::protobuf::scoped_array<SortItem> items(
  548. new SortItem[this->fields().size()]);
  549. typedef ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::size_type size_type;
  550. size_type n = 0;
  551. for (::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_iterator
  552. it = this->fields().begin();
  553. it != this->fields().end(); ++it, ++n) {
  554. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  555. }
  556. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  557. ::google::protobuf::scoped_ptr<Document_FieldsEntry_DoNotUse> entry;
  558. for (size_type i = 0; i < n; i++) {
  559. entry.reset(fields_.NewEntryWrapper(
  560. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  561. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  562. 2, *entry, output);
  563. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  564. }
  565. } else {
  566. ::google::protobuf::scoped_ptr<Document_FieldsEntry_DoNotUse> entry;
  567. for (::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_iterator
  568. it = this->fields().begin();
  569. it != this->fields().end(); ++it) {
  570. entry.reset(fields_.NewEntryWrapper(
  571. it->first, it->second));
  572. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  573. 2, *entry, output);
  574. Utf8Check::Check(&*it);
  575. }
  576. }
  577. }
  578. // .google.protobuf.Timestamp create_time = 3;
  579. if (this->has_create_time()) {
  580. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  581. 3, *this->create_time_, output);
  582. }
  583. // .google.protobuf.Timestamp update_time = 4;
  584. if (this->has_update_time()) {
  585. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  586. 4, *this->update_time_, output);
  587. }
  588. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  589. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  590. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  591. }
  592. // @@protoc_insertion_point(serialize_end:google.firestore.v1.Document)
  593. }
  594. ::google::protobuf::uint8* Document::InternalSerializeWithCachedSizesToArray(
  595. bool deterministic, ::google::protobuf::uint8* target) const {
  596. (void)deterministic; // Unused
  597. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Document)
  598. ::google::protobuf::uint32 cached_has_bits = 0;
  599. (void) cached_has_bits;
  600. // string name = 1;
  601. if (this->name().size() > 0) {
  602. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  603. this->name().data(), static_cast<int>(this->name().length()),
  604. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  605. "google.firestore.v1.Document.name");
  606. target =
  607. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  608. 1, this->name(), target);
  609. }
  610. // map<string, .google.firestore.v1.Value> fields = 2;
  611. if (!this->fields().empty()) {
  612. typedef ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_pointer
  613. ConstPtr;
  614. typedef ConstPtr SortItem;
  615. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  616. struct Utf8Check {
  617. static void Check(ConstPtr p) {
  618. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  619. p->first.data(), static_cast<int>(p->first.length()),
  620. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  621. "google.firestore.v1.Document.FieldsEntry.key");
  622. }
  623. };
  624. if (deterministic &&
  625. this->fields().size() > 1) {
  626. ::google::protobuf::scoped_array<SortItem> items(
  627. new SortItem[this->fields().size()]);
  628. typedef ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::size_type size_type;
  629. size_type n = 0;
  630. for (::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_iterator
  631. it = this->fields().begin();
  632. it != this->fields().end(); ++it, ++n) {
  633. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  634. }
  635. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  636. ::google::protobuf::scoped_ptr<Document_FieldsEntry_DoNotUse> entry;
  637. for (size_type i = 0; i < n; i++) {
  638. entry.reset(fields_.NewEntryWrapper(
  639. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  640. target = ::google::protobuf::internal::WireFormatLite::
  641. InternalWriteMessageNoVirtualToArray(
  642. 2, *entry, deterministic, target);
  643. ;
  644. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  645. }
  646. } else {
  647. ::google::protobuf::scoped_ptr<Document_FieldsEntry_DoNotUse> entry;
  648. for (::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_iterator
  649. it = this->fields().begin();
  650. it != this->fields().end(); ++it) {
  651. entry.reset(fields_.NewEntryWrapper(
  652. it->first, it->second));
  653. target = ::google::protobuf::internal::WireFormatLite::
  654. InternalWriteMessageNoVirtualToArray(
  655. 2, *entry, deterministic, target);
  656. ;
  657. Utf8Check::Check(&*it);
  658. }
  659. }
  660. }
  661. // .google.protobuf.Timestamp create_time = 3;
  662. if (this->has_create_time()) {
  663. target = ::google::protobuf::internal::WireFormatLite::
  664. InternalWriteMessageToArray(
  665. 3, *this->create_time_, deterministic, target);
  666. }
  667. // .google.protobuf.Timestamp update_time = 4;
  668. if (this->has_update_time()) {
  669. target = ::google::protobuf::internal::WireFormatLite::
  670. InternalWriteMessageToArray(
  671. 4, *this->update_time_, deterministic, target);
  672. }
  673. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  674. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  675. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  676. }
  677. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Document)
  678. return target;
  679. }
  680. size_t Document::ByteSizeLong() const {
  681. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Document)
  682. size_t total_size = 0;
  683. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  684. total_size +=
  685. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  686. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  687. }
  688. // map<string, .google.firestore.v1.Value> fields = 2;
  689. total_size += 1 *
  690. ::google::protobuf::internal::FromIntSize(this->fields_size());
  691. {
  692. ::google::protobuf::scoped_ptr<Document_FieldsEntry_DoNotUse> entry;
  693. for (::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_iterator
  694. it = this->fields().begin();
  695. it != this->fields().end(); ++it) {
  696. entry.reset(fields_.NewEntryWrapper(it->first, it->second));
  697. total_size += ::google::protobuf::internal::WireFormatLite::
  698. MessageSizeNoVirtual(*entry);
  699. }
  700. }
  701. // string name = 1;
  702. if (this->name().size() > 0) {
  703. total_size += 1 +
  704. ::google::protobuf::internal::WireFormatLite::StringSize(
  705. this->name());
  706. }
  707. // .google.protobuf.Timestamp create_time = 3;
  708. if (this->has_create_time()) {
  709. total_size += 1 +
  710. ::google::protobuf::internal::WireFormatLite::MessageSize(
  711. *this->create_time_);
  712. }
  713. // .google.protobuf.Timestamp update_time = 4;
  714. if (this->has_update_time()) {
  715. total_size += 1 +
  716. ::google::protobuf::internal::WireFormatLite::MessageSize(
  717. *this->update_time_);
  718. }
  719. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  720. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  721. _cached_size_ = cached_size;
  722. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  723. return total_size;
  724. }
  725. void Document::MergeFrom(const ::google::protobuf::Message& from) {
  726. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.Document)
  727. GOOGLE_DCHECK_NE(&from, this);
  728. const Document* source =
  729. ::google::protobuf::internal::DynamicCastToGenerated<const Document>(
  730. &from);
  731. if (source == NULL) {
  732. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.Document)
  733. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  734. } else {
  735. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.Document)
  736. MergeFrom(*source);
  737. }
  738. }
  739. void Document::MergeFrom(const Document& from) {
  740. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.Document)
  741. GOOGLE_DCHECK_NE(&from, this);
  742. _internal_metadata_.MergeFrom(from._internal_metadata_);
  743. ::google::protobuf::uint32 cached_has_bits = 0;
  744. (void) cached_has_bits;
  745. fields_.MergeFrom(from.fields_);
  746. if (from.name().size() > 0) {
  747. name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  748. }
  749. if (from.has_create_time()) {
  750. mutable_create_time()->::google::protobuf::Timestamp::MergeFrom(from.create_time());
  751. }
  752. if (from.has_update_time()) {
  753. mutable_update_time()->::google::protobuf::Timestamp::MergeFrom(from.update_time());
  754. }
  755. }
  756. void Document::CopyFrom(const ::google::protobuf::Message& from) {
  757. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.Document)
  758. if (&from == this) return;
  759. Clear();
  760. MergeFrom(from);
  761. }
  762. void Document::CopyFrom(const Document& from) {
  763. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.Document)
  764. if (&from == this) return;
  765. Clear();
  766. MergeFrom(from);
  767. }
  768. bool Document::IsInitialized() const {
  769. return true;
  770. }
  771. void Document::Swap(Document* other) {
  772. if (other == this) return;
  773. InternalSwap(other);
  774. }
  775. void Document::InternalSwap(Document* other) {
  776. using std::swap;
  777. fields_.Swap(&other->fields_);
  778. name_.Swap(&other->name_);
  779. swap(create_time_, other->create_time_);
  780. swap(update_time_, other->update_time_);
  781. _internal_metadata_.Swap(&other->_internal_metadata_);
  782. swap(_cached_size_, other->_cached_size_);
  783. }
  784. ::google::protobuf::Metadata Document::GetMetadata() const {
  785. protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce();
  786. return ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::file_level_metadata[kIndexInFileMessages];
  787. }
  788. // ===================================================================
  789. void Value::InitAsDefaultInstance() {
  790. ::google::firestore::v1::_Value_default_instance_.null_value_ = 0;
  791. ::google::firestore::v1::_Value_default_instance_.boolean_value_ = false;
  792. ::google::firestore::v1::_Value_default_instance_.integer_value_ = GOOGLE_LONGLONG(0);
  793. ::google::firestore::v1::_Value_default_instance_.double_value_ = 0;
  794. ::google::firestore::v1::_Value_default_instance_.timestamp_value_ = const_cast< ::google::protobuf::Timestamp*>(
  795. ::google::protobuf::Timestamp::internal_default_instance());
  796. ::google::firestore::v1::_Value_default_instance_.string_value_.UnsafeSetDefault(
  797. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  798. ::google::firestore::v1::_Value_default_instance_.bytes_value_.UnsafeSetDefault(
  799. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  800. ::google::firestore::v1::_Value_default_instance_.reference_value_.UnsafeSetDefault(
  801. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  802. ::google::firestore::v1::_Value_default_instance_.geo_point_value_ = const_cast< ::google::type::LatLng*>(
  803. ::google::type::LatLng::internal_default_instance());
  804. ::google::firestore::v1::_Value_default_instance_.array_value_ = const_cast< ::google::firestore::v1::ArrayValue*>(
  805. ::google::firestore::v1::ArrayValue::internal_default_instance());
  806. ::google::firestore::v1::_Value_default_instance_.map_value_ = const_cast< ::google::firestore::v1::MapValue*>(
  807. ::google::firestore::v1::MapValue::internal_default_instance());
  808. }
  809. void Value::set_allocated_timestamp_value(::google::protobuf::Timestamp* timestamp_value) {
  810. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  811. clear_value_type();
  812. if (timestamp_value) {
  813. ::google::protobuf::Arena* submessage_arena =
  814. reinterpret_cast< ::google::protobuf::MessageLite*>(timestamp_value)->GetArena();
  815. if (message_arena != submessage_arena) {
  816. timestamp_value = ::google::protobuf::internal::GetOwnedMessage(
  817. message_arena, timestamp_value, submessage_arena);
  818. }
  819. set_has_timestamp_value();
  820. value_type_.timestamp_value_ = timestamp_value;
  821. }
  822. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Value.timestamp_value)
  823. }
  824. void Value::clear_timestamp_value() {
  825. if (has_timestamp_value()) {
  826. delete value_type_.timestamp_value_;
  827. clear_has_value_type();
  828. }
  829. }
  830. void Value::set_allocated_geo_point_value(::google::type::LatLng* geo_point_value) {
  831. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  832. clear_value_type();
  833. if (geo_point_value) {
  834. ::google::protobuf::Arena* submessage_arena = NULL;
  835. if (message_arena != submessage_arena) {
  836. geo_point_value = ::google::protobuf::internal::GetOwnedMessage(
  837. message_arena, geo_point_value, submessage_arena);
  838. }
  839. set_has_geo_point_value();
  840. value_type_.geo_point_value_ = geo_point_value;
  841. }
  842. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Value.geo_point_value)
  843. }
  844. void Value::clear_geo_point_value() {
  845. if (has_geo_point_value()) {
  846. delete value_type_.geo_point_value_;
  847. clear_has_value_type();
  848. }
  849. }
  850. void Value::set_allocated_array_value(::google::firestore::v1::ArrayValue* array_value) {
  851. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  852. clear_value_type();
  853. if (array_value) {
  854. ::google::protobuf::Arena* submessage_arena = NULL;
  855. if (message_arena != submessage_arena) {
  856. array_value = ::google::protobuf::internal::GetOwnedMessage(
  857. message_arena, array_value, submessage_arena);
  858. }
  859. set_has_array_value();
  860. value_type_.array_value_ = array_value;
  861. }
  862. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Value.array_value)
  863. }
  864. void Value::set_allocated_map_value(::google::firestore::v1::MapValue* map_value) {
  865. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  866. clear_value_type();
  867. if (map_value) {
  868. ::google::protobuf::Arena* submessage_arena = NULL;
  869. if (message_arena != submessage_arena) {
  870. map_value = ::google::protobuf::internal::GetOwnedMessage(
  871. message_arena, map_value, submessage_arena);
  872. }
  873. set_has_map_value();
  874. value_type_.map_value_ = map_value;
  875. }
  876. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Value.map_value)
  877. }
  878. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  879. const int Value::kNullValueFieldNumber;
  880. const int Value::kBooleanValueFieldNumber;
  881. const int Value::kIntegerValueFieldNumber;
  882. const int Value::kDoubleValueFieldNumber;
  883. const int Value::kTimestampValueFieldNumber;
  884. const int Value::kStringValueFieldNumber;
  885. const int Value::kBytesValueFieldNumber;
  886. const int Value::kReferenceValueFieldNumber;
  887. const int Value::kGeoPointValueFieldNumber;
  888. const int Value::kArrayValueFieldNumber;
  889. const int Value::kMapValueFieldNumber;
  890. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  891. Value::Value()
  892. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  893. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  894. ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsArrayValue();
  895. }
  896. SharedCtor();
  897. // @@protoc_insertion_point(constructor:google.firestore.v1.Value)
  898. }
  899. Value::Value(const Value& from)
  900. : ::google::protobuf::Message(),
  901. _internal_metadata_(NULL),
  902. _cached_size_(0) {
  903. _internal_metadata_.MergeFrom(from._internal_metadata_);
  904. clear_has_value_type();
  905. switch (from.value_type_case()) {
  906. case kNullValue: {
  907. set_null_value(from.null_value());
  908. break;
  909. }
  910. case kBooleanValue: {
  911. set_boolean_value(from.boolean_value());
  912. break;
  913. }
  914. case kIntegerValue: {
  915. set_integer_value(from.integer_value());
  916. break;
  917. }
  918. case kDoubleValue: {
  919. set_double_value(from.double_value());
  920. break;
  921. }
  922. case kTimestampValue: {
  923. mutable_timestamp_value()->::google::protobuf::Timestamp::MergeFrom(from.timestamp_value());
  924. break;
  925. }
  926. case kStringValue: {
  927. set_string_value(from.string_value());
  928. break;
  929. }
  930. case kBytesValue: {
  931. set_bytes_value(from.bytes_value());
  932. break;
  933. }
  934. case kReferenceValue: {
  935. set_reference_value(from.reference_value());
  936. break;
  937. }
  938. case kGeoPointValue: {
  939. mutable_geo_point_value()->::google::type::LatLng::MergeFrom(from.geo_point_value());
  940. break;
  941. }
  942. case kArrayValue: {
  943. mutable_array_value()->::google::firestore::v1::ArrayValue::MergeFrom(from.array_value());
  944. break;
  945. }
  946. case kMapValue: {
  947. mutable_map_value()->::google::firestore::v1::MapValue::MergeFrom(from.map_value());
  948. break;
  949. }
  950. case VALUE_TYPE_NOT_SET: {
  951. break;
  952. }
  953. }
  954. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.Value)
  955. }
  956. void Value::SharedCtor() {
  957. clear_has_value_type();
  958. _cached_size_ = 0;
  959. }
  960. Value::~Value() {
  961. // @@protoc_insertion_point(destructor:google.firestore.v1.Value)
  962. SharedDtor();
  963. }
  964. void Value::SharedDtor() {
  965. if (has_value_type()) {
  966. clear_value_type();
  967. }
  968. }
  969. void Value::SetCachedSize(int size) const {
  970. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  971. _cached_size_ = size;
  972. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  973. }
  974. const ::google::protobuf::Descriptor* Value::descriptor() {
  975. ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce();
  976. return ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  977. }
  978. const Value& Value::default_instance() {
  979. ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsArrayValue();
  980. return *internal_default_instance();
  981. }
  982. Value* Value::New(::google::protobuf::Arena* arena) const {
  983. Value* n = new Value;
  984. if (arena != NULL) {
  985. arena->Own(n);
  986. }
  987. return n;
  988. }
  989. void Value::clear_value_type() {
  990. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.Value)
  991. switch (value_type_case()) {
  992. case kNullValue: {
  993. // No need to clear
  994. break;
  995. }
  996. case kBooleanValue: {
  997. // No need to clear
  998. break;
  999. }
  1000. case kIntegerValue: {
  1001. // No need to clear
  1002. break;
  1003. }
  1004. case kDoubleValue: {
  1005. // No need to clear
  1006. break;
  1007. }
  1008. case kTimestampValue: {
  1009. delete value_type_.timestamp_value_;
  1010. break;
  1011. }
  1012. case kStringValue: {
  1013. value_type_.string_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1014. break;
  1015. }
  1016. case kBytesValue: {
  1017. value_type_.bytes_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1018. break;
  1019. }
  1020. case kReferenceValue: {
  1021. value_type_.reference_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1022. break;
  1023. }
  1024. case kGeoPointValue: {
  1025. delete value_type_.geo_point_value_;
  1026. break;
  1027. }
  1028. case kArrayValue: {
  1029. delete value_type_.array_value_;
  1030. break;
  1031. }
  1032. case kMapValue: {
  1033. delete value_type_.map_value_;
  1034. break;
  1035. }
  1036. case VALUE_TYPE_NOT_SET: {
  1037. break;
  1038. }
  1039. }
  1040. _oneof_case_[0] = VALUE_TYPE_NOT_SET;
  1041. }
  1042. void Value::Clear() {
  1043. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.Value)
  1044. ::google::protobuf::uint32 cached_has_bits = 0;
  1045. // Prevent compiler warnings about cached_has_bits being unused
  1046. (void) cached_has_bits;
  1047. clear_value_type();
  1048. _internal_metadata_.Clear();
  1049. }
  1050. bool Value::MergePartialFromCodedStream(
  1051. ::google::protobuf::io::CodedInputStream* input) {
  1052. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1053. ::google::protobuf::uint32 tag;
  1054. // @@protoc_insertion_point(parse_start:google.firestore.v1.Value)
  1055. for (;;) {
  1056. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
  1057. tag = p.first;
  1058. if (!p.second) goto handle_unusual;
  1059. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1060. // bool boolean_value = 1;
  1061. case 1: {
  1062. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1063. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  1064. clear_value_type();
  1065. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1066. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  1067. input, &value_type_.boolean_value_)));
  1068. set_has_boolean_value();
  1069. } else {
  1070. goto handle_unusual;
  1071. }
  1072. break;
  1073. }
  1074. // int64 integer_value = 2;
  1075. case 2: {
  1076. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1077. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  1078. clear_value_type();
  1079. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1080. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  1081. input, &value_type_.integer_value_)));
  1082. set_has_integer_value();
  1083. } else {
  1084. goto handle_unusual;
  1085. }
  1086. break;
  1087. }
  1088. // double double_value = 3;
  1089. case 3: {
  1090. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1091. static_cast< ::google::protobuf::uint8>(25u /* 25 & 0xFF */)) {
  1092. clear_value_type();
  1093. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1094. double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
  1095. input, &value_type_.double_value_)));
  1096. set_has_double_value();
  1097. } else {
  1098. goto handle_unusual;
  1099. }
  1100. break;
  1101. }
  1102. // string reference_value = 5;
  1103. case 5: {
  1104. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1105. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  1106. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1107. input, this->mutable_reference_value()));
  1108. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1109. this->reference_value().data(), static_cast<int>(this->reference_value().length()),
  1110. ::google::protobuf::internal::WireFormatLite::PARSE,
  1111. "google.firestore.v1.Value.reference_value"));
  1112. } else {
  1113. goto handle_unusual;
  1114. }
  1115. break;
  1116. }
  1117. // .google.firestore.v1.MapValue map_value = 6;
  1118. case 6: {
  1119. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1120. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  1121. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1122. input, mutable_map_value()));
  1123. } else {
  1124. goto handle_unusual;
  1125. }
  1126. break;
  1127. }
  1128. // .google.type.LatLng geo_point_value = 8;
  1129. case 8: {
  1130. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1131. static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
  1132. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1133. input, mutable_geo_point_value()));
  1134. } else {
  1135. goto handle_unusual;
  1136. }
  1137. break;
  1138. }
  1139. // .google.firestore.v1.ArrayValue array_value = 9;
  1140. case 9: {
  1141. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1142. static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) {
  1143. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1144. input, mutable_array_value()));
  1145. } else {
  1146. goto handle_unusual;
  1147. }
  1148. break;
  1149. }
  1150. // .google.protobuf.Timestamp timestamp_value = 10;
  1151. case 10: {
  1152. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1153. static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) {
  1154. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1155. input, mutable_timestamp_value()));
  1156. } else {
  1157. goto handle_unusual;
  1158. }
  1159. break;
  1160. }
  1161. // .google.protobuf.NullValue null_value = 11;
  1162. case 11: {
  1163. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1164. static_cast< ::google::protobuf::uint8>(88u /* 88 & 0xFF */)) {
  1165. int value;
  1166. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1167. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  1168. input, &value)));
  1169. set_null_value(static_cast< ::google::protobuf::NullValue >(value));
  1170. } else {
  1171. goto handle_unusual;
  1172. }
  1173. break;
  1174. }
  1175. // string string_value = 17;
  1176. case 17: {
  1177. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1178. static_cast< ::google::protobuf::uint8>(138u /* 138 & 0xFF */)) {
  1179. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1180. input, this->mutable_string_value()));
  1181. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1182. this->string_value().data(), static_cast<int>(this->string_value().length()),
  1183. ::google::protobuf::internal::WireFormatLite::PARSE,
  1184. "google.firestore.v1.Value.string_value"));
  1185. } else {
  1186. goto handle_unusual;
  1187. }
  1188. break;
  1189. }
  1190. // bytes bytes_value = 18;
  1191. case 18: {
  1192. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1193. static_cast< ::google::protobuf::uint8>(146u /* 146 & 0xFF */)) {
  1194. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  1195. input, this->mutable_bytes_value()));
  1196. } else {
  1197. goto handle_unusual;
  1198. }
  1199. break;
  1200. }
  1201. default: {
  1202. handle_unusual:
  1203. if (tag == 0) {
  1204. goto success;
  1205. }
  1206. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1207. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1208. break;
  1209. }
  1210. }
  1211. }
  1212. success:
  1213. // @@protoc_insertion_point(parse_success:google.firestore.v1.Value)
  1214. return true;
  1215. failure:
  1216. // @@protoc_insertion_point(parse_failure:google.firestore.v1.Value)
  1217. return false;
  1218. #undef DO_
  1219. }
  1220. void Value::SerializeWithCachedSizes(
  1221. ::google::protobuf::io::CodedOutputStream* output) const {
  1222. // @@protoc_insertion_point(serialize_start:google.firestore.v1.Value)
  1223. ::google::protobuf::uint32 cached_has_bits = 0;
  1224. (void) cached_has_bits;
  1225. // bool boolean_value = 1;
  1226. if (has_boolean_value()) {
  1227. ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->boolean_value(), output);
  1228. }
  1229. // int64 integer_value = 2;
  1230. if (has_integer_value()) {
  1231. ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->integer_value(), output);
  1232. }
  1233. // double double_value = 3;
  1234. if (has_double_value()) {
  1235. ::google::protobuf::internal::WireFormatLite::WriteDouble(3, this->double_value(), output);
  1236. }
  1237. // string reference_value = 5;
  1238. if (has_reference_value()) {
  1239. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1240. this->reference_value().data(), static_cast<int>(this->reference_value().length()),
  1241. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1242. "google.firestore.v1.Value.reference_value");
  1243. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  1244. 5, this->reference_value(), output);
  1245. }
  1246. // .google.firestore.v1.MapValue map_value = 6;
  1247. if (has_map_value()) {
  1248. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1249. 6, *value_type_.map_value_, output);
  1250. }
  1251. // .google.type.LatLng geo_point_value = 8;
  1252. if (has_geo_point_value()) {
  1253. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1254. 8, *value_type_.geo_point_value_, output);
  1255. }
  1256. // .google.firestore.v1.ArrayValue array_value = 9;
  1257. if (has_array_value()) {
  1258. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1259. 9, *value_type_.array_value_, output);
  1260. }
  1261. // .google.protobuf.Timestamp timestamp_value = 10;
  1262. if (has_timestamp_value()) {
  1263. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1264. 10, *value_type_.timestamp_value_, output);
  1265. }
  1266. // .google.protobuf.NullValue null_value = 11;
  1267. if (has_null_value()) {
  1268. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  1269. 11, this->null_value(), output);
  1270. }
  1271. // string string_value = 17;
  1272. if (has_string_value()) {
  1273. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1274. this->string_value().data(), static_cast<int>(this->string_value().length()),
  1275. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1276. "google.firestore.v1.Value.string_value");
  1277. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  1278. 17, this->string_value(), output);
  1279. }
  1280. // bytes bytes_value = 18;
  1281. if (has_bytes_value()) {
  1282. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  1283. 18, this->bytes_value(), output);
  1284. }
  1285. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1286. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1287. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1288. }
  1289. // @@protoc_insertion_point(serialize_end:google.firestore.v1.Value)
  1290. }
  1291. ::google::protobuf::uint8* Value::InternalSerializeWithCachedSizesToArray(
  1292. bool deterministic, ::google::protobuf::uint8* target) const {
  1293. (void)deterministic; // Unused
  1294. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Value)
  1295. ::google::protobuf::uint32 cached_has_bits = 0;
  1296. (void) cached_has_bits;
  1297. // bool boolean_value = 1;
  1298. if (has_boolean_value()) {
  1299. target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->boolean_value(), target);
  1300. }
  1301. // int64 integer_value = 2;
  1302. if (has_integer_value()) {
  1303. target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->integer_value(), target);
  1304. }
  1305. // double double_value = 3;
  1306. if (has_double_value()) {
  1307. target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(3, this->double_value(), target);
  1308. }
  1309. // string reference_value = 5;
  1310. if (has_reference_value()) {
  1311. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1312. this->reference_value().data(), static_cast<int>(this->reference_value().length()),
  1313. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1314. "google.firestore.v1.Value.reference_value");
  1315. target =
  1316. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  1317. 5, this->reference_value(), target);
  1318. }
  1319. // .google.firestore.v1.MapValue map_value = 6;
  1320. if (has_map_value()) {
  1321. target = ::google::protobuf::internal::WireFormatLite::
  1322. InternalWriteMessageToArray(
  1323. 6, *value_type_.map_value_, deterministic, target);
  1324. }
  1325. // .google.type.LatLng geo_point_value = 8;
  1326. if (has_geo_point_value()) {
  1327. target = ::google::protobuf::internal::WireFormatLite::
  1328. InternalWriteMessageToArray(
  1329. 8, *value_type_.geo_point_value_, deterministic, target);
  1330. }
  1331. // .google.firestore.v1.ArrayValue array_value = 9;
  1332. if (has_array_value()) {
  1333. target = ::google::protobuf::internal::WireFormatLite::
  1334. InternalWriteMessageToArray(
  1335. 9, *value_type_.array_value_, deterministic, target);
  1336. }
  1337. // .google.protobuf.Timestamp timestamp_value = 10;
  1338. if (has_timestamp_value()) {
  1339. target = ::google::protobuf::internal::WireFormatLite::
  1340. InternalWriteMessageToArray(
  1341. 10, *value_type_.timestamp_value_, deterministic, target);
  1342. }
  1343. // .google.protobuf.NullValue null_value = 11;
  1344. if (has_null_value()) {
  1345. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  1346. 11, this->null_value(), target);
  1347. }
  1348. // string string_value = 17;
  1349. if (has_string_value()) {
  1350. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1351. this->string_value().data(), static_cast<int>(this->string_value().length()),
  1352. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1353. "google.firestore.v1.Value.string_value");
  1354. target =
  1355. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  1356. 17, this->string_value(), target);
  1357. }
  1358. // bytes bytes_value = 18;
  1359. if (has_bytes_value()) {
  1360. target =
  1361. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  1362. 18, this->bytes_value(), target);
  1363. }
  1364. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1365. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1366. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1367. }
  1368. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Value)
  1369. return target;
  1370. }
  1371. size_t Value::ByteSizeLong() const {
  1372. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Value)
  1373. size_t total_size = 0;
  1374. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1375. total_size +=
  1376. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1377. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1378. }
  1379. switch (value_type_case()) {
  1380. // .google.protobuf.NullValue null_value = 11;
  1381. case kNullValue: {
  1382. total_size += 1 +
  1383. ::google::protobuf::internal::WireFormatLite::EnumSize(this->null_value());
  1384. break;
  1385. }
  1386. // bool boolean_value = 1;
  1387. case kBooleanValue: {
  1388. total_size += 1 + 1;
  1389. break;
  1390. }
  1391. // int64 integer_value = 2;
  1392. case kIntegerValue: {
  1393. total_size += 1 +
  1394. ::google::protobuf::internal::WireFormatLite::Int64Size(
  1395. this->integer_value());
  1396. break;
  1397. }
  1398. // double double_value = 3;
  1399. case kDoubleValue: {
  1400. total_size += 1 + 8;
  1401. break;
  1402. }
  1403. // .google.protobuf.Timestamp timestamp_value = 10;
  1404. case kTimestampValue: {
  1405. total_size += 1 +
  1406. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1407. *value_type_.timestamp_value_);
  1408. break;
  1409. }
  1410. // string string_value = 17;
  1411. case kStringValue: {
  1412. total_size += 2 +
  1413. ::google::protobuf::internal::WireFormatLite::StringSize(
  1414. this->string_value());
  1415. break;
  1416. }
  1417. // bytes bytes_value = 18;
  1418. case kBytesValue: {
  1419. total_size += 2 +
  1420. ::google::protobuf::internal::WireFormatLite::BytesSize(
  1421. this->bytes_value());
  1422. break;
  1423. }
  1424. // string reference_value = 5;
  1425. case kReferenceValue: {
  1426. total_size += 1 +
  1427. ::google::protobuf::internal::WireFormatLite::StringSize(
  1428. this->reference_value());
  1429. break;
  1430. }
  1431. // .google.type.LatLng geo_point_value = 8;
  1432. case kGeoPointValue: {
  1433. total_size += 1 +
  1434. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1435. *value_type_.geo_point_value_);
  1436. break;
  1437. }
  1438. // .google.firestore.v1.ArrayValue array_value = 9;
  1439. case kArrayValue: {
  1440. total_size += 1 +
  1441. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1442. *value_type_.array_value_);
  1443. break;
  1444. }
  1445. // .google.firestore.v1.MapValue map_value = 6;
  1446. case kMapValue: {
  1447. total_size += 1 +
  1448. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1449. *value_type_.map_value_);
  1450. break;
  1451. }
  1452. case VALUE_TYPE_NOT_SET: {
  1453. break;
  1454. }
  1455. }
  1456. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1457. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1458. _cached_size_ = cached_size;
  1459. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1460. return total_size;
  1461. }
  1462. void Value::MergeFrom(const ::google::protobuf::Message& from) {
  1463. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.Value)
  1464. GOOGLE_DCHECK_NE(&from, this);
  1465. const Value* source =
  1466. ::google::protobuf::internal::DynamicCastToGenerated<const Value>(
  1467. &from);
  1468. if (source == NULL) {
  1469. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.Value)
  1470. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1471. } else {
  1472. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.Value)
  1473. MergeFrom(*source);
  1474. }
  1475. }
  1476. void Value::MergeFrom(const Value& from) {
  1477. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.Value)
  1478. GOOGLE_DCHECK_NE(&from, this);
  1479. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1480. ::google::protobuf::uint32 cached_has_bits = 0;
  1481. (void) cached_has_bits;
  1482. switch (from.value_type_case()) {
  1483. case kNullValue: {
  1484. set_null_value(from.null_value());
  1485. break;
  1486. }
  1487. case kBooleanValue: {
  1488. set_boolean_value(from.boolean_value());
  1489. break;
  1490. }
  1491. case kIntegerValue: {
  1492. set_integer_value(from.integer_value());
  1493. break;
  1494. }
  1495. case kDoubleValue: {
  1496. set_double_value(from.double_value());
  1497. break;
  1498. }
  1499. case kTimestampValue: {
  1500. mutable_timestamp_value()->::google::protobuf::Timestamp::MergeFrom(from.timestamp_value());
  1501. break;
  1502. }
  1503. case kStringValue: {
  1504. set_string_value(from.string_value());
  1505. break;
  1506. }
  1507. case kBytesValue: {
  1508. set_bytes_value(from.bytes_value());
  1509. break;
  1510. }
  1511. case kReferenceValue: {
  1512. set_reference_value(from.reference_value());
  1513. break;
  1514. }
  1515. case kGeoPointValue: {
  1516. mutable_geo_point_value()->::google::type::LatLng::MergeFrom(from.geo_point_value());
  1517. break;
  1518. }
  1519. case kArrayValue: {
  1520. mutable_array_value()->::google::firestore::v1::ArrayValue::MergeFrom(from.array_value());
  1521. break;
  1522. }
  1523. case kMapValue: {
  1524. mutable_map_value()->::google::firestore::v1::MapValue::MergeFrom(from.map_value());
  1525. break;
  1526. }
  1527. case VALUE_TYPE_NOT_SET: {
  1528. break;
  1529. }
  1530. }
  1531. }
  1532. void Value::CopyFrom(const ::google::protobuf::Message& from) {
  1533. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.Value)
  1534. if (&from == this) return;
  1535. Clear();
  1536. MergeFrom(from);
  1537. }
  1538. void Value::CopyFrom(const Value& from) {
  1539. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.Value)
  1540. if (&from == this) return;
  1541. Clear();
  1542. MergeFrom(from);
  1543. }
  1544. bool Value::IsInitialized() const {
  1545. return true;
  1546. }
  1547. void Value::Swap(Value* other) {
  1548. if (other == this) return;
  1549. InternalSwap(other);
  1550. }
  1551. void Value::InternalSwap(Value* other) {
  1552. using std::swap;
  1553. swap(value_type_, other->value_type_);
  1554. swap(_oneof_case_[0], other->_oneof_case_[0]);
  1555. _internal_metadata_.Swap(&other->_internal_metadata_);
  1556. swap(_cached_size_, other->_cached_size_);
  1557. }
  1558. ::google::protobuf::Metadata Value::GetMetadata() const {
  1559. protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce();
  1560. return ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::file_level_metadata[kIndexInFileMessages];
  1561. }
  1562. // ===================================================================
  1563. void ArrayValue::InitAsDefaultInstance() {
  1564. }
  1565. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1566. const int ArrayValue::kValuesFieldNumber;
  1567. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1568. ArrayValue::ArrayValue()
  1569. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1570. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  1571. ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsArrayValue();
  1572. }
  1573. SharedCtor();
  1574. // @@protoc_insertion_point(constructor:google.firestore.v1.ArrayValue)
  1575. }
  1576. ArrayValue::ArrayValue(const ArrayValue& from)
  1577. : ::google::protobuf::Message(),
  1578. _internal_metadata_(NULL),
  1579. values_(from.values_),
  1580. _cached_size_(0) {
  1581. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1582. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ArrayValue)
  1583. }
  1584. void ArrayValue::SharedCtor() {
  1585. _cached_size_ = 0;
  1586. }
  1587. ArrayValue::~ArrayValue() {
  1588. // @@protoc_insertion_point(destructor:google.firestore.v1.ArrayValue)
  1589. SharedDtor();
  1590. }
  1591. void ArrayValue::SharedDtor() {
  1592. }
  1593. void ArrayValue::SetCachedSize(int size) const {
  1594. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1595. _cached_size_ = size;
  1596. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1597. }
  1598. const ::google::protobuf::Descriptor* ArrayValue::descriptor() {
  1599. ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce();
  1600. return ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1601. }
  1602. const ArrayValue& ArrayValue::default_instance() {
  1603. ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsArrayValue();
  1604. return *internal_default_instance();
  1605. }
  1606. ArrayValue* ArrayValue::New(::google::protobuf::Arena* arena) const {
  1607. ArrayValue* n = new ArrayValue;
  1608. if (arena != NULL) {
  1609. arena->Own(n);
  1610. }
  1611. return n;
  1612. }
  1613. void ArrayValue::Clear() {
  1614. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.ArrayValue)
  1615. ::google::protobuf::uint32 cached_has_bits = 0;
  1616. // Prevent compiler warnings about cached_has_bits being unused
  1617. (void) cached_has_bits;
  1618. values_.Clear();
  1619. _internal_metadata_.Clear();
  1620. }
  1621. bool ArrayValue::MergePartialFromCodedStream(
  1622. ::google::protobuf::io::CodedInputStream* input) {
  1623. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1624. ::google::protobuf::uint32 tag;
  1625. // @@protoc_insertion_point(parse_start:google.firestore.v1.ArrayValue)
  1626. for (;;) {
  1627. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1628. tag = p.first;
  1629. if (!p.second) goto handle_unusual;
  1630. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1631. // repeated .google.firestore.v1.Value values = 1;
  1632. case 1: {
  1633. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1634. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1635. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_values()));
  1636. } else {
  1637. goto handle_unusual;
  1638. }
  1639. break;
  1640. }
  1641. default: {
  1642. handle_unusual:
  1643. if (tag == 0) {
  1644. goto success;
  1645. }
  1646. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1647. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1648. break;
  1649. }
  1650. }
  1651. }
  1652. success:
  1653. // @@protoc_insertion_point(parse_success:google.firestore.v1.ArrayValue)
  1654. return true;
  1655. failure:
  1656. // @@protoc_insertion_point(parse_failure:google.firestore.v1.ArrayValue)
  1657. return false;
  1658. #undef DO_
  1659. }
  1660. void ArrayValue::SerializeWithCachedSizes(
  1661. ::google::protobuf::io::CodedOutputStream* output) const {
  1662. // @@protoc_insertion_point(serialize_start:google.firestore.v1.ArrayValue)
  1663. ::google::protobuf::uint32 cached_has_bits = 0;
  1664. (void) cached_has_bits;
  1665. // repeated .google.firestore.v1.Value values = 1;
  1666. for (unsigned int i = 0,
  1667. n = static_cast<unsigned int>(this->values_size()); i < n; i++) {
  1668. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1669. 1, this->values(static_cast<int>(i)), output);
  1670. }
  1671. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1672. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1673. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1674. }
  1675. // @@protoc_insertion_point(serialize_end:google.firestore.v1.ArrayValue)
  1676. }
  1677. ::google::protobuf::uint8* ArrayValue::InternalSerializeWithCachedSizesToArray(
  1678. bool deterministic, ::google::protobuf::uint8* target) const {
  1679. (void)deterministic; // Unused
  1680. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ArrayValue)
  1681. ::google::protobuf::uint32 cached_has_bits = 0;
  1682. (void) cached_has_bits;
  1683. // repeated .google.firestore.v1.Value values = 1;
  1684. for (unsigned int i = 0,
  1685. n = static_cast<unsigned int>(this->values_size()); i < n; i++) {
  1686. target = ::google::protobuf::internal::WireFormatLite::
  1687. InternalWriteMessageToArray(
  1688. 1, this->values(static_cast<int>(i)), deterministic, target);
  1689. }
  1690. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1691. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1692. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1693. }
  1694. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ArrayValue)
  1695. return target;
  1696. }
  1697. size_t ArrayValue::ByteSizeLong() const {
  1698. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ArrayValue)
  1699. size_t total_size = 0;
  1700. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1701. total_size +=
  1702. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1703. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1704. }
  1705. // repeated .google.firestore.v1.Value values = 1;
  1706. {
  1707. unsigned int count = static_cast<unsigned int>(this->values_size());
  1708. total_size += 1UL * count;
  1709. for (unsigned int i = 0; i < count; i++) {
  1710. total_size +=
  1711. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1712. this->values(static_cast<int>(i)));
  1713. }
  1714. }
  1715. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1716. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1717. _cached_size_ = cached_size;
  1718. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1719. return total_size;
  1720. }
  1721. void ArrayValue::MergeFrom(const ::google::protobuf::Message& from) {
  1722. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ArrayValue)
  1723. GOOGLE_DCHECK_NE(&from, this);
  1724. const ArrayValue* source =
  1725. ::google::protobuf::internal::DynamicCastToGenerated<const ArrayValue>(
  1726. &from);
  1727. if (source == NULL) {
  1728. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ArrayValue)
  1729. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1730. } else {
  1731. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ArrayValue)
  1732. MergeFrom(*source);
  1733. }
  1734. }
  1735. void ArrayValue::MergeFrom(const ArrayValue& from) {
  1736. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ArrayValue)
  1737. GOOGLE_DCHECK_NE(&from, this);
  1738. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1739. ::google::protobuf::uint32 cached_has_bits = 0;
  1740. (void) cached_has_bits;
  1741. values_.MergeFrom(from.values_);
  1742. }
  1743. void ArrayValue::CopyFrom(const ::google::protobuf::Message& from) {
  1744. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ArrayValue)
  1745. if (&from == this) return;
  1746. Clear();
  1747. MergeFrom(from);
  1748. }
  1749. void ArrayValue::CopyFrom(const ArrayValue& from) {
  1750. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ArrayValue)
  1751. if (&from == this) return;
  1752. Clear();
  1753. MergeFrom(from);
  1754. }
  1755. bool ArrayValue::IsInitialized() const {
  1756. return true;
  1757. }
  1758. void ArrayValue::Swap(ArrayValue* other) {
  1759. if (other == this) return;
  1760. InternalSwap(other);
  1761. }
  1762. void ArrayValue::InternalSwap(ArrayValue* other) {
  1763. using std::swap;
  1764. values_.InternalSwap(&other->values_);
  1765. _internal_metadata_.Swap(&other->_internal_metadata_);
  1766. swap(_cached_size_, other->_cached_size_);
  1767. }
  1768. ::google::protobuf::Metadata ArrayValue::GetMetadata() const {
  1769. protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce();
  1770. return ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::file_level_metadata[kIndexInFileMessages];
  1771. }
  1772. // ===================================================================
  1773. MapValue_FieldsEntry_DoNotUse::MapValue_FieldsEntry_DoNotUse() {}
  1774. MapValue_FieldsEntry_DoNotUse::MapValue_FieldsEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
  1775. void MapValue_FieldsEntry_DoNotUse::MergeFrom(const MapValue_FieldsEntry_DoNotUse& other) {
  1776. MergeFromInternal(other);
  1777. }
  1778. ::google::protobuf::Metadata MapValue_FieldsEntry_DoNotUse::GetMetadata() const {
  1779. ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce();
  1780. return ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::file_level_metadata[4];
  1781. }
  1782. void MapValue_FieldsEntry_DoNotUse::MergeFrom(
  1783. const ::google::protobuf::Message& other) {
  1784. ::google::protobuf::Message::MergeFrom(other);
  1785. }
  1786. // ===================================================================
  1787. void MapValue::InitAsDefaultInstance() {
  1788. }
  1789. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1790. const int MapValue::kFieldsFieldNumber;
  1791. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1792. MapValue::MapValue()
  1793. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1794. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  1795. ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsArrayValue();
  1796. }
  1797. SharedCtor();
  1798. // @@protoc_insertion_point(constructor:google.firestore.v1.MapValue)
  1799. }
  1800. MapValue::MapValue(const MapValue& from)
  1801. : ::google::protobuf::Message(),
  1802. _internal_metadata_(NULL),
  1803. _cached_size_(0) {
  1804. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1805. fields_.MergeFrom(from.fields_);
  1806. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.MapValue)
  1807. }
  1808. void MapValue::SharedCtor() {
  1809. _cached_size_ = 0;
  1810. }
  1811. MapValue::~MapValue() {
  1812. // @@protoc_insertion_point(destructor:google.firestore.v1.MapValue)
  1813. SharedDtor();
  1814. }
  1815. void MapValue::SharedDtor() {
  1816. }
  1817. void MapValue::SetCachedSize(int size) const {
  1818. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1819. _cached_size_ = size;
  1820. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1821. }
  1822. const ::google::protobuf::Descriptor* MapValue::descriptor() {
  1823. ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce();
  1824. return ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1825. }
  1826. const MapValue& MapValue::default_instance() {
  1827. ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsArrayValue();
  1828. return *internal_default_instance();
  1829. }
  1830. MapValue* MapValue::New(::google::protobuf::Arena* arena) const {
  1831. MapValue* n = new MapValue;
  1832. if (arena != NULL) {
  1833. arena->Own(n);
  1834. }
  1835. return n;
  1836. }
  1837. void MapValue::Clear() {
  1838. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.MapValue)
  1839. ::google::protobuf::uint32 cached_has_bits = 0;
  1840. // Prevent compiler warnings about cached_has_bits being unused
  1841. (void) cached_has_bits;
  1842. fields_.Clear();
  1843. _internal_metadata_.Clear();
  1844. }
  1845. bool MapValue::MergePartialFromCodedStream(
  1846. ::google::protobuf::io::CodedInputStream* input) {
  1847. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1848. ::google::protobuf::uint32 tag;
  1849. // @@protoc_insertion_point(parse_start:google.firestore.v1.MapValue)
  1850. for (;;) {
  1851. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1852. tag = p.first;
  1853. if (!p.second) goto handle_unusual;
  1854. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1855. // map<string, .google.firestore.v1.Value> fields = 1;
  1856. case 1: {
  1857. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1858. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1859. MapValue_FieldsEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
  1860. MapValue_FieldsEntry_DoNotUse,
  1861. ::std::string, ::google::firestore::v1::Value,
  1862. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  1863. ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
  1864. 0 >,
  1865. ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value > > parser(&fields_);
  1866. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  1867. input, &parser));
  1868. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1869. parser.key().data(), static_cast<int>(parser.key().length()),
  1870. ::google::protobuf::internal::WireFormatLite::PARSE,
  1871. "google.firestore.v1.MapValue.FieldsEntry.key"));
  1872. } else {
  1873. goto handle_unusual;
  1874. }
  1875. break;
  1876. }
  1877. default: {
  1878. handle_unusual:
  1879. if (tag == 0) {
  1880. goto success;
  1881. }
  1882. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1883. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1884. break;
  1885. }
  1886. }
  1887. }
  1888. success:
  1889. // @@protoc_insertion_point(parse_success:google.firestore.v1.MapValue)
  1890. return true;
  1891. failure:
  1892. // @@protoc_insertion_point(parse_failure:google.firestore.v1.MapValue)
  1893. return false;
  1894. #undef DO_
  1895. }
  1896. void MapValue::SerializeWithCachedSizes(
  1897. ::google::protobuf::io::CodedOutputStream* output) const {
  1898. // @@protoc_insertion_point(serialize_start:google.firestore.v1.MapValue)
  1899. ::google::protobuf::uint32 cached_has_bits = 0;
  1900. (void) cached_has_bits;
  1901. // map<string, .google.firestore.v1.Value> fields = 1;
  1902. if (!this->fields().empty()) {
  1903. typedef ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_pointer
  1904. ConstPtr;
  1905. typedef ConstPtr SortItem;
  1906. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  1907. struct Utf8Check {
  1908. static void Check(ConstPtr p) {
  1909. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1910. p->first.data(), static_cast<int>(p->first.length()),
  1911. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1912. "google.firestore.v1.MapValue.FieldsEntry.key");
  1913. }
  1914. };
  1915. if (output->IsSerializationDeterministic() &&
  1916. this->fields().size() > 1) {
  1917. ::google::protobuf::scoped_array<SortItem> items(
  1918. new SortItem[this->fields().size()]);
  1919. typedef ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::size_type size_type;
  1920. size_type n = 0;
  1921. for (::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_iterator
  1922. it = this->fields().begin();
  1923. it != this->fields().end(); ++it, ++n) {
  1924. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  1925. }
  1926. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  1927. ::google::protobuf::scoped_ptr<MapValue_FieldsEntry_DoNotUse> entry;
  1928. for (size_type i = 0; i < n; i++) {
  1929. entry.reset(fields_.NewEntryWrapper(
  1930. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  1931. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1932. 1, *entry, output);
  1933. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  1934. }
  1935. } else {
  1936. ::google::protobuf::scoped_ptr<MapValue_FieldsEntry_DoNotUse> entry;
  1937. for (::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_iterator
  1938. it = this->fields().begin();
  1939. it != this->fields().end(); ++it) {
  1940. entry.reset(fields_.NewEntryWrapper(
  1941. it->first, it->second));
  1942. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1943. 1, *entry, output);
  1944. Utf8Check::Check(&*it);
  1945. }
  1946. }
  1947. }
  1948. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1949. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1950. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1951. }
  1952. // @@protoc_insertion_point(serialize_end:google.firestore.v1.MapValue)
  1953. }
  1954. ::google::protobuf::uint8* MapValue::InternalSerializeWithCachedSizesToArray(
  1955. bool deterministic, ::google::protobuf::uint8* target) const {
  1956. (void)deterministic; // Unused
  1957. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.MapValue)
  1958. ::google::protobuf::uint32 cached_has_bits = 0;
  1959. (void) cached_has_bits;
  1960. // map<string, .google.firestore.v1.Value> fields = 1;
  1961. if (!this->fields().empty()) {
  1962. typedef ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_pointer
  1963. ConstPtr;
  1964. typedef ConstPtr SortItem;
  1965. typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
  1966. struct Utf8Check {
  1967. static void Check(ConstPtr p) {
  1968. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1969. p->first.data(), static_cast<int>(p->first.length()),
  1970. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1971. "google.firestore.v1.MapValue.FieldsEntry.key");
  1972. }
  1973. };
  1974. if (deterministic &&
  1975. this->fields().size() > 1) {
  1976. ::google::protobuf::scoped_array<SortItem> items(
  1977. new SortItem[this->fields().size()]);
  1978. typedef ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::size_type size_type;
  1979. size_type n = 0;
  1980. for (::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_iterator
  1981. it = this->fields().begin();
  1982. it != this->fields().end(); ++it, ++n) {
  1983. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  1984. }
  1985. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  1986. ::google::protobuf::scoped_ptr<MapValue_FieldsEntry_DoNotUse> entry;
  1987. for (size_type i = 0; i < n; i++) {
  1988. entry.reset(fields_.NewEntryWrapper(
  1989. items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
  1990. target = ::google::protobuf::internal::WireFormatLite::
  1991. InternalWriteMessageNoVirtualToArray(
  1992. 1, *entry, deterministic, target);
  1993. ;
  1994. Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
  1995. }
  1996. } else {
  1997. ::google::protobuf::scoped_ptr<MapValue_FieldsEntry_DoNotUse> entry;
  1998. for (::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_iterator
  1999. it = this->fields().begin();
  2000. it != this->fields().end(); ++it) {
  2001. entry.reset(fields_.NewEntryWrapper(
  2002. it->first, it->second));
  2003. target = ::google::protobuf::internal::WireFormatLite::
  2004. InternalWriteMessageNoVirtualToArray(
  2005. 1, *entry, deterministic, target);
  2006. ;
  2007. Utf8Check::Check(&*it);
  2008. }
  2009. }
  2010. }
  2011. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2012. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2013. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2014. }
  2015. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.MapValue)
  2016. return target;
  2017. }
  2018. size_t MapValue::ByteSizeLong() const {
  2019. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.MapValue)
  2020. size_t total_size = 0;
  2021. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2022. total_size +=
  2023. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2024. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2025. }
  2026. // map<string, .google.firestore.v1.Value> fields = 1;
  2027. total_size += 1 *
  2028. ::google::protobuf::internal::FromIntSize(this->fields_size());
  2029. {
  2030. ::google::protobuf::scoped_ptr<MapValue_FieldsEntry_DoNotUse> entry;
  2031. for (::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_iterator
  2032. it = this->fields().begin();
  2033. it != this->fields().end(); ++it) {
  2034. entry.reset(fields_.NewEntryWrapper(it->first, it->second));
  2035. total_size += ::google::protobuf::internal::WireFormatLite::
  2036. MessageSizeNoVirtual(*entry);
  2037. }
  2038. }
  2039. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2040. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2041. _cached_size_ = cached_size;
  2042. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2043. return total_size;
  2044. }
  2045. void MapValue::MergeFrom(const ::google::protobuf::Message& from) {
  2046. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.MapValue)
  2047. GOOGLE_DCHECK_NE(&from, this);
  2048. const MapValue* source =
  2049. ::google::protobuf::internal::DynamicCastToGenerated<const MapValue>(
  2050. &from);
  2051. if (source == NULL) {
  2052. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.MapValue)
  2053. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2054. } else {
  2055. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.MapValue)
  2056. MergeFrom(*source);
  2057. }
  2058. }
  2059. void MapValue::MergeFrom(const MapValue& from) {
  2060. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.MapValue)
  2061. GOOGLE_DCHECK_NE(&from, this);
  2062. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2063. ::google::protobuf::uint32 cached_has_bits = 0;
  2064. (void) cached_has_bits;
  2065. fields_.MergeFrom(from.fields_);
  2066. }
  2067. void MapValue::CopyFrom(const ::google::protobuf::Message& from) {
  2068. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.MapValue)
  2069. if (&from == this) return;
  2070. Clear();
  2071. MergeFrom(from);
  2072. }
  2073. void MapValue::CopyFrom(const MapValue& from) {
  2074. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.MapValue)
  2075. if (&from == this) return;
  2076. Clear();
  2077. MergeFrom(from);
  2078. }
  2079. bool MapValue::IsInitialized() const {
  2080. return true;
  2081. }
  2082. void MapValue::Swap(MapValue* other) {
  2083. if (other == this) return;
  2084. InternalSwap(other);
  2085. }
  2086. void MapValue::InternalSwap(MapValue* other) {
  2087. using std::swap;
  2088. fields_.Swap(&other->fields_);
  2089. _internal_metadata_.Swap(&other->_internal_metadata_);
  2090. swap(_cached_size_, other->_cached_size_);
  2091. }
  2092. ::google::protobuf::Metadata MapValue::GetMetadata() const {
  2093. protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce();
  2094. return ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::file_level_metadata[kIndexInFileMessages];
  2095. }
  2096. // @@protoc_insertion_point(namespace_scope)
  2097. } // namespace v1
  2098. } // namespace firestore
  2099. } // namespace google
  2100. // @@protoc_insertion_point(global_scope)