maybe_document.pb.cc 53 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373
  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: firestore/local/maybe_document.proto
  18. #include "firestore/local/maybe_document.pb.h"
  19. #include <algorithm>
  20. #include <google/protobuf/stubs/common.h>
  21. #include <google/protobuf/io/coded_stream.h>
  22. #include <google/protobuf/extension_set.h>
  23. #include <google/protobuf/wire_format_lite.h>
  24. #include <google/protobuf/descriptor.h>
  25. #include <google/protobuf/generated_message_reflection.h>
  26. #include <google/protobuf/reflection_ops.h>
  27. #include <google/protobuf/wire_format.h>
  28. // @@protoc_insertion_point(includes)
  29. #include <google/protobuf/port_def.inc>
  30. extern PROTOBUF_INTERNAL_EXPORT_firestore_2flocal_2fmaybe_5fdocument_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_NoDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto;
  31. extern PROTOBUF_INTERNAL_EXPORT_firestore_2flocal_2fmaybe_5fdocument_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_UnknownDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto;
  32. extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fdocument_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_Document_google_2ffirestore_2fv1_2fdocument_2eproto;
  33. extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftimestamp_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto;
  34. namespace firestore {
  35. namespace client {
  36. class NoDocumentDefaultTypeInternal {
  37. public:
  38. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<NoDocument> _instance;
  39. } _NoDocument_default_instance_;
  40. class UnknownDocumentDefaultTypeInternal {
  41. public:
  42. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<UnknownDocument> _instance;
  43. } _UnknownDocument_default_instance_;
  44. class MaybeDocumentDefaultTypeInternal {
  45. public:
  46. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<MaybeDocument> _instance;
  47. const ::firestore::client::NoDocument* no_document_;
  48. const ::google::firestore::v1::Document* document_;
  49. const ::firestore::client::UnknownDocument* unknown_document_;
  50. } _MaybeDocument_default_instance_;
  51. } // namespace client
  52. } // namespace firestore
  53. static void InitDefaultsscc_info_MaybeDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto() {
  54. GOOGLE_PROTOBUF_VERIFY_VERSION;
  55. {
  56. void* ptr = &::firestore::client::_MaybeDocument_default_instance_;
  57. new (ptr) ::firestore::client::MaybeDocument();
  58. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  59. }
  60. ::firestore::client::MaybeDocument::InitAsDefaultInstance();
  61. }
  62. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_MaybeDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto =
  63. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsscc_info_MaybeDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto}, {
  64. &scc_info_NoDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto.base,
  65. &scc_info_Document_google_2ffirestore_2fv1_2fdocument_2eproto.base,
  66. &scc_info_UnknownDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto.base,}};
  67. static void InitDefaultsscc_info_NoDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto() {
  68. GOOGLE_PROTOBUF_VERIFY_VERSION;
  69. {
  70. void* ptr = &::firestore::client::_NoDocument_default_instance_;
  71. new (ptr) ::firestore::client::NoDocument();
  72. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  73. }
  74. ::firestore::client::NoDocument::InitAsDefaultInstance();
  75. }
  76. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_NoDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto =
  77. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_NoDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto}, {
  78. &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};
  79. static void InitDefaultsscc_info_UnknownDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto() {
  80. GOOGLE_PROTOBUF_VERIFY_VERSION;
  81. {
  82. void* ptr = &::firestore::client::_UnknownDocument_default_instance_;
  83. new (ptr) ::firestore::client::UnknownDocument();
  84. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  85. }
  86. ::firestore::client::UnknownDocument::InitAsDefaultInstance();
  87. }
  88. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_UnknownDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto =
  89. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_UnknownDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto}, {
  90. &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};
  91. static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_firestore_2flocal_2fmaybe_5fdocument_2eproto[3];
  92. static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_firestore_2flocal_2fmaybe_5fdocument_2eproto = nullptr;
  93. static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_firestore_2flocal_2fmaybe_5fdocument_2eproto = nullptr;
  94. const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_firestore_2flocal_2fmaybe_5fdocument_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  95. ~0u, // no _has_bits_
  96. PROTOBUF_FIELD_OFFSET(::firestore::client::NoDocument, _internal_metadata_),
  97. ~0u, // no _extensions_
  98. ~0u, // no _oneof_case_
  99. ~0u, // no _weak_field_map_
  100. PROTOBUF_FIELD_OFFSET(::firestore::client::NoDocument, name_),
  101. PROTOBUF_FIELD_OFFSET(::firestore::client::NoDocument, read_time_),
  102. ~0u, // no _has_bits_
  103. PROTOBUF_FIELD_OFFSET(::firestore::client::UnknownDocument, _internal_metadata_),
  104. ~0u, // no _extensions_
  105. ~0u, // no _oneof_case_
  106. ~0u, // no _weak_field_map_
  107. PROTOBUF_FIELD_OFFSET(::firestore::client::UnknownDocument, name_),
  108. PROTOBUF_FIELD_OFFSET(::firestore::client::UnknownDocument, version_),
  109. ~0u, // no _has_bits_
  110. PROTOBUF_FIELD_OFFSET(::firestore::client::MaybeDocument, _internal_metadata_),
  111. ~0u, // no _extensions_
  112. PROTOBUF_FIELD_OFFSET(::firestore::client::MaybeDocument, _oneof_case_[0]),
  113. ~0u, // no _weak_field_map_
  114. offsetof(::firestore::client::MaybeDocumentDefaultTypeInternal, no_document_),
  115. offsetof(::firestore::client::MaybeDocumentDefaultTypeInternal, document_),
  116. offsetof(::firestore::client::MaybeDocumentDefaultTypeInternal, unknown_document_),
  117. PROTOBUF_FIELD_OFFSET(::firestore::client::MaybeDocument, has_committed_mutations_),
  118. PROTOBUF_FIELD_OFFSET(::firestore::client::MaybeDocument, document_type_),
  119. };
  120. static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  121. { 0, -1, sizeof(::firestore::client::NoDocument)},
  122. { 7, -1, sizeof(::firestore::client::UnknownDocument)},
  123. { 14, -1, sizeof(::firestore::client::MaybeDocument)},
  124. };
  125. static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
  126. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::firestore::client::_NoDocument_default_instance_),
  127. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::firestore::client::_UnknownDocument_default_instance_),
  128. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::firestore::client::_MaybeDocument_default_instance_),
  129. };
  130. const char descriptor_table_protodef_firestore_2flocal_2fmaybe_5fdocument_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  131. "\n$firestore/local/maybe_document.proto\022\020"
  132. "firestore.client\032\"google/firestore/v1/do"
  133. "cument.proto\032\037google/protobuf/timestamp."
  134. "proto\"I\n\nNoDocument\022\014\n\004name\030\001 \001(\t\022-\n\trea"
  135. "d_time\030\002 \001(\0132\032.google.protobuf.Timestamp"
  136. "\"L\n\017UnknownDocument\022\014\n\004name\030\001 \001(\t\022+\n\007ver"
  137. "sion\030\002 \001(\0132\032.google.protobuf.Timestamp\"\350"
  138. "\001\n\rMaybeDocument\0223\n\013no_document\030\001 \001(\0132\034."
  139. "firestore.client.NoDocumentH\000\0221\n\010documen"
  140. "t\030\002 \001(\0132\035.google.firestore.v1.DocumentH\000"
  141. "\022=\n\020unknown_document\030\003 \001(\0132!.firestore.c"
  142. "lient.UnknownDocumentH\000\022\037\n\027has_committed"
  143. "_mutations\030\004 \001(\010B\017\n\rdocument_typeB/\n#com"
  144. ".google.firebase.firestore.protoP\001\242\002\005FST"
  145. "PBb\006proto3"
  146. ;
  147. static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_deps[2] = {
  148. &::descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto,
  149. &::descriptor_table_google_2fprotobuf_2ftimestamp_2eproto,
  150. };
  151. static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_sccs[3] = {
  152. &scc_info_MaybeDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto.base,
  153. &scc_info_NoDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto.base,
  154. &scc_info_UnknownDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto.base,
  155. };
  156. static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_once;
  157. static bool descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_initialized = false;
  158. const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto = {
  159. &descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_initialized, descriptor_table_protodef_firestore_2flocal_2fmaybe_5fdocument_2eproto, "firestore/local/maybe_document.proto", 570,
  160. &descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_once, descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_sccs, descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_deps, 3, 2,
  161. schemas, file_default_instances, TableStruct_firestore_2flocal_2fmaybe_5fdocument_2eproto::offsets,
  162. file_level_metadata_firestore_2flocal_2fmaybe_5fdocument_2eproto, 3, file_level_enum_descriptors_firestore_2flocal_2fmaybe_5fdocument_2eproto, file_level_service_descriptors_firestore_2flocal_2fmaybe_5fdocument_2eproto,
  163. };
  164. // Force running AddDescriptors() at dynamic initialization time.
  165. static bool dynamic_init_dummy_firestore_2flocal_2fmaybe_5fdocument_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto), true);
  166. namespace firestore {
  167. namespace client {
  168. // ===================================================================
  169. void NoDocument::InitAsDefaultInstance() {
  170. ::firestore::client::_NoDocument_default_instance_._instance.get_mutable()->read_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
  171. PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
  172. }
  173. class NoDocument::_Internal {
  174. public:
  175. static const PROTOBUF_NAMESPACE_ID::Timestamp& read_time(const NoDocument* msg);
  176. };
  177. const PROTOBUF_NAMESPACE_ID::Timestamp&
  178. NoDocument::_Internal::read_time(const NoDocument* msg) {
  179. return *msg->read_time_;
  180. }
  181. void NoDocument::clear_read_time() {
  182. if (GetArenaNoVirtual() == nullptr && read_time_ != nullptr) {
  183. delete read_time_;
  184. }
  185. read_time_ = nullptr;
  186. }
  187. NoDocument::NoDocument()
  188. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  189. SharedCtor();
  190. // @@protoc_insertion_point(constructor:firestore.client.NoDocument)
  191. }
  192. NoDocument::NoDocument(const NoDocument& from)
  193. : ::PROTOBUF_NAMESPACE_ID::Message(),
  194. _internal_metadata_(nullptr) {
  195. _internal_metadata_.MergeFrom(from._internal_metadata_);
  196. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  197. if (!from.name().empty()) {
  198. name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
  199. }
  200. if (from.has_read_time()) {
  201. read_time_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.read_time_);
  202. } else {
  203. read_time_ = nullptr;
  204. }
  205. // @@protoc_insertion_point(copy_constructor:firestore.client.NoDocument)
  206. }
  207. void NoDocument::SharedCtor() {
  208. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_NoDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto.base);
  209. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  210. read_time_ = nullptr;
  211. }
  212. NoDocument::~NoDocument() {
  213. // @@protoc_insertion_point(destructor:firestore.client.NoDocument)
  214. SharedDtor();
  215. }
  216. void NoDocument::SharedDtor() {
  217. name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  218. if (this != internal_default_instance()) delete read_time_;
  219. }
  220. void NoDocument::SetCachedSize(int size) const {
  221. _cached_size_.Set(size);
  222. }
  223. const NoDocument& NoDocument::default_instance() {
  224. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_NoDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto.base);
  225. return *internal_default_instance();
  226. }
  227. void NoDocument::Clear() {
  228. // @@protoc_insertion_point(message_clear_start:firestore.client.NoDocument)
  229. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  230. // Prevent compiler warnings about cached_has_bits being unused
  231. (void) cached_has_bits;
  232. name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  233. if (GetArenaNoVirtual() == nullptr && read_time_ != nullptr) {
  234. delete read_time_;
  235. }
  236. read_time_ = nullptr;
  237. _internal_metadata_.Clear();
  238. }
  239. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  240. const char* NoDocument::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  241. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  242. while (!ctx->Done(&ptr)) {
  243. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  244. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  245. CHK_(ptr);
  246. switch (tag >> 3) {
  247. // string name = 1;
  248. case 1:
  249. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  250. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "firestore.client.NoDocument.name");
  251. CHK_(ptr);
  252. } else goto handle_unusual;
  253. continue;
  254. // .google.protobuf.Timestamp read_time = 2;
  255. case 2:
  256. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  257. ptr = ctx->ParseMessage(mutable_read_time(), ptr);
  258. CHK_(ptr);
  259. } else goto handle_unusual;
  260. continue;
  261. default: {
  262. handle_unusual:
  263. if ((tag & 7) == 4 || tag == 0) {
  264. ctx->SetLastTag(tag);
  265. goto success;
  266. }
  267. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  268. CHK_(ptr != nullptr);
  269. continue;
  270. }
  271. } // switch
  272. } // while
  273. success:
  274. return ptr;
  275. failure:
  276. ptr = nullptr;
  277. goto success;
  278. #undef CHK_
  279. }
  280. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  281. bool NoDocument::MergePartialFromCodedStream(
  282. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  283. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  284. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  285. // @@protoc_insertion_point(parse_start:firestore.client.NoDocument)
  286. for (;;) {
  287. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  288. tag = p.first;
  289. if (!p.second) goto handle_unusual;
  290. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  291. // string name = 1;
  292. case 1: {
  293. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
  294. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  295. input, this->mutable_name()));
  296. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  297. this->name().data(), static_cast<int>(this->name().length()),
  298. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  299. "firestore.client.NoDocument.name"));
  300. } else {
  301. goto handle_unusual;
  302. }
  303. break;
  304. }
  305. // .google.protobuf.Timestamp read_time = 2;
  306. case 2: {
  307. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
  308. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  309. input, mutable_read_time()));
  310. } else {
  311. goto handle_unusual;
  312. }
  313. break;
  314. }
  315. default: {
  316. handle_unusual:
  317. if (tag == 0) {
  318. goto success;
  319. }
  320. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  321. input, tag, _internal_metadata_.mutable_unknown_fields()));
  322. break;
  323. }
  324. }
  325. }
  326. success:
  327. // @@protoc_insertion_point(parse_success:firestore.client.NoDocument)
  328. return true;
  329. failure:
  330. // @@protoc_insertion_point(parse_failure:firestore.client.NoDocument)
  331. return false;
  332. #undef DO_
  333. }
  334. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  335. void NoDocument::SerializeWithCachedSizes(
  336. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  337. // @@protoc_insertion_point(serialize_start:firestore.client.NoDocument)
  338. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  339. (void) cached_has_bits;
  340. // string name = 1;
  341. if (this->name().size() > 0) {
  342. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  343. this->name().data(), static_cast<int>(this->name().length()),
  344. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  345. "firestore.client.NoDocument.name");
  346. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
  347. 1, this->name(), output);
  348. }
  349. // .google.protobuf.Timestamp read_time = 2;
  350. if (this->has_read_time()) {
  351. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  352. 2, _Internal::read_time(this), output);
  353. }
  354. if (_internal_metadata_.have_unknown_fields()) {
  355. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  356. _internal_metadata_.unknown_fields(), output);
  357. }
  358. // @@protoc_insertion_point(serialize_end:firestore.client.NoDocument)
  359. }
  360. ::PROTOBUF_NAMESPACE_ID::uint8* NoDocument::InternalSerializeWithCachedSizesToArray(
  361. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  362. // @@protoc_insertion_point(serialize_to_array_start:firestore.client.NoDocument)
  363. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  364. (void) cached_has_bits;
  365. // string name = 1;
  366. if (this->name().size() > 0) {
  367. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  368. this->name().data(), static_cast<int>(this->name().length()),
  369. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  370. "firestore.client.NoDocument.name");
  371. target =
  372. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
  373. 1, this->name(), target);
  374. }
  375. // .google.protobuf.Timestamp read_time = 2;
  376. if (this->has_read_time()) {
  377. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  378. InternalWriteMessageToArray(
  379. 2, _Internal::read_time(this), target);
  380. }
  381. if (_internal_metadata_.have_unknown_fields()) {
  382. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  383. _internal_metadata_.unknown_fields(), target);
  384. }
  385. // @@protoc_insertion_point(serialize_to_array_end:firestore.client.NoDocument)
  386. return target;
  387. }
  388. size_t NoDocument::ByteSizeLong() const {
  389. // @@protoc_insertion_point(message_byte_size_start:firestore.client.NoDocument)
  390. size_t total_size = 0;
  391. if (_internal_metadata_.have_unknown_fields()) {
  392. total_size +=
  393. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  394. _internal_metadata_.unknown_fields());
  395. }
  396. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  397. // Prevent compiler warnings about cached_has_bits being unused
  398. (void) cached_has_bits;
  399. // string name = 1;
  400. if (this->name().size() > 0) {
  401. total_size += 1 +
  402. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  403. this->name());
  404. }
  405. // .google.protobuf.Timestamp read_time = 2;
  406. if (this->has_read_time()) {
  407. total_size += 1 +
  408. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  409. *read_time_);
  410. }
  411. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  412. SetCachedSize(cached_size);
  413. return total_size;
  414. }
  415. void NoDocument::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  416. // @@protoc_insertion_point(generalized_merge_from_start:firestore.client.NoDocument)
  417. GOOGLE_DCHECK_NE(&from, this);
  418. const NoDocument* source =
  419. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<NoDocument>(
  420. &from);
  421. if (source == nullptr) {
  422. // @@protoc_insertion_point(generalized_merge_from_cast_fail:firestore.client.NoDocument)
  423. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  424. } else {
  425. // @@protoc_insertion_point(generalized_merge_from_cast_success:firestore.client.NoDocument)
  426. MergeFrom(*source);
  427. }
  428. }
  429. void NoDocument::MergeFrom(const NoDocument& from) {
  430. // @@protoc_insertion_point(class_specific_merge_from_start:firestore.client.NoDocument)
  431. GOOGLE_DCHECK_NE(&from, this);
  432. _internal_metadata_.MergeFrom(from._internal_metadata_);
  433. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  434. (void) cached_has_bits;
  435. if (from.name().size() > 0) {
  436. name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
  437. }
  438. if (from.has_read_time()) {
  439. mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.read_time());
  440. }
  441. }
  442. void NoDocument::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  443. // @@protoc_insertion_point(generalized_copy_from_start:firestore.client.NoDocument)
  444. if (&from == this) return;
  445. Clear();
  446. MergeFrom(from);
  447. }
  448. void NoDocument::CopyFrom(const NoDocument& from) {
  449. // @@protoc_insertion_point(class_specific_copy_from_start:firestore.client.NoDocument)
  450. if (&from == this) return;
  451. Clear();
  452. MergeFrom(from);
  453. }
  454. bool NoDocument::IsInitialized() const {
  455. return true;
  456. }
  457. void NoDocument::InternalSwap(NoDocument* other) {
  458. using std::swap;
  459. _internal_metadata_.Swap(&other->_internal_metadata_);
  460. name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  461. GetArenaNoVirtual());
  462. swap(read_time_, other->read_time_);
  463. }
  464. ::PROTOBUF_NAMESPACE_ID::Metadata NoDocument::GetMetadata() const {
  465. return GetMetadataStatic();
  466. }
  467. // ===================================================================
  468. void UnknownDocument::InitAsDefaultInstance() {
  469. ::firestore::client::_UnknownDocument_default_instance_._instance.get_mutable()->version_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
  470. PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
  471. }
  472. class UnknownDocument::_Internal {
  473. public:
  474. static const PROTOBUF_NAMESPACE_ID::Timestamp& version(const UnknownDocument* msg);
  475. };
  476. const PROTOBUF_NAMESPACE_ID::Timestamp&
  477. UnknownDocument::_Internal::version(const UnknownDocument* msg) {
  478. return *msg->version_;
  479. }
  480. void UnknownDocument::clear_version() {
  481. if (GetArenaNoVirtual() == nullptr && version_ != nullptr) {
  482. delete version_;
  483. }
  484. version_ = nullptr;
  485. }
  486. UnknownDocument::UnknownDocument()
  487. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  488. SharedCtor();
  489. // @@protoc_insertion_point(constructor:firestore.client.UnknownDocument)
  490. }
  491. UnknownDocument::UnknownDocument(const UnknownDocument& from)
  492. : ::PROTOBUF_NAMESPACE_ID::Message(),
  493. _internal_metadata_(nullptr) {
  494. _internal_metadata_.MergeFrom(from._internal_metadata_);
  495. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  496. if (!from.name().empty()) {
  497. name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
  498. }
  499. if (from.has_version()) {
  500. version_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.version_);
  501. } else {
  502. version_ = nullptr;
  503. }
  504. // @@protoc_insertion_point(copy_constructor:firestore.client.UnknownDocument)
  505. }
  506. void UnknownDocument::SharedCtor() {
  507. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_UnknownDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto.base);
  508. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  509. version_ = nullptr;
  510. }
  511. UnknownDocument::~UnknownDocument() {
  512. // @@protoc_insertion_point(destructor:firestore.client.UnknownDocument)
  513. SharedDtor();
  514. }
  515. void UnknownDocument::SharedDtor() {
  516. name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  517. if (this != internal_default_instance()) delete version_;
  518. }
  519. void UnknownDocument::SetCachedSize(int size) const {
  520. _cached_size_.Set(size);
  521. }
  522. const UnknownDocument& UnknownDocument::default_instance() {
  523. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_UnknownDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto.base);
  524. return *internal_default_instance();
  525. }
  526. void UnknownDocument::Clear() {
  527. // @@protoc_insertion_point(message_clear_start:firestore.client.UnknownDocument)
  528. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  529. // Prevent compiler warnings about cached_has_bits being unused
  530. (void) cached_has_bits;
  531. name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  532. if (GetArenaNoVirtual() == nullptr && version_ != nullptr) {
  533. delete version_;
  534. }
  535. version_ = nullptr;
  536. _internal_metadata_.Clear();
  537. }
  538. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  539. const char* UnknownDocument::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  540. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  541. while (!ctx->Done(&ptr)) {
  542. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  543. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  544. CHK_(ptr);
  545. switch (tag >> 3) {
  546. // string name = 1;
  547. case 1:
  548. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  549. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "firestore.client.UnknownDocument.name");
  550. CHK_(ptr);
  551. } else goto handle_unusual;
  552. continue;
  553. // .google.protobuf.Timestamp version = 2;
  554. case 2:
  555. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  556. ptr = ctx->ParseMessage(mutable_version(), ptr);
  557. CHK_(ptr);
  558. } else goto handle_unusual;
  559. continue;
  560. default: {
  561. handle_unusual:
  562. if ((tag & 7) == 4 || tag == 0) {
  563. ctx->SetLastTag(tag);
  564. goto success;
  565. }
  566. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  567. CHK_(ptr != nullptr);
  568. continue;
  569. }
  570. } // switch
  571. } // while
  572. success:
  573. return ptr;
  574. failure:
  575. ptr = nullptr;
  576. goto success;
  577. #undef CHK_
  578. }
  579. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  580. bool UnknownDocument::MergePartialFromCodedStream(
  581. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  582. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  583. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  584. // @@protoc_insertion_point(parse_start:firestore.client.UnknownDocument)
  585. for (;;) {
  586. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  587. tag = p.first;
  588. if (!p.second) goto handle_unusual;
  589. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  590. // string name = 1;
  591. case 1: {
  592. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
  593. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  594. input, this->mutable_name()));
  595. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  596. this->name().data(), static_cast<int>(this->name().length()),
  597. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  598. "firestore.client.UnknownDocument.name"));
  599. } else {
  600. goto handle_unusual;
  601. }
  602. break;
  603. }
  604. // .google.protobuf.Timestamp version = 2;
  605. case 2: {
  606. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
  607. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  608. input, mutable_version()));
  609. } else {
  610. goto handle_unusual;
  611. }
  612. break;
  613. }
  614. default: {
  615. handle_unusual:
  616. if (tag == 0) {
  617. goto success;
  618. }
  619. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  620. input, tag, _internal_metadata_.mutable_unknown_fields()));
  621. break;
  622. }
  623. }
  624. }
  625. success:
  626. // @@protoc_insertion_point(parse_success:firestore.client.UnknownDocument)
  627. return true;
  628. failure:
  629. // @@protoc_insertion_point(parse_failure:firestore.client.UnknownDocument)
  630. return false;
  631. #undef DO_
  632. }
  633. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  634. void UnknownDocument::SerializeWithCachedSizes(
  635. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  636. // @@protoc_insertion_point(serialize_start:firestore.client.UnknownDocument)
  637. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  638. (void) cached_has_bits;
  639. // string name = 1;
  640. if (this->name().size() > 0) {
  641. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  642. this->name().data(), static_cast<int>(this->name().length()),
  643. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  644. "firestore.client.UnknownDocument.name");
  645. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
  646. 1, this->name(), output);
  647. }
  648. // .google.protobuf.Timestamp version = 2;
  649. if (this->has_version()) {
  650. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  651. 2, _Internal::version(this), output);
  652. }
  653. if (_internal_metadata_.have_unknown_fields()) {
  654. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  655. _internal_metadata_.unknown_fields(), output);
  656. }
  657. // @@protoc_insertion_point(serialize_end:firestore.client.UnknownDocument)
  658. }
  659. ::PROTOBUF_NAMESPACE_ID::uint8* UnknownDocument::InternalSerializeWithCachedSizesToArray(
  660. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  661. // @@protoc_insertion_point(serialize_to_array_start:firestore.client.UnknownDocument)
  662. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  663. (void) cached_has_bits;
  664. // string name = 1;
  665. if (this->name().size() > 0) {
  666. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  667. this->name().data(), static_cast<int>(this->name().length()),
  668. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  669. "firestore.client.UnknownDocument.name");
  670. target =
  671. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
  672. 1, this->name(), target);
  673. }
  674. // .google.protobuf.Timestamp version = 2;
  675. if (this->has_version()) {
  676. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  677. InternalWriteMessageToArray(
  678. 2, _Internal::version(this), target);
  679. }
  680. if (_internal_metadata_.have_unknown_fields()) {
  681. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  682. _internal_metadata_.unknown_fields(), target);
  683. }
  684. // @@protoc_insertion_point(serialize_to_array_end:firestore.client.UnknownDocument)
  685. return target;
  686. }
  687. size_t UnknownDocument::ByteSizeLong() const {
  688. // @@protoc_insertion_point(message_byte_size_start:firestore.client.UnknownDocument)
  689. size_t total_size = 0;
  690. if (_internal_metadata_.have_unknown_fields()) {
  691. total_size +=
  692. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  693. _internal_metadata_.unknown_fields());
  694. }
  695. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  696. // Prevent compiler warnings about cached_has_bits being unused
  697. (void) cached_has_bits;
  698. // string name = 1;
  699. if (this->name().size() > 0) {
  700. total_size += 1 +
  701. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  702. this->name());
  703. }
  704. // .google.protobuf.Timestamp version = 2;
  705. if (this->has_version()) {
  706. total_size += 1 +
  707. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  708. *version_);
  709. }
  710. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  711. SetCachedSize(cached_size);
  712. return total_size;
  713. }
  714. void UnknownDocument::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  715. // @@protoc_insertion_point(generalized_merge_from_start:firestore.client.UnknownDocument)
  716. GOOGLE_DCHECK_NE(&from, this);
  717. const UnknownDocument* source =
  718. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<UnknownDocument>(
  719. &from);
  720. if (source == nullptr) {
  721. // @@protoc_insertion_point(generalized_merge_from_cast_fail:firestore.client.UnknownDocument)
  722. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  723. } else {
  724. // @@protoc_insertion_point(generalized_merge_from_cast_success:firestore.client.UnknownDocument)
  725. MergeFrom(*source);
  726. }
  727. }
  728. void UnknownDocument::MergeFrom(const UnknownDocument& from) {
  729. // @@protoc_insertion_point(class_specific_merge_from_start:firestore.client.UnknownDocument)
  730. GOOGLE_DCHECK_NE(&from, this);
  731. _internal_metadata_.MergeFrom(from._internal_metadata_);
  732. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  733. (void) cached_has_bits;
  734. if (from.name().size() > 0) {
  735. name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
  736. }
  737. if (from.has_version()) {
  738. mutable_version()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.version());
  739. }
  740. }
  741. void UnknownDocument::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  742. // @@protoc_insertion_point(generalized_copy_from_start:firestore.client.UnknownDocument)
  743. if (&from == this) return;
  744. Clear();
  745. MergeFrom(from);
  746. }
  747. void UnknownDocument::CopyFrom(const UnknownDocument& from) {
  748. // @@protoc_insertion_point(class_specific_copy_from_start:firestore.client.UnknownDocument)
  749. if (&from == this) return;
  750. Clear();
  751. MergeFrom(from);
  752. }
  753. bool UnknownDocument::IsInitialized() const {
  754. return true;
  755. }
  756. void UnknownDocument::InternalSwap(UnknownDocument* other) {
  757. using std::swap;
  758. _internal_metadata_.Swap(&other->_internal_metadata_);
  759. name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  760. GetArenaNoVirtual());
  761. swap(version_, other->version_);
  762. }
  763. ::PROTOBUF_NAMESPACE_ID::Metadata UnknownDocument::GetMetadata() const {
  764. return GetMetadataStatic();
  765. }
  766. // ===================================================================
  767. void MaybeDocument::InitAsDefaultInstance() {
  768. ::firestore::client::_MaybeDocument_default_instance_.no_document_ = const_cast< ::firestore::client::NoDocument*>(
  769. ::firestore::client::NoDocument::internal_default_instance());
  770. ::firestore::client::_MaybeDocument_default_instance_.document_ = const_cast< ::google::firestore::v1::Document*>(
  771. ::google::firestore::v1::Document::internal_default_instance());
  772. ::firestore::client::_MaybeDocument_default_instance_.unknown_document_ = const_cast< ::firestore::client::UnknownDocument*>(
  773. ::firestore::client::UnknownDocument::internal_default_instance());
  774. }
  775. class MaybeDocument::_Internal {
  776. public:
  777. static const ::firestore::client::NoDocument& no_document(const MaybeDocument* msg);
  778. static const ::google::firestore::v1::Document& document(const MaybeDocument* msg);
  779. static const ::firestore::client::UnknownDocument& unknown_document(const MaybeDocument* msg);
  780. };
  781. const ::firestore::client::NoDocument&
  782. MaybeDocument::_Internal::no_document(const MaybeDocument* msg) {
  783. return *msg->document_type_.no_document_;
  784. }
  785. const ::google::firestore::v1::Document&
  786. MaybeDocument::_Internal::document(const MaybeDocument* msg) {
  787. return *msg->document_type_.document_;
  788. }
  789. const ::firestore::client::UnknownDocument&
  790. MaybeDocument::_Internal::unknown_document(const MaybeDocument* msg) {
  791. return *msg->document_type_.unknown_document_;
  792. }
  793. void MaybeDocument::set_allocated_no_document(::firestore::client::NoDocument* no_document) {
  794. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  795. clear_document_type();
  796. if (no_document) {
  797. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
  798. if (message_arena != submessage_arena) {
  799. no_document = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  800. message_arena, no_document, submessage_arena);
  801. }
  802. set_has_no_document();
  803. document_type_.no_document_ = no_document;
  804. }
  805. // @@protoc_insertion_point(field_set_allocated:firestore.client.MaybeDocument.no_document)
  806. }
  807. void MaybeDocument::set_allocated_document(::google::firestore::v1::Document* document) {
  808. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  809. clear_document_type();
  810. if (document) {
  811. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
  812. if (message_arena != submessage_arena) {
  813. document = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  814. message_arena, document, submessage_arena);
  815. }
  816. set_has_document();
  817. document_type_.document_ = document;
  818. }
  819. // @@protoc_insertion_point(field_set_allocated:firestore.client.MaybeDocument.document)
  820. }
  821. void MaybeDocument::clear_document() {
  822. if (has_document()) {
  823. delete document_type_.document_;
  824. clear_has_document_type();
  825. }
  826. }
  827. void MaybeDocument::set_allocated_unknown_document(::firestore::client::UnknownDocument* unknown_document) {
  828. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  829. clear_document_type();
  830. if (unknown_document) {
  831. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
  832. if (message_arena != submessage_arena) {
  833. unknown_document = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  834. message_arena, unknown_document, submessage_arena);
  835. }
  836. set_has_unknown_document();
  837. document_type_.unknown_document_ = unknown_document;
  838. }
  839. // @@protoc_insertion_point(field_set_allocated:firestore.client.MaybeDocument.unknown_document)
  840. }
  841. MaybeDocument::MaybeDocument()
  842. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  843. SharedCtor();
  844. // @@protoc_insertion_point(constructor:firestore.client.MaybeDocument)
  845. }
  846. MaybeDocument::MaybeDocument(const MaybeDocument& from)
  847. : ::PROTOBUF_NAMESPACE_ID::Message(),
  848. _internal_metadata_(nullptr) {
  849. _internal_metadata_.MergeFrom(from._internal_metadata_);
  850. has_committed_mutations_ = from.has_committed_mutations_;
  851. clear_has_document_type();
  852. switch (from.document_type_case()) {
  853. case kNoDocument: {
  854. mutable_no_document()->::firestore::client::NoDocument::MergeFrom(from.no_document());
  855. break;
  856. }
  857. case kDocument: {
  858. mutable_document()->::google::firestore::v1::Document::MergeFrom(from.document());
  859. break;
  860. }
  861. case kUnknownDocument: {
  862. mutable_unknown_document()->::firestore::client::UnknownDocument::MergeFrom(from.unknown_document());
  863. break;
  864. }
  865. case DOCUMENT_TYPE_NOT_SET: {
  866. break;
  867. }
  868. }
  869. // @@protoc_insertion_point(copy_constructor:firestore.client.MaybeDocument)
  870. }
  871. void MaybeDocument::SharedCtor() {
  872. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_MaybeDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto.base);
  873. has_committed_mutations_ = false;
  874. clear_has_document_type();
  875. }
  876. MaybeDocument::~MaybeDocument() {
  877. // @@protoc_insertion_point(destructor:firestore.client.MaybeDocument)
  878. SharedDtor();
  879. }
  880. void MaybeDocument::SharedDtor() {
  881. if (has_document_type()) {
  882. clear_document_type();
  883. }
  884. }
  885. void MaybeDocument::SetCachedSize(int size) const {
  886. _cached_size_.Set(size);
  887. }
  888. const MaybeDocument& MaybeDocument::default_instance() {
  889. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_MaybeDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto.base);
  890. return *internal_default_instance();
  891. }
  892. void MaybeDocument::clear_document_type() {
  893. // @@protoc_insertion_point(one_of_clear_start:firestore.client.MaybeDocument)
  894. switch (document_type_case()) {
  895. case kNoDocument: {
  896. delete document_type_.no_document_;
  897. break;
  898. }
  899. case kDocument: {
  900. delete document_type_.document_;
  901. break;
  902. }
  903. case kUnknownDocument: {
  904. delete document_type_.unknown_document_;
  905. break;
  906. }
  907. case DOCUMENT_TYPE_NOT_SET: {
  908. break;
  909. }
  910. }
  911. _oneof_case_[0] = DOCUMENT_TYPE_NOT_SET;
  912. }
  913. void MaybeDocument::Clear() {
  914. // @@protoc_insertion_point(message_clear_start:firestore.client.MaybeDocument)
  915. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  916. // Prevent compiler warnings about cached_has_bits being unused
  917. (void) cached_has_bits;
  918. has_committed_mutations_ = false;
  919. clear_document_type();
  920. _internal_metadata_.Clear();
  921. }
  922. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  923. const char* MaybeDocument::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  924. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  925. while (!ctx->Done(&ptr)) {
  926. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  927. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  928. CHK_(ptr);
  929. switch (tag >> 3) {
  930. // .firestore.client.NoDocument no_document = 1;
  931. case 1:
  932. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
  933. ptr = ctx->ParseMessage(mutable_no_document(), ptr);
  934. CHK_(ptr);
  935. } else goto handle_unusual;
  936. continue;
  937. // .google.firestore.v1.Document document = 2;
  938. case 2:
  939. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  940. ptr = ctx->ParseMessage(mutable_document(), ptr);
  941. CHK_(ptr);
  942. } else goto handle_unusual;
  943. continue;
  944. // .firestore.client.UnknownDocument unknown_document = 3;
  945. case 3:
  946. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
  947. ptr = ctx->ParseMessage(mutable_unknown_document(), ptr);
  948. CHK_(ptr);
  949. } else goto handle_unusual;
  950. continue;
  951. // bool has_committed_mutations = 4;
  952. case 4:
  953. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
  954. has_committed_mutations_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
  955. CHK_(ptr);
  956. } else goto handle_unusual;
  957. continue;
  958. default: {
  959. handle_unusual:
  960. if ((tag & 7) == 4 || tag == 0) {
  961. ctx->SetLastTag(tag);
  962. goto success;
  963. }
  964. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  965. CHK_(ptr != nullptr);
  966. continue;
  967. }
  968. } // switch
  969. } // while
  970. success:
  971. return ptr;
  972. failure:
  973. ptr = nullptr;
  974. goto success;
  975. #undef CHK_
  976. }
  977. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  978. bool MaybeDocument::MergePartialFromCodedStream(
  979. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  980. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  981. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  982. // @@protoc_insertion_point(parse_start:firestore.client.MaybeDocument)
  983. for (;;) {
  984. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  985. tag = p.first;
  986. if (!p.second) goto handle_unusual;
  987. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  988. // .firestore.client.NoDocument no_document = 1;
  989. case 1: {
  990. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
  991. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  992. input, mutable_no_document()));
  993. } else {
  994. goto handle_unusual;
  995. }
  996. break;
  997. }
  998. // .google.firestore.v1.Document document = 2;
  999. case 2: {
  1000. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
  1001. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  1002. input, mutable_document()));
  1003. } else {
  1004. goto handle_unusual;
  1005. }
  1006. break;
  1007. }
  1008. // .firestore.client.UnknownDocument unknown_document = 3;
  1009. case 3: {
  1010. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
  1011. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  1012. input, mutable_unknown_document()));
  1013. } else {
  1014. goto handle_unusual;
  1015. }
  1016. break;
  1017. }
  1018. // bool has_committed_mutations = 4;
  1019. case 4: {
  1020. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) {
  1021. DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
  1022. bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
  1023. input, &has_committed_mutations_)));
  1024. } else {
  1025. goto handle_unusual;
  1026. }
  1027. break;
  1028. }
  1029. default: {
  1030. handle_unusual:
  1031. if (tag == 0) {
  1032. goto success;
  1033. }
  1034. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  1035. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1036. break;
  1037. }
  1038. }
  1039. }
  1040. success:
  1041. // @@protoc_insertion_point(parse_success:firestore.client.MaybeDocument)
  1042. return true;
  1043. failure:
  1044. // @@protoc_insertion_point(parse_failure:firestore.client.MaybeDocument)
  1045. return false;
  1046. #undef DO_
  1047. }
  1048. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  1049. void MaybeDocument::SerializeWithCachedSizes(
  1050. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  1051. // @@protoc_insertion_point(serialize_start:firestore.client.MaybeDocument)
  1052. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1053. (void) cached_has_bits;
  1054. // .firestore.client.NoDocument no_document = 1;
  1055. if (has_no_document()) {
  1056. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  1057. 1, _Internal::no_document(this), output);
  1058. }
  1059. // .google.firestore.v1.Document document = 2;
  1060. if (has_document()) {
  1061. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  1062. 2, _Internal::document(this), output);
  1063. }
  1064. // .firestore.client.UnknownDocument unknown_document = 3;
  1065. if (has_unknown_document()) {
  1066. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  1067. 3, _Internal::unknown_document(this), output);
  1068. }
  1069. // bool has_committed_mutations = 4;
  1070. if (this->has_committed_mutations() != 0) {
  1071. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(4, this->has_committed_mutations(), output);
  1072. }
  1073. if (_internal_metadata_.have_unknown_fields()) {
  1074. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  1075. _internal_metadata_.unknown_fields(), output);
  1076. }
  1077. // @@protoc_insertion_point(serialize_end:firestore.client.MaybeDocument)
  1078. }
  1079. ::PROTOBUF_NAMESPACE_ID::uint8* MaybeDocument::InternalSerializeWithCachedSizesToArray(
  1080. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  1081. // @@protoc_insertion_point(serialize_to_array_start:firestore.client.MaybeDocument)
  1082. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1083. (void) cached_has_bits;
  1084. // .firestore.client.NoDocument no_document = 1;
  1085. if (has_no_document()) {
  1086. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  1087. InternalWriteMessageToArray(
  1088. 1, _Internal::no_document(this), target);
  1089. }
  1090. // .google.firestore.v1.Document document = 2;
  1091. if (has_document()) {
  1092. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  1093. InternalWriteMessageToArray(
  1094. 2, _Internal::document(this), target);
  1095. }
  1096. // .firestore.client.UnknownDocument unknown_document = 3;
  1097. if (has_unknown_document()) {
  1098. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  1099. InternalWriteMessageToArray(
  1100. 3, _Internal::unknown_document(this), target);
  1101. }
  1102. // bool has_committed_mutations = 4;
  1103. if (this->has_committed_mutations() != 0) {
  1104. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->has_committed_mutations(), target);
  1105. }
  1106. if (_internal_metadata_.have_unknown_fields()) {
  1107. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  1108. _internal_metadata_.unknown_fields(), target);
  1109. }
  1110. // @@protoc_insertion_point(serialize_to_array_end:firestore.client.MaybeDocument)
  1111. return target;
  1112. }
  1113. size_t MaybeDocument::ByteSizeLong() const {
  1114. // @@protoc_insertion_point(message_byte_size_start:firestore.client.MaybeDocument)
  1115. size_t total_size = 0;
  1116. if (_internal_metadata_.have_unknown_fields()) {
  1117. total_size +=
  1118. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  1119. _internal_metadata_.unknown_fields());
  1120. }
  1121. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1122. // Prevent compiler warnings about cached_has_bits being unused
  1123. (void) cached_has_bits;
  1124. // bool has_committed_mutations = 4;
  1125. if (this->has_committed_mutations() != 0) {
  1126. total_size += 1 + 1;
  1127. }
  1128. switch (document_type_case()) {
  1129. // .firestore.client.NoDocument no_document = 1;
  1130. case kNoDocument: {
  1131. total_size += 1 +
  1132. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  1133. *document_type_.no_document_);
  1134. break;
  1135. }
  1136. // .google.firestore.v1.Document document = 2;
  1137. case kDocument: {
  1138. total_size += 1 +
  1139. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  1140. *document_type_.document_);
  1141. break;
  1142. }
  1143. // .firestore.client.UnknownDocument unknown_document = 3;
  1144. case kUnknownDocument: {
  1145. total_size += 1 +
  1146. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  1147. *document_type_.unknown_document_);
  1148. break;
  1149. }
  1150. case DOCUMENT_TYPE_NOT_SET: {
  1151. break;
  1152. }
  1153. }
  1154. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  1155. SetCachedSize(cached_size);
  1156. return total_size;
  1157. }
  1158. void MaybeDocument::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  1159. // @@protoc_insertion_point(generalized_merge_from_start:firestore.client.MaybeDocument)
  1160. GOOGLE_DCHECK_NE(&from, this);
  1161. const MaybeDocument* source =
  1162. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<MaybeDocument>(
  1163. &from);
  1164. if (source == nullptr) {
  1165. // @@protoc_insertion_point(generalized_merge_from_cast_fail:firestore.client.MaybeDocument)
  1166. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  1167. } else {
  1168. // @@protoc_insertion_point(generalized_merge_from_cast_success:firestore.client.MaybeDocument)
  1169. MergeFrom(*source);
  1170. }
  1171. }
  1172. void MaybeDocument::MergeFrom(const MaybeDocument& from) {
  1173. // @@protoc_insertion_point(class_specific_merge_from_start:firestore.client.MaybeDocument)
  1174. GOOGLE_DCHECK_NE(&from, this);
  1175. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1176. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  1177. (void) cached_has_bits;
  1178. if (from.has_committed_mutations() != 0) {
  1179. set_has_committed_mutations(from.has_committed_mutations());
  1180. }
  1181. switch (from.document_type_case()) {
  1182. case kNoDocument: {
  1183. mutable_no_document()->::firestore::client::NoDocument::MergeFrom(from.no_document());
  1184. break;
  1185. }
  1186. case kDocument: {
  1187. mutable_document()->::google::firestore::v1::Document::MergeFrom(from.document());
  1188. break;
  1189. }
  1190. case kUnknownDocument: {
  1191. mutable_unknown_document()->::firestore::client::UnknownDocument::MergeFrom(from.unknown_document());
  1192. break;
  1193. }
  1194. case DOCUMENT_TYPE_NOT_SET: {
  1195. break;
  1196. }
  1197. }
  1198. }
  1199. void MaybeDocument::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  1200. // @@protoc_insertion_point(generalized_copy_from_start:firestore.client.MaybeDocument)
  1201. if (&from == this) return;
  1202. Clear();
  1203. MergeFrom(from);
  1204. }
  1205. void MaybeDocument::CopyFrom(const MaybeDocument& from) {
  1206. // @@protoc_insertion_point(class_specific_copy_from_start:firestore.client.MaybeDocument)
  1207. if (&from == this) return;
  1208. Clear();
  1209. MergeFrom(from);
  1210. }
  1211. bool MaybeDocument::IsInitialized() const {
  1212. return true;
  1213. }
  1214. void MaybeDocument::InternalSwap(MaybeDocument* other) {
  1215. using std::swap;
  1216. _internal_metadata_.Swap(&other->_internal_metadata_);
  1217. swap(has_committed_mutations_, other->has_committed_mutations_);
  1218. swap(document_type_, other->document_type_);
  1219. swap(_oneof_case_[0], other->_oneof_case_[0]);
  1220. }
  1221. ::PROTOBUF_NAMESPACE_ID::Metadata MaybeDocument::GetMetadata() const {
  1222. return GetMetadataStatic();
  1223. }
  1224. // @@protoc_insertion_point(namespace_scope)
  1225. } // namespace client
  1226. } // namespace firestore
  1227. PROTOBUF_NAMESPACE_OPEN
  1228. template<> PROTOBUF_NOINLINE ::firestore::client::NoDocument* Arena::CreateMaybeMessage< ::firestore::client::NoDocument >(Arena* arena) {
  1229. return Arena::CreateInternal< ::firestore::client::NoDocument >(arena);
  1230. }
  1231. template<> PROTOBUF_NOINLINE ::firestore::client::UnknownDocument* Arena::CreateMaybeMessage< ::firestore::client::UnknownDocument >(Arena* arena) {
  1232. return Arena::CreateInternal< ::firestore::client::UnknownDocument >(arena);
  1233. }
  1234. template<> PROTOBUF_NOINLINE ::firestore::client::MaybeDocument* Arena::CreateMaybeMessage< ::firestore::client::MaybeDocument >(Arena* arena) {
  1235. return Arena::CreateInternal< ::firestore::client::MaybeDocument >(arena);
  1236. }
  1237. PROTOBUF_NAMESPACE_CLOSE
  1238. // @@protoc_insertion_point(global_scope)
  1239. #include <google/protobuf/port_undef.inc>