maybe_document.pb.cc 42 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097
  1. /*
  2. * Copyright 2024 Google LLC
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. // Generated by the protocol buffer compiler. DO NOT EDIT!
  17. // source: firestore/local/maybe_document.proto
  18. #include "firestore/local/maybe_document.pb.h"
  19. #include <algorithm>
  20. #include "google/protobuf/io/coded_stream.h"
  21. #include "google/protobuf/extension_set.h"
  22. #include "google/protobuf/wire_format_lite.h"
  23. #include "google/protobuf/descriptor.h"
  24. #include "google/protobuf/generated_message_reflection.h"
  25. #include "google/protobuf/reflection_ops.h"
  26. #include "google/protobuf/wire_format.h"
  27. #include "google/protobuf/generated_message_tctable_impl.h"
  28. // @@protoc_insertion_point(includes)
  29. // Must be included last.
  30. #include "google/protobuf/port_def.inc"
  31. PROTOBUF_PRAGMA_INIT_SEG
  32. namespace _pb = ::google::protobuf;
  33. namespace _pbi = ::google::protobuf::internal;
  34. namespace _fl = ::google::protobuf::internal::field_layout;
  35. namespace firestore {
  36. namespace client {
  37. inline constexpr UnknownDocument::Impl_::Impl_(
  38. ::_pbi::ConstantInitialized) noexcept
  39. : _cached_size_{0},
  40. name_(
  41. &::google::protobuf::internal::fixed_address_empty_string,
  42. ::_pbi::ConstantInitialized()),
  43. version_{nullptr} {}
  44. template <typename>
  45. PROTOBUF_CONSTEXPR UnknownDocument::UnknownDocument(::_pbi::ConstantInitialized)
  46. : _impl_(::_pbi::ConstantInitialized()) {}
  47. struct UnknownDocumentDefaultTypeInternal {
  48. PROTOBUF_CONSTEXPR UnknownDocumentDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  49. ~UnknownDocumentDefaultTypeInternal() {}
  50. union {
  51. UnknownDocument _instance;
  52. };
  53. };
  54. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  55. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UnknownDocumentDefaultTypeInternal _UnknownDocument_default_instance_;
  56. inline constexpr NoDocument::Impl_::Impl_(
  57. ::_pbi::ConstantInitialized) noexcept
  58. : _cached_size_{0},
  59. name_(
  60. &::google::protobuf::internal::fixed_address_empty_string,
  61. ::_pbi::ConstantInitialized()),
  62. read_time_{nullptr} {}
  63. template <typename>
  64. PROTOBUF_CONSTEXPR NoDocument::NoDocument(::_pbi::ConstantInitialized)
  65. : _impl_(::_pbi::ConstantInitialized()) {}
  66. struct NoDocumentDefaultTypeInternal {
  67. PROTOBUF_CONSTEXPR NoDocumentDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  68. ~NoDocumentDefaultTypeInternal() {}
  69. union {
  70. NoDocument _instance;
  71. };
  72. };
  73. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  74. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NoDocumentDefaultTypeInternal _NoDocument_default_instance_;
  75. inline constexpr MaybeDocument::Impl_::Impl_(
  76. ::_pbi::ConstantInitialized) noexcept
  77. : has_committed_mutations_{false},
  78. document_type_{},
  79. _cached_size_{0},
  80. _oneof_case_{} {}
  81. template <typename>
  82. PROTOBUF_CONSTEXPR MaybeDocument::MaybeDocument(::_pbi::ConstantInitialized)
  83. : _impl_(::_pbi::ConstantInitialized()) {}
  84. struct MaybeDocumentDefaultTypeInternal {
  85. PROTOBUF_CONSTEXPR MaybeDocumentDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  86. ~MaybeDocumentDefaultTypeInternal() {}
  87. union {
  88. MaybeDocument _instance;
  89. };
  90. };
  91. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  92. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MaybeDocumentDefaultTypeInternal _MaybeDocument_default_instance_;
  93. } // namespace client
  94. } // namespace firestore
  95. static ::_pb::Metadata file_level_metadata_firestore_2flocal_2fmaybe_5fdocument_2eproto[3];
  96. static constexpr const ::_pb::EnumDescriptor**
  97. file_level_enum_descriptors_firestore_2flocal_2fmaybe_5fdocument_2eproto = nullptr;
  98. static constexpr const ::_pb::ServiceDescriptor**
  99. file_level_service_descriptors_firestore_2flocal_2fmaybe_5fdocument_2eproto = nullptr;
  100. const ::uint32_t TableStruct_firestore_2flocal_2fmaybe_5fdocument_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(
  101. protodesc_cold) = {
  102. PROTOBUF_FIELD_OFFSET(::firestore::client::NoDocument, _impl_._has_bits_),
  103. PROTOBUF_FIELD_OFFSET(::firestore::client::NoDocument, _internal_metadata_),
  104. ~0u, // no _extensions_
  105. ~0u, // no _oneof_case_
  106. ~0u, // no _weak_field_map_
  107. ~0u, // no _inlined_string_donated_
  108. ~0u, // no _split_
  109. ~0u, // no sizeof(Split)
  110. PROTOBUF_FIELD_OFFSET(::firestore::client::NoDocument, _impl_.name_),
  111. PROTOBUF_FIELD_OFFSET(::firestore::client::NoDocument, _impl_.read_time_),
  112. ~0u,
  113. 0,
  114. PROTOBUF_FIELD_OFFSET(::firestore::client::UnknownDocument, _impl_._has_bits_),
  115. PROTOBUF_FIELD_OFFSET(::firestore::client::UnknownDocument, _internal_metadata_),
  116. ~0u, // no _extensions_
  117. ~0u, // no _oneof_case_
  118. ~0u, // no _weak_field_map_
  119. ~0u, // no _inlined_string_donated_
  120. ~0u, // no _split_
  121. ~0u, // no sizeof(Split)
  122. PROTOBUF_FIELD_OFFSET(::firestore::client::UnknownDocument, _impl_.name_),
  123. PROTOBUF_FIELD_OFFSET(::firestore::client::UnknownDocument, _impl_.version_),
  124. ~0u,
  125. 0,
  126. ~0u, // no _has_bits_
  127. PROTOBUF_FIELD_OFFSET(::firestore::client::MaybeDocument, _internal_metadata_),
  128. ~0u, // no _extensions_
  129. PROTOBUF_FIELD_OFFSET(::firestore::client::MaybeDocument, _impl_._oneof_case_[0]),
  130. ~0u, // no _weak_field_map_
  131. ~0u, // no _inlined_string_donated_
  132. ~0u, // no _split_
  133. ~0u, // no sizeof(Split)
  134. ::_pbi::kInvalidFieldOffsetTag,
  135. ::_pbi::kInvalidFieldOffsetTag,
  136. ::_pbi::kInvalidFieldOffsetTag,
  137. PROTOBUF_FIELD_OFFSET(::firestore::client::MaybeDocument, _impl_.has_committed_mutations_),
  138. PROTOBUF_FIELD_OFFSET(::firestore::client::MaybeDocument, _impl_.document_type_),
  139. };
  140. static const ::_pbi::MigrationSchema
  141. schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  142. {0, 10, -1, sizeof(::firestore::client::NoDocument)},
  143. {12, 22, -1, sizeof(::firestore::client::UnknownDocument)},
  144. {24, -1, -1, sizeof(::firestore::client::MaybeDocument)},
  145. };
  146. static const ::_pb::Message* const file_default_instances[] = {
  147. &::firestore::client::_NoDocument_default_instance_._instance,
  148. &::firestore::client::_UnknownDocument_default_instance_._instance,
  149. &::firestore::client::_MaybeDocument_default_instance_._instance,
  150. };
  151. const char descriptor_table_protodef_firestore_2flocal_2fmaybe_5fdocument_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  152. "\n$firestore/local/maybe_document.proto\022\020"
  153. "firestore.client\032\"google/firestore/v1/do"
  154. "cument.proto\032\037google/protobuf/timestamp."
  155. "proto\"I\n\nNoDocument\022\014\n\004name\030\001 \001(\t\022-\n\trea"
  156. "d_time\030\002 \001(\0132\032.google.protobuf.Timestamp"
  157. "\"L\n\017UnknownDocument\022\014\n\004name\030\001 \001(\t\022+\n\007ver"
  158. "sion\030\002 \001(\0132\032.google.protobuf.Timestamp\"\350"
  159. "\001\n\rMaybeDocument\0223\n\013no_document\030\001 \001(\0132\034."
  160. "firestore.client.NoDocumentH\000\0221\n\010documen"
  161. "t\030\002 \001(\0132\035.google.firestore.v1.DocumentH\000"
  162. "\022=\n\020unknown_document\030\003 \001(\0132!.firestore.c"
  163. "lient.UnknownDocumentH\000\022\037\n\027has_committed"
  164. "_mutations\030\004 \001(\010B\017\n\rdocument_typeB/\n#com"
  165. ".google.firebase.firestore.protoP\001\242\002\005FST"
  166. "PBb\006proto3"
  167. };
  168. static const ::_pbi::DescriptorTable* const descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_deps[2] =
  169. {
  170. &::descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto,
  171. &::descriptor_table_google_2fprotobuf_2ftimestamp_2eproto,
  172. };
  173. static ::absl::once_flag descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_once;
  174. const ::_pbi::DescriptorTable descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto = {
  175. false,
  176. false,
  177. 570,
  178. descriptor_table_protodef_firestore_2flocal_2fmaybe_5fdocument_2eproto,
  179. "firestore/local/maybe_document.proto",
  180. &descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_once,
  181. descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_deps,
  182. 2,
  183. 3,
  184. schemas,
  185. file_default_instances,
  186. TableStruct_firestore_2flocal_2fmaybe_5fdocument_2eproto::offsets,
  187. file_level_metadata_firestore_2flocal_2fmaybe_5fdocument_2eproto,
  188. file_level_enum_descriptors_firestore_2flocal_2fmaybe_5fdocument_2eproto,
  189. file_level_service_descriptors_firestore_2flocal_2fmaybe_5fdocument_2eproto,
  190. };
  191. // This function exists to be marked as weak.
  192. // It can significantly speed up compilation by breaking up LLVM's SCC
  193. // in the .pb.cc translation units. Large translation units see a
  194. // reduction of more than 35% of walltime for optimized builds. Without
  195. // the weak attribute all the messages in the file, including all the
  196. // vtables and everything they use become part of the same SCC through
  197. // a cycle like:
  198. // GetMetadata -> descriptor table -> default instances ->
  199. // vtables -> GetMetadata
  200. // By adding a weak function here we break the connection from the
  201. // individual vtables back into the descriptor table.
  202. PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_getter() {
  203. return &descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto;
  204. }
  205. // Force running AddDescriptors() at dynamic initialization time.
  206. PROTOBUF_ATTRIBUTE_INIT_PRIORITY2
  207. static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_firestore_2flocal_2fmaybe_5fdocument_2eproto(&descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto);
  208. namespace firestore {
  209. namespace client {
  210. // ===================================================================
  211. class NoDocument::_Internal {
  212. public:
  213. using HasBits = decltype(std::declval<NoDocument>()._impl_._has_bits_);
  214. static constexpr ::int32_t kHasBitsOffset =
  215. 8 * PROTOBUF_FIELD_OFFSET(NoDocument, _impl_._has_bits_);
  216. static const ::google::protobuf::Timestamp& read_time(const NoDocument* msg);
  217. static void set_has_read_time(HasBits* has_bits) {
  218. (*has_bits)[0] |= 1u;
  219. }
  220. };
  221. const ::google::protobuf::Timestamp& NoDocument::_Internal::read_time(const NoDocument* msg) {
  222. return *msg->_impl_.read_time_;
  223. }
  224. void NoDocument::clear_read_time() {
  225. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  226. if (_impl_.read_time_ != nullptr) _impl_.read_time_->Clear();
  227. _impl_._has_bits_[0] &= ~0x00000001u;
  228. }
  229. NoDocument::NoDocument(::google::protobuf::Arena* arena)
  230. : ::google::protobuf::Message(arena) {
  231. SharedCtor(arena);
  232. // @@protoc_insertion_point(arena_constructor:firestore.client.NoDocument)
  233. }
  234. inline PROTOBUF_NDEBUG_INLINE NoDocument::Impl_::Impl_(
  235. ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
  236. const Impl_& from)
  237. : _has_bits_{from._has_bits_},
  238. _cached_size_{0},
  239. name_(arena, from.name_) {}
  240. NoDocument::NoDocument(
  241. ::google::protobuf::Arena* arena,
  242. const NoDocument& from)
  243. : ::google::protobuf::Message(arena) {
  244. NoDocument* const _this = this;
  245. (void)_this;
  246. _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
  247. from._internal_metadata_);
  248. new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
  249. ::uint32_t cached_has_bits = _impl_._has_bits_[0];
  250. _impl_.read_time_ = (cached_has_bits & 0x00000001u)
  251. ? CreateMaybeMessage<::google::protobuf::Timestamp>(arena, *from._impl_.read_time_)
  252. : nullptr;
  253. // @@protoc_insertion_point(copy_constructor:firestore.client.NoDocument)
  254. }
  255. inline PROTOBUF_NDEBUG_INLINE NoDocument::Impl_::Impl_(
  256. ::google::protobuf::internal::InternalVisibility visibility,
  257. ::google::protobuf::Arena* arena)
  258. : _cached_size_{0},
  259. name_(arena) {}
  260. inline void NoDocument::SharedCtor(::_pb::Arena* arena) {
  261. new (&_impl_) Impl_(internal_visibility(), arena);
  262. _impl_.read_time_ = {};
  263. }
  264. NoDocument::~NoDocument() {
  265. // @@protoc_insertion_point(destructor:firestore.client.NoDocument)
  266. _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  267. SharedDtor();
  268. }
  269. inline void NoDocument::SharedDtor() {
  270. ABSL_DCHECK(GetArena() == nullptr);
  271. _impl_.name_.Destroy();
  272. delete _impl_.read_time_;
  273. _impl_.~Impl_();
  274. }
  275. PROTOBUF_NOINLINE void NoDocument::Clear() {
  276. // @@protoc_insertion_point(message_clear_start:firestore.client.NoDocument)
  277. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  278. ::uint32_t cached_has_bits = 0;
  279. // Prevent compiler warnings about cached_has_bits being unused
  280. (void) cached_has_bits;
  281. _impl_.name_.ClearToEmpty();
  282. cached_has_bits = _impl_._has_bits_[0];
  283. if (cached_has_bits & 0x00000001u) {
  284. ABSL_DCHECK(_impl_.read_time_ != nullptr);
  285. _impl_.read_time_->Clear();
  286. }
  287. _impl_._has_bits_.Clear();
  288. _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
  289. }
  290. const char* NoDocument::_InternalParse(
  291. const char* ptr, ::_pbi::ParseContext* ctx) {
  292. ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  293. return ptr;
  294. }
  295. PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
  296. const ::_pbi::TcParseTable<1, 2, 1, 40, 2> NoDocument::_table_ = {
  297. {
  298. PROTOBUF_FIELD_OFFSET(NoDocument, _impl_._has_bits_),
  299. 0, // no _extensions_
  300. 2, 8, // max_field_number, fast_idx_mask
  301. offsetof(decltype(_table_), field_lookup_table),
  302. 4294967292, // skipmap
  303. offsetof(decltype(_table_), field_entries),
  304. 2, // num_field_entries
  305. 1, // num_aux_entries
  306. offsetof(decltype(_table_), aux_entries),
  307. &_NoDocument_default_instance_._instance,
  308. ::_pbi::TcParser::GenericFallback, // fallback
  309. }, {{
  310. // .google.protobuf.Timestamp read_time = 2;
  311. {::_pbi::TcParser::FastMtS1,
  312. {18, 0, 0, PROTOBUF_FIELD_OFFSET(NoDocument, _impl_.read_time_)}},
  313. // string name = 1;
  314. {::_pbi::TcParser::FastUS1,
  315. {10, 63, 0, PROTOBUF_FIELD_OFFSET(NoDocument, _impl_.name_)}},
  316. }}, {{
  317. 65535, 65535
  318. }}, {{
  319. // string name = 1;
  320. {PROTOBUF_FIELD_OFFSET(NoDocument, _impl_.name_), -1, 0,
  321. (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
  322. // .google.protobuf.Timestamp read_time = 2;
  323. {PROTOBUF_FIELD_OFFSET(NoDocument, _impl_.read_time_), _Internal::kHasBitsOffset + 0, 0,
  324. (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
  325. }}, {{
  326. {::_pbi::TcParser::GetTable<::google::protobuf::Timestamp>()},
  327. }}, {{
  328. "\33\4\0\0\0\0\0\0"
  329. "firestore.client.NoDocument"
  330. "name"
  331. }},
  332. };
  333. ::uint8_t* NoDocument::_InternalSerialize(
  334. ::uint8_t* target,
  335. ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  336. // @@protoc_insertion_point(serialize_to_array_start:firestore.client.NoDocument)
  337. ::uint32_t cached_has_bits = 0;
  338. (void)cached_has_bits;
  339. // string name = 1;
  340. if (!this->_internal_name().empty()) {
  341. const std::string& _s = this->_internal_name();
  342. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  343. _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "firestore.client.NoDocument.name");
  344. target = stream->WriteStringMaybeAliased(1, _s, target);
  345. }
  346. cached_has_bits = _impl_._has_bits_[0];
  347. // .google.protobuf.Timestamp read_time = 2;
  348. if (cached_has_bits & 0x00000001u) {
  349. target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
  350. 2, _Internal::read_time(this),
  351. _Internal::read_time(this).GetCachedSize(), target, stream);
  352. }
  353. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  354. target =
  355. ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  356. _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  357. }
  358. // @@protoc_insertion_point(serialize_to_array_end:firestore.client.NoDocument)
  359. return target;
  360. }
  361. ::size_t NoDocument::ByteSizeLong() const {
  362. // @@protoc_insertion_point(message_byte_size_start:firestore.client.NoDocument)
  363. ::size_t total_size = 0;
  364. ::uint32_t cached_has_bits = 0;
  365. // Prevent compiler warnings about cached_has_bits being unused
  366. (void) cached_has_bits;
  367. // string name = 1;
  368. if (!this->_internal_name().empty()) {
  369. total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
  370. this->_internal_name());
  371. }
  372. // .google.protobuf.Timestamp read_time = 2;
  373. cached_has_bits = _impl_._has_bits_[0];
  374. if (cached_has_bits & 0x00000001u) {
  375. total_size +=
  376. 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.read_time_);
  377. }
  378. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  379. }
  380. const ::google::protobuf::Message::ClassData NoDocument::_class_data_ = {
  381. NoDocument::MergeImpl,
  382. nullptr, // OnDemandRegisterArenaDtor
  383. };
  384. const ::google::protobuf::Message::ClassData* NoDocument::GetClassData() const {
  385. return &_class_data_;
  386. }
  387. void NoDocument::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
  388. auto* const _this = static_cast<NoDocument*>(&to_msg);
  389. auto& from = static_cast<const NoDocument&>(from_msg);
  390. // @@protoc_insertion_point(class_specific_merge_from_start:firestore.client.NoDocument)
  391. ABSL_DCHECK_NE(&from, _this);
  392. ::uint32_t cached_has_bits = 0;
  393. (void) cached_has_bits;
  394. if (!from._internal_name().empty()) {
  395. _this->_internal_set_name(from._internal_name());
  396. }
  397. if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
  398. _this->_internal_mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(
  399. from._internal_read_time());
  400. }
  401. _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
  402. }
  403. void NoDocument::CopyFrom(const NoDocument& from) {
  404. // @@protoc_insertion_point(class_specific_copy_from_start:firestore.client.NoDocument)
  405. if (&from == this) return;
  406. Clear();
  407. MergeFrom(from);
  408. }
  409. PROTOBUF_NOINLINE bool NoDocument::IsInitialized() const {
  410. return true;
  411. }
  412. ::_pbi::CachedSize* NoDocument::AccessCachedSize() const {
  413. return &_impl_._cached_size_;
  414. }
  415. void NoDocument::InternalSwap(NoDocument* PROTOBUF_RESTRICT other) {
  416. using std::swap;
  417. auto* arena = GetArena();
  418. ABSL_DCHECK_EQ(arena, other->GetArena());
  419. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  420. swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  421. ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena);
  422. swap(_impl_.read_time_, other->_impl_.read_time_);
  423. }
  424. ::google::protobuf::Metadata NoDocument::GetMetadata() const {
  425. return ::_pbi::AssignDescriptors(
  426. &descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_getter, &descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_once,
  427. file_level_metadata_firestore_2flocal_2fmaybe_5fdocument_2eproto[0]);
  428. }
  429. // ===================================================================
  430. class UnknownDocument::_Internal {
  431. public:
  432. using HasBits = decltype(std::declval<UnknownDocument>()._impl_._has_bits_);
  433. static constexpr ::int32_t kHasBitsOffset =
  434. 8 * PROTOBUF_FIELD_OFFSET(UnknownDocument, _impl_._has_bits_);
  435. static const ::google::protobuf::Timestamp& version(const UnknownDocument* msg);
  436. static void set_has_version(HasBits* has_bits) {
  437. (*has_bits)[0] |= 1u;
  438. }
  439. };
  440. const ::google::protobuf::Timestamp& UnknownDocument::_Internal::version(const UnknownDocument* msg) {
  441. return *msg->_impl_.version_;
  442. }
  443. void UnknownDocument::clear_version() {
  444. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  445. if (_impl_.version_ != nullptr) _impl_.version_->Clear();
  446. _impl_._has_bits_[0] &= ~0x00000001u;
  447. }
  448. UnknownDocument::UnknownDocument(::google::protobuf::Arena* arena)
  449. : ::google::protobuf::Message(arena) {
  450. SharedCtor(arena);
  451. // @@protoc_insertion_point(arena_constructor:firestore.client.UnknownDocument)
  452. }
  453. inline PROTOBUF_NDEBUG_INLINE UnknownDocument::Impl_::Impl_(
  454. ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
  455. const Impl_& from)
  456. : _has_bits_{from._has_bits_},
  457. _cached_size_{0},
  458. name_(arena, from.name_) {}
  459. UnknownDocument::UnknownDocument(
  460. ::google::protobuf::Arena* arena,
  461. const UnknownDocument& from)
  462. : ::google::protobuf::Message(arena) {
  463. UnknownDocument* const _this = this;
  464. (void)_this;
  465. _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
  466. from._internal_metadata_);
  467. new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
  468. ::uint32_t cached_has_bits = _impl_._has_bits_[0];
  469. _impl_.version_ = (cached_has_bits & 0x00000001u)
  470. ? CreateMaybeMessage<::google::protobuf::Timestamp>(arena, *from._impl_.version_)
  471. : nullptr;
  472. // @@protoc_insertion_point(copy_constructor:firestore.client.UnknownDocument)
  473. }
  474. inline PROTOBUF_NDEBUG_INLINE UnknownDocument::Impl_::Impl_(
  475. ::google::protobuf::internal::InternalVisibility visibility,
  476. ::google::protobuf::Arena* arena)
  477. : _cached_size_{0},
  478. name_(arena) {}
  479. inline void UnknownDocument::SharedCtor(::_pb::Arena* arena) {
  480. new (&_impl_) Impl_(internal_visibility(), arena);
  481. _impl_.version_ = {};
  482. }
  483. UnknownDocument::~UnknownDocument() {
  484. // @@protoc_insertion_point(destructor:firestore.client.UnknownDocument)
  485. _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  486. SharedDtor();
  487. }
  488. inline void UnknownDocument::SharedDtor() {
  489. ABSL_DCHECK(GetArena() == nullptr);
  490. _impl_.name_.Destroy();
  491. delete _impl_.version_;
  492. _impl_.~Impl_();
  493. }
  494. PROTOBUF_NOINLINE void UnknownDocument::Clear() {
  495. // @@protoc_insertion_point(message_clear_start:firestore.client.UnknownDocument)
  496. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  497. ::uint32_t cached_has_bits = 0;
  498. // Prevent compiler warnings about cached_has_bits being unused
  499. (void) cached_has_bits;
  500. _impl_.name_.ClearToEmpty();
  501. cached_has_bits = _impl_._has_bits_[0];
  502. if (cached_has_bits & 0x00000001u) {
  503. ABSL_DCHECK(_impl_.version_ != nullptr);
  504. _impl_.version_->Clear();
  505. }
  506. _impl_._has_bits_.Clear();
  507. _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
  508. }
  509. const char* UnknownDocument::_InternalParse(
  510. const char* ptr, ::_pbi::ParseContext* ctx) {
  511. ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  512. return ptr;
  513. }
  514. PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
  515. const ::_pbi::TcParseTable<1, 2, 1, 45, 2> UnknownDocument::_table_ = {
  516. {
  517. PROTOBUF_FIELD_OFFSET(UnknownDocument, _impl_._has_bits_),
  518. 0, // no _extensions_
  519. 2, 8, // max_field_number, fast_idx_mask
  520. offsetof(decltype(_table_), field_lookup_table),
  521. 4294967292, // skipmap
  522. offsetof(decltype(_table_), field_entries),
  523. 2, // num_field_entries
  524. 1, // num_aux_entries
  525. offsetof(decltype(_table_), aux_entries),
  526. &_UnknownDocument_default_instance_._instance,
  527. ::_pbi::TcParser::GenericFallback, // fallback
  528. }, {{
  529. // .google.protobuf.Timestamp version = 2;
  530. {::_pbi::TcParser::FastMtS1,
  531. {18, 0, 0, PROTOBUF_FIELD_OFFSET(UnknownDocument, _impl_.version_)}},
  532. // string name = 1;
  533. {::_pbi::TcParser::FastUS1,
  534. {10, 63, 0, PROTOBUF_FIELD_OFFSET(UnknownDocument, _impl_.name_)}},
  535. }}, {{
  536. 65535, 65535
  537. }}, {{
  538. // string name = 1;
  539. {PROTOBUF_FIELD_OFFSET(UnknownDocument, _impl_.name_), -1, 0,
  540. (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
  541. // .google.protobuf.Timestamp version = 2;
  542. {PROTOBUF_FIELD_OFFSET(UnknownDocument, _impl_.version_), _Internal::kHasBitsOffset + 0, 0,
  543. (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
  544. }}, {{
  545. {::_pbi::TcParser::GetTable<::google::protobuf::Timestamp>()},
  546. }}, {{
  547. "\40\4\0\0\0\0\0\0"
  548. "firestore.client.UnknownDocument"
  549. "name"
  550. }},
  551. };
  552. ::uint8_t* UnknownDocument::_InternalSerialize(
  553. ::uint8_t* target,
  554. ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  555. // @@protoc_insertion_point(serialize_to_array_start:firestore.client.UnknownDocument)
  556. ::uint32_t cached_has_bits = 0;
  557. (void)cached_has_bits;
  558. // string name = 1;
  559. if (!this->_internal_name().empty()) {
  560. const std::string& _s = this->_internal_name();
  561. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  562. _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "firestore.client.UnknownDocument.name");
  563. target = stream->WriteStringMaybeAliased(1, _s, target);
  564. }
  565. cached_has_bits = _impl_._has_bits_[0];
  566. // .google.protobuf.Timestamp version = 2;
  567. if (cached_has_bits & 0x00000001u) {
  568. target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
  569. 2, _Internal::version(this),
  570. _Internal::version(this).GetCachedSize(), target, stream);
  571. }
  572. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  573. target =
  574. ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  575. _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  576. }
  577. // @@protoc_insertion_point(serialize_to_array_end:firestore.client.UnknownDocument)
  578. return target;
  579. }
  580. ::size_t UnknownDocument::ByteSizeLong() const {
  581. // @@protoc_insertion_point(message_byte_size_start:firestore.client.UnknownDocument)
  582. ::size_t total_size = 0;
  583. ::uint32_t cached_has_bits = 0;
  584. // Prevent compiler warnings about cached_has_bits being unused
  585. (void) cached_has_bits;
  586. // string name = 1;
  587. if (!this->_internal_name().empty()) {
  588. total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
  589. this->_internal_name());
  590. }
  591. // .google.protobuf.Timestamp version = 2;
  592. cached_has_bits = _impl_._has_bits_[0];
  593. if (cached_has_bits & 0x00000001u) {
  594. total_size +=
  595. 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.version_);
  596. }
  597. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  598. }
  599. const ::google::protobuf::Message::ClassData UnknownDocument::_class_data_ = {
  600. UnknownDocument::MergeImpl,
  601. nullptr, // OnDemandRegisterArenaDtor
  602. };
  603. const ::google::protobuf::Message::ClassData* UnknownDocument::GetClassData() const {
  604. return &_class_data_;
  605. }
  606. void UnknownDocument::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
  607. auto* const _this = static_cast<UnknownDocument*>(&to_msg);
  608. auto& from = static_cast<const UnknownDocument&>(from_msg);
  609. // @@protoc_insertion_point(class_specific_merge_from_start:firestore.client.UnknownDocument)
  610. ABSL_DCHECK_NE(&from, _this);
  611. ::uint32_t cached_has_bits = 0;
  612. (void) cached_has_bits;
  613. if (!from._internal_name().empty()) {
  614. _this->_internal_set_name(from._internal_name());
  615. }
  616. if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
  617. _this->_internal_mutable_version()->::google::protobuf::Timestamp::MergeFrom(
  618. from._internal_version());
  619. }
  620. _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
  621. }
  622. void UnknownDocument::CopyFrom(const UnknownDocument& from) {
  623. // @@protoc_insertion_point(class_specific_copy_from_start:firestore.client.UnknownDocument)
  624. if (&from == this) return;
  625. Clear();
  626. MergeFrom(from);
  627. }
  628. PROTOBUF_NOINLINE bool UnknownDocument::IsInitialized() const {
  629. return true;
  630. }
  631. ::_pbi::CachedSize* UnknownDocument::AccessCachedSize() const {
  632. return &_impl_._cached_size_;
  633. }
  634. void UnknownDocument::InternalSwap(UnknownDocument* PROTOBUF_RESTRICT other) {
  635. using std::swap;
  636. auto* arena = GetArena();
  637. ABSL_DCHECK_EQ(arena, other->GetArena());
  638. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  639. swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  640. ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena);
  641. swap(_impl_.version_, other->_impl_.version_);
  642. }
  643. ::google::protobuf::Metadata UnknownDocument::GetMetadata() const {
  644. return ::_pbi::AssignDescriptors(
  645. &descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_getter, &descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_once,
  646. file_level_metadata_firestore_2flocal_2fmaybe_5fdocument_2eproto[1]);
  647. }
  648. // ===================================================================
  649. class MaybeDocument::_Internal {
  650. public:
  651. static constexpr ::int32_t kOneofCaseOffset =
  652. PROTOBUF_FIELD_OFFSET(::firestore::client::MaybeDocument, _impl_._oneof_case_);
  653. static const ::firestore::client::NoDocument& no_document(const MaybeDocument* msg);
  654. static const ::google::firestore::v1::Document& document(const MaybeDocument* msg);
  655. static const ::firestore::client::UnknownDocument& unknown_document(const MaybeDocument* msg);
  656. };
  657. const ::firestore::client::NoDocument& MaybeDocument::_Internal::no_document(const MaybeDocument* msg) {
  658. return *msg->_impl_.document_type_.no_document_;
  659. }
  660. const ::google::firestore::v1::Document& MaybeDocument::_Internal::document(const MaybeDocument* msg) {
  661. return *msg->_impl_.document_type_.document_;
  662. }
  663. const ::firestore::client::UnknownDocument& MaybeDocument::_Internal::unknown_document(const MaybeDocument* msg) {
  664. return *msg->_impl_.document_type_.unknown_document_;
  665. }
  666. void MaybeDocument::set_allocated_no_document(::firestore::client::NoDocument* no_document) {
  667. ::google::protobuf::Arena* message_arena = GetArena();
  668. clear_document_type();
  669. if (no_document) {
  670. ::google::protobuf::Arena* submessage_arena = no_document->GetArena();
  671. if (message_arena != submessage_arena) {
  672. no_document = ::google::protobuf::internal::GetOwnedMessage(message_arena, no_document, submessage_arena);
  673. }
  674. set_has_no_document();
  675. _impl_.document_type_.no_document_ = no_document;
  676. }
  677. // @@protoc_insertion_point(field_set_allocated:firestore.client.MaybeDocument.no_document)
  678. }
  679. void MaybeDocument::set_allocated_document(::google::firestore::v1::Document* document) {
  680. ::google::protobuf::Arena* message_arena = GetArena();
  681. clear_document_type();
  682. if (document) {
  683. ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(document)->GetArena();
  684. if (message_arena != submessage_arena) {
  685. document = ::google::protobuf::internal::GetOwnedMessage(message_arena, document, submessage_arena);
  686. }
  687. set_has_document();
  688. _impl_.document_type_.document_ = document;
  689. }
  690. // @@protoc_insertion_point(field_set_allocated:firestore.client.MaybeDocument.document)
  691. }
  692. void MaybeDocument::clear_document() {
  693. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  694. if (document_type_case() == kDocument) {
  695. if (GetArena() == nullptr) {
  696. delete _impl_.document_type_.document_;
  697. }
  698. clear_has_document_type();
  699. }
  700. }
  701. void MaybeDocument::set_allocated_unknown_document(::firestore::client::UnknownDocument* unknown_document) {
  702. ::google::protobuf::Arena* message_arena = GetArena();
  703. clear_document_type();
  704. if (unknown_document) {
  705. ::google::protobuf::Arena* submessage_arena = unknown_document->GetArena();
  706. if (message_arena != submessage_arena) {
  707. unknown_document = ::google::protobuf::internal::GetOwnedMessage(message_arena, unknown_document, submessage_arena);
  708. }
  709. set_has_unknown_document();
  710. _impl_.document_type_.unknown_document_ = unknown_document;
  711. }
  712. // @@protoc_insertion_point(field_set_allocated:firestore.client.MaybeDocument.unknown_document)
  713. }
  714. MaybeDocument::MaybeDocument(::google::protobuf::Arena* arena)
  715. : ::google::protobuf::Message(arena) {
  716. SharedCtor(arena);
  717. // @@protoc_insertion_point(arena_constructor:firestore.client.MaybeDocument)
  718. }
  719. inline PROTOBUF_NDEBUG_INLINE MaybeDocument::Impl_::Impl_(
  720. ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
  721. const Impl_& from)
  722. : document_type_{},
  723. _cached_size_{0},
  724. _oneof_case_{from._oneof_case_[0]} {}
  725. MaybeDocument::MaybeDocument(
  726. ::google::protobuf::Arena* arena,
  727. const MaybeDocument& from)
  728. : ::google::protobuf::Message(arena) {
  729. MaybeDocument* const _this = this;
  730. (void)_this;
  731. _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
  732. from._internal_metadata_);
  733. new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
  734. _impl_.has_committed_mutations_ = from._impl_.has_committed_mutations_;
  735. switch (document_type_case()) {
  736. case DOCUMENT_TYPE_NOT_SET:
  737. break;
  738. case kNoDocument:
  739. _impl_.document_type_.no_document_ = CreateMaybeMessage<::firestore::client::NoDocument>(arena, *from._impl_.document_type_.no_document_);
  740. break;
  741. case kDocument:
  742. _impl_.document_type_.document_ = CreateMaybeMessage<::google::firestore::v1::Document>(arena, *from._impl_.document_type_.document_);
  743. break;
  744. case kUnknownDocument:
  745. _impl_.document_type_.unknown_document_ = CreateMaybeMessage<::firestore::client::UnknownDocument>(arena, *from._impl_.document_type_.unknown_document_);
  746. break;
  747. }
  748. // @@protoc_insertion_point(copy_constructor:firestore.client.MaybeDocument)
  749. }
  750. inline PROTOBUF_NDEBUG_INLINE MaybeDocument::Impl_::Impl_(
  751. ::google::protobuf::internal::InternalVisibility visibility,
  752. ::google::protobuf::Arena* arena)
  753. : document_type_{},
  754. _cached_size_{0},
  755. _oneof_case_{} {}
  756. inline void MaybeDocument::SharedCtor(::_pb::Arena* arena) {
  757. new (&_impl_) Impl_(internal_visibility(), arena);
  758. _impl_.has_committed_mutations_ = {};
  759. }
  760. MaybeDocument::~MaybeDocument() {
  761. // @@protoc_insertion_point(destructor:firestore.client.MaybeDocument)
  762. _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  763. SharedDtor();
  764. }
  765. inline void MaybeDocument::SharedDtor() {
  766. ABSL_DCHECK(GetArena() == nullptr);
  767. if (has_document_type()) {
  768. clear_document_type();
  769. }
  770. _impl_.~Impl_();
  771. }
  772. void MaybeDocument::clear_document_type() {
  773. // @@protoc_insertion_point(one_of_clear_start:firestore.client.MaybeDocument)
  774. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  775. switch (document_type_case()) {
  776. case kNoDocument: {
  777. if (GetArena() == nullptr) {
  778. delete _impl_.document_type_.no_document_;
  779. }
  780. break;
  781. }
  782. case kDocument: {
  783. if (GetArena() == nullptr) {
  784. delete _impl_.document_type_.document_;
  785. }
  786. break;
  787. }
  788. case kUnknownDocument: {
  789. if (GetArena() == nullptr) {
  790. delete _impl_.document_type_.unknown_document_;
  791. }
  792. break;
  793. }
  794. case DOCUMENT_TYPE_NOT_SET: {
  795. break;
  796. }
  797. }
  798. _impl_._oneof_case_[0] = DOCUMENT_TYPE_NOT_SET;
  799. }
  800. PROTOBUF_NOINLINE void MaybeDocument::Clear() {
  801. // @@protoc_insertion_point(message_clear_start:firestore.client.MaybeDocument)
  802. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  803. ::uint32_t cached_has_bits = 0;
  804. // Prevent compiler warnings about cached_has_bits being unused
  805. (void) cached_has_bits;
  806. _impl_.has_committed_mutations_ = false;
  807. clear_document_type();
  808. _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
  809. }
  810. const char* MaybeDocument::_InternalParse(
  811. const char* ptr, ::_pbi::ParseContext* ctx) {
  812. ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  813. return ptr;
  814. }
  815. PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
  816. const ::_pbi::TcParseTable<0, 4, 3, 0, 2> MaybeDocument::_table_ = {
  817. {
  818. 0, // no _has_bits_
  819. 0, // no _extensions_
  820. 4, 0, // max_field_number, fast_idx_mask
  821. offsetof(decltype(_table_), field_lookup_table),
  822. 4294967280, // skipmap
  823. offsetof(decltype(_table_), field_entries),
  824. 4, // num_field_entries
  825. 3, // num_aux_entries
  826. offsetof(decltype(_table_), aux_entries),
  827. &_MaybeDocument_default_instance_._instance,
  828. ::_pbi::TcParser::GenericFallback, // fallback
  829. }, {{
  830. // bool has_committed_mutations = 4;
  831. {::_pbi::TcParser::SingularVarintNoZag1<bool, offsetof(MaybeDocument, _impl_.has_committed_mutations_), 63>(),
  832. {32, 63, 0, PROTOBUF_FIELD_OFFSET(MaybeDocument, _impl_.has_committed_mutations_)}},
  833. }}, {{
  834. 65535, 65535
  835. }}, {{
  836. // .firestore.client.NoDocument no_document = 1;
  837. {PROTOBUF_FIELD_OFFSET(MaybeDocument, _impl_.document_type_.no_document_), _Internal::kOneofCaseOffset + 0, 0,
  838. (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
  839. // .google.firestore.v1.Document document = 2;
  840. {PROTOBUF_FIELD_OFFSET(MaybeDocument, _impl_.document_type_.document_), _Internal::kOneofCaseOffset + 0, 1,
  841. (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
  842. // .firestore.client.UnknownDocument unknown_document = 3;
  843. {PROTOBUF_FIELD_OFFSET(MaybeDocument, _impl_.document_type_.unknown_document_), _Internal::kOneofCaseOffset + 0, 2,
  844. (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
  845. // bool has_committed_mutations = 4;
  846. {PROTOBUF_FIELD_OFFSET(MaybeDocument, _impl_.has_committed_mutations_), 0, 0,
  847. (0 | ::_fl::kFcSingular | ::_fl::kBool)},
  848. }}, {{
  849. {::_pbi::TcParser::GetTable<::firestore::client::NoDocument>()},
  850. {::_pbi::TcParser::GetTable<::google::firestore::v1::Document>()},
  851. {::_pbi::TcParser::GetTable<::firestore::client::UnknownDocument>()},
  852. }}, {{
  853. }},
  854. };
  855. ::uint8_t* MaybeDocument::_InternalSerialize(
  856. ::uint8_t* target,
  857. ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  858. // @@protoc_insertion_point(serialize_to_array_start:firestore.client.MaybeDocument)
  859. ::uint32_t cached_has_bits = 0;
  860. (void)cached_has_bits;
  861. switch (document_type_case()) {
  862. case kNoDocument: {
  863. target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
  864. 1, _Internal::no_document(this),
  865. _Internal::no_document(this).GetCachedSize(), target, stream);
  866. break;
  867. }
  868. case kDocument: {
  869. target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
  870. 2, _Internal::document(this),
  871. _Internal::document(this).GetCachedSize(), target, stream);
  872. break;
  873. }
  874. case kUnknownDocument: {
  875. target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
  876. 3, _Internal::unknown_document(this),
  877. _Internal::unknown_document(this).GetCachedSize(), target, stream);
  878. break;
  879. }
  880. default:
  881. break;
  882. }
  883. // bool has_committed_mutations = 4;
  884. if (this->_internal_has_committed_mutations() != 0) {
  885. target = stream->EnsureSpace(target);
  886. target = ::_pbi::WireFormatLite::WriteBoolToArray(
  887. 4, this->_internal_has_committed_mutations(), target);
  888. }
  889. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  890. target =
  891. ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  892. _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  893. }
  894. // @@protoc_insertion_point(serialize_to_array_end:firestore.client.MaybeDocument)
  895. return target;
  896. }
  897. ::size_t MaybeDocument::ByteSizeLong() const {
  898. // @@protoc_insertion_point(message_byte_size_start:firestore.client.MaybeDocument)
  899. ::size_t total_size = 0;
  900. ::uint32_t cached_has_bits = 0;
  901. // Prevent compiler warnings about cached_has_bits being unused
  902. (void) cached_has_bits;
  903. // bool has_committed_mutations = 4;
  904. if (this->_internal_has_committed_mutations() != 0) {
  905. total_size += 2;
  906. }
  907. switch (document_type_case()) {
  908. // .firestore.client.NoDocument no_document = 1;
  909. case kNoDocument: {
  910. total_size +=
  911. 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.document_type_.no_document_);
  912. break;
  913. }
  914. // .google.firestore.v1.Document document = 2;
  915. case kDocument: {
  916. total_size +=
  917. 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.document_type_.document_);
  918. break;
  919. }
  920. // .firestore.client.UnknownDocument unknown_document = 3;
  921. case kUnknownDocument: {
  922. total_size +=
  923. 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.document_type_.unknown_document_);
  924. break;
  925. }
  926. case DOCUMENT_TYPE_NOT_SET: {
  927. break;
  928. }
  929. }
  930. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  931. }
  932. const ::google::protobuf::Message::ClassData MaybeDocument::_class_data_ = {
  933. MaybeDocument::MergeImpl,
  934. nullptr, // OnDemandRegisterArenaDtor
  935. };
  936. const ::google::protobuf::Message::ClassData* MaybeDocument::GetClassData() const {
  937. return &_class_data_;
  938. }
  939. void MaybeDocument::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
  940. auto* const _this = static_cast<MaybeDocument*>(&to_msg);
  941. auto& from = static_cast<const MaybeDocument&>(from_msg);
  942. // @@protoc_insertion_point(class_specific_merge_from_start:firestore.client.MaybeDocument)
  943. ABSL_DCHECK_NE(&from, _this);
  944. ::uint32_t cached_has_bits = 0;
  945. (void) cached_has_bits;
  946. if (from._internal_has_committed_mutations() != 0) {
  947. _this->_internal_set_has_committed_mutations(from._internal_has_committed_mutations());
  948. }
  949. switch (from.document_type_case()) {
  950. case kNoDocument: {
  951. _this->_internal_mutable_no_document()->::firestore::client::NoDocument::MergeFrom(
  952. from._internal_no_document());
  953. break;
  954. }
  955. case kDocument: {
  956. _this->_internal_mutable_document()->::google::firestore::v1::Document::MergeFrom(
  957. from._internal_document());
  958. break;
  959. }
  960. case kUnknownDocument: {
  961. _this->_internal_mutable_unknown_document()->::firestore::client::UnknownDocument::MergeFrom(
  962. from._internal_unknown_document());
  963. break;
  964. }
  965. case DOCUMENT_TYPE_NOT_SET: {
  966. break;
  967. }
  968. }
  969. _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
  970. }
  971. void MaybeDocument::CopyFrom(const MaybeDocument& from) {
  972. // @@protoc_insertion_point(class_specific_copy_from_start:firestore.client.MaybeDocument)
  973. if (&from == this) return;
  974. Clear();
  975. MergeFrom(from);
  976. }
  977. PROTOBUF_NOINLINE bool MaybeDocument::IsInitialized() const {
  978. return true;
  979. }
  980. ::_pbi::CachedSize* MaybeDocument::AccessCachedSize() const {
  981. return &_impl_._cached_size_;
  982. }
  983. void MaybeDocument::InternalSwap(MaybeDocument* PROTOBUF_RESTRICT other) {
  984. using std::swap;
  985. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  986. swap(_impl_.has_committed_mutations_, other->_impl_.has_committed_mutations_);
  987. swap(_impl_.document_type_, other->_impl_.document_type_);
  988. swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
  989. }
  990. ::google::protobuf::Metadata MaybeDocument::GetMetadata() const {
  991. return ::_pbi::AssignDescriptors(
  992. &descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_getter, &descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_once,
  993. file_level_metadata_firestore_2flocal_2fmaybe_5fdocument_2eproto[2]);
  994. }
  995. // @@protoc_insertion_point(namespace_scope)
  996. } // namespace client
  997. } // namespace firestore
  998. namespace google {
  999. namespace protobuf {
  1000. } // namespace protobuf
  1001. } // namespace google
  1002. // @@protoc_insertion_point(global_scope)
  1003. #include "google/protobuf/port_undef.inc"