aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Protos/cpp/firestore
diff options
context:
space:
mode:
authorGravatar rsgowman <rgowman@google.com>2018-04-24 11:31:58 -0400
committerGravatar GitHub <noreply@github.com>2018-04-24 11:31:58 -0400
commit6dfc142888410ef6906970d8cb90f69c0992852a (patch)
tree72b1287cc6143f1d005d03cb710c60a9f3414fd8 /Firestore/Protos/cpp/firestore
parenta04e782db87b86bacc6a232fae38dcd8d203f5b6 (diff)
Adjust serializer test to verify via libprotobuf. (#1039)
Previously, the tests would compare serialization results against a precomputed (via protoc) array of bytes. Now they serialize via our nanopb based class and deserialize via libprotobuf (and vice versa) and then ensure the result is the same as the input
Diffstat (limited to 'Firestore/Protos/cpp/firestore')
-rw-r--r--Firestore/Protos/cpp/firestore/local/maybe_document.pb.cc862
-rw-r--r--Firestore/Protos/cpp/firestore/local/maybe_document.pb.h541
-rw-r--r--Firestore/Protos/cpp/firestore/local/mutation.pb.cc808
-rw-r--r--Firestore/Protos/cpp/firestore/local/mutation.pb.h502
-rw-r--r--Firestore/Protos/cpp/firestore/local/target.pb.cc1121
-rw-r--r--Firestore/Protos/cpp/firestore/local/target.pb.h695
6 files changed, 4529 insertions, 0 deletions
diff --git a/Firestore/Protos/cpp/firestore/local/maybe_document.pb.cc b/Firestore/Protos/cpp/firestore/local/maybe_document.pb.cc
new file mode 100644
index 0000000..04f2b26
--- /dev/null
+++ b/Firestore/Protos/cpp/firestore/local/maybe_document.pb.cc
@@ -0,0 +1,862 @@
+/*
+ * 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/stubs/port.h>
+#include <google/protobuf/stubs/once.h>
+#include <google/protobuf/io/coded_stream.h>
+#include <google/protobuf/wire_format_lite_inl.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>
+// This is a temporary google only hack
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+#include "third_party/protobuf/version.h"
+#endif
+// @@protoc_insertion_point(includes)
+namespace firestore {
+namespace client {
+class NoDocumentDefaultTypeInternal {
+ public:
+ ::google::protobuf::internal::ExplicitlyConstructed<NoDocument>
+ _instance;
+} _NoDocument_default_instance_;
+class MaybeDocumentDefaultTypeInternal {
+ public:
+ ::google::protobuf::internal::ExplicitlyConstructed<MaybeDocument>
+ _instance;
+ const ::firestore::client::NoDocument* no_document_;
+ const ::google::firestore::v1beta1::Document* document_;
+} _MaybeDocument_default_instance_;
+} // namespace client
+} // namespace firestore
+namespace protobuf_firestore_2flocal_2fmaybe_5fdocument_2eproto {
+void InitDefaultsNoDocumentImpl() {
+ GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+ ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
+#else
+ ::google::protobuf::internal::InitProtobufDefaults();
+#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+ protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
+ {
+ void* ptr = &::firestore::client::_NoDocument_default_instance_;
+ new (ptr) ::firestore::client::NoDocument();
+ ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
+ }
+ ::firestore::client::NoDocument::InitAsDefaultInstance();
+}
+
+void InitDefaultsNoDocument() {
+ static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+ ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsNoDocumentImpl);
+}
+
+void InitDefaultsMaybeDocumentImpl() {
+ GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+ ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
+#else
+ ::google::protobuf::internal::InitProtobufDefaults();
+#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+ protobuf_firestore_2flocal_2fmaybe_5fdocument_2eproto::InitDefaultsNoDocument();
+ protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsDocument();
+ {
+ void* ptr = &::firestore::client::_MaybeDocument_default_instance_;
+ new (ptr) ::firestore::client::MaybeDocument();
+ ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
+ }
+ ::firestore::client::MaybeDocument::InitAsDefaultInstance();
+}
+
+void InitDefaultsMaybeDocument() {
+ static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+ ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsMaybeDocumentImpl);
+}
+
+::google::protobuf::Metadata file_level_metadata[2];
+
+const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
+ ~0u, // no _has_bits_
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::NoDocument, _internal_metadata_),
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::NoDocument, name_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::NoDocument, read_time_),
+ ~0u, // no _has_bits_
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::MaybeDocument, _internal_metadata_),
+ ~0u, // no _extensions_
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::MaybeDocument, _oneof_case_[0]),
+ ~0u, // no _weak_field_map_
+ offsetof(::firestore::client::MaybeDocumentDefaultTypeInternal, no_document_),
+ offsetof(::firestore::client::MaybeDocumentDefaultTypeInternal, document_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::MaybeDocument, document_type_),
+};
+static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
+ { 0, -1, sizeof(::firestore::client::NoDocument)},
+ { 7, -1, sizeof(::firestore::client::MaybeDocument)},
+};
+
+static ::google::protobuf::Message const * const file_default_instances[] = {
+ reinterpret_cast<const ::google::protobuf::Message*>(&::firestore::client::_NoDocument_default_instance_),
+ reinterpret_cast<const ::google::protobuf::Message*>(&::firestore::client::_MaybeDocument_default_instance_),
+};
+
+void protobuf_AssignDescriptors() {
+ AddDescriptors();
+ ::google::protobuf::MessageFactory* factory = NULL;
+ AssignDescriptors(
+ "firestore/local/maybe_document.proto", schemas, file_default_instances, TableStruct::offsets, factory,
+ file_level_metadata, NULL, NULL);
+}
+
+void protobuf_AssignDescriptorsOnce() {
+ static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+ ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
+}
+
+void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
+void protobuf_RegisterTypes(const ::std::string&) {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 2);
+}
+
+void AddDescriptorsImpl() {
+ InitDefaults();
+ static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
+ "\n$firestore/local/maybe_document.proto\022\020"
+ "firestore.client\032\'google/firestore/v1bet"
+ "a1/document.proto\032\037google/protobuf/times"
+ "tamp.proto\"I\n\nNoDocument\022\014\n\004name\030\001 \001(\t\022-"
+ "\n\tread_time\030\002 \001(\0132\032.google.protobuf.Time"
+ "stamp\"\215\001\n\rMaybeDocument\0223\n\013no_document\030\001"
+ " \001(\0132\034.firestore.client.NoDocumentH\000\0226\n\010"
+ "document\030\002 \001(\0132\".google.firestore.v1beta"
+ "1.DocumentH\000B\017\n\rdocument_typeB/\n#com.goo"
+ "gle.firebase.firestore.protoP\001\242\002\005FSTPBb\006"
+ "proto3"
+ };
+ ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
+ descriptor, 406);
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
+ "firestore/local/maybe_document.proto", &protobuf_RegisterTypes);
+ ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::AddDescriptors();
+ ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::AddDescriptors();
+}
+
+void AddDescriptors() {
+ static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+ ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
+}
+// Force AddDescriptors() to be called at dynamic initialization time.
+struct StaticDescriptorInitializer {
+ StaticDescriptorInitializer() {
+ AddDescriptors();
+ }
+} static_descriptor_initializer;
+} // namespace protobuf_firestore_2flocal_2fmaybe_5fdocument_2eproto
+namespace firestore {
+namespace client {
+
+// ===================================================================
+
+void NoDocument::InitAsDefaultInstance() {
+ ::firestore::client::_NoDocument_default_instance_._instance.get_mutable()->read_time_ = const_cast< ::google::protobuf::Timestamp*>(
+ ::google::protobuf::Timestamp::internal_default_instance());
+}
+void NoDocument::clear_read_time() {
+ if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
+ delete read_time_;
+ }
+ read_time_ = NULL;
+}
+#if !defined(_MSC_VER) || _MSC_VER >= 1900
+const int NoDocument::kNameFieldNumber;
+const int NoDocument::kReadTimeFieldNumber;
+#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
+
+NoDocument::NoDocument()
+ : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+ if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
+ ::protobuf_firestore_2flocal_2fmaybe_5fdocument_2eproto::InitDefaultsNoDocument();
+ }
+ SharedCtor();
+ // @@protoc_insertion_point(constructor:firestore.client.NoDocument)
+}
+NoDocument::NoDocument(const NoDocument& from)
+ : ::google::protobuf::Message(),
+ _internal_metadata_(NULL),
+ _cached_size_(0) {
+ _internal_metadata_.MergeFrom(from._internal_metadata_);
+ name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ if (from.name().size() > 0) {
+ name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
+ }
+ if (from.has_read_time()) {
+ read_time_ = new ::google::protobuf::Timestamp(*from.read_time_);
+ } else {
+ read_time_ = NULL;
+ }
+ // @@protoc_insertion_point(copy_constructor:firestore.client.NoDocument)
+}
+
+void NoDocument::SharedCtor() {
+ name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ read_time_ = NULL;
+ _cached_size_ = 0;
+}
+
+NoDocument::~NoDocument() {
+ // @@protoc_insertion_point(destructor:firestore.client.NoDocument)
+ SharedDtor();
+}
+
+void NoDocument::SharedDtor() {
+ name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ if (this != internal_default_instance()) delete read_time_;
+}
+
+void NoDocument::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* NoDocument::descriptor() {
+ ::protobuf_firestore_2flocal_2fmaybe_5fdocument_2eproto::protobuf_AssignDescriptorsOnce();
+ return ::protobuf_firestore_2flocal_2fmaybe_5fdocument_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
+}
+
+const NoDocument& NoDocument::default_instance() {
+ ::protobuf_firestore_2flocal_2fmaybe_5fdocument_2eproto::InitDefaultsNoDocument();
+ return *internal_default_instance();
+}
+
+NoDocument* NoDocument::New(::google::protobuf::Arena* arena) const {
+ NoDocument* n = new NoDocument;
+ if (arena != NULL) {
+ arena->Own(n);
+ }
+ return n;
+}
+
+void NoDocument::Clear() {
+// @@protoc_insertion_point(message_clear_start:firestore.client.NoDocument)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
+ delete read_time_;
+ }
+ read_time_ = NULL;
+ _internal_metadata_.Clear();
+}
+
+bool NoDocument::MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input) {
+#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
+ ::google::protobuf::uint32 tag;
+ // @@protoc_insertion_point(parse_start:firestore.client.NoDocument)
+ for (;;) {
+ ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+ tag = p.first;
+ if (!p.second) goto handle_unusual;
+ switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
+ // string name = 1;
+ case 1: {
+ if (static_cast< ::google::protobuf::uint8>(tag) ==
+ static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+ input, this->mutable_name()));
+ DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
+ this->name().data(), static_cast<int>(this->name().length()),
+ ::google::protobuf::internal::WireFormatLite::PARSE,
+ "firestore.client.NoDocument.name"));
+ } else {
+ goto handle_unusual;
+ }
+ break;
+ }
+
+ // .google.protobuf.Timestamp read_time = 2;
+ case 2: {
+ if (static_cast< ::google::protobuf::uint8>(tag) ==
+ static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
+ input, mutable_read_time()));
+ } else {
+ goto handle_unusual;
+ }
+ break;
+ }
+
+ default: {
+ handle_unusual:
+ if (tag == 0) {
+ goto success;
+ }
+ DO_(::google::protobuf::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_
+}
+
+void NoDocument::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // @@protoc_insertion_point(serialize_start:firestore.client.NoDocument)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
+ // string name = 1;
+ if (this->name().size() > 0) {
+ ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
+ this->name().data(), static_cast<int>(this->name().length()),
+ ::google::protobuf::internal::WireFormatLite::SERIALIZE,
+ "firestore.client.NoDocument.name");
+ ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
+ 1, this->name(), output);
+ }
+
+ // .google.protobuf.Timestamp read_time = 2;
+ if (this->has_read_time()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 2, *this->read_time_, output);
+ }
+
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
+ }
+ // @@protoc_insertion_point(serialize_end:firestore.client.NoDocument)
+}
+
+::google::protobuf::uint8* NoDocument::InternalSerializeWithCachedSizesToArray(
+ bool deterministic, ::google::protobuf::uint8* target) const {
+ (void)deterministic; // Unused
+ // @@protoc_insertion_point(serialize_to_array_start:firestore.client.NoDocument)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
+ // string name = 1;
+ if (this->name().size() > 0) {
+ ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
+ this->name().data(), static_cast<int>(this->name().length()),
+ ::google::protobuf::internal::WireFormatLite::SERIALIZE,
+ "firestore.client.NoDocument.name");
+ target =
+ ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+ 1, this->name(), target);
+ }
+
+ // .google.protobuf.Timestamp read_time = 2;
+ if (this->has_read_time()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ InternalWriteMessageToArray(
+ 2, *this->read_time_, deterministic, target);
+ }
+
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), 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() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ total_size +=
+ ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
+ }
+ // string name = 1;
+ if (this->name().size() > 0) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::StringSize(
+ this->name());
+ }
+
+ // .google.protobuf.Timestamp read_time = 2;
+ if (this->has_read_time()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSize(
+ *this->read_time_);
+ }
+
+ int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = cached_size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+ return total_size;
+}
+
+void NoDocument::MergeFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_merge_from_start:firestore.client.NoDocument)
+ GOOGLE_DCHECK_NE(&from, this);
+ const NoDocument* source =
+ ::google::protobuf::internal::DynamicCastToGenerated<const NoDocument>(
+ &from);
+ if (source == NULL) {
+ // @@protoc_insertion_point(generalized_merge_from_cast_fail:firestore.client.NoDocument)
+ ::google::protobuf::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_);
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
+ if (from.name().size() > 0) {
+
+ name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
+ }
+ if (from.has_read_time()) {
+ mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
+ }
+}
+
+void NoDocument::CopyFrom(const ::google::protobuf::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::Swap(NoDocument* other) {
+ if (other == this) return;
+ InternalSwap(other);
+}
+void NoDocument::InternalSwap(NoDocument* other) {
+ using std::swap;
+ name_.Swap(&other->name_);
+ swap(read_time_, other->read_time_);
+ _internal_metadata_.Swap(&other->_internal_metadata_);
+ swap(_cached_size_, other->_cached_size_);
+}
+
+::google::protobuf::Metadata NoDocument::GetMetadata() const {
+ protobuf_firestore_2flocal_2fmaybe_5fdocument_2eproto::protobuf_AssignDescriptorsOnce();
+ return ::protobuf_firestore_2flocal_2fmaybe_5fdocument_2eproto::file_level_metadata[kIndexInFileMessages];
+}
+
+
+// ===================================================================
+
+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::v1beta1::Document*>(
+ ::google::firestore::v1beta1::Document::internal_default_instance());
+}
+void MaybeDocument::set_allocated_no_document(::firestore::client::NoDocument* no_document) {
+ ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
+ clear_document_type();
+ if (no_document) {
+ ::google::protobuf::Arena* submessage_arena = NULL;
+ if (message_arena != submessage_arena) {
+ no_document = ::google::protobuf::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::v1beta1::Document* document) {
+ ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
+ clear_document_type();
+ if (document) {
+ ::google::protobuf::Arena* submessage_arena = NULL;
+ if (message_arena != submessage_arena) {
+ document = ::google::protobuf::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();
+ }
+}
+#if !defined(_MSC_VER) || _MSC_VER >= 1900
+const int MaybeDocument::kNoDocumentFieldNumber;
+const int MaybeDocument::kDocumentFieldNumber;
+#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
+
+MaybeDocument::MaybeDocument()
+ : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+ if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
+ ::protobuf_firestore_2flocal_2fmaybe_5fdocument_2eproto::InitDefaultsMaybeDocument();
+ }
+ SharedCtor();
+ // @@protoc_insertion_point(constructor:firestore.client.MaybeDocument)
+}
+MaybeDocument::MaybeDocument(const MaybeDocument& from)
+ : ::google::protobuf::Message(),
+ _internal_metadata_(NULL),
+ _cached_size_(0) {
+ _internal_metadata_.MergeFrom(from._internal_metadata_);
+ 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::v1beta1::Document::MergeFrom(from.document());
+ break;
+ }
+ case DOCUMENT_TYPE_NOT_SET: {
+ break;
+ }
+ }
+ // @@protoc_insertion_point(copy_constructor:firestore.client.MaybeDocument)
+}
+
+void MaybeDocument::SharedCtor() {
+ clear_has_document_type();
+ _cached_size_ = 0;
+}
+
+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 {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* MaybeDocument::descriptor() {
+ ::protobuf_firestore_2flocal_2fmaybe_5fdocument_2eproto::protobuf_AssignDescriptorsOnce();
+ return ::protobuf_firestore_2flocal_2fmaybe_5fdocument_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
+}
+
+const MaybeDocument& MaybeDocument::default_instance() {
+ ::protobuf_firestore_2flocal_2fmaybe_5fdocument_2eproto::InitDefaultsMaybeDocument();
+ return *internal_default_instance();
+}
+
+MaybeDocument* MaybeDocument::New(::google::protobuf::Arena* arena) const {
+ MaybeDocument* n = new MaybeDocument;
+ if (arena != NULL) {
+ arena->Own(n);
+ }
+ return n;
+}
+
+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 DOCUMENT_TYPE_NOT_SET: {
+ break;
+ }
+ }
+ _oneof_case_[0] = DOCUMENT_TYPE_NOT_SET;
+}
+
+
+void MaybeDocument::Clear() {
+// @@protoc_insertion_point(message_clear_start:firestore.client.MaybeDocument)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ clear_document_type();
+ _internal_metadata_.Clear();
+}
+
+bool MaybeDocument::MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input) {
+#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
+ ::google::protobuf::uint32 tag;
+ // @@protoc_insertion_point(parse_start:firestore.client.MaybeDocument)
+ for (;;) {
+ ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+ tag = p.first;
+ if (!p.second) goto handle_unusual;
+ switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
+ // .firestore.client.NoDocument no_document = 1;
+ case 1: {
+ if (static_cast< ::google::protobuf::uint8>(tag) ==
+ static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
+ input, mutable_no_document()));
+ } else {
+ goto handle_unusual;
+ }
+ break;
+ }
+
+ // .google.firestore.v1beta1.Document document = 2;
+ case 2: {
+ if (static_cast< ::google::protobuf::uint8>(tag) ==
+ static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
+ input, mutable_document()));
+ } else {
+ goto handle_unusual;
+ }
+ break;
+ }
+
+ default: {
+ handle_unusual:
+ if (tag == 0) {
+ goto success;
+ }
+ DO_(::google::protobuf::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_
+}
+
+void MaybeDocument::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // @@protoc_insertion_point(serialize_start:firestore.client.MaybeDocument)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
+ // .firestore.client.NoDocument no_document = 1;
+ if (has_no_document()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 1, *document_type_.no_document_, output);
+ }
+
+ // .google.firestore.v1beta1.Document document = 2;
+ if (has_document()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 2, *document_type_.document_, output);
+ }
+
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
+ }
+ // @@protoc_insertion_point(serialize_end:firestore.client.MaybeDocument)
+}
+
+::google::protobuf::uint8* MaybeDocument::InternalSerializeWithCachedSizesToArray(
+ bool deterministic, ::google::protobuf::uint8* target) const {
+ (void)deterministic; // Unused
+ // @@protoc_insertion_point(serialize_to_array_start:firestore.client.MaybeDocument)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
+ // .firestore.client.NoDocument no_document = 1;
+ if (has_no_document()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ InternalWriteMessageToArray(
+ 1, *document_type_.no_document_, deterministic, target);
+ }
+
+ // .google.firestore.v1beta1.Document document = 2;
+ if (has_document()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ InternalWriteMessageToArray(
+ 2, *document_type_.document_, deterministic, target);
+ }
+
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), 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() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ total_size +=
+ ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
+ }
+ switch (document_type_case()) {
+ // .firestore.client.NoDocument no_document = 1;
+ case kNoDocument: {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSize(
+ *document_type_.no_document_);
+ break;
+ }
+ // .google.firestore.v1beta1.Document document = 2;
+ case kDocument: {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSize(
+ *document_type_.document_);
+ break;
+ }
+ case DOCUMENT_TYPE_NOT_SET: {
+ break;
+ }
+ }
+ int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = cached_size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+ return total_size;
+}
+
+void MaybeDocument::MergeFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_merge_from_start:firestore.client.MaybeDocument)
+ GOOGLE_DCHECK_NE(&from, this);
+ const MaybeDocument* source =
+ ::google::protobuf::internal::DynamicCastToGenerated<const MaybeDocument>(
+ &from);
+ if (source == NULL) {
+ // @@protoc_insertion_point(generalized_merge_from_cast_fail:firestore.client.MaybeDocument)
+ ::google::protobuf::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_);
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
+ switch (from.document_type_case()) {
+ case kNoDocument: {
+ mutable_no_document()->::firestore::client::NoDocument::MergeFrom(from.no_document());
+ break;
+ }
+ case kDocument: {
+ mutable_document()->::google::firestore::v1beta1::Document::MergeFrom(from.document());
+ break;
+ }
+ case DOCUMENT_TYPE_NOT_SET: {
+ break;
+ }
+ }
+}
+
+void MaybeDocument::CopyFrom(const ::google::protobuf::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::Swap(MaybeDocument* other) {
+ if (other == this) return;
+ InternalSwap(other);
+}
+void MaybeDocument::InternalSwap(MaybeDocument* other) {
+ using std::swap;
+ swap(document_type_, other->document_type_);
+ swap(_oneof_case_[0], other->_oneof_case_[0]);
+ _internal_metadata_.Swap(&other->_internal_metadata_);
+ swap(_cached_size_, other->_cached_size_);
+}
+
+::google::protobuf::Metadata MaybeDocument::GetMetadata() const {
+ protobuf_firestore_2flocal_2fmaybe_5fdocument_2eproto::protobuf_AssignDescriptorsOnce();
+ return ::protobuf_firestore_2flocal_2fmaybe_5fdocument_2eproto::file_level_metadata[kIndexInFileMessages];
+}
+
+
+// @@protoc_insertion_point(namespace_scope)
+} // namespace client
+} // namespace firestore
+
+// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/cpp/firestore/local/maybe_document.pb.h b/Firestore/Protos/cpp/firestore/local/maybe_document.pb.h
new file mode 100644
index 0000000..34125fa
--- /dev/null
+++ b/Firestore/Protos/cpp/firestore/local/maybe_document.pb.h
@@ -0,0 +1,541 @@
+/*
+ * 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
+
+#ifndef PROTOBUF_firestore_2flocal_2fmaybe_5fdocument_2eproto__INCLUDED
+#define PROTOBUF_firestore_2flocal_2fmaybe_5fdocument_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 3005000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please update
+#error your headers.
+#endif
+#if 3005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/io/coded_stream.h>
+#include <google/protobuf/arena.h>
+#include <google/protobuf/arenastring.h>
+#include <google/protobuf/generated_message_table_driven.h>
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/metadata.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/repeated_field.h> // IWYU pragma: export
+#include <google/protobuf/extension_set.h> // IWYU pragma: export
+#include <google/protobuf/unknown_field_set.h>
+#include "google/firestore/v1beta1/document.pb.h"
+#include <google/protobuf/timestamp.pb.h>
+// @@protoc_insertion_point(includes)
+
+namespace protobuf_firestore_2flocal_2fmaybe_5fdocument_2eproto {
+// Internal implementation detail -- do not use these members.
+struct TableStruct {
+ static const ::google::protobuf::internal::ParseTableField entries[];
+ static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
+ static const ::google::protobuf::internal::ParseTable schema[2];
+ static const ::google::protobuf::internal::FieldMetadata field_metadata[];
+ static const ::google::protobuf::internal::SerializationTable serialization_table[];
+ static const ::google::protobuf::uint32 offsets[];
+};
+void AddDescriptors();
+void InitDefaultsNoDocumentImpl();
+void InitDefaultsNoDocument();
+void InitDefaultsMaybeDocumentImpl();
+void InitDefaultsMaybeDocument();
+inline void InitDefaults() {
+ InitDefaultsNoDocument();
+ InitDefaultsMaybeDocument();
+}
+} // namespace protobuf_firestore_2flocal_2fmaybe_5fdocument_2eproto
+namespace firestore {
+namespace client {
+class MaybeDocument;
+class MaybeDocumentDefaultTypeInternal;
+extern MaybeDocumentDefaultTypeInternal _MaybeDocument_default_instance_;
+class NoDocument;
+class NoDocumentDefaultTypeInternal;
+extern NoDocumentDefaultTypeInternal _NoDocument_default_instance_;
+} // namespace client
+} // namespace firestore
+namespace firestore {
+namespace client {
+
+// ===================================================================
+
+class NoDocument : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:firestore.client.NoDocument) */ {
+ public:
+ NoDocument();
+ virtual ~NoDocument();
+
+ NoDocument(const NoDocument& from);
+
+ inline NoDocument& operator=(const NoDocument& from) {
+ CopyFrom(from);
+ return *this;
+ }
+ #if LANG_CXX11
+ NoDocument(NoDocument&& from) noexcept
+ : NoDocument() {
+ *this = ::std::move(from);
+ }
+
+ inline NoDocument& operator=(NoDocument&& from) noexcept {
+ if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
+ if (this != &from) InternalSwap(&from);
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
+ #endif
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const NoDocument& default_instance();
+
+ static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
+ static inline const NoDocument* internal_default_instance() {
+ return reinterpret_cast<const NoDocument*>(
+ &_NoDocument_default_instance_);
+ }
+ static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
+ 0;
+
+ void Swap(NoDocument* other);
+ friend void swap(NoDocument& a, NoDocument& b) {
+ a.Swap(&b);
+ }
+
+ // implements Message ----------------------------------------------
+
+ inline NoDocument* New() const PROTOBUF_FINAL { return New(NULL); }
+
+ NoDocument* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
+ void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+ void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+ void CopyFrom(const NoDocument& from);
+ void MergeFrom(const NoDocument& from);
+ void Clear() PROTOBUF_FINAL;
+ bool IsInitialized() const PROTOBUF_FINAL;
+
+ size_t ByteSizeLong() const PROTOBUF_FINAL;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
+ ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
+ bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
+ int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const PROTOBUF_FINAL;
+ void InternalSwap(NoDocument* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return NULL;
+ }
+ inline void* MaybeArenaPtr() const {
+ return NULL;
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // string name = 1;
+ void clear_name();
+ static const int kNameFieldNumber = 1;
+ const ::std::string& name() const;
+ void set_name(const ::std::string& value);
+ #if LANG_CXX11
+ void set_name(::std::string&& value);
+ #endif
+ void set_name(const char* value);
+ void set_name(const char* value, size_t size);
+ ::std::string* mutable_name();
+ ::std::string* release_name();
+ void set_allocated_name(::std::string* name);
+
+ // .google.protobuf.Timestamp read_time = 2;
+ bool has_read_time() const;
+ void clear_read_time();
+ static const int kReadTimeFieldNumber = 2;
+ const ::google::protobuf::Timestamp& read_time() const;
+ ::google::protobuf::Timestamp* release_read_time();
+ ::google::protobuf::Timestamp* mutable_read_time();
+ void set_allocated_read_time(::google::protobuf::Timestamp* read_time);
+
+ // @@protoc_insertion_point(class_scope:firestore.client.NoDocument)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ ::google::protobuf::internal::ArenaStringPtr name_;
+ ::google::protobuf::Timestamp* read_time_;
+ mutable int _cached_size_;
+ friend struct ::protobuf_firestore_2flocal_2fmaybe_5fdocument_2eproto::TableStruct;
+ friend void ::protobuf_firestore_2flocal_2fmaybe_5fdocument_2eproto::InitDefaultsNoDocumentImpl();
+};
+// -------------------------------------------------------------------
+
+class MaybeDocument : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:firestore.client.MaybeDocument) */ {
+ public:
+ MaybeDocument();
+ virtual ~MaybeDocument();
+
+ MaybeDocument(const MaybeDocument& from);
+
+ inline MaybeDocument& operator=(const MaybeDocument& from) {
+ CopyFrom(from);
+ return *this;
+ }
+ #if LANG_CXX11
+ MaybeDocument(MaybeDocument&& from) noexcept
+ : MaybeDocument() {
+ *this = ::std::move(from);
+ }
+
+ inline MaybeDocument& operator=(MaybeDocument&& from) noexcept {
+ if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
+ if (this != &from) InternalSwap(&from);
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
+ #endif
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const MaybeDocument& default_instance();
+
+ enum DocumentTypeCase {
+ kNoDocument = 1,
+ kDocument = 2,
+ DOCUMENT_TYPE_NOT_SET = 0,
+ };
+
+ static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
+ static inline const MaybeDocument* internal_default_instance() {
+ return reinterpret_cast<const MaybeDocument*>(
+ &_MaybeDocument_default_instance_);
+ }
+ static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
+ 1;
+
+ void Swap(MaybeDocument* other);
+ friend void swap(MaybeDocument& a, MaybeDocument& b) {
+ a.Swap(&b);
+ }
+
+ // implements Message ----------------------------------------------
+
+ inline MaybeDocument* New() const PROTOBUF_FINAL { return New(NULL); }
+
+ MaybeDocument* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
+ void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+ void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+ void CopyFrom(const MaybeDocument& from);
+ void MergeFrom(const MaybeDocument& from);
+ void Clear() PROTOBUF_FINAL;
+ bool IsInitialized() const PROTOBUF_FINAL;
+
+ size_t ByteSizeLong() const PROTOBUF_FINAL;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
+ ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
+ bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
+ int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const PROTOBUF_FINAL;
+ void InternalSwap(MaybeDocument* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return NULL;
+ }
+ inline void* MaybeArenaPtr() const {
+ return NULL;
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // .firestore.client.NoDocument no_document = 1;
+ bool has_no_document() const;
+ void clear_no_document();
+ static const int kNoDocumentFieldNumber = 1;
+ const ::firestore::client::NoDocument& no_document() const;
+ ::firestore::client::NoDocument* release_no_document();
+ ::firestore::client::NoDocument* mutable_no_document();
+ void set_allocated_no_document(::firestore::client::NoDocument* no_document);
+
+ // .google.firestore.v1beta1.Document document = 2;
+ bool has_document() const;
+ void clear_document();
+ static const int kDocumentFieldNumber = 2;
+ const ::google::firestore::v1beta1::Document& document() const;
+ ::google::firestore::v1beta1::Document* release_document();
+ ::google::firestore::v1beta1::Document* mutable_document();
+ void set_allocated_document(::google::firestore::v1beta1::Document* document);
+
+ DocumentTypeCase document_type_case() const;
+ // @@protoc_insertion_point(class_scope:firestore.client.MaybeDocument)
+ private:
+ void set_has_no_document();
+ void set_has_document();
+
+ inline bool has_document_type() const;
+ void clear_document_type();
+ inline void clear_has_document_type();
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ union DocumentTypeUnion {
+ DocumentTypeUnion() {}
+ ::firestore::client::NoDocument* no_document_;
+ ::google::firestore::v1beta1::Document* document_;
+ } document_type_;
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _oneof_case_[1];
+
+ friend struct ::protobuf_firestore_2flocal_2fmaybe_5fdocument_2eproto::TableStruct;
+ friend void ::protobuf_firestore_2flocal_2fmaybe_5fdocument_2eproto::InitDefaultsMaybeDocumentImpl();
+};
+// ===================================================================
+
+
+// ===================================================================
+
+#ifdef __GNUC__
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif // __GNUC__
+// NoDocument
+
+// string name = 1;
+inline void NoDocument::clear_name() {
+ name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline const ::std::string& NoDocument::name() const {
+ // @@protoc_insertion_point(field_get:firestore.client.NoDocument.name)
+ return name_.GetNoArena();
+}
+inline void NoDocument::set_name(const ::std::string& value) {
+
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:firestore.client.NoDocument.name)
+}
+#if LANG_CXX11
+inline void NoDocument::set_name(::std::string&& value) {
+
+ name_.SetNoArena(
+ &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
+ // @@protoc_insertion_point(field_set_rvalue:firestore.client.NoDocument.name)
+}
+#endif
+inline void NoDocument::set_name(const char* value) {
+ GOOGLE_DCHECK(value != NULL);
+
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+ // @@protoc_insertion_point(field_set_char:firestore.client.NoDocument.name)
+}
+inline void NoDocument::set_name(const char* value, size_t size) {
+
+ name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:firestore.client.NoDocument.name)
+}
+inline ::std::string* NoDocument::mutable_name() {
+
+ // @@protoc_insertion_point(field_mutable:firestore.client.NoDocument.name)
+ return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* NoDocument::release_name() {
+ // @@protoc_insertion_point(field_release:firestore.client.NoDocument.name)
+
+ return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void NoDocument::set_allocated_name(::std::string* name) {
+ if (name != NULL) {
+
+ } else {
+
+ }
+ name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
+ // @@protoc_insertion_point(field_set_allocated:firestore.client.NoDocument.name)
+}
+
+// .google.protobuf.Timestamp read_time = 2;
+inline bool NoDocument::has_read_time() const {
+ return this != internal_default_instance() && read_time_ != NULL;
+}
+inline const ::google::protobuf::Timestamp& NoDocument::read_time() const {
+ const ::google::protobuf::Timestamp* p = read_time_;
+ // @@protoc_insertion_point(field_get:firestore.client.NoDocument.read_time)
+ return p != NULL ? *p : *reinterpret_cast<const ::google::protobuf::Timestamp*>(
+ &::google::protobuf::_Timestamp_default_instance_);
+}
+inline ::google::protobuf::Timestamp* NoDocument::release_read_time() {
+ // @@protoc_insertion_point(field_release:firestore.client.NoDocument.read_time)
+
+ ::google::protobuf::Timestamp* temp = read_time_;
+ read_time_ = NULL;
+ return temp;
+}
+inline ::google::protobuf::Timestamp* NoDocument::mutable_read_time() {
+
+ if (read_time_ == NULL) {
+ read_time_ = new ::google::protobuf::Timestamp;
+ }
+ // @@protoc_insertion_point(field_mutable:firestore.client.NoDocument.read_time)
+ return read_time_;
+}
+inline void NoDocument::set_allocated_read_time(::google::protobuf::Timestamp* read_time) {
+ ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
+ if (message_arena == NULL) {
+ delete reinterpret_cast< ::google::protobuf::MessageLite*>(read_time_);
+ }
+ if (read_time) {
+ ::google::protobuf::Arena* submessage_arena =
+ reinterpret_cast< ::google::protobuf::MessageLite*>(read_time)->GetArena();
+ if (message_arena != submessage_arena) {
+ read_time = ::google::protobuf::internal::GetOwnedMessage(
+ message_arena, read_time, submessage_arena);
+ }
+
+ } else {
+
+ }
+ read_time_ = read_time;
+ // @@protoc_insertion_point(field_set_allocated:firestore.client.NoDocument.read_time)
+}
+
+// -------------------------------------------------------------------
+
+// MaybeDocument
+
+// .firestore.client.NoDocument no_document = 1;
+inline bool MaybeDocument::has_no_document() const {
+ return document_type_case() == kNoDocument;
+}
+inline void MaybeDocument::set_has_no_document() {
+ _oneof_case_[0] = kNoDocument;
+}
+inline void MaybeDocument::clear_no_document() {
+ if (has_no_document()) {
+ delete document_type_.no_document_;
+ clear_has_document_type();
+ }
+}
+inline ::firestore::client::NoDocument* MaybeDocument::release_no_document() {
+ // @@protoc_insertion_point(field_release:firestore.client.MaybeDocument.no_document)
+ if (has_no_document()) {
+ clear_has_document_type();
+ ::firestore::client::NoDocument* temp = document_type_.no_document_;
+ document_type_.no_document_ = NULL;
+ return temp;
+ } else {
+ return NULL;
+ }
+}
+inline const ::firestore::client::NoDocument& MaybeDocument::no_document() const {
+ // @@protoc_insertion_point(field_get:firestore.client.MaybeDocument.no_document)
+ return has_no_document()
+ ? *document_type_.no_document_
+ : *reinterpret_cast< ::firestore::client::NoDocument*>(&::firestore::client::_NoDocument_default_instance_);
+}
+inline ::firestore::client::NoDocument* MaybeDocument::mutable_no_document() {
+ if (!has_no_document()) {
+ clear_document_type();
+ set_has_no_document();
+ document_type_.no_document_ = new ::firestore::client::NoDocument;
+ }
+ // @@protoc_insertion_point(field_mutable:firestore.client.MaybeDocument.no_document)
+ return document_type_.no_document_;
+}
+
+// .google.firestore.v1beta1.Document document = 2;
+inline bool MaybeDocument::has_document() const {
+ return document_type_case() == kDocument;
+}
+inline void MaybeDocument::set_has_document() {
+ _oneof_case_[0] = kDocument;
+}
+inline ::google::firestore::v1beta1::Document* MaybeDocument::release_document() {
+ // @@protoc_insertion_point(field_release:firestore.client.MaybeDocument.document)
+ if (has_document()) {
+ clear_has_document_type();
+ ::google::firestore::v1beta1::Document* temp = document_type_.document_;
+ document_type_.document_ = NULL;
+ return temp;
+ } else {
+ return NULL;
+ }
+}
+inline const ::google::firestore::v1beta1::Document& MaybeDocument::document() const {
+ // @@protoc_insertion_point(field_get:firestore.client.MaybeDocument.document)
+ return has_document()
+ ? *document_type_.document_
+ : *reinterpret_cast< ::google::firestore::v1beta1::Document*>(&::google::firestore::v1beta1::_Document_default_instance_);
+}
+inline ::google::firestore::v1beta1::Document* MaybeDocument::mutable_document() {
+ if (!has_document()) {
+ clear_document_type();
+ set_has_document();
+ document_type_.document_ = new ::google::firestore::v1beta1::Document;
+ }
+ // @@protoc_insertion_point(field_mutable:firestore.client.MaybeDocument.document)
+ return document_type_.document_;
+}
+
+inline bool MaybeDocument::has_document_type() const {
+ return document_type_case() != DOCUMENT_TYPE_NOT_SET;
+}
+inline void MaybeDocument::clear_has_document_type() {
+ _oneof_case_[0] = DOCUMENT_TYPE_NOT_SET;
+}
+inline MaybeDocument::DocumentTypeCase MaybeDocument::document_type_case() const {
+ return MaybeDocument::DocumentTypeCase(_oneof_case_[0]);
+}
+#ifdef __GNUC__
+ #pragma GCC diagnostic pop
+#endif // __GNUC__
+// -------------------------------------------------------------------
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace client
+} // namespace firestore
+
+// @@protoc_insertion_point(global_scope)
+
+#endif // PROTOBUF_firestore_2flocal_2fmaybe_5fdocument_2eproto__INCLUDED
diff --git a/Firestore/Protos/cpp/firestore/local/mutation.pb.cc b/Firestore/Protos/cpp/firestore/local/mutation.pb.cc
new file mode 100644
index 0000000..e6c88d7
--- /dev/null
+++ b/Firestore/Protos/cpp/firestore/local/mutation.pb.cc
@@ -0,0 +1,808 @@
+/*
+ * 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/mutation.proto
+
+#include "firestore/local/mutation.pb.h"
+
+#include <algorithm>
+
+#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/port.h>
+#include <google/protobuf/stubs/once.h>
+#include <google/protobuf/io/coded_stream.h>
+#include <google/protobuf/wire_format_lite_inl.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>
+// This is a temporary google only hack
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+#include "third_party/protobuf/version.h"
+#endif
+// @@protoc_insertion_point(includes)
+namespace firestore {
+namespace client {
+class MutationQueueDefaultTypeInternal {
+ public:
+ ::google::protobuf::internal::ExplicitlyConstructed<MutationQueue>
+ _instance;
+} _MutationQueue_default_instance_;
+class WriteBatchDefaultTypeInternal {
+ public:
+ ::google::protobuf::internal::ExplicitlyConstructed<WriteBatch>
+ _instance;
+} _WriteBatch_default_instance_;
+} // namespace client
+} // namespace firestore
+namespace protobuf_firestore_2flocal_2fmutation_2eproto {
+void InitDefaultsMutationQueueImpl() {
+ GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+ ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
+#else
+ ::google::protobuf::internal::InitProtobufDefaults();
+#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+ {
+ void* ptr = &::firestore::client::_MutationQueue_default_instance_;
+ new (ptr) ::firestore::client::MutationQueue();
+ ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
+ }
+ ::firestore::client::MutationQueue::InitAsDefaultInstance();
+}
+
+void InitDefaultsMutationQueue() {
+ static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+ ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsMutationQueueImpl);
+}
+
+void InitDefaultsWriteBatchImpl() {
+ GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+ ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
+#else
+ ::google::protobuf::internal::InitProtobufDefaults();
+#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+ protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsWrite();
+ protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
+ {
+ void* ptr = &::firestore::client::_WriteBatch_default_instance_;
+ new (ptr) ::firestore::client::WriteBatch();
+ ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
+ }
+ ::firestore::client::WriteBatch::InitAsDefaultInstance();
+}
+
+void InitDefaultsWriteBatch() {
+ static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+ ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsWriteBatchImpl);
+}
+
+::google::protobuf::Metadata file_level_metadata[2];
+
+const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
+ ~0u, // no _has_bits_
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::MutationQueue, _internal_metadata_),
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::MutationQueue, last_acknowledged_batch_id_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::MutationQueue, last_stream_token_),
+ ~0u, // no _has_bits_
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::WriteBatch, _internal_metadata_),
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::WriteBatch, batch_id_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::WriteBatch, writes_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::WriteBatch, local_write_time_),
+};
+static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
+ { 0, -1, sizeof(::firestore::client::MutationQueue)},
+ { 7, -1, sizeof(::firestore::client::WriteBatch)},
+};
+
+static ::google::protobuf::Message const * const file_default_instances[] = {
+ reinterpret_cast<const ::google::protobuf::Message*>(&::firestore::client::_MutationQueue_default_instance_),
+ reinterpret_cast<const ::google::protobuf::Message*>(&::firestore::client::_WriteBatch_default_instance_),
+};
+
+void protobuf_AssignDescriptors() {
+ AddDescriptors();
+ ::google::protobuf::MessageFactory* factory = NULL;
+ AssignDescriptors(
+ "firestore/local/mutation.proto", schemas, file_default_instances, TableStruct::offsets, factory,
+ file_level_metadata, NULL, NULL);
+}
+
+void protobuf_AssignDescriptorsOnce() {
+ static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+ ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
+}
+
+void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
+void protobuf_RegisterTypes(const ::std::string&) {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 2);
+}
+
+void AddDescriptorsImpl() {
+ InitDefaults();
+ static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
+ "\n\036firestore/local/mutation.proto\022\020firest"
+ "ore.client\032$google/firestore/v1beta1/wri"
+ "te.proto\032\037google/protobuf/timestamp.prot"
+ "o\"N\n\rMutationQueue\022\"\n\032last_acknowledged_"
+ "batch_id\030\001 \001(\005\022\031\n\021last_stream_token\030\002 \001("
+ "\014\"\205\001\n\nWriteBatch\022\020\n\010batch_id\030\001 \001(\005\022/\n\006wr"
+ "ites\030\002 \003(\0132\037.google.firestore.v1beta1.Wr"
+ "ite\0224\n\020local_write_time\030\003 \001(\0132\032.google.p"
+ "rotobuf.TimestampB/\n#com.google.firebase"
+ ".firestore.protoP\001\242\002\005FSTPBb\006proto3"
+ };
+ ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
+ descriptor, 394);
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
+ "firestore/local/mutation.proto", &protobuf_RegisterTypes);
+ ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::AddDescriptors();
+ ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::AddDescriptors();
+}
+
+void AddDescriptors() {
+ static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+ ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
+}
+// Force AddDescriptors() to be called at dynamic initialization time.
+struct StaticDescriptorInitializer {
+ StaticDescriptorInitializer() {
+ AddDescriptors();
+ }
+} static_descriptor_initializer;
+} // namespace protobuf_firestore_2flocal_2fmutation_2eproto
+namespace firestore {
+namespace client {
+
+// ===================================================================
+
+void MutationQueue::InitAsDefaultInstance() {
+}
+#if !defined(_MSC_VER) || _MSC_VER >= 1900
+const int MutationQueue::kLastAcknowledgedBatchIdFieldNumber;
+const int MutationQueue::kLastStreamTokenFieldNumber;
+#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
+
+MutationQueue::MutationQueue()
+ : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+ if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
+ ::protobuf_firestore_2flocal_2fmutation_2eproto::InitDefaultsMutationQueue();
+ }
+ SharedCtor();
+ // @@protoc_insertion_point(constructor:firestore.client.MutationQueue)
+}
+MutationQueue::MutationQueue(const MutationQueue& from)
+ : ::google::protobuf::Message(),
+ _internal_metadata_(NULL),
+ _cached_size_(0) {
+ _internal_metadata_.MergeFrom(from._internal_metadata_);
+ last_stream_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ if (from.last_stream_token().size() > 0) {
+ last_stream_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.last_stream_token_);
+ }
+ last_acknowledged_batch_id_ = from.last_acknowledged_batch_id_;
+ // @@protoc_insertion_point(copy_constructor:firestore.client.MutationQueue)
+}
+
+void MutationQueue::SharedCtor() {
+ last_stream_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ last_acknowledged_batch_id_ = 0;
+ _cached_size_ = 0;
+}
+
+MutationQueue::~MutationQueue() {
+ // @@protoc_insertion_point(destructor:firestore.client.MutationQueue)
+ SharedDtor();
+}
+
+void MutationQueue::SharedDtor() {
+ last_stream_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+
+void MutationQueue::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* MutationQueue::descriptor() {
+ ::protobuf_firestore_2flocal_2fmutation_2eproto::protobuf_AssignDescriptorsOnce();
+ return ::protobuf_firestore_2flocal_2fmutation_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
+}
+
+const MutationQueue& MutationQueue::default_instance() {
+ ::protobuf_firestore_2flocal_2fmutation_2eproto::InitDefaultsMutationQueue();
+ return *internal_default_instance();
+}
+
+MutationQueue* MutationQueue::New(::google::protobuf::Arena* arena) const {
+ MutationQueue* n = new MutationQueue;
+ if (arena != NULL) {
+ arena->Own(n);
+ }
+ return n;
+}
+
+void MutationQueue::Clear() {
+// @@protoc_insertion_point(message_clear_start:firestore.client.MutationQueue)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ last_stream_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ last_acknowledged_batch_id_ = 0;
+ _internal_metadata_.Clear();
+}
+
+bool MutationQueue::MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input) {
+#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
+ ::google::protobuf::uint32 tag;
+ // @@protoc_insertion_point(parse_start:firestore.client.MutationQueue)
+ for (;;) {
+ ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+ tag = p.first;
+ if (!p.second) goto handle_unusual;
+ switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
+ // int32 last_acknowledged_batch_id = 1;
+ case 1: {
+ if (static_cast< ::google::protobuf::uint8>(tag) ==
+ static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
+
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &last_acknowledged_batch_id_)));
+ } else {
+ goto handle_unusual;
+ }
+ break;
+ }
+
+ // bytes last_stream_token = 2;
+ case 2: {
+ if (static_cast< ::google::protobuf::uint8>(tag) ==
+ static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
+ input, this->mutable_last_stream_token()));
+ } else {
+ goto handle_unusual;
+ }
+ break;
+ }
+
+ default: {
+ handle_unusual:
+ if (tag == 0) {
+ goto success;
+ }
+ DO_(::google::protobuf::internal::WireFormat::SkipField(
+ input, tag, _internal_metadata_.mutable_unknown_fields()));
+ break;
+ }
+ }
+ }
+success:
+ // @@protoc_insertion_point(parse_success:firestore.client.MutationQueue)
+ return true;
+failure:
+ // @@protoc_insertion_point(parse_failure:firestore.client.MutationQueue)
+ return false;
+#undef DO_
+}
+
+void MutationQueue::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // @@protoc_insertion_point(serialize_start:firestore.client.MutationQueue)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
+ // int32 last_acknowledged_batch_id = 1;
+ if (this->last_acknowledged_batch_id() != 0) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->last_acknowledged_batch_id(), output);
+ }
+
+ // bytes last_stream_token = 2;
+ if (this->last_stream_token().size() > 0) {
+ ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
+ 2, this->last_stream_token(), output);
+ }
+
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
+ }
+ // @@protoc_insertion_point(serialize_end:firestore.client.MutationQueue)
+}
+
+::google::protobuf::uint8* MutationQueue::InternalSerializeWithCachedSizesToArray(
+ bool deterministic, ::google::protobuf::uint8* target) const {
+ (void)deterministic; // Unused
+ // @@protoc_insertion_point(serialize_to_array_start:firestore.client.MutationQueue)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
+ // int32 last_acknowledged_batch_id = 1;
+ if (this->last_acknowledged_batch_id() != 0) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->last_acknowledged_batch_id(), target);
+ }
+
+ // bytes last_stream_token = 2;
+ if (this->last_stream_token().size() > 0) {
+ target =
+ ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
+ 2, this->last_stream_token(), target);
+ }
+
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
+ }
+ // @@protoc_insertion_point(serialize_to_array_end:firestore.client.MutationQueue)
+ return target;
+}
+
+size_t MutationQueue::ByteSizeLong() const {
+// @@protoc_insertion_point(message_byte_size_start:firestore.client.MutationQueue)
+ size_t total_size = 0;
+
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ total_size +=
+ ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
+ }
+ // bytes last_stream_token = 2;
+ if (this->last_stream_token().size() > 0) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::BytesSize(
+ this->last_stream_token());
+ }
+
+ // int32 last_acknowledged_batch_id = 1;
+ if (this->last_acknowledged_batch_id() != 0) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->last_acknowledged_batch_id());
+ }
+
+ int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = cached_size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+ return total_size;
+}
+
+void MutationQueue::MergeFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_merge_from_start:firestore.client.MutationQueue)
+ GOOGLE_DCHECK_NE(&from, this);
+ const MutationQueue* source =
+ ::google::protobuf::internal::DynamicCastToGenerated<const MutationQueue>(
+ &from);
+ if (source == NULL) {
+ // @@protoc_insertion_point(generalized_merge_from_cast_fail:firestore.client.MutationQueue)
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ // @@protoc_insertion_point(generalized_merge_from_cast_success:firestore.client.MutationQueue)
+ MergeFrom(*source);
+ }
+}
+
+void MutationQueue::MergeFrom(const MutationQueue& from) {
+// @@protoc_insertion_point(class_specific_merge_from_start:firestore.client.MutationQueue)
+ GOOGLE_DCHECK_NE(&from, this);
+ _internal_metadata_.MergeFrom(from._internal_metadata_);
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
+ if (from.last_stream_token().size() > 0) {
+
+ last_stream_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.last_stream_token_);
+ }
+ if (from.last_acknowledged_batch_id() != 0) {
+ set_last_acknowledged_batch_id(from.last_acknowledged_batch_id());
+ }
+}
+
+void MutationQueue::CopyFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_copy_from_start:firestore.client.MutationQueue)
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void MutationQueue::CopyFrom(const MutationQueue& from) {
+// @@protoc_insertion_point(class_specific_copy_from_start:firestore.client.MutationQueue)
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool MutationQueue::IsInitialized() const {
+ return true;
+}
+
+void MutationQueue::Swap(MutationQueue* other) {
+ if (other == this) return;
+ InternalSwap(other);
+}
+void MutationQueue::InternalSwap(MutationQueue* other) {
+ using std::swap;
+ last_stream_token_.Swap(&other->last_stream_token_);
+ swap(last_acknowledged_batch_id_, other->last_acknowledged_batch_id_);
+ _internal_metadata_.Swap(&other->_internal_metadata_);
+ swap(_cached_size_, other->_cached_size_);
+}
+
+::google::protobuf::Metadata MutationQueue::GetMetadata() const {
+ protobuf_firestore_2flocal_2fmutation_2eproto::protobuf_AssignDescriptorsOnce();
+ return ::protobuf_firestore_2flocal_2fmutation_2eproto::file_level_metadata[kIndexInFileMessages];
+}
+
+
+// ===================================================================
+
+void WriteBatch::InitAsDefaultInstance() {
+ ::firestore::client::_WriteBatch_default_instance_._instance.get_mutable()->local_write_time_ = const_cast< ::google::protobuf::Timestamp*>(
+ ::google::protobuf::Timestamp::internal_default_instance());
+}
+void WriteBatch::clear_writes() {
+ writes_.Clear();
+}
+void WriteBatch::clear_local_write_time() {
+ if (GetArenaNoVirtual() == NULL && local_write_time_ != NULL) {
+ delete local_write_time_;
+ }
+ local_write_time_ = NULL;
+}
+#if !defined(_MSC_VER) || _MSC_VER >= 1900
+const int WriteBatch::kBatchIdFieldNumber;
+const int WriteBatch::kWritesFieldNumber;
+const int WriteBatch::kLocalWriteTimeFieldNumber;
+#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
+
+WriteBatch::WriteBatch()
+ : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+ if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
+ ::protobuf_firestore_2flocal_2fmutation_2eproto::InitDefaultsWriteBatch();
+ }
+ SharedCtor();
+ // @@protoc_insertion_point(constructor:firestore.client.WriteBatch)
+}
+WriteBatch::WriteBatch(const WriteBatch& from)
+ : ::google::protobuf::Message(),
+ _internal_metadata_(NULL),
+ writes_(from.writes_),
+ _cached_size_(0) {
+ _internal_metadata_.MergeFrom(from._internal_metadata_);
+ if (from.has_local_write_time()) {
+ local_write_time_ = new ::google::protobuf::Timestamp(*from.local_write_time_);
+ } else {
+ local_write_time_ = NULL;
+ }
+ batch_id_ = from.batch_id_;
+ // @@protoc_insertion_point(copy_constructor:firestore.client.WriteBatch)
+}
+
+void WriteBatch::SharedCtor() {
+ ::memset(&local_write_time_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&batch_id_) -
+ reinterpret_cast<char*>(&local_write_time_)) + sizeof(batch_id_));
+ _cached_size_ = 0;
+}
+
+WriteBatch::~WriteBatch() {
+ // @@protoc_insertion_point(destructor:firestore.client.WriteBatch)
+ SharedDtor();
+}
+
+void WriteBatch::SharedDtor() {
+ if (this != internal_default_instance()) delete local_write_time_;
+}
+
+void WriteBatch::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* WriteBatch::descriptor() {
+ ::protobuf_firestore_2flocal_2fmutation_2eproto::protobuf_AssignDescriptorsOnce();
+ return ::protobuf_firestore_2flocal_2fmutation_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
+}
+
+const WriteBatch& WriteBatch::default_instance() {
+ ::protobuf_firestore_2flocal_2fmutation_2eproto::InitDefaultsWriteBatch();
+ return *internal_default_instance();
+}
+
+WriteBatch* WriteBatch::New(::google::protobuf::Arena* arena) const {
+ WriteBatch* n = new WriteBatch;
+ if (arena != NULL) {
+ arena->Own(n);
+ }
+ return n;
+}
+
+void WriteBatch::Clear() {
+// @@protoc_insertion_point(message_clear_start:firestore.client.WriteBatch)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ writes_.Clear();
+ if (GetArenaNoVirtual() == NULL && local_write_time_ != NULL) {
+ delete local_write_time_;
+ }
+ local_write_time_ = NULL;
+ batch_id_ = 0;
+ _internal_metadata_.Clear();
+}
+
+bool WriteBatch::MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input) {
+#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
+ ::google::protobuf::uint32 tag;
+ // @@protoc_insertion_point(parse_start:firestore.client.WriteBatch)
+ for (;;) {
+ ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+ tag = p.first;
+ if (!p.second) goto handle_unusual;
+ switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
+ // int32 batch_id = 1;
+ case 1: {
+ if (static_cast< ::google::protobuf::uint8>(tag) ==
+ static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
+
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &batch_id_)));
+ } else {
+ goto handle_unusual;
+ }
+ break;
+ }
+
+ // repeated .google.firestore.v1beta1.Write writes = 2;
+ case 2: {
+ if (static_cast< ::google::protobuf::uint8>(tag) ==
+ static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_writes()));
+ } else {
+ goto handle_unusual;
+ }
+ break;
+ }
+
+ // .google.protobuf.Timestamp local_write_time = 3;
+ case 3: {
+ if (static_cast< ::google::protobuf::uint8>(tag) ==
+ static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
+ input, mutable_local_write_time()));
+ } else {
+ goto handle_unusual;
+ }
+ break;
+ }
+
+ default: {
+ handle_unusual:
+ if (tag == 0) {
+ goto success;
+ }
+ DO_(::google::protobuf::internal::WireFormat::SkipField(
+ input, tag, _internal_metadata_.mutable_unknown_fields()));
+ break;
+ }
+ }
+ }
+success:
+ // @@protoc_insertion_point(parse_success:firestore.client.WriteBatch)
+ return true;
+failure:
+ // @@protoc_insertion_point(parse_failure:firestore.client.WriteBatch)
+ return false;
+#undef DO_
+}
+
+void WriteBatch::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // @@protoc_insertion_point(serialize_start:firestore.client.WriteBatch)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
+ // int32 batch_id = 1;
+ if (this->batch_id() != 0) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->batch_id(), output);
+ }
+
+ // repeated .google.firestore.v1beta1.Write writes = 2;
+ for (unsigned int i = 0,
+ n = static_cast<unsigned int>(this->writes_size()); i < n; i++) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 2, this->writes(static_cast<int>(i)), output);
+ }
+
+ // .google.protobuf.Timestamp local_write_time = 3;
+ if (this->has_local_write_time()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 3, *this->local_write_time_, output);
+ }
+
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
+ }
+ // @@protoc_insertion_point(serialize_end:firestore.client.WriteBatch)
+}
+
+::google::protobuf::uint8* WriteBatch::InternalSerializeWithCachedSizesToArray(
+ bool deterministic, ::google::protobuf::uint8* target) const {
+ (void)deterministic; // Unused
+ // @@protoc_insertion_point(serialize_to_array_start:firestore.client.WriteBatch)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
+ // int32 batch_id = 1;
+ if (this->batch_id() != 0) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->batch_id(), target);
+ }
+
+ // repeated .google.firestore.v1beta1.Write writes = 2;
+ for (unsigned int i = 0,
+ n = static_cast<unsigned int>(this->writes_size()); i < n; i++) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ InternalWriteMessageToArray(
+ 2, this->writes(static_cast<int>(i)), deterministic, target);
+ }
+
+ // .google.protobuf.Timestamp local_write_time = 3;
+ if (this->has_local_write_time()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ InternalWriteMessageToArray(
+ 3, *this->local_write_time_, deterministic, target);
+ }
+
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
+ }
+ // @@protoc_insertion_point(serialize_to_array_end:firestore.client.WriteBatch)
+ return target;
+}
+
+size_t WriteBatch::ByteSizeLong() const {
+// @@protoc_insertion_point(message_byte_size_start:firestore.client.WriteBatch)
+ size_t total_size = 0;
+
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ total_size +=
+ ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
+ }
+ // repeated .google.firestore.v1beta1.Write writes = 2;
+ {
+ unsigned int count = static_cast<unsigned int>(this->writes_size());
+ total_size += 1UL * count;
+ for (unsigned int i = 0; i < count; i++) {
+ total_size +=
+ ::google::protobuf::internal::WireFormatLite::MessageSize(
+ this->writes(static_cast<int>(i)));
+ }
+ }
+
+ // .google.protobuf.Timestamp local_write_time = 3;
+ if (this->has_local_write_time()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSize(
+ *this->local_write_time_);
+ }
+
+ // int32 batch_id = 1;
+ if (this->batch_id() != 0) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->batch_id());
+ }
+
+ int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = cached_size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+ return total_size;
+}
+
+void WriteBatch::MergeFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_merge_from_start:firestore.client.WriteBatch)
+ GOOGLE_DCHECK_NE(&from, this);
+ const WriteBatch* source =
+ ::google::protobuf::internal::DynamicCastToGenerated<const WriteBatch>(
+ &from);
+ if (source == NULL) {
+ // @@protoc_insertion_point(generalized_merge_from_cast_fail:firestore.client.WriteBatch)
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ // @@protoc_insertion_point(generalized_merge_from_cast_success:firestore.client.WriteBatch)
+ MergeFrom(*source);
+ }
+}
+
+void WriteBatch::MergeFrom(const WriteBatch& from) {
+// @@protoc_insertion_point(class_specific_merge_from_start:firestore.client.WriteBatch)
+ GOOGLE_DCHECK_NE(&from, this);
+ _internal_metadata_.MergeFrom(from._internal_metadata_);
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
+ writes_.MergeFrom(from.writes_);
+ if (from.has_local_write_time()) {
+ mutable_local_write_time()->::google::protobuf::Timestamp::MergeFrom(from.local_write_time());
+ }
+ if (from.batch_id() != 0) {
+ set_batch_id(from.batch_id());
+ }
+}
+
+void WriteBatch::CopyFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_copy_from_start:firestore.client.WriteBatch)
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void WriteBatch::CopyFrom(const WriteBatch& from) {
+// @@protoc_insertion_point(class_specific_copy_from_start:firestore.client.WriteBatch)
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool WriteBatch::IsInitialized() const {
+ return true;
+}
+
+void WriteBatch::Swap(WriteBatch* other) {
+ if (other == this) return;
+ InternalSwap(other);
+}
+void WriteBatch::InternalSwap(WriteBatch* other) {
+ using std::swap;
+ writes_.InternalSwap(&other->writes_);
+ swap(local_write_time_, other->local_write_time_);
+ swap(batch_id_, other->batch_id_);
+ _internal_metadata_.Swap(&other->_internal_metadata_);
+ swap(_cached_size_, other->_cached_size_);
+}
+
+::google::protobuf::Metadata WriteBatch::GetMetadata() const {
+ protobuf_firestore_2flocal_2fmutation_2eproto::protobuf_AssignDescriptorsOnce();
+ return ::protobuf_firestore_2flocal_2fmutation_2eproto::file_level_metadata[kIndexInFileMessages];
+}
+
+
+// @@protoc_insertion_point(namespace_scope)
+} // namespace client
+} // namespace firestore
+
+// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/cpp/firestore/local/mutation.pb.h b/Firestore/Protos/cpp/firestore/local/mutation.pb.h
new file mode 100644
index 0000000..24ad8f1
--- /dev/null
+++ b/Firestore/Protos/cpp/firestore/local/mutation.pb.h
@@ -0,0 +1,502 @@
+/*
+ * 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/mutation.proto
+
+#ifndef PROTOBUF_firestore_2flocal_2fmutation_2eproto__INCLUDED
+#define PROTOBUF_firestore_2flocal_2fmutation_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 3005000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please update
+#error your headers.
+#endif
+#if 3005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/io/coded_stream.h>
+#include <google/protobuf/arena.h>
+#include <google/protobuf/arenastring.h>
+#include <google/protobuf/generated_message_table_driven.h>
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/metadata.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/repeated_field.h> // IWYU pragma: export
+#include <google/protobuf/extension_set.h> // IWYU pragma: export
+#include <google/protobuf/unknown_field_set.h>
+#include "google/firestore/v1beta1/write.pb.h"
+#include <google/protobuf/timestamp.pb.h>
+// @@protoc_insertion_point(includes)
+
+namespace protobuf_firestore_2flocal_2fmutation_2eproto {
+// Internal implementation detail -- do not use these members.
+struct TableStruct {
+ static const ::google::protobuf::internal::ParseTableField entries[];
+ static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
+ static const ::google::protobuf::internal::ParseTable schema[2];
+ static const ::google::protobuf::internal::FieldMetadata field_metadata[];
+ static const ::google::protobuf::internal::SerializationTable serialization_table[];
+ static const ::google::protobuf::uint32 offsets[];
+};
+void AddDescriptors();
+void InitDefaultsMutationQueueImpl();
+void InitDefaultsMutationQueue();
+void InitDefaultsWriteBatchImpl();
+void InitDefaultsWriteBatch();
+inline void InitDefaults() {
+ InitDefaultsMutationQueue();
+ InitDefaultsWriteBatch();
+}
+} // namespace protobuf_firestore_2flocal_2fmutation_2eproto
+namespace firestore {
+namespace client {
+class MutationQueue;
+class MutationQueueDefaultTypeInternal;
+extern MutationQueueDefaultTypeInternal _MutationQueue_default_instance_;
+class WriteBatch;
+class WriteBatchDefaultTypeInternal;
+extern WriteBatchDefaultTypeInternal _WriteBatch_default_instance_;
+} // namespace client
+} // namespace firestore
+namespace firestore {
+namespace client {
+
+// ===================================================================
+
+class MutationQueue : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:firestore.client.MutationQueue) */ {
+ public:
+ MutationQueue();
+ virtual ~MutationQueue();
+
+ MutationQueue(const MutationQueue& from);
+
+ inline MutationQueue& operator=(const MutationQueue& from) {
+ CopyFrom(from);
+ return *this;
+ }
+ #if LANG_CXX11
+ MutationQueue(MutationQueue&& from) noexcept
+ : MutationQueue() {
+ *this = ::std::move(from);
+ }
+
+ inline MutationQueue& operator=(MutationQueue&& from) noexcept {
+ if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
+ if (this != &from) InternalSwap(&from);
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
+ #endif
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const MutationQueue& default_instance();
+
+ static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
+ static inline const MutationQueue* internal_default_instance() {
+ return reinterpret_cast<const MutationQueue*>(
+ &_MutationQueue_default_instance_);
+ }
+ static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
+ 0;
+
+ void Swap(MutationQueue* other);
+ friend void swap(MutationQueue& a, MutationQueue& b) {
+ a.Swap(&b);
+ }
+
+ // implements Message ----------------------------------------------
+
+ inline MutationQueue* New() const PROTOBUF_FINAL { return New(NULL); }
+
+ MutationQueue* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
+ void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+ void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+ void CopyFrom(const MutationQueue& from);
+ void MergeFrom(const MutationQueue& from);
+ void Clear() PROTOBUF_FINAL;
+ bool IsInitialized() const PROTOBUF_FINAL;
+
+ size_t ByteSizeLong() const PROTOBUF_FINAL;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
+ ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
+ bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
+ int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const PROTOBUF_FINAL;
+ void InternalSwap(MutationQueue* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return NULL;
+ }
+ inline void* MaybeArenaPtr() const {
+ return NULL;
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // bytes last_stream_token = 2;
+ void clear_last_stream_token();
+ static const int kLastStreamTokenFieldNumber = 2;
+ const ::std::string& last_stream_token() const;
+ void set_last_stream_token(const ::std::string& value);
+ #if LANG_CXX11
+ void set_last_stream_token(::std::string&& value);
+ #endif
+ void set_last_stream_token(const char* value);
+ void set_last_stream_token(const void* value, size_t size);
+ ::std::string* mutable_last_stream_token();
+ ::std::string* release_last_stream_token();
+ void set_allocated_last_stream_token(::std::string* last_stream_token);
+
+ // int32 last_acknowledged_batch_id = 1;
+ void clear_last_acknowledged_batch_id();
+ static const int kLastAcknowledgedBatchIdFieldNumber = 1;
+ ::google::protobuf::int32 last_acknowledged_batch_id() const;
+ void set_last_acknowledged_batch_id(::google::protobuf::int32 value);
+
+ // @@protoc_insertion_point(class_scope:firestore.client.MutationQueue)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ ::google::protobuf::internal::ArenaStringPtr last_stream_token_;
+ ::google::protobuf::int32 last_acknowledged_batch_id_;
+ mutable int _cached_size_;
+ friend struct ::protobuf_firestore_2flocal_2fmutation_2eproto::TableStruct;
+ friend void ::protobuf_firestore_2flocal_2fmutation_2eproto::InitDefaultsMutationQueueImpl();
+};
+// -------------------------------------------------------------------
+
+class WriteBatch : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:firestore.client.WriteBatch) */ {
+ public:
+ WriteBatch();
+ virtual ~WriteBatch();
+
+ WriteBatch(const WriteBatch& from);
+
+ inline WriteBatch& operator=(const WriteBatch& from) {
+ CopyFrom(from);
+ return *this;
+ }
+ #if LANG_CXX11
+ WriteBatch(WriteBatch&& from) noexcept
+ : WriteBatch() {
+ *this = ::std::move(from);
+ }
+
+ inline WriteBatch& operator=(WriteBatch&& from) noexcept {
+ if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
+ if (this != &from) InternalSwap(&from);
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
+ #endif
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const WriteBatch& default_instance();
+
+ static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
+ static inline const WriteBatch* internal_default_instance() {
+ return reinterpret_cast<const WriteBatch*>(
+ &_WriteBatch_default_instance_);
+ }
+ static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
+ 1;
+
+ void Swap(WriteBatch* other);
+ friend void swap(WriteBatch& a, WriteBatch& b) {
+ a.Swap(&b);
+ }
+
+ // implements Message ----------------------------------------------
+
+ inline WriteBatch* New() const PROTOBUF_FINAL { return New(NULL); }
+
+ WriteBatch* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
+ void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+ void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+ void CopyFrom(const WriteBatch& from);
+ void MergeFrom(const WriteBatch& from);
+ void Clear() PROTOBUF_FINAL;
+ bool IsInitialized() const PROTOBUF_FINAL;
+
+ size_t ByteSizeLong() const PROTOBUF_FINAL;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
+ ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
+ bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
+ int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const PROTOBUF_FINAL;
+ void InternalSwap(WriteBatch* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return NULL;
+ }
+ inline void* MaybeArenaPtr() const {
+ return NULL;
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // repeated .google.firestore.v1beta1.Write writes = 2;
+ int writes_size() const;
+ void clear_writes();
+ static const int kWritesFieldNumber = 2;
+ const ::google::firestore::v1beta1::Write& writes(int index) const;
+ ::google::firestore::v1beta1::Write* mutable_writes(int index);
+ ::google::firestore::v1beta1::Write* add_writes();
+ ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Write >*
+ mutable_writes();
+ const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Write >&
+ writes() const;
+
+ // .google.protobuf.Timestamp local_write_time = 3;
+ bool has_local_write_time() const;
+ void clear_local_write_time();
+ static const int kLocalWriteTimeFieldNumber = 3;
+ const ::google::protobuf::Timestamp& local_write_time() const;
+ ::google::protobuf::Timestamp* release_local_write_time();
+ ::google::protobuf::Timestamp* mutable_local_write_time();
+ void set_allocated_local_write_time(::google::protobuf::Timestamp* local_write_time);
+
+ // int32 batch_id = 1;
+ void clear_batch_id();
+ static const int kBatchIdFieldNumber = 1;
+ ::google::protobuf::int32 batch_id() const;
+ void set_batch_id(::google::protobuf::int32 value);
+
+ // @@protoc_insertion_point(class_scope:firestore.client.WriteBatch)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Write > writes_;
+ ::google::protobuf::Timestamp* local_write_time_;
+ ::google::protobuf::int32 batch_id_;
+ mutable int _cached_size_;
+ friend struct ::protobuf_firestore_2flocal_2fmutation_2eproto::TableStruct;
+ friend void ::protobuf_firestore_2flocal_2fmutation_2eproto::InitDefaultsWriteBatchImpl();
+};
+// ===================================================================
+
+
+// ===================================================================
+
+#ifdef __GNUC__
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif // __GNUC__
+// MutationQueue
+
+// int32 last_acknowledged_batch_id = 1;
+inline void MutationQueue::clear_last_acknowledged_batch_id() {
+ last_acknowledged_batch_id_ = 0;
+}
+inline ::google::protobuf::int32 MutationQueue::last_acknowledged_batch_id() const {
+ // @@protoc_insertion_point(field_get:firestore.client.MutationQueue.last_acknowledged_batch_id)
+ return last_acknowledged_batch_id_;
+}
+inline void MutationQueue::set_last_acknowledged_batch_id(::google::protobuf::int32 value) {
+
+ last_acknowledged_batch_id_ = value;
+ // @@protoc_insertion_point(field_set:firestore.client.MutationQueue.last_acknowledged_batch_id)
+}
+
+// bytes last_stream_token = 2;
+inline void MutationQueue::clear_last_stream_token() {
+ last_stream_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline const ::std::string& MutationQueue::last_stream_token() const {
+ // @@protoc_insertion_point(field_get:firestore.client.MutationQueue.last_stream_token)
+ return last_stream_token_.GetNoArena();
+}
+inline void MutationQueue::set_last_stream_token(const ::std::string& value) {
+
+ last_stream_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:firestore.client.MutationQueue.last_stream_token)
+}
+#if LANG_CXX11
+inline void MutationQueue::set_last_stream_token(::std::string&& value) {
+
+ last_stream_token_.SetNoArena(
+ &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
+ // @@protoc_insertion_point(field_set_rvalue:firestore.client.MutationQueue.last_stream_token)
+}
+#endif
+inline void MutationQueue::set_last_stream_token(const char* value) {
+ GOOGLE_DCHECK(value != NULL);
+
+ last_stream_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+ // @@protoc_insertion_point(field_set_char:firestore.client.MutationQueue.last_stream_token)
+}
+inline void MutationQueue::set_last_stream_token(const void* value, size_t size) {
+
+ last_stream_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:firestore.client.MutationQueue.last_stream_token)
+}
+inline ::std::string* MutationQueue::mutable_last_stream_token() {
+
+ // @@protoc_insertion_point(field_mutable:firestore.client.MutationQueue.last_stream_token)
+ return last_stream_token_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* MutationQueue::release_last_stream_token() {
+ // @@protoc_insertion_point(field_release:firestore.client.MutationQueue.last_stream_token)
+
+ return last_stream_token_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void MutationQueue::set_allocated_last_stream_token(::std::string* last_stream_token) {
+ if (last_stream_token != NULL) {
+
+ } else {
+
+ }
+ last_stream_token_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), last_stream_token);
+ // @@protoc_insertion_point(field_set_allocated:firestore.client.MutationQueue.last_stream_token)
+}
+
+// -------------------------------------------------------------------
+
+// WriteBatch
+
+// int32 batch_id = 1;
+inline void WriteBatch::clear_batch_id() {
+ batch_id_ = 0;
+}
+inline ::google::protobuf::int32 WriteBatch::batch_id() const {
+ // @@protoc_insertion_point(field_get:firestore.client.WriteBatch.batch_id)
+ return batch_id_;
+}
+inline void WriteBatch::set_batch_id(::google::protobuf::int32 value) {
+
+ batch_id_ = value;
+ // @@protoc_insertion_point(field_set:firestore.client.WriteBatch.batch_id)
+}
+
+// repeated .google.firestore.v1beta1.Write writes = 2;
+inline int WriteBatch::writes_size() const {
+ return writes_.size();
+}
+inline const ::google::firestore::v1beta1::Write& WriteBatch::writes(int index) const {
+ // @@protoc_insertion_point(field_get:firestore.client.WriteBatch.writes)
+ return writes_.Get(index);
+}
+inline ::google::firestore::v1beta1::Write* WriteBatch::mutable_writes(int index) {
+ // @@protoc_insertion_point(field_mutable:firestore.client.WriteBatch.writes)
+ return writes_.Mutable(index);
+}
+inline ::google::firestore::v1beta1::Write* WriteBatch::add_writes() {
+ // @@protoc_insertion_point(field_add:firestore.client.WriteBatch.writes)
+ return writes_.Add();
+}
+inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Write >*
+WriteBatch::mutable_writes() {
+ // @@protoc_insertion_point(field_mutable_list:firestore.client.WriteBatch.writes)
+ return &writes_;
+}
+inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Write >&
+WriteBatch::writes() const {
+ // @@protoc_insertion_point(field_list:firestore.client.WriteBatch.writes)
+ return writes_;
+}
+
+// .google.protobuf.Timestamp local_write_time = 3;
+inline bool WriteBatch::has_local_write_time() const {
+ return this != internal_default_instance() && local_write_time_ != NULL;
+}
+inline const ::google::protobuf::Timestamp& WriteBatch::local_write_time() const {
+ const ::google::protobuf::Timestamp* p = local_write_time_;
+ // @@protoc_insertion_point(field_get:firestore.client.WriteBatch.local_write_time)
+ return p != NULL ? *p : *reinterpret_cast<const ::google::protobuf::Timestamp*>(
+ &::google::protobuf::_Timestamp_default_instance_);
+}
+inline ::google::protobuf::Timestamp* WriteBatch::release_local_write_time() {
+ // @@protoc_insertion_point(field_release:firestore.client.WriteBatch.local_write_time)
+
+ ::google::protobuf::Timestamp* temp = local_write_time_;
+ local_write_time_ = NULL;
+ return temp;
+}
+inline ::google::protobuf::Timestamp* WriteBatch::mutable_local_write_time() {
+
+ if (local_write_time_ == NULL) {
+ local_write_time_ = new ::google::protobuf::Timestamp;
+ }
+ // @@protoc_insertion_point(field_mutable:firestore.client.WriteBatch.local_write_time)
+ return local_write_time_;
+}
+inline void WriteBatch::set_allocated_local_write_time(::google::protobuf::Timestamp* local_write_time) {
+ ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
+ if (message_arena == NULL) {
+ delete reinterpret_cast< ::google::protobuf::MessageLite*>(local_write_time_);
+ }
+ if (local_write_time) {
+ ::google::protobuf::Arena* submessage_arena =
+ reinterpret_cast< ::google::protobuf::MessageLite*>(local_write_time)->GetArena();
+ if (message_arena != submessage_arena) {
+ local_write_time = ::google::protobuf::internal::GetOwnedMessage(
+ message_arena, local_write_time, submessage_arena);
+ }
+
+ } else {
+
+ }
+ local_write_time_ = local_write_time;
+ // @@protoc_insertion_point(field_set_allocated:firestore.client.WriteBatch.local_write_time)
+}
+
+#ifdef __GNUC__
+ #pragma GCC diagnostic pop
+#endif // __GNUC__
+// -------------------------------------------------------------------
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace client
+} // namespace firestore
+
+// @@protoc_insertion_point(global_scope)
+
+#endif // PROTOBUF_firestore_2flocal_2fmutation_2eproto__INCLUDED
diff --git a/Firestore/Protos/cpp/firestore/local/target.pb.cc b/Firestore/Protos/cpp/firestore/local/target.pb.cc
new file mode 100644
index 0000000..6f9a8a1
--- /dev/null
+++ b/Firestore/Protos/cpp/firestore/local/target.pb.cc
@@ -0,0 +1,1121 @@
+/*
+ * 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/target.proto
+
+#include "firestore/local/target.pb.h"
+
+#include <algorithm>
+
+#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/port.h>
+#include <google/protobuf/stubs/once.h>
+#include <google/protobuf/io/coded_stream.h>
+#include <google/protobuf/wire_format_lite_inl.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>
+// This is a temporary google only hack
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+#include "third_party/protobuf/version.h"
+#endif
+// @@protoc_insertion_point(includes)
+namespace firestore {
+namespace client {
+class TargetDefaultTypeInternal {
+ public:
+ ::google::protobuf::internal::ExplicitlyConstructed<Target>
+ _instance;
+ const ::google::firestore::v1beta1::Target_QueryTarget* query_;
+ const ::google::firestore::v1beta1::Target_DocumentsTarget* documents_;
+} _Target_default_instance_;
+class TargetGlobalDefaultTypeInternal {
+ public:
+ ::google::protobuf::internal::ExplicitlyConstructed<TargetGlobal>
+ _instance;
+} _TargetGlobal_default_instance_;
+} // namespace client
+} // namespace firestore
+namespace protobuf_firestore_2flocal_2ftarget_2eproto {
+void InitDefaultsTargetImpl() {
+ GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+ ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
+#else
+ ::google::protobuf::internal::InitProtobufDefaults();
+#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+ protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
+ protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget_QueryTarget();
+ protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget_DocumentsTarget();
+ {
+ void* ptr = &::firestore::client::_Target_default_instance_;
+ new (ptr) ::firestore::client::Target();
+ ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
+ }
+ ::firestore::client::Target::InitAsDefaultInstance();
+}
+
+void InitDefaultsTarget() {
+ static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+ ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTargetImpl);
+}
+
+void InitDefaultsTargetGlobalImpl() {
+ GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+ ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
+#else
+ ::google::protobuf::internal::InitProtobufDefaults();
+#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+ protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
+ {
+ void* ptr = &::firestore::client::_TargetGlobal_default_instance_;
+ new (ptr) ::firestore::client::TargetGlobal();
+ ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
+ }
+ ::firestore::client::TargetGlobal::InitAsDefaultInstance();
+}
+
+void InitDefaultsTargetGlobal() {
+ static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+ ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTargetGlobalImpl);
+}
+
+::google::protobuf::Metadata file_level_metadata[2];
+
+const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
+ ~0u, // no _has_bits_
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::Target, _internal_metadata_),
+ ~0u, // no _extensions_
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::Target, _oneof_case_[0]),
+ ~0u, // no _weak_field_map_
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::Target, target_id_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::Target, snapshot_version_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::Target, resume_token_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::Target, last_listen_sequence_number_),
+ offsetof(::firestore::client::TargetDefaultTypeInternal, query_),
+ offsetof(::firestore::client::TargetDefaultTypeInternal, documents_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::Target, target_type_),
+ ~0u, // no _has_bits_
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::TargetGlobal, _internal_metadata_),
+ ~0u, // no _extensions_
+ ~0u, // no _oneof_case_
+ ~0u, // no _weak_field_map_
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::TargetGlobal, highest_target_id_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::TargetGlobal, highest_listen_sequence_number_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::TargetGlobal, last_remote_snapshot_version_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::TargetGlobal, target_count_),
+};
+static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
+ { 0, -1, sizeof(::firestore::client::Target)},
+ { 12, -1, sizeof(::firestore::client::TargetGlobal)},
+};
+
+static ::google::protobuf::Message const * const file_default_instances[] = {
+ reinterpret_cast<const ::google::protobuf::Message*>(&::firestore::client::_Target_default_instance_),
+ reinterpret_cast<const ::google::protobuf::Message*>(&::firestore::client::_TargetGlobal_default_instance_),
+};
+
+void protobuf_AssignDescriptors() {
+ AddDescriptors();
+ ::google::protobuf::MessageFactory* factory = NULL;
+ AssignDescriptors(
+ "firestore/local/target.proto", schemas, file_default_instances, TableStruct::offsets, factory,
+ file_level_metadata, NULL, NULL);
+}
+
+void protobuf_AssignDescriptorsOnce() {
+ static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+ ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
+}
+
+void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
+void protobuf_RegisterTypes(const ::std::string&) {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 2);
+}
+
+void AddDescriptorsImpl() {
+ InitDefaults();
+ static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
+ "\n\034firestore/local/target.proto\022\020firestor"
+ "e.client\032(google/firestore/v1beta1/fires"
+ "tore.proto\032\037google/protobuf/timestamp.pr"
+ "oto\"\241\002\n\006Target\022\021\n\ttarget_id\030\001 \001(\005\0224\n\020sna"
+ "pshot_version\030\002 \001(\0132\032.google.protobuf.Ti"
+ "mestamp\022\024\n\014resume_token\030\003 \001(\014\022#\n\033last_li"
+ "sten_sequence_number\030\004 \001(\003\022=\n\005query\030\005 \001("
+ "\0132,.google.firestore.v1beta1.Target.Quer"
+ "yTargetH\000\022E\n\tdocuments\030\006 \001(\01320.google.fi"
+ "restore.v1beta1.Target.DocumentsTargetH\000"
+ "B\r\n\013target_type\"\251\001\n\014TargetGlobal\022\031\n\021high"
+ "est_target_id\030\001 \001(\005\022&\n\036highest_listen_se"
+ "quence_number\030\002 \001(\003\022@\n\034last_remote_snaps"
+ "hot_version\030\003 \001(\0132\032.google.protobuf.Time"
+ "stamp\022\024\n\014target_count\030\004 \001(\005B/\n#com.googl"
+ "e.firebase.firestore.protoP\001\242\002\005FSTPBb\006pr"
+ "oto3"
+ };
+ ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
+ descriptor, 644);
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
+ "firestore/local/target.proto", &protobuf_RegisterTypes);
+ ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::AddDescriptors();
+ ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::AddDescriptors();
+}
+
+void AddDescriptors() {
+ static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
+ ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
+}
+// Force AddDescriptors() to be called at dynamic initialization time.
+struct StaticDescriptorInitializer {
+ StaticDescriptorInitializer() {
+ AddDescriptors();
+ }
+} static_descriptor_initializer;
+} // namespace protobuf_firestore_2flocal_2ftarget_2eproto
+namespace firestore {
+namespace client {
+
+// ===================================================================
+
+void Target::InitAsDefaultInstance() {
+ ::firestore::client::_Target_default_instance_._instance.get_mutable()->snapshot_version_ = const_cast< ::google::protobuf::Timestamp*>(
+ ::google::protobuf::Timestamp::internal_default_instance());
+ ::firestore::client::_Target_default_instance_.query_ = const_cast< ::google::firestore::v1beta1::Target_QueryTarget*>(
+ ::google::firestore::v1beta1::Target_QueryTarget::internal_default_instance());
+ ::firestore::client::_Target_default_instance_.documents_ = const_cast< ::google::firestore::v1beta1::Target_DocumentsTarget*>(
+ ::google::firestore::v1beta1::Target_DocumentsTarget::internal_default_instance());
+}
+void Target::clear_snapshot_version() {
+ if (GetArenaNoVirtual() == NULL && snapshot_version_ != NULL) {
+ delete snapshot_version_;
+ }
+ snapshot_version_ = NULL;
+}
+void Target::set_allocated_query(::google::firestore::v1beta1::Target_QueryTarget* query) {
+ ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
+ clear_target_type();
+ if (query) {
+ ::google::protobuf::Arena* submessage_arena = NULL;
+ if (message_arena != submessage_arena) {
+ query = ::google::protobuf::internal::GetOwnedMessage(
+ message_arena, query, submessage_arena);
+ }
+ set_has_query();
+ target_type_.query_ = query;
+ }
+ // @@protoc_insertion_point(field_set_allocated:firestore.client.Target.query)
+}
+void Target::clear_query() {
+ if (has_query()) {
+ delete target_type_.query_;
+ clear_has_target_type();
+ }
+}
+void Target::set_allocated_documents(::google::firestore::v1beta1::Target_DocumentsTarget* documents) {
+ ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
+ clear_target_type();
+ if (documents) {
+ ::google::protobuf::Arena* submessage_arena = NULL;
+ if (message_arena != submessage_arena) {
+ documents = ::google::protobuf::internal::GetOwnedMessage(
+ message_arena, documents, submessage_arena);
+ }
+ set_has_documents();
+ target_type_.documents_ = documents;
+ }
+ // @@protoc_insertion_point(field_set_allocated:firestore.client.Target.documents)
+}
+void Target::clear_documents() {
+ if (has_documents()) {
+ delete target_type_.documents_;
+ clear_has_target_type();
+ }
+}
+#if !defined(_MSC_VER) || _MSC_VER >= 1900
+const int Target::kTargetIdFieldNumber;
+const int Target::kSnapshotVersionFieldNumber;
+const int Target::kResumeTokenFieldNumber;
+const int Target::kLastListenSequenceNumberFieldNumber;
+const int Target::kQueryFieldNumber;
+const int Target::kDocumentsFieldNumber;
+#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
+
+Target::Target()
+ : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+ if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
+ ::protobuf_firestore_2flocal_2ftarget_2eproto::InitDefaultsTarget();
+ }
+ SharedCtor();
+ // @@protoc_insertion_point(constructor:firestore.client.Target)
+}
+Target::Target(const Target& from)
+ : ::google::protobuf::Message(),
+ _internal_metadata_(NULL),
+ _cached_size_(0) {
+ _internal_metadata_.MergeFrom(from._internal_metadata_);
+ resume_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ if (from.resume_token().size() > 0) {
+ resume_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.resume_token_);
+ }
+ if (from.has_snapshot_version()) {
+ snapshot_version_ = new ::google::protobuf::Timestamp(*from.snapshot_version_);
+ } else {
+ snapshot_version_ = NULL;
+ }
+ ::memcpy(&last_listen_sequence_number_, &from.last_listen_sequence_number_,
+ static_cast<size_t>(reinterpret_cast<char*>(&target_id_) -
+ reinterpret_cast<char*>(&last_listen_sequence_number_)) + sizeof(target_id_));
+ clear_has_target_type();
+ switch (from.target_type_case()) {
+ case kQuery: {
+ mutable_query()->::google::firestore::v1beta1::Target_QueryTarget::MergeFrom(from.query());
+ break;
+ }
+ case kDocuments: {
+ mutable_documents()->::google::firestore::v1beta1::Target_DocumentsTarget::MergeFrom(from.documents());
+ break;
+ }
+ case TARGET_TYPE_NOT_SET: {
+ break;
+ }
+ }
+ // @@protoc_insertion_point(copy_constructor:firestore.client.Target)
+}
+
+void Target::SharedCtor() {
+ resume_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ ::memset(&snapshot_version_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&target_id_) -
+ reinterpret_cast<char*>(&snapshot_version_)) + sizeof(target_id_));
+ clear_has_target_type();
+ _cached_size_ = 0;
+}
+
+Target::~Target() {
+ // @@protoc_insertion_point(destructor:firestore.client.Target)
+ SharedDtor();
+}
+
+void Target::SharedDtor() {
+ resume_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ if (this != internal_default_instance()) delete snapshot_version_;
+ if (has_target_type()) {
+ clear_target_type();
+ }
+}
+
+void Target::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* Target::descriptor() {
+ ::protobuf_firestore_2flocal_2ftarget_2eproto::protobuf_AssignDescriptorsOnce();
+ return ::protobuf_firestore_2flocal_2ftarget_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
+}
+
+const Target& Target::default_instance() {
+ ::protobuf_firestore_2flocal_2ftarget_2eproto::InitDefaultsTarget();
+ return *internal_default_instance();
+}
+
+Target* Target::New(::google::protobuf::Arena* arena) const {
+ Target* n = new Target;
+ if (arena != NULL) {
+ arena->Own(n);
+ }
+ return n;
+}
+
+void Target::clear_target_type() {
+// @@protoc_insertion_point(one_of_clear_start:firestore.client.Target)
+ switch (target_type_case()) {
+ case kQuery: {
+ delete target_type_.query_;
+ break;
+ }
+ case kDocuments: {
+ delete target_type_.documents_;
+ break;
+ }
+ case TARGET_TYPE_NOT_SET: {
+ break;
+ }
+ }
+ _oneof_case_[0] = TARGET_TYPE_NOT_SET;
+}
+
+
+void Target::Clear() {
+// @@protoc_insertion_point(message_clear_start:firestore.client.Target)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ resume_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+ if (GetArenaNoVirtual() == NULL && snapshot_version_ != NULL) {
+ delete snapshot_version_;
+ }
+ snapshot_version_ = NULL;
+ ::memset(&last_listen_sequence_number_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&target_id_) -
+ reinterpret_cast<char*>(&last_listen_sequence_number_)) + sizeof(target_id_));
+ clear_target_type();
+ _internal_metadata_.Clear();
+}
+
+bool Target::MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input) {
+#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
+ ::google::protobuf::uint32 tag;
+ // @@protoc_insertion_point(parse_start:firestore.client.Target)
+ for (;;) {
+ ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+ tag = p.first;
+ if (!p.second) goto handle_unusual;
+ switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
+ // int32 target_id = 1;
+ case 1: {
+ if (static_cast< ::google::protobuf::uint8>(tag) ==
+ static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
+
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &target_id_)));
+ } else {
+ goto handle_unusual;
+ }
+ break;
+ }
+
+ // .google.protobuf.Timestamp snapshot_version = 2;
+ case 2: {
+ if (static_cast< ::google::protobuf::uint8>(tag) ==
+ static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
+ input, mutable_snapshot_version()));
+ } else {
+ goto handle_unusual;
+ }
+ break;
+ }
+
+ // bytes resume_token = 3;
+ case 3: {
+ if (static_cast< ::google::protobuf::uint8>(tag) ==
+ static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
+ input, this->mutable_resume_token()));
+ } else {
+ goto handle_unusual;
+ }
+ break;
+ }
+
+ // int64 last_listen_sequence_number = 4;
+ case 4: {
+ if (static_cast< ::google::protobuf::uint8>(tag) ==
+ static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
+
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
+ input, &last_listen_sequence_number_)));
+ } else {
+ goto handle_unusual;
+ }
+ break;
+ }
+
+ // .google.firestore.v1beta1.Target.QueryTarget query = 5;
+ case 5: {
+ if (static_cast< ::google::protobuf::uint8>(tag) ==
+ static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
+ input, mutable_query()));
+ } else {
+ goto handle_unusual;
+ }
+ break;
+ }
+
+ // .google.firestore.v1beta1.Target.DocumentsTarget documents = 6;
+ case 6: {
+ if (static_cast< ::google::protobuf::uint8>(tag) ==
+ static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
+ input, mutable_documents()));
+ } else {
+ goto handle_unusual;
+ }
+ break;
+ }
+
+ default: {
+ handle_unusual:
+ if (tag == 0) {
+ goto success;
+ }
+ DO_(::google::protobuf::internal::WireFormat::SkipField(
+ input, tag, _internal_metadata_.mutable_unknown_fields()));
+ break;
+ }
+ }
+ }
+success:
+ // @@protoc_insertion_point(parse_success:firestore.client.Target)
+ return true;
+failure:
+ // @@protoc_insertion_point(parse_failure:firestore.client.Target)
+ return false;
+#undef DO_
+}
+
+void Target::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // @@protoc_insertion_point(serialize_start:firestore.client.Target)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
+ // int32 target_id = 1;
+ if (this->target_id() != 0) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->target_id(), output);
+ }
+
+ // .google.protobuf.Timestamp snapshot_version = 2;
+ if (this->has_snapshot_version()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 2, *this->snapshot_version_, output);
+ }
+
+ // bytes resume_token = 3;
+ if (this->resume_token().size() > 0) {
+ ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
+ 3, this->resume_token(), output);
+ }
+
+ // int64 last_listen_sequence_number = 4;
+ if (this->last_listen_sequence_number() != 0) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt64(4, this->last_listen_sequence_number(), output);
+ }
+
+ // .google.firestore.v1beta1.Target.QueryTarget query = 5;
+ if (has_query()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 5, *target_type_.query_, output);
+ }
+
+ // .google.firestore.v1beta1.Target.DocumentsTarget documents = 6;
+ if (has_documents()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 6, *target_type_.documents_, output);
+ }
+
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
+ }
+ // @@protoc_insertion_point(serialize_end:firestore.client.Target)
+}
+
+::google::protobuf::uint8* Target::InternalSerializeWithCachedSizesToArray(
+ bool deterministic, ::google::protobuf::uint8* target) const {
+ (void)deterministic; // Unused
+ // @@protoc_insertion_point(serialize_to_array_start:firestore.client.Target)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
+ // int32 target_id = 1;
+ if (this->target_id() != 0) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->target_id(), target);
+ }
+
+ // .google.protobuf.Timestamp snapshot_version = 2;
+ if (this->has_snapshot_version()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ InternalWriteMessageToArray(
+ 2, *this->snapshot_version_, deterministic, target);
+ }
+
+ // bytes resume_token = 3;
+ if (this->resume_token().size() > 0) {
+ target =
+ ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
+ 3, this->resume_token(), target);
+ }
+
+ // int64 last_listen_sequence_number = 4;
+ if (this->last_listen_sequence_number() != 0) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(4, this->last_listen_sequence_number(), target);
+ }
+
+ // .google.firestore.v1beta1.Target.QueryTarget query = 5;
+ if (has_query()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ InternalWriteMessageToArray(
+ 5, *target_type_.query_, deterministic, target);
+ }
+
+ // .google.firestore.v1beta1.Target.DocumentsTarget documents = 6;
+ if (has_documents()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ InternalWriteMessageToArray(
+ 6, *target_type_.documents_, deterministic, target);
+ }
+
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
+ }
+ // @@protoc_insertion_point(serialize_to_array_end:firestore.client.Target)
+ return target;
+}
+
+size_t Target::ByteSizeLong() const {
+// @@protoc_insertion_point(message_byte_size_start:firestore.client.Target)
+ size_t total_size = 0;
+
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ total_size +=
+ ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
+ }
+ // bytes resume_token = 3;
+ if (this->resume_token().size() > 0) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::BytesSize(
+ this->resume_token());
+ }
+
+ // .google.protobuf.Timestamp snapshot_version = 2;
+ if (this->has_snapshot_version()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSize(
+ *this->snapshot_version_);
+ }
+
+ // int64 last_listen_sequence_number = 4;
+ if (this->last_listen_sequence_number() != 0) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int64Size(
+ this->last_listen_sequence_number());
+ }
+
+ // int32 target_id = 1;
+ if (this->target_id() != 0) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->target_id());
+ }
+
+ switch (target_type_case()) {
+ // .google.firestore.v1beta1.Target.QueryTarget query = 5;
+ case kQuery: {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSize(
+ *target_type_.query_);
+ break;
+ }
+ // .google.firestore.v1beta1.Target.DocumentsTarget documents = 6;
+ case kDocuments: {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSize(
+ *target_type_.documents_);
+ break;
+ }
+ case TARGET_TYPE_NOT_SET: {
+ break;
+ }
+ }
+ int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = cached_size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+ return total_size;
+}
+
+void Target::MergeFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_merge_from_start:firestore.client.Target)
+ GOOGLE_DCHECK_NE(&from, this);
+ const Target* source =
+ ::google::protobuf::internal::DynamicCastToGenerated<const Target>(
+ &from);
+ if (source == NULL) {
+ // @@protoc_insertion_point(generalized_merge_from_cast_fail:firestore.client.Target)
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ // @@protoc_insertion_point(generalized_merge_from_cast_success:firestore.client.Target)
+ MergeFrom(*source);
+ }
+}
+
+void Target::MergeFrom(const Target& from) {
+// @@protoc_insertion_point(class_specific_merge_from_start:firestore.client.Target)
+ GOOGLE_DCHECK_NE(&from, this);
+ _internal_metadata_.MergeFrom(from._internal_metadata_);
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
+ if (from.resume_token().size() > 0) {
+
+ resume_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.resume_token_);
+ }
+ if (from.has_snapshot_version()) {
+ mutable_snapshot_version()->::google::protobuf::Timestamp::MergeFrom(from.snapshot_version());
+ }
+ if (from.last_listen_sequence_number() != 0) {
+ set_last_listen_sequence_number(from.last_listen_sequence_number());
+ }
+ if (from.target_id() != 0) {
+ set_target_id(from.target_id());
+ }
+ switch (from.target_type_case()) {
+ case kQuery: {
+ mutable_query()->::google::firestore::v1beta1::Target_QueryTarget::MergeFrom(from.query());
+ break;
+ }
+ case kDocuments: {
+ mutable_documents()->::google::firestore::v1beta1::Target_DocumentsTarget::MergeFrom(from.documents());
+ break;
+ }
+ case TARGET_TYPE_NOT_SET: {
+ break;
+ }
+ }
+}
+
+void Target::CopyFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_copy_from_start:firestore.client.Target)
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void Target::CopyFrom(const Target& from) {
+// @@protoc_insertion_point(class_specific_copy_from_start:firestore.client.Target)
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool Target::IsInitialized() const {
+ return true;
+}
+
+void Target::Swap(Target* other) {
+ if (other == this) return;
+ InternalSwap(other);
+}
+void Target::InternalSwap(Target* other) {
+ using std::swap;
+ resume_token_.Swap(&other->resume_token_);
+ swap(snapshot_version_, other->snapshot_version_);
+ swap(last_listen_sequence_number_, other->last_listen_sequence_number_);
+ swap(target_id_, other->target_id_);
+ swap(target_type_, other->target_type_);
+ swap(_oneof_case_[0], other->_oneof_case_[0]);
+ _internal_metadata_.Swap(&other->_internal_metadata_);
+ swap(_cached_size_, other->_cached_size_);
+}
+
+::google::protobuf::Metadata Target::GetMetadata() const {
+ protobuf_firestore_2flocal_2ftarget_2eproto::protobuf_AssignDescriptorsOnce();
+ return ::protobuf_firestore_2flocal_2ftarget_2eproto::file_level_metadata[kIndexInFileMessages];
+}
+
+
+// ===================================================================
+
+void TargetGlobal::InitAsDefaultInstance() {
+ ::firestore::client::_TargetGlobal_default_instance_._instance.get_mutable()->last_remote_snapshot_version_ = const_cast< ::google::protobuf::Timestamp*>(
+ ::google::protobuf::Timestamp::internal_default_instance());
+}
+void TargetGlobal::clear_last_remote_snapshot_version() {
+ if (GetArenaNoVirtual() == NULL && last_remote_snapshot_version_ != NULL) {
+ delete last_remote_snapshot_version_;
+ }
+ last_remote_snapshot_version_ = NULL;
+}
+#if !defined(_MSC_VER) || _MSC_VER >= 1900
+const int TargetGlobal::kHighestTargetIdFieldNumber;
+const int TargetGlobal::kHighestListenSequenceNumberFieldNumber;
+const int TargetGlobal::kLastRemoteSnapshotVersionFieldNumber;
+const int TargetGlobal::kTargetCountFieldNumber;
+#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
+
+TargetGlobal::TargetGlobal()
+ : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+ if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
+ ::protobuf_firestore_2flocal_2ftarget_2eproto::InitDefaultsTargetGlobal();
+ }
+ SharedCtor();
+ // @@protoc_insertion_point(constructor:firestore.client.TargetGlobal)
+}
+TargetGlobal::TargetGlobal(const TargetGlobal& from)
+ : ::google::protobuf::Message(),
+ _internal_metadata_(NULL),
+ _cached_size_(0) {
+ _internal_metadata_.MergeFrom(from._internal_metadata_);
+ if (from.has_last_remote_snapshot_version()) {
+ last_remote_snapshot_version_ = new ::google::protobuf::Timestamp(*from.last_remote_snapshot_version_);
+ } else {
+ last_remote_snapshot_version_ = NULL;
+ }
+ ::memcpy(&highest_listen_sequence_number_, &from.highest_listen_sequence_number_,
+ static_cast<size_t>(reinterpret_cast<char*>(&target_count_) -
+ reinterpret_cast<char*>(&highest_listen_sequence_number_)) + sizeof(target_count_));
+ // @@protoc_insertion_point(copy_constructor:firestore.client.TargetGlobal)
+}
+
+void TargetGlobal::SharedCtor() {
+ ::memset(&last_remote_snapshot_version_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&target_count_) -
+ reinterpret_cast<char*>(&last_remote_snapshot_version_)) + sizeof(target_count_));
+ _cached_size_ = 0;
+}
+
+TargetGlobal::~TargetGlobal() {
+ // @@protoc_insertion_point(destructor:firestore.client.TargetGlobal)
+ SharedDtor();
+}
+
+void TargetGlobal::SharedDtor() {
+ if (this != internal_default_instance()) delete last_remote_snapshot_version_;
+}
+
+void TargetGlobal::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* TargetGlobal::descriptor() {
+ ::protobuf_firestore_2flocal_2ftarget_2eproto::protobuf_AssignDescriptorsOnce();
+ return ::protobuf_firestore_2flocal_2ftarget_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
+}
+
+const TargetGlobal& TargetGlobal::default_instance() {
+ ::protobuf_firestore_2flocal_2ftarget_2eproto::InitDefaultsTargetGlobal();
+ return *internal_default_instance();
+}
+
+TargetGlobal* TargetGlobal::New(::google::protobuf::Arena* arena) const {
+ TargetGlobal* n = new TargetGlobal;
+ if (arena != NULL) {
+ arena->Own(n);
+ }
+ return n;
+}
+
+void TargetGlobal::Clear() {
+// @@protoc_insertion_point(message_clear_start:firestore.client.TargetGlobal)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ // Prevent compiler warnings about cached_has_bits being unused
+ (void) cached_has_bits;
+
+ if (GetArenaNoVirtual() == NULL && last_remote_snapshot_version_ != NULL) {
+ delete last_remote_snapshot_version_;
+ }
+ last_remote_snapshot_version_ = NULL;
+ ::memset(&highest_listen_sequence_number_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&target_count_) -
+ reinterpret_cast<char*>(&highest_listen_sequence_number_)) + sizeof(target_count_));
+ _internal_metadata_.Clear();
+}
+
+bool TargetGlobal::MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input) {
+#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
+ ::google::protobuf::uint32 tag;
+ // @@protoc_insertion_point(parse_start:firestore.client.TargetGlobal)
+ for (;;) {
+ ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+ tag = p.first;
+ if (!p.second) goto handle_unusual;
+ switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
+ // int32 highest_target_id = 1;
+ case 1: {
+ if (static_cast< ::google::protobuf::uint8>(tag) ==
+ static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
+
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &highest_target_id_)));
+ } else {
+ goto handle_unusual;
+ }
+ break;
+ }
+
+ // int64 highest_listen_sequence_number = 2;
+ case 2: {
+ if (static_cast< ::google::protobuf::uint8>(tag) ==
+ static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
+
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
+ input, &highest_listen_sequence_number_)));
+ } else {
+ goto handle_unusual;
+ }
+ break;
+ }
+
+ // .google.protobuf.Timestamp last_remote_snapshot_version = 3;
+ case 3: {
+ if (static_cast< ::google::protobuf::uint8>(tag) ==
+ static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
+ input, mutable_last_remote_snapshot_version()));
+ } else {
+ goto handle_unusual;
+ }
+ break;
+ }
+
+ // int32 target_count = 4;
+ case 4: {
+ if (static_cast< ::google::protobuf::uint8>(tag) ==
+ static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
+
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &target_count_)));
+ } else {
+ goto handle_unusual;
+ }
+ break;
+ }
+
+ default: {
+ handle_unusual:
+ if (tag == 0) {
+ goto success;
+ }
+ DO_(::google::protobuf::internal::WireFormat::SkipField(
+ input, tag, _internal_metadata_.mutable_unknown_fields()));
+ break;
+ }
+ }
+ }
+success:
+ // @@protoc_insertion_point(parse_success:firestore.client.TargetGlobal)
+ return true;
+failure:
+ // @@protoc_insertion_point(parse_failure:firestore.client.TargetGlobal)
+ return false;
+#undef DO_
+}
+
+void TargetGlobal::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // @@protoc_insertion_point(serialize_start:firestore.client.TargetGlobal)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
+ // int32 highest_target_id = 1;
+ if (this->highest_target_id() != 0) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->highest_target_id(), output);
+ }
+
+ // int64 highest_listen_sequence_number = 2;
+ if (this->highest_listen_sequence_number() != 0) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->highest_listen_sequence_number(), output);
+ }
+
+ // .google.protobuf.Timestamp last_remote_snapshot_version = 3;
+ if (this->has_last_remote_snapshot_version()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 3, *this->last_remote_snapshot_version_, output);
+ }
+
+ // int32 target_count = 4;
+ if (this->target_count() != 0) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->target_count(), output);
+ }
+
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
+ }
+ // @@protoc_insertion_point(serialize_end:firestore.client.TargetGlobal)
+}
+
+::google::protobuf::uint8* TargetGlobal::InternalSerializeWithCachedSizesToArray(
+ bool deterministic, ::google::protobuf::uint8* target) const {
+ (void)deterministic; // Unused
+ // @@protoc_insertion_point(serialize_to_array_start:firestore.client.TargetGlobal)
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
+ // int32 highest_target_id = 1;
+ if (this->highest_target_id() != 0) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->highest_target_id(), target);
+ }
+
+ // int64 highest_listen_sequence_number = 2;
+ if (this->highest_listen_sequence_number() != 0) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->highest_listen_sequence_number(), target);
+ }
+
+ // .google.protobuf.Timestamp last_remote_snapshot_version = 3;
+ if (this->has_last_remote_snapshot_version()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ InternalWriteMessageToArray(
+ 3, *this->last_remote_snapshot_version_, deterministic, target);
+ }
+
+ // int32 target_count = 4;
+ if (this->target_count() != 0) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->target_count(), target);
+ }
+
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
+ }
+ // @@protoc_insertion_point(serialize_to_array_end:firestore.client.TargetGlobal)
+ return target;
+}
+
+size_t TargetGlobal::ByteSizeLong() const {
+// @@protoc_insertion_point(message_byte_size_start:firestore.client.TargetGlobal)
+ size_t total_size = 0;
+
+ if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+ total_size +=
+ ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+ (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
+ }
+ // .google.protobuf.Timestamp last_remote_snapshot_version = 3;
+ if (this->has_last_remote_snapshot_version()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSize(
+ *this->last_remote_snapshot_version_);
+ }
+
+ // int64 highest_listen_sequence_number = 2;
+ if (this->highest_listen_sequence_number() != 0) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int64Size(
+ this->highest_listen_sequence_number());
+ }
+
+ // int32 highest_target_id = 1;
+ if (this->highest_target_id() != 0) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->highest_target_id());
+ }
+
+ // int32 target_count = 4;
+ if (this->target_count() != 0) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->target_count());
+ }
+
+ int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = cached_size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+ return total_size;
+}
+
+void TargetGlobal::MergeFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_merge_from_start:firestore.client.TargetGlobal)
+ GOOGLE_DCHECK_NE(&from, this);
+ const TargetGlobal* source =
+ ::google::protobuf::internal::DynamicCastToGenerated<const TargetGlobal>(
+ &from);
+ if (source == NULL) {
+ // @@protoc_insertion_point(generalized_merge_from_cast_fail:firestore.client.TargetGlobal)
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ // @@protoc_insertion_point(generalized_merge_from_cast_success:firestore.client.TargetGlobal)
+ MergeFrom(*source);
+ }
+}
+
+void TargetGlobal::MergeFrom(const TargetGlobal& from) {
+// @@protoc_insertion_point(class_specific_merge_from_start:firestore.client.TargetGlobal)
+ GOOGLE_DCHECK_NE(&from, this);
+ _internal_metadata_.MergeFrom(from._internal_metadata_);
+ ::google::protobuf::uint32 cached_has_bits = 0;
+ (void) cached_has_bits;
+
+ if (from.has_last_remote_snapshot_version()) {
+ mutable_last_remote_snapshot_version()->::google::protobuf::Timestamp::MergeFrom(from.last_remote_snapshot_version());
+ }
+ if (from.highest_listen_sequence_number() != 0) {
+ set_highest_listen_sequence_number(from.highest_listen_sequence_number());
+ }
+ if (from.highest_target_id() != 0) {
+ set_highest_target_id(from.highest_target_id());
+ }
+ if (from.target_count() != 0) {
+ set_target_count(from.target_count());
+ }
+}
+
+void TargetGlobal::CopyFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_copy_from_start:firestore.client.TargetGlobal)
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void TargetGlobal::CopyFrom(const TargetGlobal& from) {
+// @@protoc_insertion_point(class_specific_copy_from_start:firestore.client.TargetGlobal)
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool TargetGlobal::IsInitialized() const {
+ return true;
+}
+
+void TargetGlobal::Swap(TargetGlobal* other) {
+ if (other == this) return;
+ InternalSwap(other);
+}
+void TargetGlobal::InternalSwap(TargetGlobal* other) {
+ using std::swap;
+ swap(last_remote_snapshot_version_, other->last_remote_snapshot_version_);
+ swap(highest_listen_sequence_number_, other->highest_listen_sequence_number_);
+ swap(highest_target_id_, other->highest_target_id_);
+ swap(target_count_, other->target_count_);
+ _internal_metadata_.Swap(&other->_internal_metadata_);
+ swap(_cached_size_, other->_cached_size_);
+}
+
+::google::protobuf::Metadata TargetGlobal::GetMetadata() const {
+ protobuf_firestore_2flocal_2ftarget_2eproto::protobuf_AssignDescriptorsOnce();
+ return ::protobuf_firestore_2flocal_2ftarget_2eproto::file_level_metadata[kIndexInFileMessages];
+}
+
+
+// @@protoc_insertion_point(namespace_scope)
+} // namespace client
+} // namespace firestore
+
+// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/cpp/firestore/local/target.pb.h b/Firestore/Protos/cpp/firestore/local/target.pb.h
new file mode 100644
index 0000000..2896f29
--- /dev/null
+++ b/Firestore/Protos/cpp/firestore/local/target.pb.h
@@ -0,0 +1,695 @@
+/*
+ * 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/target.proto
+
+#ifndef PROTOBUF_firestore_2flocal_2ftarget_2eproto__INCLUDED
+#define PROTOBUF_firestore_2flocal_2ftarget_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 3005000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please update
+#error your headers.
+#endif
+#if 3005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/io/coded_stream.h>
+#include <google/protobuf/arena.h>
+#include <google/protobuf/arenastring.h>
+#include <google/protobuf/generated_message_table_driven.h>
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/metadata.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/repeated_field.h> // IWYU pragma: export
+#include <google/protobuf/extension_set.h> // IWYU pragma: export
+#include <google/protobuf/unknown_field_set.h>
+#include "google/firestore/v1beta1/firestore.pb.h"
+#include <google/protobuf/timestamp.pb.h>
+// @@protoc_insertion_point(includes)
+
+namespace protobuf_firestore_2flocal_2ftarget_2eproto {
+// Internal implementation detail -- do not use these members.
+struct TableStruct {
+ static const ::google::protobuf::internal::ParseTableField entries[];
+ static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
+ static const ::google::protobuf::internal::ParseTable schema[2];
+ static const ::google::protobuf::internal::FieldMetadata field_metadata[];
+ static const ::google::protobuf::internal::SerializationTable serialization_table[];
+ static const ::google::protobuf::uint32 offsets[];
+};
+void AddDescriptors();
+void InitDefaultsTargetImpl();
+void InitDefaultsTarget();
+void InitDefaultsTargetGlobalImpl();
+void InitDefaultsTargetGlobal();
+inline void InitDefaults() {
+ InitDefaultsTarget();
+ InitDefaultsTargetGlobal();
+}
+} // namespace protobuf_firestore_2flocal_2ftarget_2eproto
+namespace firestore {
+namespace client {
+class Target;
+class TargetDefaultTypeInternal;
+extern TargetDefaultTypeInternal _Target_default_instance_;
+class TargetGlobal;
+class TargetGlobalDefaultTypeInternal;
+extern TargetGlobalDefaultTypeInternal _TargetGlobal_default_instance_;
+} // namespace client
+} // namespace firestore
+namespace firestore {
+namespace client {
+
+// ===================================================================
+
+class Target : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:firestore.client.Target) */ {
+ public:
+ Target();
+ virtual ~Target();
+
+ Target(const Target& from);
+
+ inline Target& operator=(const Target& from) {
+ CopyFrom(from);
+ return *this;
+ }
+ #if LANG_CXX11
+ Target(Target&& from) noexcept
+ : Target() {
+ *this = ::std::move(from);
+ }
+
+ inline Target& operator=(Target&& from) noexcept {
+ if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
+ if (this != &from) InternalSwap(&from);
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
+ #endif
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const Target& default_instance();
+
+ enum TargetTypeCase {
+ kQuery = 5,
+ kDocuments = 6,
+ TARGET_TYPE_NOT_SET = 0,
+ };
+
+ static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
+ static inline const Target* internal_default_instance() {
+ return reinterpret_cast<const Target*>(
+ &_Target_default_instance_);
+ }
+ static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
+ 0;
+
+ void Swap(Target* other);
+ friend void swap(Target& a, Target& b) {
+ a.Swap(&b);
+ }
+
+ // implements Message ----------------------------------------------
+
+ inline Target* New() const PROTOBUF_FINAL { return New(NULL); }
+
+ Target* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
+ void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+ void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+ void CopyFrom(const Target& from);
+ void MergeFrom(const Target& from);
+ void Clear() PROTOBUF_FINAL;
+ bool IsInitialized() const PROTOBUF_FINAL;
+
+ size_t ByteSizeLong() const PROTOBUF_FINAL;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
+ ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
+ bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
+ int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const PROTOBUF_FINAL;
+ void InternalSwap(Target* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return NULL;
+ }
+ inline void* MaybeArenaPtr() const {
+ return NULL;
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // bytes resume_token = 3;
+ void clear_resume_token();
+ static const int kResumeTokenFieldNumber = 3;
+ const ::std::string& resume_token() const;
+ void set_resume_token(const ::std::string& value);
+ #if LANG_CXX11
+ void set_resume_token(::std::string&& value);
+ #endif
+ void set_resume_token(const char* value);
+ void set_resume_token(const void* value, size_t size);
+ ::std::string* mutable_resume_token();
+ ::std::string* release_resume_token();
+ void set_allocated_resume_token(::std::string* resume_token);
+
+ // .google.protobuf.Timestamp snapshot_version = 2;
+ bool has_snapshot_version() const;
+ void clear_snapshot_version();
+ static const int kSnapshotVersionFieldNumber = 2;
+ const ::google::protobuf::Timestamp& snapshot_version() const;
+ ::google::protobuf::Timestamp* release_snapshot_version();
+ ::google::protobuf::Timestamp* mutable_snapshot_version();
+ void set_allocated_snapshot_version(::google::protobuf::Timestamp* snapshot_version);
+
+ // int64 last_listen_sequence_number = 4;
+ void clear_last_listen_sequence_number();
+ static const int kLastListenSequenceNumberFieldNumber = 4;
+ ::google::protobuf::int64 last_listen_sequence_number() const;
+ void set_last_listen_sequence_number(::google::protobuf::int64 value);
+
+ // int32 target_id = 1;
+ void clear_target_id();
+ static const int kTargetIdFieldNumber = 1;
+ ::google::protobuf::int32 target_id() const;
+ void set_target_id(::google::protobuf::int32 value);
+
+ // .google.firestore.v1beta1.Target.QueryTarget query = 5;
+ bool has_query() const;
+ void clear_query();
+ static const int kQueryFieldNumber = 5;
+ const ::google::firestore::v1beta1::Target_QueryTarget& query() const;
+ ::google::firestore::v1beta1::Target_QueryTarget* release_query();
+ ::google::firestore::v1beta1::Target_QueryTarget* mutable_query();
+ void set_allocated_query(::google::firestore::v1beta1::Target_QueryTarget* query);
+
+ // .google.firestore.v1beta1.Target.DocumentsTarget documents = 6;
+ bool has_documents() const;
+ void clear_documents();
+ static const int kDocumentsFieldNumber = 6;
+ const ::google::firestore::v1beta1::Target_DocumentsTarget& documents() const;
+ ::google::firestore::v1beta1::Target_DocumentsTarget* release_documents();
+ ::google::firestore::v1beta1::Target_DocumentsTarget* mutable_documents();
+ void set_allocated_documents(::google::firestore::v1beta1::Target_DocumentsTarget* documents);
+
+ TargetTypeCase target_type_case() const;
+ // @@protoc_insertion_point(class_scope:firestore.client.Target)
+ private:
+ void set_has_query();
+ void set_has_documents();
+
+ inline bool has_target_type() const;
+ void clear_target_type();
+ inline void clear_has_target_type();
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ ::google::protobuf::internal::ArenaStringPtr resume_token_;
+ ::google::protobuf::Timestamp* snapshot_version_;
+ ::google::protobuf::int64 last_listen_sequence_number_;
+ ::google::protobuf::int32 target_id_;
+ union TargetTypeUnion {
+ TargetTypeUnion() {}
+ ::google::firestore::v1beta1::Target_QueryTarget* query_;
+ ::google::firestore::v1beta1::Target_DocumentsTarget* documents_;
+ } target_type_;
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _oneof_case_[1];
+
+ friend struct ::protobuf_firestore_2flocal_2ftarget_2eproto::TableStruct;
+ friend void ::protobuf_firestore_2flocal_2ftarget_2eproto::InitDefaultsTargetImpl();
+};
+// -------------------------------------------------------------------
+
+class TargetGlobal : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:firestore.client.TargetGlobal) */ {
+ public:
+ TargetGlobal();
+ virtual ~TargetGlobal();
+
+ TargetGlobal(const TargetGlobal& from);
+
+ inline TargetGlobal& operator=(const TargetGlobal& from) {
+ CopyFrom(from);
+ return *this;
+ }
+ #if LANG_CXX11
+ TargetGlobal(TargetGlobal&& from) noexcept
+ : TargetGlobal() {
+ *this = ::std::move(from);
+ }
+
+ inline TargetGlobal& operator=(TargetGlobal&& from) noexcept {
+ if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
+ if (this != &from) InternalSwap(&from);
+ } else {
+ CopyFrom(from);
+ }
+ return *this;
+ }
+ #endif
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const TargetGlobal& default_instance();
+
+ static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
+ static inline const TargetGlobal* internal_default_instance() {
+ return reinterpret_cast<const TargetGlobal*>(
+ &_TargetGlobal_default_instance_);
+ }
+ static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
+ 1;
+
+ void Swap(TargetGlobal* other);
+ friend void swap(TargetGlobal& a, TargetGlobal& b) {
+ a.Swap(&b);
+ }
+
+ // implements Message ----------------------------------------------
+
+ inline TargetGlobal* New() const PROTOBUF_FINAL { return New(NULL); }
+
+ TargetGlobal* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
+ void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+ void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
+ void CopyFrom(const TargetGlobal& from);
+ void MergeFrom(const TargetGlobal& from);
+ void Clear() PROTOBUF_FINAL;
+ bool IsInitialized() const PROTOBUF_FINAL;
+
+ size_t ByteSizeLong() const PROTOBUF_FINAL;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
+ ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
+ bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
+ int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const PROTOBUF_FINAL;
+ void InternalSwap(TargetGlobal* other);
+ private:
+ inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+ return NULL;
+ }
+ inline void* MaybeArenaPtr() const {
+ return NULL;
+ }
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // .google.protobuf.Timestamp last_remote_snapshot_version = 3;
+ bool has_last_remote_snapshot_version() const;
+ void clear_last_remote_snapshot_version();
+ static const int kLastRemoteSnapshotVersionFieldNumber = 3;
+ const ::google::protobuf::Timestamp& last_remote_snapshot_version() const;
+ ::google::protobuf::Timestamp* release_last_remote_snapshot_version();
+ ::google::protobuf::Timestamp* mutable_last_remote_snapshot_version();
+ void set_allocated_last_remote_snapshot_version(::google::protobuf::Timestamp* last_remote_snapshot_version);
+
+ // int64 highest_listen_sequence_number = 2;
+ void clear_highest_listen_sequence_number();
+ static const int kHighestListenSequenceNumberFieldNumber = 2;
+ ::google::protobuf::int64 highest_listen_sequence_number() const;
+ void set_highest_listen_sequence_number(::google::protobuf::int64 value);
+
+ // int32 highest_target_id = 1;
+ void clear_highest_target_id();
+ static const int kHighestTargetIdFieldNumber = 1;
+ ::google::protobuf::int32 highest_target_id() const;
+ void set_highest_target_id(::google::protobuf::int32 value);
+
+ // int32 target_count = 4;
+ void clear_target_count();
+ static const int kTargetCountFieldNumber = 4;
+ ::google::protobuf::int32 target_count() const;
+ void set_target_count(::google::protobuf::int32 value);
+
+ // @@protoc_insertion_point(class_scope:firestore.client.TargetGlobal)
+ private:
+
+ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+ ::google::protobuf::Timestamp* last_remote_snapshot_version_;
+ ::google::protobuf::int64 highest_listen_sequence_number_;
+ ::google::protobuf::int32 highest_target_id_;
+ ::google::protobuf::int32 target_count_;
+ mutable int _cached_size_;
+ friend struct ::protobuf_firestore_2flocal_2ftarget_2eproto::TableStruct;
+ friend void ::protobuf_firestore_2flocal_2ftarget_2eproto::InitDefaultsTargetGlobalImpl();
+};
+// ===================================================================
+
+
+// ===================================================================
+
+#ifdef __GNUC__
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif // __GNUC__
+// Target
+
+// int32 target_id = 1;
+inline void Target::clear_target_id() {
+ target_id_ = 0;
+}
+inline ::google::protobuf::int32 Target::target_id() const {
+ // @@protoc_insertion_point(field_get:firestore.client.Target.target_id)
+ return target_id_;
+}
+inline void Target::set_target_id(::google::protobuf::int32 value) {
+
+ target_id_ = value;
+ // @@protoc_insertion_point(field_set:firestore.client.Target.target_id)
+}
+
+// .google.protobuf.Timestamp snapshot_version = 2;
+inline bool Target::has_snapshot_version() const {
+ return this != internal_default_instance() && snapshot_version_ != NULL;
+}
+inline const ::google::protobuf::Timestamp& Target::snapshot_version() const {
+ const ::google::protobuf::Timestamp* p = snapshot_version_;
+ // @@protoc_insertion_point(field_get:firestore.client.Target.snapshot_version)
+ return p != NULL ? *p : *reinterpret_cast<const ::google::protobuf::Timestamp*>(
+ &::google::protobuf::_Timestamp_default_instance_);
+}
+inline ::google::protobuf::Timestamp* Target::release_snapshot_version() {
+ // @@protoc_insertion_point(field_release:firestore.client.Target.snapshot_version)
+
+ ::google::protobuf::Timestamp* temp = snapshot_version_;
+ snapshot_version_ = NULL;
+ return temp;
+}
+inline ::google::protobuf::Timestamp* Target::mutable_snapshot_version() {
+
+ if (snapshot_version_ == NULL) {
+ snapshot_version_ = new ::google::protobuf::Timestamp;
+ }
+ // @@protoc_insertion_point(field_mutable:firestore.client.Target.snapshot_version)
+ return snapshot_version_;
+}
+inline void Target::set_allocated_snapshot_version(::google::protobuf::Timestamp* snapshot_version) {
+ ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
+ if (message_arena == NULL) {
+ delete reinterpret_cast< ::google::protobuf::MessageLite*>(snapshot_version_);
+ }
+ if (snapshot_version) {
+ ::google::protobuf::Arena* submessage_arena =
+ reinterpret_cast< ::google::protobuf::MessageLite*>(snapshot_version)->GetArena();
+ if (message_arena != submessage_arena) {
+ snapshot_version = ::google::protobuf::internal::GetOwnedMessage(
+ message_arena, snapshot_version, submessage_arena);
+ }
+
+ } else {
+
+ }
+ snapshot_version_ = snapshot_version;
+ // @@protoc_insertion_point(field_set_allocated:firestore.client.Target.snapshot_version)
+}
+
+// bytes resume_token = 3;
+inline void Target::clear_resume_token() {
+ resume_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline const ::std::string& Target::resume_token() const {
+ // @@protoc_insertion_point(field_get:firestore.client.Target.resume_token)
+ return resume_token_.GetNoArena();
+}
+inline void Target::set_resume_token(const ::std::string& value) {
+
+ resume_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+ // @@protoc_insertion_point(field_set:firestore.client.Target.resume_token)
+}
+#if LANG_CXX11
+inline void Target::set_resume_token(::std::string&& value) {
+
+ resume_token_.SetNoArena(
+ &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
+ // @@protoc_insertion_point(field_set_rvalue:firestore.client.Target.resume_token)
+}
+#endif
+inline void Target::set_resume_token(const char* value) {
+ GOOGLE_DCHECK(value != NULL);
+
+ resume_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+ // @@protoc_insertion_point(field_set_char:firestore.client.Target.resume_token)
+}
+inline void Target::set_resume_token(const void* value, size_t size) {
+
+ resume_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+ ::std::string(reinterpret_cast<const char*>(value), size));
+ // @@protoc_insertion_point(field_set_pointer:firestore.client.Target.resume_token)
+}
+inline ::std::string* Target::mutable_resume_token() {
+
+ // @@protoc_insertion_point(field_mutable:firestore.client.Target.resume_token)
+ return resume_token_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* Target::release_resume_token() {
+ // @@protoc_insertion_point(field_release:firestore.client.Target.resume_token)
+
+ return resume_token_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Target::set_allocated_resume_token(::std::string* resume_token) {
+ if (resume_token != NULL) {
+
+ } else {
+
+ }
+ resume_token_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), resume_token);
+ // @@protoc_insertion_point(field_set_allocated:firestore.client.Target.resume_token)
+}
+
+// int64 last_listen_sequence_number = 4;
+inline void Target::clear_last_listen_sequence_number() {
+ last_listen_sequence_number_ = GOOGLE_LONGLONG(0);
+}
+inline ::google::protobuf::int64 Target::last_listen_sequence_number() const {
+ // @@protoc_insertion_point(field_get:firestore.client.Target.last_listen_sequence_number)
+ return last_listen_sequence_number_;
+}
+inline void Target::set_last_listen_sequence_number(::google::protobuf::int64 value) {
+
+ last_listen_sequence_number_ = value;
+ // @@protoc_insertion_point(field_set:firestore.client.Target.last_listen_sequence_number)
+}
+
+// .google.firestore.v1beta1.Target.QueryTarget query = 5;
+inline bool Target::has_query() const {
+ return target_type_case() == kQuery;
+}
+inline void Target::set_has_query() {
+ _oneof_case_[0] = kQuery;
+}
+inline ::google::firestore::v1beta1::Target_QueryTarget* Target::release_query() {
+ // @@protoc_insertion_point(field_release:firestore.client.Target.query)
+ if (has_query()) {
+ clear_has_target_type();
+ ::google::firestore::v1beta1::Target_QueryTarget* temp = target_type_.query_;
+ target_type_.query_ = NULL;
+ return temp;
+ } else {
+ return NULL;
+ }
+}
+inline const ::google::firestore::v1beta1::Target_QueryTarget& Target::query() const {
+ // @@protoc_insertion_point(field_get:firestore.client.Target.query)
+ return has_query()
+ ? *target_type_.query_
+ : *reinterpret_cast< ::google::firestore::v1beta1::Target_QueryTarget*>(&::google::firestore::v1beta1::_Target_QueryTarget_default_instance_);
+}
+inline ::google::firestore::v1beta1::Target_QueryTarget* Target::mutable_query() {
+ if (!has_query()) {
+ clear_target_type();
+ set_has_query();
+ target_type_.query_ = new ::google::firestore::v1beta1::Target_QueryTarget;
+ }
+ // @@protoc_insertion_point(field_mutable:firestore.client.Target.query)
+ return target_type_.query_;
+}
+
+// .google.firestore.v1beta1.Target.DocumentsTarget documents = 6;
+inline bool Target::has_documents() const {
+ return target_type_case() == kDocuments;
+}
+inline void Target::set_has_documents() {
+ _oneof_case_[0] = kDocuments;
+}
+inline ::google::firestore::v1beta1::Target_DocumentsTarget* Target::release_documents() {
+ // @@protoc_insertion_point(field_release:firestore.client.Target.documents)
+ if (has_documents()) {
+ clear_has_target_type();
+ ::google::firestore::v1beta1::Target_DocumentsTarget* temp = target_type_.documents_;
+ target_type_.documents_ = NULL;
+ return temp;
+ } else {
+ return NULL;
+ }
+}
+inline const ::google::firestore::v1beta1::Target_DocumentsTarget& Target::documents() const {
+ // @@protoc_insertion_point(field_get:firestore.client.Target.documents)
+ return has_documents()
+ ? *target_type_.documents_
+ : *reinterpret_cast< ::google::firestore::v1beta1::Target_DocumentsTarget*>(&::google::firestore::v1beta1::_Target_DocumentsTarget_default_instance_);
+}
+inline ::google::firestore::v1beta1::Target_DocumentsTarget* Target::mutable_documents() {
+ if (!has_documents()) {
+ clear_target_type();
+ set_has_documents();
+ target_type_.documents_ = new ::google::firestore::v1beta1::Target_DocumentsTarget;
+ }
+ // @@protoc_insertion_point(field_mutable:firestore.client.Target.documents)
+ return target_type_.documents_;
+}
+
+inline bool Target::has_target_type() const {
+ return target_type_case() != TARGET_TYPE_NOT_SET;
+}
+inline void Target::clear_has_target_type() {
+ _oneof_case_[0] = TARGET_TYPE_NOT_SET;
+}
+inline Target::TargetTypeCase Target::target_type_case() const {
+ return Target::TargetTypeCase(_oneof_case_[0]);
+}
+// -------------------------------------------------------------------
+
+// TargetGlobal
+
+// int32 highest_target_id = 1;
+inline void TargetGlobal::clear_highest_target_id() {
+ highest_target_id_ = 0;
+}
+inline ::google::protobuf::int32 TargetGlobal::highest_target_id() const {
+ // @@protoc_insertion_point(field_get:firestore.client.TargetGlobal.highest_target_id)
+ return highest_target_id_;
+}
+inline void TargetGlobal::set_highest_target_id(::google::protobuf::int32 value) {
+
+ highest_target_id_ = value;
+ // @@protoc_insertion_point(field_set:firestore.client.TargetGlobal.highest_target_id)
+}
+
+// int64 highest_listen_sequence_number = 2;
+inline void TargetGlobal::clear_highest_listen_sequence_number() {
+ highest_listen_sequence_number_ = GOOGLE_LONGLONG(0);
+}
+inline ::google::protobuf::int64 TargetGlobal::highest_listen_sequence_number() const {
+ // @@protoc_insertion_point(field_get:firestore.client.TargetGlobal.highest_listen_sequence_number)
+ return highest_listen_sequence_number_;
+}
+inline void TargetGlobal::set_highest_listen_sequence_number(::google::protobuf::int64 value) {
+
+ highest_listen_sequence_number_ = value;
+ // @@protoc_insertion_point(field_set:firestore.client.TargetGlobal.highest_listen_sequence_number)
+}
+
+// .google.protobuf.Timestamp last_remote_snapshot_version = 3;
+inline bool TargetGlobal::has_last_remote_snapshot_version() const {
+ return this != internal_default_instance() && last_remote_snapshot_version_ != NULL;
+}
+inline const ::google::protobuf::Timestamp& TargetGlobal::last_remote_snapshot_version() const {
+ const ::google::protobuf::Timestamp* p = last_remote_snapshot_version_;
+ // @@protoc_insertion_point(field_get:firestore.client.TargetGlobal.last_remote_snapshot_version)
+ return p != NULL ? *p : *reinterpret_cast<const ::google::protobuf::Timestamp*>(
+ &::google::protobuf::_Timestamp_default_instance_);
+}
+inline ::google::protobuf::Timestamp* TargetGlobal::release_last_remote_snapshot_version() {
+ // @@protoc_insertion_point(field_release:firestore.client.TargetGlobal.last_remote_snapshot_version)
+
+ ::google::protobuf::Timestamp* temp = last_remote_snapshot_version_;
+ last_remote_snapshot_version_ = NULL;
+ return temp;
+}
+inline ::google::protobuf::Timestamp* TargetGlobal::mutable_last_remote_snapshot_version() {
+
+ if (last_remote_snapshot_version_ == NULL) {
+ last_remote_snapshot_version_ = new ::google::protobuf::Timestamp;
+ }
+ // @@protoc_insertion_point(field_mutable:firestore.client.TargetGlobal.last_remote_snapshot_version)
+ return last_remote_snapshot_version_;
+}
+inline void TargetGlobal::set_allocated_last_remote_snapshot_version(::google::protobuf::Timestamp* last_remote_snapshot_version) {
+ ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
+ if (message_arena == NULL) {
+ delete reinterpret_cast< ::google::protobuf::MessageLite*>(last_remote_snapshot_version_);
+ }
+ if (last_remote_snapshot_version) {
+ ::google::protobuf::Arena* submessage_arena =
+ reinterpret_cast< ::google::protobuf::MessageLite*>(last_remote_snapshot_version)->GetArena();
+ if (message_arena != submessage_arena) {
+ last_remote_snapshot_version = ::google::protobuf::internal::GetOwnedMessage(
+ message_arena, last_remote_snapshot_version, submessage_arena);
+ }
+
+ } else {
+
+ }
+ last_remote_snapshot_version_ = last_remote_snapshot_version;
+ // @@protoc_insertion_point(field_set_allocated:firestore.client.TargetGlobal.last_remote_snapshot_version)
+}
+
+// int32 target_count = 4;
+inline void TargetGlobal::clear_target_count() {
+ target_count_ = 0;
+}
+inline ::google::protobuf::int32 TargetGlobal::target_count() const {
+ // @@protoc_insertion_point(field_get:firestore.client.TargetGlobal.target_count)
+ return target_count_;
+}
+inline void TargetGlobal::set_target_count(::google::protobuf::int32 value) {
+
+ target_count_ = value;
+ // @@protoc_insertion_point(field_set:firestore.client.TargetGlobal.target_count)
+}
+
+#ifdef __GNUC__
+ #pragma GCC diagnostic pop
+#endif // __GNUC__
+// -------------------------------------------------------------------
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace client
+} // namespace firestore
+
+// @@protoc_insertion_point(global_scope)
+
+#endif // PROTOBUF_firestore_2flocal_2ftarget_2eproto__INCLUDED