Files
firebase-ios-sdk/Firestore/Protos/cpp/firestore/local/maybe_document.pb.cc
T

1098 lines
42 KiB
C++

/*
* Copyright 2024 Google LLC
*
* 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/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"
#include "google/protobuf/generated_message_tctable_impl.h"
// @@protoc_insertion_point(includes)
// Must be included last.
#include "google/protobuf/port_def.inc"
PROTOBUF_PRAGMA_INIT_SEG
namespace _pb = ::google::protobuf;
namespace _pbi = ::google::protobuf::internal;
namespace _fl = ::google::protobuf::internal::field_layout;
namespace firestore {
namespace client {
inline constexpr UnknownDocument::Impl_::Impl_(
::_pbi::ConstantInitialized) noexcept
: _cached_size_{0},
name_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
version_{nullptr} {}
template <typename>
PROTOBUF_CONSTEXPR UnknownDocument::UnknownDocument(::_pbi::ConstantInitialized)
: _impl_(::_pbi::ConstantInitialized()) {}
struct UnknownDocumentDefaultTypeInternal {
PROTOBUF_CONSTEXPR UnknownDocumentDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~UnknownDocumentDefaultTypeInternal() {}
union {
UnknownDocument _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UnknownDocumentDefaultTypeInternal _UnknownDocument_default_instance_;
inline constexpr NoDocument::Impl_::Impl_(
::_pbi::ConstantInitialized) noexcept
: _cached_size_{0},
name_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
read_time_{nullptr} {}
template <typename>
PROTOBUF_CONSTEXPR NoDocument::NoDocument(::_pbi::ConstantInitialized)
: _impl_(::_pbi::ConstantInitialized()) {}
struct NoDocumentDefaultTypeInternal {
PROTOBUF_CONSTEXPR NoDocumentDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~NoDocumentDefaultTypeInternal() {}
union {
NoDocument _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NoDocumentDefaultTypeInternal _NoDocument_default_instance_;
inline constexpr MaybeDocument::Impl_::Impl_(
::_pbi::ConstantInitialized) noexcept
: has_committed_mutations_{false},
document_type_{},
_cached_size_{0},
_oneof_case_{} {}
template <typename>
PROTOBUF_CONSTEXPR MaybeDocument::MaybeDocument(::_pbi::ConstantInitialized)
: _impl_(::_pbi::ConstantInitialized()) {}
struct MaybeDocumentDefaultTypeInternal {
PROTOBUF_CONSTEXPR MaybeDocumentDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~MaybeDocumentDefaultTypeInternal() {}
union {
MaybeDocument _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MaybeDocumentDefaultTypeInternal _MaybeDocument_default_instance_;
} // namespace client
} // namespace firestore
static ::_pb::Metadata file_level_metadata_firestore_2flocal_2fmaybe_5fdocument_2eproto[3];
static constexpr const ::_pb::EnumDescriptor**
file_level_enum_descriptors_firestore_2flocal_2fmaybe_5fdocument_2eproto = nullptr;
static constexpr const ::_pb::ServiceDescriptor**
file_level_service_descriptors_firestore_2flocal_2fmaybe_5fdocument_2eproto = nullptr;
const ::uint32_t TableStruct_firestore_2flocal_2fmaybe_5fdocument_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(
protodesc_cold) = {
PROTOBUF_FIELD_OFFSET(::firestore::client::NoDocument, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::firestore::client::NoDocument, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
~0u, // no _split_
~0u, // no sizeof(Split)
PROTOBUF_FIELD_OFFSET(::firestore::client::NoDocument, _impl_.name_),
PROTOBUF_FIELD_OFFSET(::firestore::client::NoDocument, _impl_.read_time_),
~0u,
0,
PROTOBUF_FIELD_OFFSET(::firestore::client::UnknownDocument, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::firestore::client::UnknownDocument, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
~0u, // no _split_
~0u, // no sizeof(Split)
PROTOBUF_FIELD_OFFSET(::firestore::client::UnknownDocument, _impl_.name_),
PROTOBUF_FIELD_OFFSET(::firestore::client::UnknownDocument, _impl_.version_),
~0u,
0,
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::firestore::client::MaybeDocument, _internal_metadata_),
~0u, // no _extensions_
PROTOBUF_FIELD_OFFSET(::firestore::client::MaybeDocument, _impl_._oneof_case_[0]),
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
~0u, // no _split_
~0u, // no sizeof(Split)
::_pbi::kInvalidFieldOffsetTag,
::_pbi::kInvalidFieldOffsetTag,
::_pbi::kInvalidFieldOffsetTag,
PROTOBUF_FIELD_OFFSET(::firestore::client::MaybeDocument, _impl_.has_committed_mutations_),
PROTOBUF_FIELD_OFFSET(::firestore::client::MaybeDocument, _impl_.document_type_),
};
static const ::_pbi::MigrationSchema
schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{0, 10, -1, sizeof(::firestore::client::NoDocument)},
{12, 22, -1, sizeof(::firestore::client::UnknownDocument)},
{24, -1, -1, sizeof(::firestore::client::MaybeDocument)},
};
static const ::_pb::Message* const file_default_instances[] = {
&::firestore::client::_NoDocument_default_instance_._instance,
&::firestore::client::_UnknownDocument_default_instance_._instance,
&::firestore::client::_MaybeDocument_default_instance_._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 ::_pbi::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 ::absl::once_flag descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto = {
false,
false,
570,
descriptor_table_protodef_firestore_2flocal_2fmaybe_5fdocument_2eproto,
"firestore/local/maybe_document.proto",
&descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_once,
descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_deps,
2,
3,
schemas,
file_default_instances,
TableStruct_firestore_2flocal_2fmaybe_5fdocument_2eproto::offsets,
file_level_metadata_firestore_2flocal_2fmaybe_5fdocument_2eproto,
file_level_enum_descriptors_firestore_2flocal_2fmaybe_5fdocument_2eproto,
file_level_service_descriptors_firestore_2flocal_2fmaybe_5fdocument_2eproto,
};
// This function exists to be marked as weak.
// It can significantly speed up compilation by breaking up LLVM's SCC
// in the .pb.cc translation units. Large translation units see a
// reduction of more than 35% of walltime for optimized builds. Without
// the weak attribute all the messages in the file, including all the
// vtables and everything they use become part of the same SCC through
// a cycle like:
// GetMetadata -> descriptor table -> default instances ->
// vtables -> GetMetadata
// By adding a weak function here we break the connection from the
// individual vtables back into the descriptor table.
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_getter() {
return &descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto;
}
// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2
static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_firestore_2flocal_2fmaybe_5fdocument_2eproto(&descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto);
namespace firestore {
namespace client {
// ===================================================================
class NoDocument::_Internal {
public:
using HasBits = decltype(std::declval<NoDocument>()._impl_._has_bits_);
static constexpr ::int32_t kHasBitsOffset =
8 * PROTOBUF_FIELD_OFFSET(NoDocument, _impl_._has_bits_);
static const ::google::protobuf::Timestamp& read_time(const NoDocument* msg);
static void set_has_read_time(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
};
const ::google::protobuf::Timestamp& NoDocument::_Internal::read_time(const NoDocument* msg) {
return *msg->_impl_.read_time_;
}
void NoDocument::clear_read_time() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
if (_impl_.read_time_ != nullptr) _impl_.read_time_->Clear();
_impl_._has_bits_[0] &= ~0x00000001u;
}
NoDocument::NoDocument(::google::protobuf::Arena* arena)
: ::google::protobuf::Message(arena) {
SharedCtor(arena);
// @@protoc_insertion_point(arena_constructor:firestore.client.NoDocument)
}
inline PROTOBUF_NDEBUG_INLINE NoDocument::Impl_::Impl_(
::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
const Impl_& from)
: _has_bits_{from._has_bits_},
_cached_size_{0},
name_(arena, from.name_) {}
NoDocument::NoDocument(
::google::protobuf::Arena* arena,
const NoDocument& from)
: ::google::protobuf::Message(arena) {
NoDocument* const _this = this;
(void)_this;
_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
from._internal_metadata_);
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
::uint32_t cached_has_bits = _impl_._has_bits_[0];
_impl_.read_time_ = (cached_has_bits & 0x00000001u)
? CreateMaybeMessage<::google::protobuf::Timestamp>(arena, *from._impl_.read_time_)
: nullptr;
// @@protoc_insertion_point(copy_constructor:firestore.client.NoDocument)
}
inline PROTOBUF_NDEBUG_INLINE NoDocument::Impl_::Impl_(
::google::protobuf::internal::InternalVisibility visibility,
::google::protobuf::Arena* arena)
: _cached_size_{0},
name_(arena) {}
inline void NoDocument::SharedCtor(::_pb::Arena* arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
_impl_.read_time_ = {};
}
NoDocument::~NoDocument() {
// @@protoc_insertion_point(destructor:firestore.client.NoDocument)
_internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
SharedDtor();
}
inline void NoDocument::SharedDtor() {
ABSL_DCHECK(GetArena() == nullptr);
_impl_.name_.Destroy();
delete _impl_.read_time_;
_impl_.~Impl_();
}
PROTOBUF_NOINLINE void NoDocument::Clear() {
// @@protoc_insertion_point(message_clear_start:firestore.client.NoDocument)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.name_.ClearToEmpty();
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
ABSL_DCHECK(_impl_.read_time_ != nullptr);
_impl_.read_time_->Clear();
}
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}
const char* NoDocument::_InternalParse(
const char* ptr, ::_pbi::ParseContext* ctx) {
ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
return ptr;
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<1, 2, 1, 40, 2> NoDocument::_table_ = {
{
PROTOBUF_FIELD_OFFSET(NoDocument, _impl_._has_bits_),
0, // no _extensions_
2, 8, // max_field_number, fast_idx_mask
offsetof(decltype(_table_), field_lookup_table),
4294967292, // skipmap
offsetof(decltype(_table_), field_entries),
2, // num_field_entries
1, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_NoDocument_default_instance_._instance,
::_pbi::TcParser::GenericFallback, // fallback
}, {{
// .google.protobuf.Timestamp read_time = 2;
{::_pbi::TcParser::FastMtS1,
{18, 0, 0, PROTOBUF_FIELD_OFFSET(NoDocument, _impl_.read_time_)}},
// string name = 1;
{::_pbi::TcParser::FastUS1,
{10, 63, 0, PROTOBUF_FIELD_OFFSET(NoDocument, _impl_.name_)}},
}}, {{
65535, 65535
}}, {{
// string name = 1;
{PROTOBUF_FIELD_OFFSET(NoDocument, _impl_.name_), -1, 0,
(0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
// .google.protobuf.Timestamp read_time = 2;
{PROTOBUF_FIELD_OFFSET(NoDocument, _impl_.read_time_), _Internal::kHasBitsOffset + 0, 0,
(0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
}}, {{
{::_pbi::TcParser::GetTable<::google::protobuf::Timestamp>()},
}}, {{
"\33\4\0\0\0\0\0\0"
"firestore.client.NoDocument"
"name"
}},
};
::uint8_t* NoDocument::_InternalSerialize(
::uint8_t* target,
::google::protobuf::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:firestore.client.NoDocument)
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
// string name = 1;
if (!this->_internal_name().empty()) {
const std::string& _s = this->_internal_name();
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "firestore.client.NoDocument.name");
target = stream->WriteStringMaybeAliased(1, _s, target);
}
cached_has_bits = _impl_._has_bits_[0];
// .google.protobuf.Timestamp read_time = 2;
if (cached_has_bits & 0x00000001u) {
target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
2, _Internal::read_time(this),
_Internal::read_time(this).GetCachedSize(), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target =
::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
}
// @@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;
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// string name = 1;
if (!this->_internal_name().empty()) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
this->_internal_name());
}
// .google.protobuf.Timestamp read_time = 2;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
total_size +=
1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.read_time_);
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::google::protobuf::Message::ClassData NoDocument::_class_data_ = {
NoDocument::MergeImpl,
nullptr, // OnDemandRegisterArenaDtor
};
const ::google::protobuf::Message::ClassData* NoDocument::GetClassData() const {
return &_class_data_;
}
void NoDocument::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
auto* const _this = static_cast<NoDocument*>(&to_msg);
auto& from = static_cast<const NoDocument&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:firestore.client.NoDocument)
ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (!from._internal_name().empty()) {
_this->_internal_set_name(from._internal_name());
}
if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
_this->_internal_mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(
from._internal_read_time());
}
_this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
}
void NoDocument::CopyFrom(const NoDocument& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:firestore.client.NoDocument)
if (&from == this) return;
Clear();
MergeFrom(from);
}
PROTOBUF_NOINLINE bool NoDocument::IsInitialized() const {
return true;
}
::_pbi::CachedSize* NoDocument::AccessCachedSize() const {
return &_impl_._cached_size_;
}
void NoDocument::InternalSwap(NoDocument* PROTOBUF_RESTRICT other) {
using std::swap;
auto* arena = GetArena();
ABSL_DCHECK_EQ(arena, other->GetArena());
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena);
swap(_impl_.read_time_, other->_impl_.read_time_);
}
::google::protobuf::Metadata NoDocument::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_getter, &descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_once,
file_level_metadata_firestore_2flocal_2fmaybe_5fdocument_2eproto[0]);
}
// ===================================================================
class UnknownDocument::_Internal {
public:
using HasBits = decltype(std::declval<UnknownDocument>()._impl_._has_bits_);
static constexpr ::int32_t kHasBitsOffset =
8 * PROTOBUF_FIELD_OFFSET(UnknownDocument, _impl_._has_bits_);
static const ::google::protobuf::Timestamp& version(const UnknownDocument* msg);
static void set_has_version(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
};
const ::google::protobuf::Timestamp& UnknownDocument::_Internal::version(const UnknownDocument* msg) {
return *msg->_impl_.version_;
}
void UnknownDocument::clear_version() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
if (_impl_.version_ != nullptr) _impl_.version_->Clear();
_impl_._has_bits_[0] &= ~0x00000001u;
}
UnknownDocument::UnknownDocument(::google::protobuf::Arena* arena)
: ::google::protobuf::Message(arena) {
SharedCtor(arena);
// @@protoc_insertion_point(arena_constructor:firestore.client.UnknownDocument)
}
inline PROTOBUF_NDEBUG_INLINE UnknownDocument::Impl_::Impl_(
::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
const Impl_& from)
: _has_bits_{from._has_bits_},
_cached_size_{0},
name_(arena, from.name_) {}
UnknownDocument::UnknownDocument(
::google::protobuf::Arena* arena,
const UnknownDocument& from)
: ::google::protobuf::Message(arena) {
UnknownDocument* const _this = this;
(void)_this;
_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
from._internal_metadata_);
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
::uint32_t cached_has_bits = _impl_._has_bits_[0];
_impl_.version_ = (cached_has_bits & 0x00000001u)
? CreateMaybeMessage<::google::protobuf::Timestamp>(arena, *from._impl_.version_)
: nullptr;
// @@protoc_insertion_point(copy_constructor:firestore.client.UnknownDocument)
}
inline PROTOBUF_NDEBUG_INLINE UnknownDocument::Impl_::Impl_(
::google::protobuf::internal::InternalVisibility visibility,
::google::protobuf::Arena* arena)
: _cached_size_{0},
name_(arena) {}
inline void UnknownDocument::SharedCtor(::_pb::Arena* arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
_impl_.version_ = {};
}
UnknownDocument::~UnknownDocument() {
// @@protoc_insertion_point(destructor:firestore.client.UnknownDocument)
_internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
SharedDtor();
}
inline void UnknownDocument::SharedDtor() {
ABSL_DCHECK(GetArena() == nullptr);
_impl_.name_.Destroy();
delete _impl_.version_;
_impl_.~Impl_();
}
PROTOBUF_NOINLINE void UnknownDocument::Clear() {
// @@protoc_insertion_point(message_clear_start:firestore.client.UnknownDocument)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.name_.ClearToEmpty();
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
ABSL_DCHECK(_impl_.version_ != nullptr);
_impl_.version_->Clear();
}
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}
const char* UnknownDocument::_InternalParse(
const char* ptr, ::_pbi::ParseContext* ctx) {
ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
return ptr;
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<1, 2, 1, 45, 2> UnknownDocument::_table_ = {
{
PROTOBUF_FIELD_OFFSET(UnknownDocument, _impl_._has_bits_),
0, // no _extensions_
2, 8, // max_field_number, fast_idx_mask
offsetof(decltype(_table_), field_lookup_table),
4294967292, // skipmap
offsetof(decltype(_table_), field_entries),
2, // num_field_entries
1, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_UnknownDocument_default_instance_._instance,
::_pbi::TcParser::GenericFallback, // fallback
}, {{
// .google.protobuf.Timestamp version = 2;
{::_pbi::TcParser::FastMtS1,
{18, 0, 0, PROTOBUF_FIELD_OFFSET(UnknownDocument, _impl_.version_)}},
// string name = 1;
{::_pbi::TcParser::FastUS1,
{10, 63, 0, PROTOBUF_FIELD_OFFSET(UnknownDocument, _impl_.name_)}},
}}, {{
65535, 65535
}}, {{
// string name = 1;
{PROTOBUF_FIELD_OFFSET(UnknownDocument, _impl_.name_), -1, 0,
(0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
// .google.protobuf.Timestamp version = 2;
{PROTOBUF_FIELD_OFFSET(UnknownDocument, _impl_.version_), _Internal::kHasBitsOffset + 0, 0,
(0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
}}, {{
{::_pbi::TcParser::GetTable<::google::protobuf::Timestamp>()},
}}, {{
"\40\4\0\0\0\0\0\0"
"firestore.client.UnknownDocument"
"name"
}},
};
::uint8_t* UnknownDocument::_InternalSerialize(
::uint8_t* target,
::google::protobuf::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:firestore.client.UnknownDocument)
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
// string name = 1;
if (!this->_internal_name().empty()) {
const std::string& _s = this->_internal_name();
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "firestore.client.UnknownDocument.name");
target = stream->WriteStringMaybeAliased(1, _s, target);
}
cached_has_bits = _impl_._has_bits_[0];
// .google.protobuf.Timestamp version = 2;
if (cached_has_bits & 0x00000001u) {
target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
2, _Internal::version(this),
_Internal::version(this).GetCachedSize(), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target =
::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
}
// @@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;
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// string name = 1;
if (!this->_internal_name().empty()) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
this->_internal_name());
}
// .google.protobuf.Timestamp version = 2;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
total_size +=
1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.version_);
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::google::protobuf::Message::ClassData UnknownDocument::_class_data_ = {
UnknownDocument::MergeImpl,
nullptr, // OnDemandRegisterArenaDtor
};
const ::google::protobuf::Message::ClassData* UnknownDocument::GetClassData() const {
return &_class_data_;
}
void UnknownDocument::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
auto* const _this = static_cast<UnknownDocument*>(&to_msg);
auto& from = static_cast<const UnknownDocument&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:firestore.client.UnknownDocument)
ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (!from._internal_name().empty()) {
_this->_internal_set_name(from._internal_name());
}
if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
_this->_internal_mutable_version()->::google::protobuf::Timestamp::MergeFrom(
from._internal_version());
}
_this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
}
void UnknownDocument::CopyFrom(const UnknownDocument& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:firestore.client.UnknownDocument)
if (&from == this) return;
Clear();
MergeFrom(from);
}
PROTOBUF_NOINLINE bool UnknownDocument::IsInitialized() const {
return true;
}
::_pbi::CachedSize* UnknownDocument::AccessCachedSize() const {
return &_impl_._cached_size_;
}
void UnknownDocument::InternalSwap(UnknownDocument* PROTOBUF_RESTRICT other) {
using std::swap;
auto* arena = GetArena();
ABSL_DCHECK_EQ(arena, other->GetArena());
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena);
swap(_impl_.version_, other->_impl_.version_);
}
::google::protobuf::Metadata UnknownDocument::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_getter, &descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_once,
file_level_metadata_firestore_2flocal_2fmaybe_5fdocument_2eproto[1]);
}
// ===================================================================
class MaybeDocument::_Internal {
public:
static constexpr ::int32_t kOneofCaseOffset =
PROTOBUF_FIELD_OFFSET(::firestore::client::MaybeDocument, _impl_._oneof_case_);
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->_impl_.document_type_.no_document_;
}
const ::google::firestore::v1::Document& MaybeDocument::_Internal::document(const MaybeDocument* msg) {
return *msg->_impl_.document_type_.document_;
}
const ::firestore::client::UnknownDocument& MaybeDocument::_Internal::unknown_document(const MaybeDocument* msg) {
return *msg->_impl_.document_type_.unknown_document_;
}
void MaybeDocument::set_allocated_no_document(::firestore::client::NoDocument* no_document) {
::google::protobuf::Arena* message_arena = GetArena();
clear_document_type();
if (no_document) {
::google::protobuf::Arena* submessage_arena = no_document->GetArena();
if (message_arena != submessage_arena) {
no_document = ::google::protobuf::internal::GetOwnedMessage(message_arena, no_document, submessage_arena);
}
set_has_no_document();
_impl_.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) {
::google::protobuf::Arena* message_arena = GetArena();
clear_document_type();
if (document) {
::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(document)->GetArena();
if (message_arena != submessage_arena) {
document = ::google::protobuf::internal::GetOwnedMessage(message_arena, document, submessage_arena);
}
set_has_document();
_impl_.document_type_.document_ = document;
}
// @@protoc_insertion_point(field_set_allocated:firestore.client.MaybeDocument.document)
}
void MaybeDocument::clear_document() {
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
if (document_type_case() == kDocument) {
if (GetArena() == nullptr) {
delete _impl_.document_type_.document_;
}
clear_has_document_type();
}
}
void MaybeDocument::set_allocated_unknown_document(::firestore::client::UnknownDocument* unknown_document) {
::google::protobuf::Arena* message_arena = GetArena();
clear_document_type();
if (unknown_document) {
::google::protobuf::Arena* submessage_arena = unknown_document->GetArena();
if (message_arena != submessage_arena) {
unknown_document = ::google::protobuf::internal::GetOwnedMessage(message_arena, unknown_document, submessage_arena);
}
set_has_unknown_document();
_impl_.document_type_.unknown_document_ = unknown_document;
}
// @@protoc_insertion_point(field_set_allocated:firestore.client.MaybeDocument.unknown_document)
}
MaybeDocument::MaybeDocument(::google::protobuf::Arena* arena)
: ::google::protobuf::Message(arena) {
SharedCtor(arena);
// @@protoc_insertion_point(arena_constructor:firestore.client.MaybeDocument)
}
inline PROTOBUF_NDEBUG_INLINE MaybeDocument::Impl_::Impl_(
::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
const Impl_& from)
: document_type_{},
_cached_size_{0},
_oneof_case_{from._oneof_case_[0]} {}
MaybeDocument::MaybeDocument(
::google::protobuf::Arena* arena,
const MaybeDocument& from)
: ::google::protobuf::Message(arena) {
MaybeDocument* const _this = this;
(void)_this;
_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
from._internal_metadata_);
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
_impl_.has_committed_mutations_ = from._impl_.has_committed_mutations_;
switch (document_type_case()) {
case DOCUMENT_TYPE_NOT_SET:
break;
case kNoDocument:
_impl_.document_type_.no_document_ = CreateMaybeMessage<::firestore::client::NoDocument>(arena, *from._impl_.document_type_.no_document_);
break;
case kDocument:
_impl_.document_type_.document_ = CreateMaybeMessage<::google::firestore::v1::Document>(arena, *from._impl_.document_type_.document_);
break;
case kUnknownDocument:
_impl_.document_type_.unknown_document_ = CreateMaybeMessage<::firestore::client::UnknownDocument>(arena, *from._impl_.document_type_.unknown_document_);
break;
}
// @@protoc_insertion_point(copy_constructor:firestore.client.MaybeDocument)
}
inline PROTOBUF_NDEBUG_INLINE MaybeDocument::Impl_::Impl_(
::google::protobuf::internal::InternalVisibility visibility,
::google::protobuf::Arena* arena)
: document_type_{},
_cached_size_{0},
_oneof_case_{} {}
inline void MaybeDocument::SharedCtor(::_pb::Arena* arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
_impl_.has_committed_mutations_ = {};
}
MaybeDocument::~MaybeDocument() {
// @@protoc_insertion_point(destructor:firestore.client.MaybeDocument)
_internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
SharedDtor();
}
inline void MaybeDocument::SharedDtor() {
ABSL_DCHECK(GetArena() == nullptr);
if (has_document_type()) {
clear_document_type();
}
_impl_.~Impl_();
}
void MaybeDocument::clear_document_type() {
// @@protoc_insertion_point(one_of_clear_start:firestore.client.MaybeDocument)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
switch (document_type_case()) {
case kNoDocument: {
if (GetArena() == nullptr) {
delete _impl_.document_type_.no_document_;
}
break;
}
case kDocument: {
if (GetArena() == nullptr) {
delete _impl_.document_type_.document_;
}
break;
}
case kUnknownDocument: {
if (GetArena() == nullptr) {
delete _impl_.document_type_.unknown_document_;
}
break;
}
case DOCUMENT_TYPE_NOT_SET: {
break;
}
}
_impl_._oneof_case_[0] = DOCUMENT_TYPE_NOT_SET;
}
PROTOBUF_NOINLINE void MaybeDocument::Clear() {
// @@protoc_insertion_point(message_clear_start:firestore.client.MaybeDocument)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.has_committed_mutations_ = false;
clear_document_type();
_internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}
const char* MaybeDocument::_InternalParse(
const char* ptr, ::_pbi::ParseContext* ctx) {
ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
return ptr;
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<0, 4, 3, 0, 2> MaybeDocument::_table_ = {
{
0, // no _has_bits_
0, // no _extensions_
4, 0, // max_field_number, fast_idx_mask
offsetof(decltype(_table_), field_lookup_table),
4294967280, // skipmap
offsetof(decltype(_table_), field_entries),
4, // num_field_entries
3, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_MaybeDocument_default_instance_._instance,
::_pbi::TcParser::GenericFallback, // fallback
}, {{
// bool has_committed_mutations = 4;
{::_pbi::TcParser::SingularVarintNoZag1<bool, offsetof(MaybeDocument, _impl_.has_committed_mutations_), 63>(),
{32, 63, 0, PROTOBUF_FIELD_OFFSET(MaybeDocument, _impl_.has_committed_mutations_)}},
}}, {{
65535, 65535
}}, {{
// .firestore.client.NoDocument no_document = 1;
{PROTOBUF_FIELD_OFFSET(MaybeDocument, _impl_.document_type_.no_document_), _Internal::kOneofCaseOffset + 0, 0,
(0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
// .google.firestore.v1.Document document = 2;
{PROTOBUF_FIELD_OFFSET(MaybeDocument, _impl_.document_type_.document_), _Internal::kOneofCaseOffset + 0, 1,
(0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
// .firestore.client.UnknownDocument unknown_document = 3;
{PROTOBUF_FIELD_OFFSET(MaybeDocument, _impl_.document_type_.unknown_document_), _Internal::kOneofCaseOffset + 0, 2,
(0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
// bool has_committed_mutations = 4;
{PROTOBUF_FIELD_OFFSET(MaybeDocument, _impl_.has_committed_mutations_), 0, 0,
(0 | ::_fl::kFcSingular | ::_fl::kBool)},
}}, {{
{::_pbi::TcParser::GetTable<::firestore::client::NoDocument>()},
{::_pbi::TcParser::GetTable<::google::firestore::v1::Document>()},
{::_pbi::TcParser::GetTable<::firestore::client::UnknownDocument>()},
}}, {{
}},
};
::uint8_t* MaybeDocument::_InternalSerialize(
::uint8_t* target,
::google::protobuf::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:firestore.client.MaybeDocument)
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
switch (document_type_case()) {
case kNoDocument: {
target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
1, _Internal::no_document(this),
_Internal::no_document(this).GetCachedSize(), target, stream);
break;
}
case kDocument: {
target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
2, _Internal::document(this),
_Internal::document(this).GetCachedSize(), target, stream);
break;
}
case kUnknownDocument: {
target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
3, _Internal::unknown_document(this),
_Internal::unknown_document(this).GetCachedSize(), target, stream);
break;
}
default:
break;
}
// bool has_committed_mutations = 4;
if (this->_internal_has_committed_mutations() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteBoolToArray(
4, this->_internal_has_committed_mutations(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target =
::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
}
// @@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;
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// bool has_committed_mutations = 4;
if (this->_internal_has_committed_mutations() != 0) {
total_size += 2;
}
switch (document_type_case()) {
// .firestore.client.NoDocument no_document = 1;
case kNoDocument: {
total_size +=
1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.document_type_.no_document_);
break;
}
// .google.firestore.v1.Document document = 2;
case kDocument: {
total_size +=
1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.document_type_.document_);
break;
}
// .firestore.client.UnknownDocument unknown_document = 3;
case kUnknownDocument: {
total_size +=
1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.document_type_.unknown_document_);
break;
}
case DOCUMENT_TYPE_NOT_SET: {
break;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::google::protobuf::Message::ClassData MaybeDocument::_class_data_ = {
MaybeDocument::MergeImpl,
nullptr, // OnDemandRegisterArenaDtor
};
const ::google::protobuf::Message::ClassData* MaybeDocument::GetClassData() const {
return &_class_data_;
}
void MaybeDocument::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
auto* const _this = static_cast<MaybeDocument*>(&to_msg);
auto& from = static_cast<const MaybeDocument&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:firestore.client.MaybeDocument)
ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_has_committed_mutations() != 0) {
_this->_internal_set_has_committed_mutations(from._internal_has_committed_mutations());
}
switch (from.document_type_case()) {
case kNoDocument: {
_this->_internal_mutable_no_document()->::firestore::client::NoDocument::MergeFrom(
from._internal_no_document());
break;
}
case kDocument: {
_this->_internal_mutable_document()->::google::firestore::v1::Document::MergeFrom(
from._internal_document());
break;
}
case kUnknownDocument: {
_this->_internal_mutable_unknown_document()->::firestore::client::UnknownDocument::MergeFrom(
from._internal_unknown_document());
break;
}
case DOCUMENT_TYPE_NOT_SET: {
break;
}
}
_this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
}
void MaybeDocument::CopyFrom(const MaybeDocument& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:firestore.client.MaybeDocument)
if (&from == this) return;
Clear();
MergeFrom(from);
}
PROTOBUF_NOINLINE bool MaybeDocument::IsInitialized() const {
return true;
}
::_pbi::CachedSize* MaybeDocument::AccessCachedSize() const {
return &_impl_._cached_size_;
}
void MaybeDocument::InternalSwap(MaybeDocument* PROTOBUF_RESTRICT other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_.has_committed_mutations_, other->_impl_.has_committed_mutations_);
swap(_impl_.document_type_, other->_impl_.document_type_);
swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}
::google::protobuf::Metadata MaybeDocument::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_getter, &descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto_once,
file_level_metadata_firestore_2flocal_2fmaybe_5fdocument_2eproto[2]);
}
// @@protoc_insertion_point(namespace_scope)
} // namespace client
} // namespace firestore
namespace google {
namespace protobuf {
} // namespace protobuf
} // namespace google
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"