| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373 |
- /*
- * Copyright 2018 Google
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: firestore/local/maybe_document.proto
- #include "firestore/local/maybe_document.pb.h"
- #include <algorithm>
- #include <google/protobuf/stubs/common.h>
- #include <google/protobuf/io/coded_stream.h>
- #include <google/protobuf/extension_set.h>
- #include <google/protobuf/wire_format_lite.h>
- #include <google/protobuf/descriptor.h>
- #include <google/protobuf/generated_message_reflection.h>
- #include <google/protobuf/reflection_ops.h>
- #include <google/protobuf/wire_format.h>
- // @@protoc_insertion_point(includes)
- #include <google/protobuf/port_def.inc>
- extern PROTOBUF_INTERNAL_EXPORT_firestore_2flocal_2fmaybe_5fdocument_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_NoDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto;
- extern PROTOBUF_INTERNAL_EXPORT_firestore_2flocal_2fmaybe_5fdocument_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_UnknownDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto;
- extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fdocument_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_Document_google_2ffirestore_2fv1_2fdocument_2eproto;
- extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftimestamp_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto;
- namespace firestore {
- namespace client {
- class NoDocumentDefaultTypeInternal {
- public:
- ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<NoDocument> _instance;
- } _NoDocument_default_instance_;
- class UnknownDocumentDefaultTypeInternal {
- public:
- ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<UnknownDocument> _instance;
- } _UnknownDocument_default_instance_;
- class MaybeDocumentDefaultTypeInternal {
- public:
- ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<MaybeDocument> _instance;
- const ::firestore::client::NoDocument* no_document_;
- const ::google::firestore::v1::Document* document_;
- const ::firestore::client::UnknownDocument* unknown_document_;
- } _MaybeDocument_default_instance_;
- } // namespace client
- } // namespace firestore
- static void InitDefaultsscc_info_MaybeDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::firestore::client::_MaybeDocument_default_instance_;
- new (ptr) ::firestore::client::MaybeDocument();
- ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
- }
- ::firestore::client::MaybeDocument::InitAsDefaultInstance();
- }
- ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_MaybeDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto =
- {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsscc_info_MaybeDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto}, {
- &scc_info_NoDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto.base,
- &scc_info_Document_google_2ffirestore_2fv1_2fdocument_2eproto.base,
- &scc_info_UnknownDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto.base,}};
- static void InitDefaultsscc_info_NoDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::firestore::client::_NoDocument_default_instance_;
- new (ptr) ::firestore::client::NoDocument();
- ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
- }
- ::firestore::client::NoDocument::InitAsDefaultInstance();
- }
- ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_NoDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto =
- {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_NoDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto}, {
- &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};
- static void InitDefaultsscc_info_UnknownDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- {
- void* ptr = &::firestore::client::_UnknownDocument_default_instance_;
- new (ptr) ::firestore::client::UnknownDocument();
- ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
- }
- ::firestore::client::UnknownDocument::InitAsDefaultInstance();
- }
- ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_UnknownDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto =
- {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_UnknownDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto}, {
- &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};
- static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_firestore_2flocal_2fmaybe_5fdocument_2eproto[3];
- static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_firestore_2flocal_2fmaybe_5fdocument_2eproto = nullptr;
- static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_firestore_2flocal_2fmaybe_5fdocument_2eproto = nullptr;
- const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_firestore_2flocal_2fmaybe_5fdocument_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::firestore::client::NoDocument, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::firestore::client::NoDocument, name_),
- PROTOBUF_FIELD_OFFSET(::firestore::client::NoDocument, read_time_),
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::firestore::client::UnknownDocument, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- PROTOBUF_FIELD_OFFSET(::firestore::client::UnknownDocument, name_),
- PROTOBUF_FIELD_OFFSET(::firestore::client::UnknownDocument, version_),
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::firestore::client::MaybeDocument, _internal_metadata_),
- ~0u, // no _extensions_
- PROTOBUF_FIELD_OFFSET(::firestore::client::MaybeDocument, _oneof_case_[0]),
- ~0u, // no _weak_field_map_
- offsetof(::firestore::client::MaybeDocumentDefaultTypeInternal, no_document_),
- offsetof(::firestore::client::MaybeDocumentDefaultTypeInternal, document_),
- offsetof(::firestore::client::MaybeDocumentDefaultTypeInternal, unknown_document_),
- PROTOBUF_FIELD_OFFSET(::firestore::client::MaybeDocument, has_committed_mutations_),
- PROTOBUF_FIELD_OFFSET(::firestore::client::MaybeDocument, document_type_),
- };
- static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
- { 0, -1, sizeof(::firestore::client::NoDocument)},
- { 7, -1, sizeof(::firestore::client::UnknownDocument)},
- { 14, -1, sizeof(::firestore::client::MaybeDocument)},
- };
- static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::firestore::client::_NoDocument_default_instance_),
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::firestore::client::_UnknownDocument_default_instance_),
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::firestore::client::_MaybeDocument_default_instance_),
- };
- const char descriptor_table_protodef_firestore_2flocal_2fmaybe_5fdocument_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
- "\n$firestore/local/maybe_document.proto\022\020"
- "firestore.client\032\"google/firestore/v1/do"
- "cument.proto\032\037google/protobuf/timestamp."
- "proto\"I\n\nNoDocument\022\014\n\004name\030\001 \001(\t\022-\n\trea"
- "d_time\030\002 \001(\0132\032.google.protobuf.Timestamp"
- "\"L\n\017UnknownDocument\022\014\n\004name\030\001 \001(\t\022+\n\007ver"
- "sion\030\002 \001(\0132\032.google.protobuf.Timestamp\"\350"
- "\001\n\rMaybeDocument\0223\n\013no_document\030\001 \001(\0132\034."
- "firestore.client.NoDocumentH\000\0221\n\010documen"
- "t\030\002 \001(\0132\035.google.firestore.v1.DocumentH\000"
- "\022=\n\020unknown_document\030\003 \001(\0132!.firestore.c"
- "lient.UnknownDocumentH\000\022\037\n\027has_committed"
- "_mutations\030\004 \001(\010B\017\n\rdocument_typeB/\n#com"
- ".google.firebase.firestore.protoP\001\242\002\005FST"
- "PBb\006proto3"
- ;
- static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_deps[2] = {
- &::descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto,
- &::descriptor_table_google_2fprotobuf_2ftimestamp_2eproto,
- };
- static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_sccs[3] = {
- &scc_info_MaybeDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto.base,
- &scc_info_NoDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto.base,
- &scc_info_UnknownDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto.base,
- };
- static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_once;
- static bool descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_initialized = false;
- const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto = {
- &descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_initialized, descriptor_table_protodef_firestore_2flocal_2fmaybe_5fdocument_2eproto, "firestore/local/maybe_document.proto", 570,
- &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,
- schemas, file_default_instances, TableStruct_firestore_2flocal_2fmaybe_5fdocument_2eproto::offsets,
- 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,
- };
- // Force running AddDescriptors() at dynamic initialization time.
- static bool dynamic_init_dummy_firestore_2flocal_2fmaybe_5fdocument_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto), true);
- namespace firestore {
- namespace client {
- // ===================================================================
- void NoDocument::InitAsDefaultInstance() {
- ::firestore::client::_NoDocument_default_instance_._instance.get_mutable()->read_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
- PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
- }
- class NoDocument::_Internal {
- public:
- static const PROTOBUF_NAMESPACE_ID::Timestamp& read_time(const NoDocument* msg);
- };
- const PROTOBUF_NAMESPACE_ID::Timestamp&
- NoDocument::_Internal::read_time(const NoDocument* msg) {
- return *msg->read_time_;
- }
- void NoDocument::clear_read_time() {
- if (GetArenaNoVirtual() == nullptr && read_time_ != nullptr) {
- delete read_time_;
- }
- read_time_ = nullptr;
- }
- NoDocument::NoDocument()
- : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
- SharedCtor();
- // @@protoc_insertion_point(constructor:firestore.client.NoDocument)
- }
- NoDocument::NoDocument(const NoDocument& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _internal_metadata_(nullptr) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (!from.name().empty()) {
- name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
- }
- if (from.has_read_time()) {
- read_time_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.read_time_);
- } else {
- read_time_ = nullptr;
- }
- // @@protoc_insertion_point(copy_constructor:firestore.client.NoDocument)
- }
- void NoDocument::SharedCtor() {
- ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_NoDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto.base);
- name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- read_time_ = nullptr;
- }
- NoDocument::~NoDocument() {
- // @@protoc_insertion_point(destructor:firestore.client.NoDocument)
- SharedDtor();
- }
- void NoDocument::SharedDtor() {
- name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete read_time_;
- }
- void NoDocument::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const NoDocument& NoDocument::default_instance() {
- ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_NoDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto.base);
- return *internal_default_instance();
- }
- void NoDocument::Clear() {
- // @@protoc_insertion_point(message_clear_start:firestore.client.NoDocument)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (GetArenaNoVirtual() == nullptr && read_time_ != nullptr) {
- delete read_time_;
- }
- read_time_ = nullptr;
- _internal_metadata_.Clear();
- }
- #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- const char* NoDocument::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
- #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
- while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- CHK_(ptr);
- switch (tag >> 3) {
- // string name = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "firestore.client.NoDocument.name");
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // .google.protobuf.Timestamp read_time = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
- ptr = ctx->ParseMessage(mutable_read_time(), ptr);
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- default: {
- handle_unusual:
- if ((tag & 7) == 4 || tag == 0) {
- ctx->SetLastTag(tag);
- goto success;
- }
- ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
- CHK_(ptr != nullptr);
- continue;
- }
- } // switch
- } // while
- success:
- return ptr;
- failure:
- ptr = nullptr;
- goto success;
- #undef CHK_
- }
- #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- bool NoDocument::MergePartialFromCodedStream(
- ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
- // @@protoc_insertion_point(parse_start:firestore.client.NoDocument)
- for (;;) {
- ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // string name = 1;
- case 1: {
- if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
- input, this->mutable_name()));
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->name().data(), static_cast<int>(this->name().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
- "firestore.client.NoDocument.name"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.Timestamp read_time = 2;
- case 2: {
- if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
- input, mutable_read_time()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:firestore.client.NoDocument)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:firestore.client.NoDocument)
- return false;
- #undef DO_
- }
- #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- void NoDocument::SerializeWithCachedSizes(
- ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:firestore.client.NoDocument)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string name = 1;
- if (this->name().size() > 0) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->name().data(), static_cast<int>(this->name().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "firestore.client.NoDocument.name");
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->name(), output);
- }
- // .google.protobuf.Timestamp read_time = 2;
- if (this->has_read_time()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
- 2, _Internal::read_time(this), output);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
- _internal_metadata_.unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:firestore.client.NoDocument)
- }
- ::PROTOBUF_NAMESPACE_ID::uint8* NoDocument::InternalSerializeWithCachedSizesToArray(
- ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:firestore.client.NoDocument)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string name = 1;
- if (this->name().size() > 0) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->name().data(), static_cast<int>(this->name().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "firestore.client.NoDocument.name");
- target =
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
- 1, this->name(), target);
- }
- // .google.protobuf.Timestamp read_time = 2;
- if (this->has_read_time()) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 2, _Internal::read_time(this), target);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:firestore.client.NoDocument)
- return target;
- }
- size_t NoDocument::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:firestore.client.NoDocument)
- size_t total_size = 0;
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
- _internal_metadata_.unknown_fields());
- }
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- // string name = 1;
- if (this->name().size() > 0) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->name());
- }
- // .google.protobuf.Timestamp read_time = 2;
- if (this->has_read_time()) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *read_time_);
- }
- int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void NoDocument::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:firestore.client.NoDocument)
- GOOGLE_DCHECK_NE(&from, this);
- const NoDocument* source =
- ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<NoDocument>(
- &from);
- if (source == nullptr) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:firestore.client.NoDocument)
- ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:firestore.client.NoDocument)
- MergeFrom(*source);
- }
- }
- void NoDocument::MergeFrom(const NoDocument& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:firestore.client.NoDocument)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- if (from.name().size() > 0) {
- name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
- }
- if (from.has_read_time()) {
- mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.read_time());
- }
- }
- void NoDocument::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:firestore.client.NoDocument)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void NoDocument::CopyFrom(const NoDocument& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:firestore.client.NoDocument)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool NoDocument::IsInitialized() const {
- return true;
- }
- void NoDocument::InternalSwap(NoDocument* other) {
- using std::swap;
- _internal_metadata_.Swap(&other->_internal_metadata_);
- name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- swap(read_time_, other->read_time_);
- }
- ::PROTOBUF_NAMESPACE_ID::Metadata NoDocument::GetMetadata() const {
- return GetMetadataStatic();
- }
- // ===================================================================
- void UnknownDocument::InitAsDefaultInstance() {
- ::firestore::client::_UnknownDocument_default_instance_._instance.get_mutable()->version_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
- PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
- }
- class UnknownDocument::_Internal {
- public:
- static const PROTOBUF_NAMESPACE_ID::Timestamp& version(const UnknownDocument* msg);
- };
- const PROTOBUF_NAMESPACE_ID::Timestamp&
- UnknownDocument::_Internal::version(const UnknownDocument* msg) {
- return *msg->version_;
- }
- void UnknownDocument::clear_version() {
- if (GetArenaNoVirtual() == nullptr && version_ != nullptr) {
- delete version_;
- }
- version_ = nullptr;
- }
- UnknownDocument::UnknownDocument()
- : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
- SharedCtor();
- // @@protoc_insertion_point(constructor:firestore.client.UnknownDocument)
- }
- UnknownDocument::UnknownDocument(const UnknownDocument& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _internal_metadata_(nullptr) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (!from.name().empty()) {
- name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
- }
- if (from.has_version()) {
- version_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.version_);
- } else {
- version_ = nullptr;
- }
- // @@protoc_insertion_point(copy_constructor:firestore.client.UnknownDocument)
- }
- void UnknownDocument::SharedCtor() {
- ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_UnknownDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto.base);
- name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- version_ = nullptr;
- }
- UnknownDocument::~UnknownDocument() {
- // @@protoc_insertion_point(destructor:firestore.client.UnknownDocument)
- SharedDtor();
- }
- void UnknownDocument::SharedDtor() {
- name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete version_;
- }
- void UnknownDocument::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const UnknownDocument& UnknownDocument::default_instance() {
- ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_UnknownDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto.base);
- return *internal_default_instance();
- }
- void UnknownDocument::Clear() {
- // @@protoc_insertion_point(message_clear_start:firestore.client.UnknownDocument)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (GetArenaNoVirtual() == nullptr && version_ != nullptr) {
- delete version_;
- }
- version_ = nullptr;
- _internal_metadata_.Clear();
- }
- #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- const char* UnknownDocument::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
- #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
- while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- CHK_(ptr);
- switch (tag >> 3) {
- // string name = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "firestore.client.UnknownDocument.name");
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // .google.protobuf.Timestamp version = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
- ptr = ctx->ParseMessage(mutable_version(), ptr);
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- default: {
- handle_unusual:
- if ((tag & 7) == 4 || tag == 0) {
- ctx->SetLastTag(tag);
- goto success;
- }
- ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
- CHK_(ptr != nullptr);
- continue;
- }
- } // switch
- } // while
- success:
- return ptr;
- failure:
- ptr = nullptr;
- goto success;
- #undef CHK_
- }
- #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- bool UnknownDocument::MergePartialFromCodedStream(
- ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
- // @@protoc_insertion_point(parse_start:firestore.client.UnknownDocument)
- for (;;) {
- ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // string name = 1;
- case 1: {
- if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
- input, this->mutable_name()));
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->name().data(), static_cast<int>(this->name().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
- "firestore.client.UnknownDocument.name"));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.protobuf.Timestamp version = 2;
- case 2: {
- if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
- input, mutable_version()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:firestore.client.UnknownDocument)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:firestore.client.UnknownDocument)
- return false;
- #undef DO_
- }
- #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- void UnknownDocument::SerializeWithCachedSizes(
- ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:firestore.client.UnknownDocument)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string name = 1;
- if (this->name().size() > 0) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->name().data(), static_cast<int>(this->name().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "firestore.client.UnknownDocument.name");
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->name(), output);
- }
- // .google.protobuf.Timestamp version = 2;
- if (this->has_version()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
- 2, _Internal::version(this), output);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
- _internal_metadata_.unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:firestore.client.UnknownDocument)
- }
- ::PROTOBUF_NAMESPACE_ID::uint8* UnknownDocument::InternalSerializeWithCachedSizesToArray(
- ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:firestore.client.UnknownDocument)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // string name = 1;
- if (this->name().size() > 0) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
- this->name().data(), static_cast<int>(this->name().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
- "firestore.client.UnknownDocument.name");
- target =
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
- 1, this->name(), target);
- }
- // .google.protobuf.Timestamp version = 2;
- if (this->has_version()) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 2, _Internal::version(this), target);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:firestore.client.UnknownDocument)
- return target;
- }
- size_t UnknownDocument::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:firestore.client.UnknownDocument)
- size_t total_size = 0;
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
- _internal_metadata_.unknown_fields());
- }
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- // string name = 1;
- if (this->name().size() > 0) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->name());
- }
- // .google.protobuf.Timestamp version = 2;
- if (this->has_version()) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *version_);
- }
- int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void UnknownDocument::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:firestore.client.UnknownDocument)
- GOOGLE_DCHECK_NE(&from, this);
- const UnknownDocument* source =
- ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<UnknownDocument>(
- &from);
- if (source == nullptr) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:firestore.client.UnknownDocument)
- ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:firestore.client.UnknownDocument)
- MergeFrom(*source);
- }
- }
- void UnknownDocument::MergeFrom(const UnknownDocument& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:firestore.client.UnknownDocument)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- if (from.name().size() > 0) {
- name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
- }
- if (from.has_version()) {
- mutable_version()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from.version());
- }
- }
- void UnknownDocument::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:firestore.client.UnknownDocument)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void UnknownDocument::CopyFrom(const UnknownDocument& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:firestore.client.UnknownDocument)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool UnknownDocument::IsInitialized() const {
- return true;
- }
- void UnknownDocument::InternalSwap(UnknownDocument* other) {
- using std::swap;
- _internal_metadata_.Swap(&other->_internal_metadata_);
- name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- swap(version_, other->version_);
- }
- ::PROTOBUF_NAMESPACE_ID::Metadata UnknownDocument::GetMetadata() const {
- return GetMetadataStatic();
- }
- // ===================================================================
- void MaybeDocument::InitAsDefaultInstance() {
- ::firestore::client::_MaybeDocument_default_instance_.no_document_ = const_cast< ::firestore::client::NoDocument*>(
- ::firestore::client::NoDocument::internal_default_instance());
- ::firestore::client::_MaybeDocument_default_instance_.document_ = const_cast< ::google::firestore::v1::Document*>(
- ::google::firestore::v1::Document::internal_default_instance());
- ::firestore::client::_MaybeDocument_default_instance_.unknown_document_ = const_cast< ::firestore::client::UnknownDocument*>(
- ::firestore::client::UnknownDocument::internal_default_instance());
- }
- class MaybeDocument::_Internal {
- public:
- static const ::firestore::client::NoDocument& no_document(const MaybeDocument* msg);
- static const ::google::firestore::v1::Document& document(const MaybeDocument* msg);
- static const ::firestore::client::UnknownDocument& unknown_document(const MaybeDocument* msg);
- };
- const ::firestore::client::NoDocument&
- MaybeDocument::_Internal::no_document(const MaybeDocument* msg) {
- return *msg->document_type_.no_document_;
- }
- const ::google::firestore::v1::Document&
- MaybeDocument::_Internal::document(const MaybeDocument* msg) {
- return *msg->document_type_.document_;
- }
- const ::firestore::client::UnknownDocument&
- MaybeDocument::_Internal::unknown_document(const MaybeDocument* msg) {
- return *msg->document_type_.unknown_document_;
- }
- void MaybeDocument::set_allocated_no_document(::firestore::client::NoDocument* no_document) {
- ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
- clear_document_type();
- if (no_document) {
- ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
- if (message_arena != submessage_arena) {
- no_document = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
- message_arena, no_document, submessage_arena);
- }
- set_has_no_document();
- document_type_.no_document_ = no_document;
- }
- // @@protoc_insertion_point(field_set_allocated:firestore.client.MaybeDocument.no_document)
- }
- void MaybeDocument::set_allocated_document(::google::firestore::v1::Document* document) {
- ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
- clear_document_type();
- if (document) {
- ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
- if (message_arena != submessage_arena) {
- document = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
- message_arena, document, submessage_arena);
- }
- set_has_document();
- document_type_.document_ = document;
- }
- // @@protoc_insertion_point(field_set_allocated:firestore.client.MaybeDocument.document)
- }
- void MaybeDocument::clear_document() {
- if (has_document()) {
- delete document_type_.document_;
- clear_has_document_type();
- }
- }
- void MaybeDocument::set_allocated_unknown_document(::firestore::client::UnknownDocument* unknown_document) {
- ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
- clear_document_type();
- if (unknown_document) {
- ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
- if (message_arena != submessage_arena) {
- unknown_document = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
- message_arena, unknown_document, submessage_arena);
- }
- set_has_unknown_document();
- document_type_.unknown_document_ = unknown_document;
- }
- // @@protoc_insertion_point(field_set_allocated:firestore.client.MaybeDocument.unknown_document)
- }
- MaybeDocument::MaybeDocument()
- : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
- SharedCtor();
- // @@protoc_insertion_point(constructor:firestore.client.MaybeDocument)
- }
- MaybeDocument::MaybeDocument(const MaybeDocument& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _internal_metadata_(nullptr) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- has_committed_mutations_ = from.has_committed_mutations_;
- clear_has_document_type();
- switch (from.document_type_case()) {
- case kNoDocument: {
- mutable_no_document()->::firestore::client::NoDocument::MergeFrom(from.no_document());
- break;
- }
- case kDocument: {
- mutable_document()->::google::firestore::v1::Document::MergeFrom(from.document());
- break;
- }
- case kUnknownDocument: {
- mutable_unknown_document()->::firestore::client::UnknownDocument::MergeFrom(from.unknown_document());
- break;
- }
- case DOCUMENT_TYPE_NOT_SET: {
- break;
- }
- }
- // @@protoc_insertion_point(copy_constructor:firestore.client.MaybeDocument)
- }
- void MaybeDocument::SharedCtor() {
- ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_MaybeDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto.base);
- has_committed_mutations_ = false;
- clear_has_document_type();
- }
- MaybeDocument::~MaybeDocument() {
- // @@protoc_insertion_point(destructor:firestore.client.MaybeDocument)
- SharedDtor();
- }
- void MaybeDocument::SharedDtor() {
- if (has_document_type()) {
- clear_document_type();
- }
- }
- void MaybeDocument::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- const MaybeDocument& MaybeDocument::default_instance() {
- ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_MaybeDocument_firestore_2flocal_2fmaybe_5fdocument_2eproto.base);
- return *internal_default_instance();
- }
- void MaybeDocument::clear_document_type() {
- // @@protoc_insertion_point(one_of_clear_start:firestore.client.MaybeDocument)
- switch (document_type_case()) {
- case kNoDocument: {
- delete document_type_.no_document_;
- break;
- }
- case kDocument: {
- delete document_type_.document_;
- break;
- }
- case kUnknownDocument: {
- delete document_type_.unknown_document_;
- break;
- }
- case DOCUMENT_TYPE_NOT_SET: {
- break;
- }
- }
- _oneof_case_[0] = DOCUMENT_TYPE_NOT_SET;
- }
- void MaybeDocument::Clear() {
- // @@protoc_insertion_point(message_clear_start:firestore.client.MaybeDocument)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- has_committed_mutations_ = false;
- clear_document_type();
- _internal_metadata_.Clear();
- }
- #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- const char* MaybeDocument::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
- #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
- while (!ctx->Done(&ptr)) {
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- CHK_(ptr);
- switch (tag >> 3) {
- // .firestore.client.NoDocument no_document = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
- ptr = ctx->ParseMessage(mutable_no_document(), ptr);
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // .google.firestore.v1.Document document = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
- ptr = ctx->ParseMessage(mutable_document(), ptr);
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // .firestore.client.UnknownDocument unknown_document = 3;
- case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
- ptr = ctx->ParseMessage(mutable_unknown_document(), ptr);
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- // bool has_committed_mutations = 4;
- case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
- has_committed_mutations_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
- CHK_(ptr);
- } else goto handle_unusual;
- continue;
- default: {
- handle_unusual:
- if ((tag & 7) == 4 || tag == 0) {
- ctx->SetLastTag(tag);
- goto success;
- }
- ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
- CHK_(ptr != nullptr);
- continue;
- }
- } // switch
- } // while
- success:
- return ptr;
- failure:
- ptr = nullptr;
- goto success;
- #undef CHK_
- }
- #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- bool MaybeDocument::MergePartialFromCodedStream(
- ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
- ::PROTOBUF_NAMESPACE_ID::uint32 tag;
- // @@protoc_insertion_point(parse_start:firestore.client.MaybeDocument)
- for (;;) {
- ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // .firestore.client.NoDocument no_document = 1;
- case 1: {
- if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
- input, mutable_no_document()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .google.firestore.v1.Document document = 2;
- case 2: {
- if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
- input, mutable_document()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // .firestore.client.UnknownDocument unknown_document = 3;
- case 3: {
- if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
- input, mutable_unknown_document()));
- } else {
- goto handle_unusual;
- }
- break;
- }
- // bool has_committed_mutations = 4;
- case 4: {
- if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) {
- DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
- bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
- input, &has_committed_mutations_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:firestore.client.MaybeDocument)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:firestore.client.MaybeDocument)
- return false;
- #undef DO_
- }
- #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
- void MaybeDocument::SerializeWithCachedSizes(
- ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:firestore.client.MaybeDocument)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // .firestore.client.NoDocument no_document = 1;
- if (has_no_document()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
- 1, _Internal::no_document(this), output);
- }
- // .google.firestore.v1.Document document = 2;
- if (has_document()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
- 2, _Internal::document(this), output);
- }
- // .firestore.client.UnknownDocument unknown_document = 3;
- if (has_unknown_document()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
- 3, _Internal::unknown_document(this), output);
- }
- // bool has_committed_mutations = 4;
- if (this->has_committed_mutations() != 0) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(4, this->has_committed_mutations(), output);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
- _internal_metadata_.unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:firestore.client.MaybeDocument)
- }
- ::PROTOBUF_NAMESPACE_ID::uint8* MaybeDocument::InternalSerializeWithCachedSizesToArray(
- ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:firestore.client.MaybeDocument)
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- // .firestore.client.NoDocument no_document = 1;
- if (has_no_document()) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 1, _Internal::no_document(this), target);
- }
- // .google.firestore.v1.Document document = 2;
- if (has_document()) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 2, _Internal::document(this), target);
- }
- // .firestore.client.UnknownDocument unknown_document = 3;
- if (has_unknown_document()) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 3, _Internal::unknown_document(this), target);
- }
- // bool has_committed_mutations = 4;
- if (this->has_committed_mutations() != 0) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->has_committed_mutations(), target);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:firestore.client.MaybeDocument)
- return target;
- }
- size_t MaybeDocument::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:firestore.client.MaybeDocument)
- size_t total_size = 0;
- if (_internal_metadata_.have_unknown_fields()) {
- total_size +=
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
- _internal_metadata_.unknown_fields());
- }
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- // bool has_committed_mutations = 4;
- if (this->has_committed_mutations() != 0) {
- total_size += 1 + 1;
- }
- switch (document_type_case()) {
- // .firestore.client.NoDocument no_document = 1;
- case kNoDocument: {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *document_type_.no_document_);
- break;
- }
- // .google.firestore.v1.Document document = 2;
- case kDocument: {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *document_type_.document_);
- break;
- }
- // .firestore.client.UnknownDocument unknown_document = 3;
- case kUnknownDocument: {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *document_type_.unknown_document_);
- break;
- }
- case DOCUMENT_TYPE_NOT_SET: {
- break;
- }
- }
- int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
- SetCachedSize(cached_size);
- return total_size;
- }
- void MaybeDocument::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:firestore.client.MaybeDocument)
- GOOGLE_DCHECK_NE(&from, this);
- const MaybeDocument* source =
- ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<MaybeDocument>(
- &from);
- if (source == nullptr) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:firestore.client.MaybeDocument)
- ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:firestore.client.MaybeDocument)
- MergeFrom(*source);
- }
- }
- void MaybeDocument::MergeFrom(const MaybeDocument& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:firestore.client.MaybeDocument)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
- if (from.has_committed_mutations() != 0) {
- set_has_committed_mutations(from.has_committed_mutations());
- }
- switch (from.document_type_case()) {
- case kNoDocument: {
- mutable_no_document()->::firestore::client::NoDocument::MergeFrom(from.no_document());
- break;
- }
- case kDocument: {
- mutable_document()->::google::firestore::v1::Document::MergeFrom(from.document());
- break;
- }
- case kUnknownDocument: {
- mutable_unknown_document()->::firestore::client::UnknownDocument::MergeFrom(from.unknown_document());
- break;
- }
- case DOCUMENT_TYPE_NOT_SET: {
- break;
- }
- }
- }
- void MaybeDocument::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:firestore.client.MaybeDocument)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void MaybeDocument::CopyFrom(const MaybeDocument& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:firestore.client.MaybeDocument)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool MaybeDocument::IsInitialized() const {
- return true;
- }
- void MaybeDocument::InternalSwap(MaybeDocument* other) {
- using std::swap;
- _internal_metadata_.Swap(&other->_internal_metadata_);
- swap(has_committed_mutations_, other->has_committed_mutations_);
- swap(document_type_, other->document_type_);
- swap(_oneof_case_[0], other->_oneof_case_[0]);
- }
- ::PROTOBUF_NAMESPACE_ID::Metadata MaybeDocument::GetMetadata() const {
- return GetMetadataStatic();
- }
- // @@protoc_insertion_point(namespace_scope)
- } // namespace client
- } // namespace firestore
- PROTOBUF_NAMESPACE_OPEN
- template<> PROTOBUF_NOINLINE ::firestore::client::NoDocument* Arena::CreateMaybeMessage< ::firestore::client::NoDocument >(Arena* arena) {
- return Arena::CreateInternal< ::firestore::client::NoDocument >(arena);
- }
- template<> PROTOBUF_NOINLINE ::firestore::client::UnknownDocument* Arena::CreateMaybeMessage< ::firestore::client::UnknownDocument >(Arena* arena) {
- return Arena::CreateInternal< ::firestore::client::UnknownDocument >(arena);
- }
- template<> PROTOBUF_NOINLINE ::firestore::client::MaybeDocument* Arena::CreateMaybeMessage< ::firestore::client::MaybeDocument >(Arena* arena) {
- return Arena::CreateInternal< ::firestore::client::MaybeDocument >(arena);
- }
- PROTOBUF_NAMESPACE_CLOSE
- // @@protoc_insertion_point(global_scope)
- #include <google/protobuf/port_undef.inc>
|