/*
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/firestore/v1/firestore.proto

#include "google/firestore/v1/firestore.pb.h"

#include <algorithm>

#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_AggregationResult_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fdocument_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_Document_google_2ffirestore_2fv1_2fdocument_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fwrite_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_DocumentChange_google_2ffirestore_2fv1_2fwrite_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fwrite_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_DocumentDelete_google_2ffirestore_2fv1_2fwrite_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fcommon_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_DocumentMask_google_2ffirestore_2fv1_2fcommon_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fwrite_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_DocumentRemove_google_2ffirestore_2fv1_2fwrite_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fwrite_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ExistenceFilter_google_2ffirestore_2fv1_2fwrite_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2ffirestore_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ListenRequest_LabelsEntry_DoNotUse_google_2ffirestore_2fv1_2ffirestore_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fcommon_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Precondition_google_2ffirestore_2fv1_2fcommon_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fquery_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_StructuredAggregationQuery_google_2ffirestore_2fv1_2fquery_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fquery_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<6> scc_info_StructuredQuery_google_2ffirestore_2fv1_2fquery_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2ffirestore_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_Target_google_2ffirestore_2fv1_2ffirestore_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2ffirestore_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Target_DocumentsTarget_google_2ffirestore_2fv1_2ffirestore_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2ffirestore_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Target_QueryTarget_google_2ffirestore_2fv1_2ffirestore_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2ffirestore_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_TargetChange_google_2ffirestore_2fv1_2ffirestore_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fcommon_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_TransactionOptions_google_2ffirestore_2fv1_2fcommon_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fwrite_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<5> scc_info_Write_google_2ffirestore_2fv1_2fwrite_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2ffirestore_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_WriteRequest_LabelsEntry_DoNotUse_google_2ffirestore_2fv1_2ffirestore_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fwrite_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_WriteResult_google_2ffirestore_2fv1_2fwrite_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftimestamp_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2frpc_2fstatus_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Status_google_2frpc_2fstatus_2eproto;
namespace google {
namespace firestore {
namespace v1 {
class GetDocumentRequestDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<GetDocumentRequest> _instance;
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr transaction_;
  const PROTOBUF_NAMESPACE_ID::Timestamp* read_time_;
} _GetDocumentRequest_default_instance_;
class ListDocumentsRequestDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ListDocumentsRequest> _instance;
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr transaction_;
  const PROTOBUF_NAMESPACE_ID::Timestamp* read_time_;
} _ListDocumentsRequest_default_instance_;
class ListDocumentsResponseDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ListDocumentsResponse> _instance;
} _ListDocumentsResponse_default_instance_;
class CreateDocumentRequestDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<CreateDocumentRequest> _instance;
} _CreateDocumentRequest_default_instance_;
class UpdateDocumentRequestDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<UpdateDocumentRequest> _instance;
} _UpdateDocumentRequest_default_instance_;
class DeleteDocumentRequestDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<DeleteDocumentRequest> _instance;
} _DeleteDocumentRequest_default_instance_;
class BatchGetDocumentsRequestDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<BatchGetDocumentsRequest> _instance;
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr transaction_;
  const ::google::firestore::v1::TransactionOptions* new_transaction_;
  const PROTOBUF_NAMESPACE_ID::Timestamp* read_time_;
} _BatchGetDocumentsRequest_default_instance_;
class BatchGetDocumentsResponseDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<BatchGetDocumentsResponse> _instance;
  const ::google::firestore::v1::Document* found_;
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr missing_;
} _BatchGetDocumentsResponse_default_instance_;
class BeginTransactionRequestDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<BeginTransactionRequest> _instance;
} _BeginTransactionRequest_default_instance_;
class BeginTransactionResponseDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<BeginTransactionResponse> _instance;
} _BeginTransactionResponse_default_instance_;
class CommitRequestDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<CommitRequest> _instance;
} _CommitRequest_default_instance_;
class CommitResponseDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<CommitResponse> _instance;
} _CommitResponse_default_instance_;
class RollbackRequestDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<RollbackRequest> _instance;
} _RollbackRequest_default_instance_;
class RunQueryRequestDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<RunQueryRequest> _instance;
  const ::google::firestore::v1::StructuredQuery* structured_query_;
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr transaction_;
  const ::google::firestore::v1::TransactionOptions* new_transaction_;
  const PROTOBUF_NAMESPACE_ID::Timestamp* read_time_;
} _RunQueryRequest_default_instance_;
class RunQueryResponseDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<RunQueryResponse> _instance;
} _RunQueryResponse_default_instance_;
class RunAggregationQueryRequestDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<RunAggregationQueryRequest> _instance;
  const ::google::firestore::v1::StructuredAggregationQuery* structured_aggregation_query_;
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr transaction_;
  const ::google::firestore::v1::TransactionOptions* new_transaction_;
  const PROTOBUF_NAMESPACE_ID::Timestamp* read_time_;
} _RunAggregationQueryRequest_default_instance_;
class RunAggregationQueryResponseDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<RunAggregationQueryResponse> _instance;
} _RunAggregationQueryResponse_default_instance_;
class WriteRequest_LabelsEntry_DoNotUseDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<WriteRequest_LabelsEntry_DoNotUse> _instance;
} _WriteRequest_LabelsEntry_DoNotUse_default_instance_;
class WriteRequestDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<WriteRequest> _instance;
} _WriteRequest_default_instance_;
class WriteResponseDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<WriteResponse> _instance;
} _WriteResponse_default_instance_;
class ListenRequest_LabelsEntry_DoNotUseDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ListenRequest_LabelsEntry_DoNotUse> _instance;
} _ListenRequest_LabelsEntry_DoNotUse_default_instance_;
class ListenRequestDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ListenRequest> _instance;
  const ::google::firestore::v1::Target* add_target_;
  ::PROTOBUF_NAMESPACE_ID::int32 remove_target_;
} _ListenRequest_default_instance_;
class ListenResponseDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ListenResponse> _instance;
  const ::google::firestore::v1::TargetChange* target_change_;
  const ::google::firestore::v1::DocumentChange* document_change_;
  const ::google::firestore::v1::DocumentDelete* document_delete_;
  const ::google::firestore::v1::DocumentRemove* document_remove_;
  const ::google::firestore::v1::ExistenceFilter* filter_;
} _ListenResponse_default_instance_;
class Target_DocumentsTargetDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Target_DocumentsTarget> _instance;
} _Target_DocumentsTarget_default_instance_;
class Target_QueryTargetDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Target_QueryTarget> _instance;
  const ::google::firestore::v1::StructuredQuery* structured_query_;
} _Target_QueryTarget_default_instance_;
class TargetDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Target> _instance;
  const ::google::firestore::v1::Target_QueryTarget* query_;
  const ::google::firestore::v1::Target_DocumentsTarget* documents_;
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr resume_token_;
  const PROTOBUF_NAMESPACE_ID::Timestamp* read_time_;
} _Target_default_instance_;
class TargetChangeDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<TargetChange> _instance;
} _TargetChange_default_instance_;
class ListCollectionIdsRequestDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ListCollectionIdsRequest> _instance;
} _ListCollectionIdsRequest_default_instance_;
class ListCollectionIdsResponseDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ListCollectionIdsResponse> _instance;
} _ListCollectionIdsResponse_default_instance_;
}  // namespace v1
}  // namespace firestore
}  // namespace google
static void InitDefaultsscc_info_BatchGetDocumentsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_BatchGetDocumentsRequest_default_instance_;
    new (ptr) ::google::firestore::v1::BatchGetDocumentsRequest();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::BatchGetDocumentsRequest::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_BatchGetDocumentsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, 0, InitDefaultsscc_info_BatchGetDocumentsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
      &scc_info_DocumentMask_google_2ffirestore_2fv1_2fcommon_2eproto.base,
      &scc_info_TransactionOptions_google_2ffirestore_2fv1_2fcommon_2eproto.base,
      &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};

static void InitDefaultsscc_info_BatchGetDocumentsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_BatchGetDocumentsResponse_default_instance_;
    new (ptr) ::google::firestore::v1::BatchGetDocumentsResponse();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::BatchGetDocumentsResponse::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_BatchGetDocumentsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_BatchGetDocumentsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
      &scc_info_Document_google_2ffirestore_2fv1_2fdocument_2eproto.base,
      &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};

static void InitDefaultsscc_info_BeginTransactionRequest_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_BeginTransactionRequest_default_instance_;
    new (ptr) ::google::firestore::v1::BeginTransactionRequest();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::BeginTransactionRequest::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_BeginTransactionRequest_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_BeginTransactionRequest_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
      &scc_info_TransactionOptions_google_2ffirestore_2fv1_2fcommon_2eproto.base,}};

static void InitDefaultsscc_info_BeginTransactionResponse_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_BeginTransactionResponse_default_instance_;
    new (ptr) ::google::firestore::v1::BeginTransactionResponse();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::BeginTransactionResponse::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_BeginTransactionResponse_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_BeginTransactionResponse_google_2ffirestore_2fv1_2ffirestore_2eproto}, {}};

static void InitDefaultsscc_info_CommitRequest_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_CommitRequest_default_instance_;
    new (ptr) ::google::firestore::v1::CommitRequest();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::CommitRequest::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_CommitRequest_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_CommitRequest_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
      &scc_info_Write_google_2ffirestore_2fv1_2fwrite_2eproto.base,}};

static void InitDefaultsscc_info_CommitResponse_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_CommitResponse_default_instance_;
    new (ptr) ::google::firestore::v1::CommitResponse();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::CommitResponse::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_CommitResponse_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_CommitResponse_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
      &scc_info_WriteResult_google_2ffirestore_2fv1_2fwrite_2eproto.base,
      &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};

static void InitDefaultsscc_info_CreateDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_CreateDocumentRequest_default_instance_;
    new (ptr) ::google::firestore::v1::CreateDocumentRequest();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::CreateDocumentRequest::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_CreateDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_CreateDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
      &scc_info_Document_google_2ffirestore_2fv1_2fdocument_2eproto.base,
      &scc_info_DocumentMask_google_2ffirestore_2fv1_2fcommon_2eproto.base,}};

static void InitDefaultsscc_info_DeleteDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_DeleteDocumentRequest_default_instance_;
    new (ptr) ::google::firestore::v1::DeleteDocumentRequest();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::DeleteDocumentRequest::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_DeleteDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_DeleteDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
      &scc_info_Precondition_google_2ffirestore_2fv1_2fcommon_2eproto.base,}};

static void InitDefaultsscc_info_GetDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_GetDocumentRequest_default_instance_;
    new (ptr) ::google::firestore::v1::GetDocumentRequest();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::GetDocumentRequest::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_GetDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_GetDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
      &scc_info_DocumentMask_google_2ffirestore_2fv1_2fcommon_2eproto.base,
      &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};

static void InitDefaultsscc_info_ListCollectionIdsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_ListCollectionIdsRequest_default_instance_;
    new (ptr) ::google::firestore::v1::ListCollectionIdsRequest();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::ListCollectionIdsRequest::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ListCollectionIdsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_ListCollectionIdsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto}, {}};

static void InitDefaultsscc_info_ListCollectionIdsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_ListCollectionIdsResponse_default_instance_;
    new (ptr) ::google::firestore::v1::ListCollectionIdsResponse();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::ListCollectionIdsResponse::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ListCollectionIdsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_ListCollectionIdsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto}, {}};

static void InitDefaultsscc_info_ListDocumentsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_ListDocumentsRequest_default_instance_;
    new (ptr) ::google::firestore::v1::ListDocumentsRequest();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::ListDocumentsRequest::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_ListDocumentsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_ListDocumentsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
      &scc_info_DocumentMask_google_2ffirestore_2fv1_2fcommon_2eproto.base,
      &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};

static void InitDefaultsscc_info_ListDocumentsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_ListDocumentsResponse_default_instance_;
    new (ptr) ::google::firestore::v1::ListDocumentsResponse();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::ListDocumentsResponse::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ListDocumentsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_ListDocumentsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
      &scc_info_Document_google_2ffirestore_2fv1_2fdocument_2eproto.base,}};

static void InitDefaultsscc_info_ListenRequest_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_ListenRequest_default_instance_;
    new (ptr) ::google::firestore::v1::ListenRequest();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::ListenRequest::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_ListenRequest_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_ListenRequest_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
      &scc_info_Target_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
      &scc_info_ListenRequest_LabelsEntry_DoNotUse_google_2ffirestore_2fv1_2ffirestore_2eproto.base,}};

static void InitDefaultsscc_info_ListenRequest_LabelsEntry_DoNotUse_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_ListenRequest_LabelsEntry_DoNotUse_default_instance_;
    new (ptr) ::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse();
  }
  ::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ListenRequest_LabelsEntry_DoNotUse_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_ListenRequest_LabelsEntry_DoNotUse_google_2ffirestore_2fv1_2ffirestore_2eproto}, {}};

static void InitDefaultsscc_info_ListenResponse_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_ListenResponse_default_instance_;
    new (ptr) ::google::firestore::v1::ListenResponse();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::ListenResponse::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<5> scc_info_ListenResponse_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 5, 0, InitDefaultsscc_info_ListenResponse_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
      &scc_info_TargetChange_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
      &scc_info_DocumentChange_google_2ffirestore_2fv1_2fwrite_2eproto.base,
      &scc_info_DocumentDelete_google_2ffirestore_2fv1_2fwrite_2eproto.base,
      &scc_info_DocumentRemove_google_2ffirestore_2fv1_2fwrite_2eproto.base,
      &scc_info_ExistenceFilter_google_2ffirestore_2fv1_2fwrite_2eproto.base,}};

static void InitDefaultsscc_info_RollbackRequest_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_RollbackRequest_default_instance_;
    new (ptr) ::google::firestore::v1::RollbackRequest();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::RollbackRequest::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_RollbackRequest_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_RollbackRequest_google_2ffirestore_2fv1_2ffirestore_2eproto}, {}};

static void InitDefaultsscc_info_RunAggregationQueryRequest_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_RunAggregationQueryRequest_default_instance_;
    new (ptr) ::google::firestore::v1::RunAggregationQueryRequest();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::RunAggregationQueryRequest::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_RunAggregationQueryRequest_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, 0, InitDefaultsscc_info_RunAggregationQueryRequest_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
      &scc_info_StructuredAggregationQuery_google_2ffirestore_2fv1_2fquery_2eproto.base,
      &scc_info_TransactionOptions_google_2ffirestore_2fv1_2fcommon_2eproto.base,
      &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};

static void InitDefaultsscc_info_RunAggregationQueryResponse_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_RunAggregationQueryResponse_default_instance_;
    new (ptr) ::google::firestore::v1::RunAggregationQueryResponse();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::RunAggregationQueryResponse::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_RunAggregationQueryResponse_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_RunAggregationQueryResponse_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
      &scc_info_AggregationResult_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto.base,
      &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};

static void InitDefaultsscc_info_RunQueryRequest_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_RunQueryRequest_default_instance_;
    new (ptr) ::google::firestore::v1::RunQueryRequest();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::RunQueryRequest::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_RunQueryRequest_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, 0, InitDefaultsscc_info_RunQueryRequest_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
      &scc_info_StructuredQuery_google_2ffirestore_2fv1_2fquery_2eproto.base,
      &scc_info_TransactionOptions_google_2ffirestore_2fv1_2fcommon_2eproto.base,
      &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};

static void InitDefaultsscc_info_RunQueryResponse_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_RunQueryResponse_default_instance_;
    new (ptr) ::google::firestore::v1::RunQueryResponse();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::RunQueryResponse::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_RunQueryResponse_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_RunQueryResponse_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
      &scc_info_Document_google_2ffirestore_2fv1_2fdocument_2eproto.base,
      &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};

static void InitDefaultsscc_info_Target_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_Target_default_instance_;
    new (ptr) ::google::firestore::v1::Target();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::Target::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_Target_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, 0, InitDefaultsscc_info_Target_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
      &scc_info_Target_QueryTarget_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
      &scc_info_Target_DocumentsTarget_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
      &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};

static void InitDefaultsscc_info_Target_DocumentsTarget_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_Target_DocumentsTarget_default_instance_;
    new (ptr) ::google::firestore::v1::Target_DocumentsTarget();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::Target_DocumentsTarget::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Target_DocumentsTarget_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Target_DocumentsTarget_google_2ffirestore_2fv1_2ffirestore_2eproto}, {}};

static void InitDefaultsscc_info_Target_QueryTarget_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_Target_QueryTarget_default_instance_;
    new (ptr) ::google::firestore::v1::Target_QueryTarget();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::Target_QueryTarget::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Target_QueryTarget_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Target_QueryTarget_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
      &scc_info_StructuredQuery_google_2ffirestore_2fv1_2fquery_2eproto.base,}};

static void InitDefaultsscc_info_TargetChange_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_TargetChange_default_instance_;
    new (ptr) ::google::firestore::v1::TargetChange();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::TargetChange::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_TargetChange_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_TargetChange_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
      &scc_info_Status_google_2frpc_2fstatus_2eproto.base,
      &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};

static void InitDefaultsscc_info_UpdateDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_UpdateDocumentRequest_default_instance_;
    new (ptr) ::google::firestore::v1::UpdateDocumentRequest();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::UpdateDocumentRequest::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_UpdateDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, 0, InitDefaultsscc_info_UpdateDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
      &scc_info_Document_google_2ffirestore_2fv1_2fdocument_2eproto.base,
      &scc_info_DocumentMask_google_2ffirestore_2fv1_2fcommon_2eproto.base,
      &scc_info_Precondition_google_2ffirestore_2fv1_2fcommon_2eproto.base,}};

static void InitDefaultsscc_info_WriteRequest_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_WriteRequest_default_instance_;
    new (ptr) ::google::firestore::v1::WriteRequest();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::WriteRequest::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_WriteRequest_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_WriteRequest_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
      &scc_info_Write_google_2ffirestore_2fv1_2fwrite_2eproto.base,
      &scc_info_WriteRequest_LabelsEntry_DoNotUse_google_2ffirestore_2fv1_2ffirestore_2eproto.base,}};

static void InitDefaultsscc_info_WriteRequest_LabelsEntry_DoNotUse_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_WriteRequest_LabelsEntry_DoNotUse_default_instance_;
    new (ptr) ::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse();
  }
  ::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_WriteRequest_LabelsEntry_DoNotUse_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_WriteRequest_LabelsEntry_DoNotUse_google_2ffirestore_2fv1_2ffirestore_2eproto}, {}};

static void InitDefaultsscc_info_WriteResponse_google_2ffirestore_2fv1_2ffirestore_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_WriteResponse_default_instance_;
    new (ptr) ::google::firestore::v1::WriteResponse();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::WriteResponse::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_WriteResponse_google_2ffirestore_2fv1_2ffirestore_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_WriteResponse_google_2ffirestore_2fv1_2ffirestore_2eproto}, {
      &scc_info_WriteResult_google_2ffirestore_2fv1_2fwrite_2eproto.base,
      &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};

static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2ffirestore_2fv1_2ffirestore_2eproto[29];
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_google_2ffirestore_2fv1_2ffirestore_2eproto[1];
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2ffirestore_2fv1_2ffirestore_2eproto = nullptr;

const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2ffirestore_2fv1_2ffirestore_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::GetDocumentRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::GetDocumentRequest, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::GetDocumentRequest, name_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::GetDocumentRequest, mask_),
  offsetof(::google::firestore::v1::GetDocumentRequestDefaultTypeInternal, transaction_),
  offsetof(::google::firestore::v1::GetDocumentRequestDefaultTypeInternal, read_time_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::GetDocumentRequest, consistency_selector_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, parent_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, collection_id_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, page_size_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, page_token_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, order_by_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, mask_),
  offsetof(::google::firestore::v1::ListDocumentsRequestDefaultTypeInternal, transaction_),
  offsetof(::google::firestore::v1::ListDocumentsRequestDefaultTypeInternal, read_time_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, show_missing_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, consistency_selector_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListDocumentsResponse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListDocumentsResponse, documents_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListDocumentsResponse, next_page_token_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::CreateDocumentRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::CreateDocumentRequest, parent_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::CreateDocumentRequest, collection_id_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::CreateDocumentRequest, document_id_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::CreateDocumentRequest, document_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::CreateDocumentRequest, mask_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::UpdateDocumentRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::UpdateDocumentRequest, document_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::UpdateDocumentRequest, update_mask_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::UpdateDocumentRequest, mask_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::UpdateDocumentRequest, current_document_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::DeleteDocumentRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::DeleteDocumentRequest, name_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::DeleteDocumentRequest, current_document_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsRequest, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsRequest, database_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsRequest, documents_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsRequest, mask_),
  offsetof(::google::firestore::v1::BatchGetDocumentsRequestDefaultTypeInternal, transaction_),
  offsetof(::google::firestore::v1::BatchGetDocumentsRequestDefaultTypeInternal, new_transaction_),
  offsetof(::google::firestore::v1::BatchGetDocumentsRequestDefaultTypeInternal, read_time_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsRequest, consistency_selector_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsResponse, _internal_metadata_),
  ~0u,  // no _extensions_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsResponse, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  offsetof(::google::firestore::v1::BatchGetDocumentsResponseDefaultTypeInternal, found_),
  offsetof(::google::firestore::v1::BatchGetDocumentsResponseDefaultTypeInternal, missing_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsResponse, transaction_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsResponse, read_time_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsResponse, result_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BeginTransactionRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BeginTransactionRequest, database_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BeginTransactionRequest, options_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BeginTransactionResponse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::BeginTransactionResponse, transaction_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::CommitRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::CommitRequest, database_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::CommitRequest, writes_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::CommitRequest, transaction_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::CommitResponse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::CommitResponse, write_results_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::CommitResponse, commit_time_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RollbackRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RollbackRequest, database_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RollbackRequest, transaction_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunQueryRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunQueryRequest, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunQueryRequest, parent_),
  offsetof(::google::firestore::v1::RunQueryRequestDefaultTypeInternal, structured_query_),
  offsetof(::google::firestore::v1::RunQueryRequestDefaultTypeInternal, transaction_),
  offsetof(::google::firestore::v1::RunQueryRequestDefaultTypeInternal, new_transaction_),
  offsetof(::google::firestore::v1::RunQueryRequestDefaultTypeInternal, read_time_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunQueryRequest, query_type_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunQueryRequest, consistency_selector_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunQueryResponse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunQueryResponse, transaction_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunQueryResponse, document_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunQueryResponse, read_time_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunQueryResponse, skipped_results_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunAggregationQueryRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunAggregationQueryRequest, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunAggregationQueryRequest, parent_),
  offsetof(::google::firestore::v1::RunAggregationQueryRequestDefaultTypeInternal, structured_aggregation_query_),
  offsetof(::google::firestore::v1::RunAggregationQueryRequestDefaultTypeInternal, transaction_),
  offsetof(::google::firestore::v1::RunAggregationQueryRequestDefaultTypeInternal, new_transaction_),
  offsetof(::google::firestore::v1::RunAggregationQueryRequestDefaultTypeInternal, read_time_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunAggregationQueryRequest, query_type_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunAggregationQueryRequest, consistency_selector_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunAggregationQueryResponse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunAggregationQueryResponse, result_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunAggregationQueryResponse, transaction_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::RunAggregationQueryResponse, read_time_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse, key_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse, value_),
  0,
  1,
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteRequest, database_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteRequest, stream_id_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteRequest, writes_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteRequest, stream_token_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteRequest, labels_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteResponse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteResponse, stream_id_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteResponse, stream_token_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteResponse, write_results_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteResponse, commit_time_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse, key_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse, value_),
  0,
  1,
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListenRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListenRequest, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListenRequest, database_),
  offsetof(::google::firestore::v1::ListenRequestDefaultTypeInternal, add_target_),
  offsetof(::google::firestore::v1::ListenRequestDefaultTypeInternal, remove_target_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListenRequest, labels_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListenRequest, target_change_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListenResponse, _internal_metadata_),
  ~0u,  // no _extensions_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListenResponse, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  offsetof(::google::firestore::v1::ListenResponseDefaultTypeInternal, target_change_),
  offsetof(::google::firestore::v1::ListenResponseDefaultTypeInternal, document_change_),
  offsetof(::google::firestore::v1::ListenResponseDefaultTypeInternal, document_delete_),
  offsetof(::google::firestore::v1::ListenResponseDefaultTypeInternal, document_remove_),
  offsetof(::google::firestore::v1::ListenResponseDefaultTypeInternal, filter_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListenResponse, response_type_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Target_DocumentsTarget, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Target_DocumentsTarget, documents_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Target_QueryTarget, _internal_metadata_),
  ~0u,  // no _extensions_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Target_QueryTarget, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Target_QueryTarget, parent_),
  offsetof(::google::firestore::v1::Target_QueryTargetDefaultTypeInternal, structured_query_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Target_QueryTarget, query_type_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Target, _internal_metadata_),
  ~0u,  // no _extensions_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Target, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  offsetof(::google::firestore::v1::TargetDefaultTypeInternal, query_),
  offsetof(::google::firestore::v1::TargetDefaultTypeInternal, documents_),
  offsetof(::google::firestore::v1::TargetDefaultTypeInternal, resume_token_),
  offsetof(::google::firestore::v1::TargetDefaultTypeInternal, read_time_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Target, target_id_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Target, once_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Target, target_type_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Target, resume_type_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::TargetChange, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::TargetChange, target_change_type_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::TargetChange, target_ids_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::TargetChange, cause_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::TargetChange, resume_token_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::TargetChange, read_time_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListCollectionIdsRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListCollectionIdsRequest, parent_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListCollectionIdsRequest, page_size_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListCollectionIdsRequest, page_token_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListCollectionIdsResponse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListCollectionIdsResponse, collection_ids_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ListCollectionIdsResponse, next_page_token_),
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, sizeof(::google::firestore::v1::GetDocumentRequest)},
  { 10, -1, sizeof(::google::firestore::v1::ListDocumentsRequest)},
  { 25, -1, sizeof(::google::firestore::v1::ListDocumentsResponse)},
  { 32, -1, sizeof(::google::firestore::v1::CreateDocumentRequest)},
  { 42, -1, sizeof(::google::firestore::v1::UpdateDocumentRequest)},
  { 51, -1, sizeof(::google::firestore::v1::DeleteDocumentRequest)},
  { 58, -1, sizeof(::google::firestore::v1::BatchGetDocumentsRequest)},
  { 70, -1, sizeof(::google::firestore::v1::BatchGetDocumentsResponse)},
  { 80, -1, sizeof(::google::firestore::v1::BeginTransactionRequest)},
  { 87, -1, sizeof(::google::firestore::v1::BeginTransactionResponse)},
  { 93, -1, sizeof(::google::firestore::v1::CommitRequest)},
  { 101, -1, sizeof(::google::firestore::v1::CommitResponse)},
  { 108, -1, sizeof(::google::firestore::v1::RollbackRequest)},
  { 115, -1, sizeof(::google::firestore::v1::RunQueryRequest)},
  { 127, -1, sizeof(::google::firestore::v1::RunQueryResponse)},
  { 136, -1, sizeof(::google::firestore::v1::RunAggregationQueryRequest)},
  { 148, -1, sizeof(::google::firestore::v1::RunAggregationQueryResponse)},
  { 156, 163, sizeof(::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse)},
  { 165, -1, sizeof(::google::firestore::v1::WriteRequest)},
  { 175, -1, sizeof(::google::firestore::v1::WriteResponse)},
  { 184, 191, sizeof(::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse)},
  { 193, -1, sizeof(::google::firestore::v1::ListenRequest)},
  { 203, -1, sizeof(::google::firestore::v1::ListenResponse)},
  { 214, -1, sizeof(::google::firestore::v1::Target_DocumentsTarget)},
  { 220, -1, sizeof(::google::firestore::v1::Target_QueryTarget)},
  { 228, -1, sizeof(::google::firestore::v1::Target)},
  { 241, -1, sizeof(::google::firestore::v1::TargetChange)},
  { 251, -1, sizeof(::google::firestore::v1::ListCollectionIdsRequest)},
  { 259, -1, sizeof(::google::firestore::v1::ListCollectionIdsResponse)},
};

static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_GetDocumentRequest_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_ListDocumentsRequest_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_ListDocumentsResponse_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_CreateDocumentRequest_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_UpdateDocumentRequest_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_DeleteDocumentRequest_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_BatchGetDocumentsRequest_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_BatchGetDocumentsResponse_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_BeginTransactionRequest_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_BeginTransactionResponse_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_CommitRequest_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_CommitResponse_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_RollbackRequest_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_RunQueryRequest_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_RunQueryResponse_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_RunAggregationQueryRequest_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_RunAggregationQueryResponse_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_WriteRequest_LabelsEntry_DoNotUse_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_WriteRequest_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_WriteResponse_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_ListenRequest_LabelsEntry_DoNotUse_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_ListenRequest_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_ListenResponse_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_Target_DocumentsTarget_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_Target_QueryTarget_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_Target_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_TargetChange_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_ListCollectionIdsRequest_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_ListCollectionIdsResponse_default_instance_),
};

const char descriptor_table_protodef_google_2ffirestore_2fv1_2ffirestore_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n#google/firestore/v1/firestore.proto\022\023g"
  "oogle.firestore.v1\032\034google/api/annotatio"
  "ns.proto\032,google/firestore/v1/aggregatio"
  "n_result.proto\032 google/firestore/v1/comm"
  "on.proto\032\"google/firestore/v1/document.p"
  "roto\032\037google/firestore/v1/query.proto\032\037g"
  "oogle/firestore/v1/write.proto\032\033google/p"
  "rotobuf/empty.proto\032\037google/protobuf/tim"
  "estamp.proto\032\027google/rpc/status.proto\"\263\001"
  "\n\022GetDocumentRequest\022\014\n\004name\030\001 \001(\t\022/\n\004ma"
  "sk\030\002 \001(\0132!.google.firestore.v1.DocumentM"
  "ask\022\025\n\013transaction\030\003 \001(\014H\000\022/\n\tread_time\030"
  "\005 \001(\0132\032.google.protobuf.TimestampH\000B\026\n\024c"
  "onsistency_selector\"\235\002\n\024ListDocumentsReq"
  "uest\022\016\n\006parent\030\001 \001(\t\022\025\n\rcollection_id\030\002 "
  "\001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001"
  "(\t\022\020\n\010order_by\030\006 \001(\t\022/\n\004mask\030\007 \001(\0132!.goo"
  "gle.firestore.v1.DocumentMask\022\025\n\013transac"
  "tion\030\010 \001(\014H\000\022/\n\tread_time\030\n \001(\0132\032.google"
  ".protobuf.TimestampH\000\022\024\n\014show_missing\030\014 "
  "\001(\010B\026\n\024consistency_selector\"b\n\025ListDocum"
  "entsResponse\0220\n\tdocuments\030\001 \003(\0132\035.google"
  ".firestore.v1.Document\022\027\n\017next_page_toke"
  "n\030\002 \001(\t\"\265\001\n\025CreateDocumentRequest\022\016\n\006par"
  "ent\030\001 \001(\t\022\025\n\rcollection_id\030\002 \001(\t\022\023\n\013docu"
  "ment_id\030\003 \001(\t\022/\n\010document\030\004 \001(\0132\035.google"
  ".firestore.v1.Document\022/\n\004mask\030\005 \001(\0132!.g"
  "oogle.firestore.v1.DocumentMask\"\356\001\n\025Upda"
  "teDocumentRequest\022/\n\010document\030\001 \001(\0132\035.go"
  "ogle.firestore.v1.Document\0226\n\013update_mas"
  "k\030\002 \001(\0132!.google.firestore.v1.DocumentMa"
  "sk\022/\n\004mask\030\003 \001(\0132!.google.firestore.v1.D"
  "ocumentMask\022;\n\020current_document\030\004 \001(\0132!."
  "google.firestore.v1.Precondition\"b\n\025Dele"
  "teDocumentRequest\022\014\n\004name\030\001 \001(\t\022;\n\020curre"
  "nt_document\030\002 \001(\0132!.google.firestore.v1."
  "Precondition\"\224\002\n\030BatchGetDocumentsReques"
  "t\022\020\n\010database\030\001 \001(\t\022\021\n\tdocuments\030\002 \003(\t\022/"
  "\n\004mask\030\003 \001(\0132!.google.firestore.v1.Docum"
  "entMask\022\025\n\013transaction\030\004 \001(\014H\000\022B\n\017new_tr"
  "ansaction\030\005 \001(\0132\'.google.firestore.v1.Tr"
  "ansactionOptionsH\000\022/\n\tread_time\030\007 \001(\0132\032."
  "google.protobuf.TimestampH\000B\026\n\024consisten"
  "cy_selector\"\254\001\n\031BatchGetDocumentsRespons"
  "e\022.\n\005found\030\001 \001(\0132\035.google.firestore.v1.D"
  "ocumentH\000\022\021\n\007missing\030\002 \001(\tH\000\022\023\n\013transact"
  "ion\030\003 \001(\014\022-\n\tread_time\030\004 \001(\0132\032.google.pr"
  "otobuf.TimestampB\010\n\006result\"e\n\027BeginTrans"
  "actionRequest\022\020\n\010database\030\001 \001(\t\0228\n\007optio"
  "ns\030\002 \001(\0132\'.google.firestore.v1.Transacti"
  "onOptions\"/\n\030BeginTransactionResponse\022\023\n"
  "\013transaction\030\001 \001(\014\"b\n\rCommitRequest\022\020\n\010d"
  "atabase\030\001 \001(\t\022*\n\006writes\030\002 \003(\0132\032.google.f"
  "irestore.v1.Write\022\023\n\013transaction\030\003 \001(\014\"z"
  "\n\016CommitResponse\0227\n\rwrite_results\030\001 \003(\0132"
  " .google.firestore.v1.WriteResult\022/\n\013com"
  "mit_time\030\002 \001(\0132\032.google.protobuf.Timesta"
  "mp\"8\n\017RollbackRequest\022\020\n\010database\030\001 \001(\t\022"
  "\023\n\013transaction\030\002 \001(\014\"\225\002\n\017RunQueryRequest"
  "\022\016\n\006parent\030\001 \001(\t\022@\n\020structured_query\030\002 \001"
  "(\0132$.google.firestore.v1.StructuredQuery"
  "H\000\022\025\n\013transaction\030\005 \001(\014H\001\022B\n\017new_transac"
  "tion\030\006 \001(\0132\'.google.firestore.v1.Transac"
  "tionOptionsH\001\022/\n\tread_time\030\007 \001(\0132\032.googl"
  "e.protobuf.TimestampH\001B\014\n\nquery_typeB\026\n\024"
  "consistency_selector\"\240\001\n\020RunQueryRespons"
  "e\022\023\n\013transaction\030\002 \001(\014\022/\n\010document\030\001 \001(\013"
  "2\035.google.firestore.v1.Document\022-\n\tread_"
  "time\030\003 \001(\0132\032.google.protobuf.Timestamp\022\027"
  "\n\017skipped_results\030\004 \001(\005\"\267\002\n\032RunAggregati"
  "onQueryRequest\022\016\n\006parent\030\001 \001(\t\022W\n\034struct"
  "ured_aggregation_query\030\002 \001(\0132/.google.fi"
  "restore.v1.StructuredAggregationQueryH\000\022"
  "\025\n\013transaction\030\004 \001(\014H\001\022B\n\017new_transactio"
  "n\030\005 \001(\0132\'.google.firestore.v1.Transactio"
  "nOptionsH\001\022/\n\tread_time\030\006 \001(\0132\032.google.p"
  "rotobuf.TimestampH\001B\014\n\nquery_typeB\026\n\024con"
  "sistency_selector\"\231\001\n\033RunAggregationQuer"
  "yResponse\0226\n\006result\030\001 \001(\0132&.google.fires"
  "tore.v1.AggregationResult\022\023\n\013transaction"
  "\030\002 \001(\014\022-\n\tread_time\030\003 \001(\0132\032.google.proto"
  "buf.Timestamp\"\343\001\n\014WriteRequest\022\020\n\010databa"
  "se\030\001 \001(\t\022\021\n\tstream_id\030\002 \001(\t\022*\n\006writes\030\003 "
  "\003(\0132\032.google.firestore.v1.Write\022\024\n\014strea"
  "m_token\030\004 \001(\014\022=\n\006labels\030\005 \003(\0132-.google.f"
  "irestore.v1.WriteRequest.LabelsEntry\032-\n\013"
  "LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:"
  "\0028\001\"\242\001\n\rWriteResponse\022\021\n\tstream_id\030\001 \001(\t"
  "\022\024\n\014stream_token\030\002 \001(\014\0227\n\rwrite_results\030"
  "\003 \003(\0132 .google.firestore.v1.WriteResult\022"
  "/\n\013commit_time\030\004 \001(\0132\032.google.protobuf.T"
  "imestamp\"\355\001\n\rListenRequest\022\020\n\010database\030\001"
  " \001(\t\0221\n\nadd_target\030\002 \001(\0132\033.google.firest"
  "ore.v1.TargetH\000\022\027\n\rremove_target\030\003 \001(\005H\000"
  "\022>\n\006labels\030\004 \003(\0132..google.firestore.v1.L"
  "istenRequest.LabelsEntry\032-\n\013LabelsEntry\022"
  "\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\017\n\rtarge"
  "t_change\"\325\002\n\016ListenResponse\022:\n\rtarget_ch"
  "ange\030\002 \001(\0132!.google.firestore.v1.TargetC"
  "hangeH\000\022>\n\017document_change\030\003 \001(\0132#.googl"
  "e.firestore.v1.DocumentChangeH\000\022>\n\017docum"
  "ent_delete\030\004 \001(\0132#.google.firestore.v1.D"
  "ocumentDeleteH\000\022>\n\017document_remove\030\006 \001(\013"
  "2#.google.firestore.v1.DocumentRemoveH\000\022"
  "6\n\006filter\030\005 \001(\0132$.google.firestore.v1.Ex"
  "istenceFilterH\000B\017\n\rresponse_type\"\241\003\n\006Tar"
  "get\0228\n\005query\030\002 \001(\0132\'.google.firestore.v1"
  ".Target.QueryTargetH\000\022@\n\tdocuments\030\003 \001(\013"
  "2+.google.firestore.v1.Target.DocumentsT"
  "argetH\000\022\026\n\014resume_token\030\004 \001(\014H\001\022/\n\tread_"
  "time\030\013 \001(\0132\032.google.protobuf.TimestampH\001"
  "\022\021\n\ttarget_id\030\005 \001(\005\022\014\n\004once\030\006 \001(\010\032$\n\017Doc"
  "umentsTarget\022\021\n\tdocuments\030\002 \003(\t\032m\n\013Query"
  "Target\022\016\n\006parent\030\001 \001(\t\022@\n\020structured_que"
  "ry\030\002 \001(\0132$.google.firestore.v1.Structure"
  "dQueryH\000B\014\n\nquery_typeB\r\n\013target_typeB\r\n"
  "\013resume_type\"\252\002\n\014TargetChange\022N\n\022target_"
  "change_type\030\001 \001(\01622.google.firestore.v1."
  "TargetChange.TargetChangeType\022\022\n\ntarget_"
  "ids\030\002 \003(\005\022!\n\005cause\030\003 \001(\0132\022.google.rpc.St"
  "atus\022\024\n\014resume_token\030\004 \001(\014\022-\n\tread_time\030"
  "\006 \001(\0132\032.google.protobuf.Timestamp\"N\n\020Tar"
  "getChangeType\022\r\n\tNO_CHANGE\020\000\022\007\n\003ADD\020\001\022\n\n"
  "\006REMOVE\020\002\022\013\n\007CURRENT\020\003\022\t\n\005RESET\020\004\"Q\n\030Lis"
  "tCollectionIdsRequest\022\016\n\006parent\030\001 \001(\t\022\021\n"
  "\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"L\n\031"
  "ListCollectionIdsResponse\022\026\n\016collection_"
  "ids\030\001 \003(\t\022\027\n\017next_page_token\030\002 \001(\t2\236\024\n\tF"
  "irestore\022\217\001\n\013GetDocument\022\'.google.firest"
  "ore.v1.GetDocumentRequest\032\035.google.fires"
  "tore.v1.Document\"8\202\323\344\223\0022\0220/v1/{name=proj"
  "ects/*/databases/*/documents/*/**}\022\262\001\n\rL"
  "istDocuments\022).google.firestore.v1.ListD"
  "ocumentsRequest\032*.google.firestore.v1.Li"
  "stDocumentsResponse\"J\202\323\344\223\002D\022B/v1/{parent"
  "=projects/*/databases/*/documents/*/**}/"
  "{collection_id}\022\257\001\n\016CreateDocument\022*.goo"
  "gle.firestore.v1.CreateDocumentRequest\032\035"
  ".google.firestore.v1.Document\"R\202\323\344\223\002L\"@/"
  "v1/{parent=projects/*/databases/*/docume"
  "nts/**}/{collection_id}:\010document\022\250\001\n\016Up"
  "dateDocument\022*.google.firestore.v1.Updat"
  "eDocumentRequest\032\035.google.firestore.v1.D"
  "ocument\"K\202\323\344\223\002E29/v1/{document.name=proj"
  "ects/*/databases/*/documents/*/**}:\010docu"
  "ment\022\216\001\n\016DeleteDocument\022*.google.firesto"
  "re.v1.DeleteDocumentRequest\032\026.google.pro"
  "tobuf.Empty\"8\202\323\344\223\0022*0/v1/{name=projects/"
  "*/databases/*/documents/*/**}\022\271\001\n\021BatchG"
  "etDocuments\022-.google.firestore.v1.BatchG"
  "etDocumentsRequest\032..google.firestore.v1"
  ".BatchGetDocumentsResponse\"C\202\323\344\223\002=\"8/v1/"
  "{database=projects/*/databases/*}/docume"
  "nts:batchGet:\001*0\001\022\274\001\n\020BeginTransaction\022,"
  ".google.firestore.v1.BeginTransactionReq"
  "uest\032-.google.firestore.v1.BeginTransact"
  "ionResponse\"K\202\323\344\223\002E\"@/v1/{database=proje"
  "cts/*/databases/*}/documents:beginTransa"
  "ction:\001*\022\224\001\n\006Commit\022\".google.firestore.v"
  "1.CommitRequest\032#.google.firestore.v1.Co"
  "mmitResponse\"A\202\323\344\223\002;\"6/v1/{database=proj"
  "ects/*/databases/*}/documents:commit:\001*\022"
  "\215\001\n\010Rollback\022$.google.firestore.v1.Rollb"
  "ackRequest\032\026.google.protobuf.Empty\"C\202\323\344\223"
  "\002=\"8/v1/{database=projects/*/databases/*"
  "}/documents:rollback:\001*\022\337\001\n\010RunQuery\022$.g"
  "oogle.firestore.v1.RunQueryRequest\032%.goo"
  "gle.firestore.v1.RunQueryResponse\"\203\001\202\323\344\223"
  "\002}\"6/v1/{parent=projects/*/databases/*/d"
  "ocuments}:runQuery:\001*Z@\";/v1/{parent=pro"
  "jects/*/databases/*/documents/*/**}:runQ"
  "uery:\001*0\001\022\227\002\n\023RunAggregationQuery\022/.goog"
  "le.firestore.v1.RunAggregationQueryReque"
  "st\0320.google.firestore.v1.RunAggregationQ"
  "ueryResponse\"\232\001\202\323\344\223\002\223\001\"A/v1/{parent=proj"
  "ects/*/databases/*/documents}:runAggrega"
  "tionQuery:\001*ZK\"F/v1/{parent=projects/*/d"
  "atabases/*/documents/*/**}:runAggregatio"
  "nQuery:\001*0\001\022\224\001\n\005Write\022!.google.firestore"
  ".v1.WriteRequest\032\".google.firestore.v1.W"
  "riteResponse\"@\202\323\344\223\002:\"5/v1/{database=proj"
  "ects/*/databases/*}/documents:write:\001*(\001"
  "0\001\022\230\001\n\006Listen\022\".google.firestore.v1.List"
  "enRequest\032#.google.firestore.v1.ListenRe"
  "sponse\"A\202\323\344\223\002;\"6/v1/{database=projects/*"
  "/databases/*}/documents:listen:\001*(\0010\001\022\213\002"
  "\n\021ListCollectionIds\022-.google.firestore.v"
  "1.ListCollectionIdsRequest\032..google.fire"
  "store.v1.ListCollectionIdsResponse\"\226\001\202\323\344"
  "\223\002\217\001\"\?/v1/{parent=projects/*/databases/*"
  "/documents}:listCollectionIds:\001*ZI\"D/v1/"
  "{parent=projects/*/databases/*/documents"
  "/*/**}:listCollectionIds:\001*B\262\001\n\027com.goog"
  "le.firestore.v1B\016FirestoreProtoP\001Z<googl"
  "e.golang.org/genproto/googleapis/firesto"
  "re/v1;firestore\242\002\004GCFS\252\002\036Google.Cloud.Fi"
  "restore.V1Beta1\312\002\036Google\\Cloud\\Firestore"
  "\\V1beta1b\006proto3"
  ;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_google_2ffirestore_2fv1_2ffirestore_2eproto_deps[9] = {
  &::descriptor_table_google_2fapi_2fannotations_2eproto,
  &::descriptor_table_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto,
  &::descriptor_table_google_2ffirestore_2fv1_2fcommon_2eproto,
  &::descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto,
  &::descriptor_table_google_2ffirestore_2fv1_2fquery_2eproto,
  &::descriptor_table_google_2ffirestore_2fv1_2fwrite_2eproto,
  &::descriptor_table_google_2fprotobuf_2fempty_2eproto,
  &::descriptor_table_google_2fprotobuf_2ftimestamp_2eproto,
  &::descriptor_table_google_2frpc_2fstatus_2eproto,
};
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_google_2ffirestore_2fv1_2ffirestore_2eproto_sccs[29] = {
  &scc_info_BatchGetDocumentsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_BatchGetDocumentsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_BeginTransactionRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_BeginTransactionResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_CommitRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_CommitResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_CreateDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_DeleteDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_GetDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_ListCollectionIdsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_ListCollectionIdsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_ListDocumentsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_ListDocumentsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_ListenRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_ListenRequest_LabelsEntry_DoNotUse_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_ListenResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_RollbackRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_RunAggregationQueryRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_RunAggregationQueryResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_RunQueryRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_RunQueryResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_Target_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_Target_DocumentsTarget_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_Target_QueryTarget_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_TargetChange_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_UpdateDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_WriteRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_WriteRequest_LabelsEntry_DoNotUse_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  &scc_info_WriteResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2ffirestore_2fv1_2ffirestore_2eproto_once;
static bool descriptor_table_google_2ffirestore_2fv1_2ffirestore_2eproto_initialized = false;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2ffirestore_2fv1_2ffirestore_2eproto = {
  &descriptor_table_google_2ffirestore_2fv1_2ffirestore_2eproto_initialized, descriptor_table_protodef_google_2ffirestore_2fv1_2ffirestore_2eproto, "google/firestore/v1/firestore.proto", 7896,
  &descriptor_table_google_2ffirestore_2fv1_2ffirestore_2eproto_once, descriptor_table_google_2ffirestore_2fv1_2ffirestore_2eproto_sccs, descriptor_table_google_2ffirestore_2fv1_2ffirestore_2eproto_deps, 29, 9,
  schemas, file_default_instances, TableStruct_google_2ffirestore_2fv1_2ffirestore_2eproto::offsets,
  file_level_metadata_google_2ffirestore_2fv1_2ffirestore_2eproto, 29, file_level_enum_descriptors_google_2ffirestore_2fv1_2ffirestore_2eproto, file_level_service_descriptors_google_2ffirestore_2fv1_2ffirestore_2eproto,
};

// Force running AddDescriptors() at dynamic initialization time.
static bool dynamic_init_dummy_google_2ffirestore_2fv1_2ffirestore_2eproto = (  ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2ffirestore_2fv1_2ffirestore_2eproto), true);
namespace google {
namespace firestore {
namespace v1 {
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* TargetChange_TargetChangeType_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2ffirestore_2fv1_2ffirestore_2eproto);
  return file_level_enum_descriptors_google_2ffirestore_2fv1_2ffirestore_2eproto[0];
}
bool TargetChange_TargetChangeType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
constexpr TargetChange_TargetChangeType TargetChange::NO_CHANGE;
constexpr TargetChange_TargetChangeType TargetChange::ADD;
constexpr TargetChange_TargetChangeType TargetChange::REMOVE;
constexpr TargetChange_TargetChangeType TargetChange::CURRENT;
constexpr TargetChange_TargetChangeType TargetChange::RESET;
constexpr TargetChange_TargetChangeType TargetChange::TargetChangeType_MIN;
constexpr TargetChange_TargetChangeType TargetChange::TargetChangeType_MAX;
constexpr int TargetChange::TargetChangeType_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)

// ===================================================================

void GetDocumentRequest::InitAsDefaultInstance() {
  ::google::firestore::v1::_GetDocumentRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1::DocumentMask*>(
      ::google::firestore::v1::DocumentMask::internal_default_instance());
  ::google::firestore::v1::_GetDocumentRequest_default_instance_.transaction_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  ::google::firestore::v1::_GetDocumentRequest_default_instance_.read_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
      PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
}
class GetDocumentRequest::_Internal {
 public:
  static const ::google::firestore::v1::DocumentMask& mask(const GetDocumentRequest* msg);
  static const PROTOBUF_NAMESPACE_ID::Timestamp& read_time(const GetDocumentRequest* msg);
};

const ::google::firestore::v1::DocumentMask&
GetDocumentRequest::_Internal::mask(const GetDocumentRequest* msg) {
  return *msg->mask_;
}
const PROTOBUF_NAMESPACE_ID::Timestamp&
GetDocumentRequest::_Internal::read_time(const GetDocumentRequest* msg) {
  return *msg->consistency_selector_.read_time_;
}
void GetDocumentRequest::clear_mask() {
  if (GetArenaNoVirtual() == nullptr && mask_ != nullptr) {
    delete mask_;
  }
  mask_ = nullptr;
}
void GetDocumentRequest::set_allocated_read_time(PROTOBUF_NAMESPACE_ID::Timestamp* read_time) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_consistency_selector();
  if (read_time) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(read_time)->GetArena();
    if (message_arena != submessage_arena) {
      read_time = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, read_time, submessage_arena);
    }
    set_has_read_time();
    consistency_selector_.read_time_ = read_time;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.GetDocumentRequest.read_time)
}
void GetDocumentRequest::clear_read_time() {
  if (_internal_has_read_time()) {
    delete consistency_selector_.read_time_;
    clear_has_consistency_selector();
  }
}
GetDocumentRequest::GetDocumentRequest()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.GetDocumentRequest)
}
GetDocumentRequest::GetDocumentRequest(const GetDocumentRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_name().empty()) {
    name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
  }
  if (from._internal_has_mask()) {
    mask_ = new ::google::firestore::v1::DocumentMask(*from.mask_);
  } else {
    mask_ = nullptr;
  }
  clear_has_consistency_selector();
  switch (from.consistency_selector_case()) {
    case kTransaction: {
      _internal_set_transaction(from._internal_transaction());
      break;
    }
    case kReadTime: {
      _internal_mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_read_time());
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.GetDocumentRequest)
}

void GetDocumentRequest::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_GetDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  mask_ = nullptr;
  clear_has_consistency_selector();
}

GetDocumentRequest::~GetDocumentRequest() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.GetDocumentRequest)
  SharedDtor();
}

void GetDocumentRequest::SharedDtor() {
  name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete mask_;
  if (has_consistency_selector()) {
    clear_consistency_selector();
  }
}

void GetDocumentRequest::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const GetDocumentRequest& GetDocumentRequest::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_GetDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  return *internal_default_instance();
}


void GetDocumentRequest::clear_consistency_selector() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.GetDocumentRequest)
  switch (consistency_selector_case()) {
    case kTransaction: {
      consistency_selector_.transaction_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
      break;
    }
    case kReadTime: {
      delete consistency_selector_.read_time_;
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = CONSISTENCY_SELECTOR_NOT_SET;
}


void GetDocumentRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.GetDocumentRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == nullptr && mask_ != nullptr) {
    delete mask_;
  }
  mask_ = nullptr;
  clear_consistency_selector();
  _internal_metadata_.Clear();
}

const char* GetDocumentRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // string name = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          auto str = _internal_mutable_name();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.GetDocumentRequest.name"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.DocumentMask mask = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_mask(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // bytes transaction = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
          auto str = _internal_mutable_transaction();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.protobuf.Timestamp read_time = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_read_time(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* GetDocumentRequest::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.GetDocumentRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string name = 1;
  if (this->name().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.GetDocumentRequest.name");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_name(), target);
  }

  // .google.firestore.v1.DocumentMask mask = 2;
  if (this->has_mask()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        2, _Internal::mask(this), target, stream);
  }

  // bytes transaction = 3;
  if (_internal_has_transaction()) {
    target = stream->WriteBytesMaybeAliased(
        3, this->_internal_transaction(), target);
  }

  // .google.protobuf.Timestamp read_time = 5;
  if (_internal_has_read_time()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        5, _Internal::read_time(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.GetDocumentRequest)
  return target;
}

size_t GetDocumentRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.GetDocumentRequest)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // string name = 1;
  if (this->name().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_name());
  }

  // .google.firestore.v1.DocumentMask mask = 2;
  if (this->has_mask()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *mask_);
  }

  switch (consistency_selector_case()) {
    // bytes transaction = 3;
    case kTransaction: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
          this->_internal_transaction());
      break;
    }
    // .google.protobuf.Timestamp read_time = 5;
    case kReadTime: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *consistency_selector_.read_time_);
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void GetDocumentRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.GetDocumentRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const GetDocumentRequest* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<GetDocumentRequest>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.GetDocumentRequest)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.GetDocumentRequest)
    MergeFrom(*source);
  }
}

void GetDocumentRequest::MergeFrom(const GetDocumentRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.GetDocumentRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.name().size() > 0) {

    name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
  }
  if (from.has_mask()) {
    _internal_mutable_mask()->::google::firestore::v1::DocumentMask::MergeFrom(from._internal_mask());
  }
  switch (from.consistency_selector_case()) {
    case kTransaction: {
      _internal_set_transaction(from._internal_transaction());
      break;
    }
    case kReadTime: {
      _internal_mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_read_time());
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
}

void GetDocumentRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.GetDocumentRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void GetDocumentRequest::CopyFrom(const GetDocumentRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.GetDocumentRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GetDocumentRequest::IsInitialized() const {
  return true;
}

void GetDocumentRequest::InternalSwap(GetDocumentRequest* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(mask_, other->mask_);
  swap(consistency_selector_, other->consistency_selector_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
}

::PROTOBUF_NAMESPACE_ID::Metadata GetDocumentRequest::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void ListDocumentsRequest::InitAsDefaultInstance() {
  ::google::firestore::v1::_ListDocumentsRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1::DocumentMask*>(
      ::google::firestore::v1::DocumentMask::internal_default_instance());
  ::google::firestore::v1::_ListDocumentsRequest_default_instance_.transaction_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  ::google::firestore::v1::_ListDocumentsRequest_default_instance_.read_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
      PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
}
class ListDocumentsRequest::_Internal {
 public:
  static const ::google::firestore::v1::DocumentMask& mask(const ListDocumentsRequest* msg);
  static const PROTOBUF_NAMESPACE_ID::Timestamp& read_time(const ListDocumentsRequest* msg);
};

const ::google::firestore::v1::DocumentMask&
ListDocumentsRequest::_Internal::mask(const ListDocumentsRequest* msg) {
  return *msg->mask_;
}
const PROTOBUF_NAMESPACE_ID::Timestamp&
ListDocumentsRequest::_Internal::read_time(const ListDocumentsRequest* msg) {
  return *msg->consistency_selector_.read_time_;
}
void ListDocumentsRequest::clear_mask() {
  if (GetArenaNoVirtual() == nullptr && mask_ != nullptr) {
    delete mask_;
  }
  mask_ = nullptr;
}
void ListDocumentsRequest::set_allocated_read_time(PROTOBUF_NAMESPACE_ID::Timestamp* read_time) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_consistency_selector();
  if (read_time) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(read_time)->GetArena();
    if (message_arena != submessage_arena) {
      read_time = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, read_time, submessage_arena);
    }
    set_has_read_time();
    consistency_selector_.read_time_ = read_time;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListDocumentsRequest.read_time)
}
void ListDocumentsRequest::clear_read_time() {
  if (_internal_has_read_time()) {
    delete consistency_selector_.read_time_;
    clear_has_consistency_selector();
  }
}
ListDocumentsRequest::ListDocumentsRequest()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.ListDocumentsRequest)
}
ListDocumentsRequest::ListDocumentsRequest(const ListDocumentsRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  parent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_parent().empty()) {
    parent_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parent_);
  }
  collection_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_collection_id().empty()) {
    collection_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.collection_id_);
  }
  page_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_page_token().empty()) {
    page_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.page_token_);
  }
  order_by_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_order_by().empty()) {
    order_by_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.order_by_);
  }
  if (from._internal_has_mask()) {
    mask_ = new ::google::firestore::v1::DocumentMask(*from.mask_);
  } else {
    mask_ = nullptr;
  }
  ::memcpy(&page_size_, &from.page_size_,
    static_cast<size_t>(reinterpret_cast<char*>(&show_missing_) -
    reinterpret_cast<char*>(&page_size_)) + sizeof(show_missing_));
  clear_has_consistency_selector();
  switch (from.consistency_selector_case()) {
    case kTransaction: {
      _internal_set_transaction(from._internal_transaction());
      break;
    }
    case kReadTime: {
      _internal_mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_read_time());
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ListDocumentsRequest)
}

void ListDocumentsRequest::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ListDocumentsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  parent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  collection_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  page_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  order_by_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  ::memset(&mask_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&show_missing_) -
      reinterpret_cast<char*>(&mask_)) + sizeof(show_missing_));
  clear_has_consistency_selector();
}

ListDocumentsRequest::~ListDocumentsRequest() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.ListDocumentsRequest)
  SharedDtor();
}

void ListDocumentsRequest::SharedDtor() {
  parent_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  collection_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  page_token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  order_by_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete mask_;
  if (has_consistency_selector()) {
    clear_consistency_selector();
  }
}

void ListDocumentsRequest::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ListDocumentsRequest& ListDocumentsRequest::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ListDocumentsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  return *internal_default_instance();
}


void ListDocumentsRequest::clear_consistency_selector() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.ListDocumentsRequest)
  switch (consistency_selector_case()) {
    case kTransaction: {
      consistency_selector_.transaction_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
      break;
    }
    case kReadTime: {
      delete consistency_selector_.read_time_;
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = CONSISTENCY_SELECTOR_NOT_SET;
}


void ListDocumentsRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.ListDocumentsRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  parent_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  collection_id_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  page_token_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  order_by_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == nullptr && mask_ != nullptr) {
    delete mask_;
  }
  mask_ = nullptr;
  ::memset(&page_size_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&show_missing_) -
      reinterpret_cast<char*>(&page_size_)) + sizeof(show_missing_));
  clear_consistency_selector();
  _internal_metadata_.Clear();
}

const char* ListDocumentsRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // string parent = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          auto str = _internal_mutable_parent();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.ListDocumentsRequest.parent"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // string collection_id = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          auto str = _internal_mutable_collection_id();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.ListDocumentsRequest.collection_id"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // int32 page_size = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
          page_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // string page_token = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
          auto str = _internal_mutable_page_token();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.ListDocumentsRequest.page_token"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // string order_by = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
          auto str = _internal_mutable_order_by();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.ListDocumentsRequest.order_by"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.DocumentMask mask = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
          ptr = ctx->ParseMessage(_internal_mutable_mask(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // bytes transaction = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) {
          auto str = _internal_mutable_transaction();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.protobuf.Timestamp read_time = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 82)) {
          ptr = ctx->ParseMessage(_internal_mutable_read_time(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // bool show_missing = 12;
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 96)) {
          show_missing_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* ListDocumentsRequest::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ListDocumentsRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string parent = 1;
  if (this->parent().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_parent().data(), static_cast<int>(this->_internal_parent().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.ListDocumentsRequest.parent");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_parent(), target);
  }

  // string collection_id = 2;
  if (this->collection_id().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_collection_id().data(), static_cast<int>(this->_internal_collection_id().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.ListDocumentsRequest.collection_id");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_collection_id(), target);
  }

  // int32 page_size = 3;
  if (this->page_size() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_page_size(), target);
  }

  // string page_token = 4;
  if (this->page_token().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_page_token().data(), static_cast<int>(this->_internal_page_token().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.ListDocumentsRequest.page_token");
    target = stream->WriteStringMaybeAliased(
        4, this->_internal_page_token(), target);
  }

  // string order_by = 6;
  if (this->order_by().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_order_by().data(), static_cast<int>(this->_internal_order_by().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.ListDocumentsRequest.order_by");
    target = stream->WriteStringMaybeAliased(
        6, this->_internal_order_by(), target);
  }

  // .google.firestore.v1.DocumentMask mask = 7;
  if (this->has_mask()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        7, _Internal::mask(this), target, stream);
  }

  // bytes transaction = 8;
  if (_internal_has_transaction()) {
    target = stream->WriteBytesMaybeAliased(
        8, this->_internal_transaction(), target);
  }

  // .google.protobuf.Timestamp read_time = 10;
  if (_internal_has_read_time()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        10, _Internal::read_time(this), target, stream);
  }

  // bool show_missing = 12;
  if (this->show_missing() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(12, this->_internal_show_missing(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ListDocumentsRequest)
  return target;
}

size_t ListDocumentsRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ListDocumentsRequest)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // string parent = 1;
  if (this->parent().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_parent());
  }

  // string collection_id = 2;
  if (this->collection_id().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_collection_id());
  }

  // string page_token = 4;
  if (this->page_token().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_page_token());
  }

  // string order_by = 6;
  if (this->order_by().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_order_by());
  }

  // .google.firestore.v1.DocumentMask mask = 7;
  if (this->has_mask()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *mask_);
  }

  // int32 page_size = 3;
  if (this->page_size() != 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
        this->_internal_page_size());
  }

  // bool show_missing = 12;
  if (this->show_missing() != 0) {
    total_size += 1 + 1;
  }

  switch (consistency_selector_case()) {
    // bytes transaction = 8;
    case kTransaction: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
          this->_internal_transaction());
      break;
    }
    // .google.protobuf.Timestamp read_time = 10;
    case kReadTime: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *consistency_selector_.read_time_);
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void ListDocumentsRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ListDocumentsRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const ListDocumentsRequest* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ListDocumentsRequest>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ListDocumentsRequest)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ListDocumentsRequest)
    MergeFrom(*source);
  }
}

void ListDocumentsRequest::MergeFrom(const ListDocumentsRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ListDocumentsRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.parent().size() > 0) {

    parent_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parent_);
  }
  if (from.collection_id().size() > 0) {

    collection_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.collection_id_);
  }
  if (from.page_token().size() > 0) {

    page_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.page_token_);
  }
  if (from.order_by().size() > 0) {

    order_by_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.order_by_);
  }
  if (from.has_mask()) {
    _internal_mutable_mask()->::google::firestore::v1::DocumentMask::MergeFrom(from._internal_mask());
  }
  if (from.page_size() != 0) {
    _internal_set_page_size(from._internal_page_size());
  }
  if (from.show_missing() != 0) {
    _internal_set_show_missing(from._internal_show_missing());
  }
  switch (from.consistency_selector_case()) {
    case kTransaction: {
      _internal_set_transaction(from._internal_transaction());
      break;
    }
    case kReadTime: {
      _internal_mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_read_time());
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
}

void ListDocumentsRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ListDocumentsRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ListDocumentsRequest::CopyFrom(const ListDocumentsRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ListDocumentsRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ListDocumentsRequest::IsInitialized() const {
  return true;
}

void ListDocumentsRequest::InternalSwap(ListDocumentsRequest* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  parent_.Swap(&other->parent_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  collection_id_.Swap(&other->collection_id_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  page_token_.Swap(&other->page_token_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  order_by_.Swap(&other->order_by_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(mask_, other->mask_);
  swap(page_size_, other->page_size_);
  swap(show_missing_, other->show_missing_);
  swap(consistency_selector_, other->consistency_selector_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
}

::PROTOBUF_NAMESPACE_ID::Metadata ListDocumentsRequest::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void ListDocumentsResponse::InitAsDefaultInstance() {
}
class ListDocumentsResponse::_Internal {
 public:
};

void ListDocumentsResponse::clear_documents() {
  documents_.Clear();
}
ListDocumentsResponse::ListDocumentsResponse()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.ListDocumentsResponse)
}
ListDocumentsResponse::ListDocumentsResponse(const ListDocumentsResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr),
      documents_(from.documents_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  next_page_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_next_page_token().empty()) {
    next_page_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.next_page_token_);
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ListDocumentsResponse)
}

void ListDocumentsResponse::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ListDocumentsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  next_page_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

ListDocumentsResponse::~ListDocumentsResponse() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.ListDocumentsResponse)
  SharedDtor();
}

void ListDocumentsResponse::SharedDtor() {
  next_page_token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void ListDocumentsResponse::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ListDocumentsResponse& ListDocumentsResponse::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ListDocumentsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  return *internal_default_instance();
}


void ListDocumentsResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.ListDocumentsResponse)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  documents_.Clear();
  next_page_token_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  _internal_metadata_.Clear();
}

const char* ListDocumentsResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // repeated .google.firestore.v1.Document documents = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_documents(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
        } else goto handle_unusual;
        continue;
      // string next_page_token = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          auto str = _internal_mutable_next_page_token();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.ListDocumentsResponse.next_page_token"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* ListDocumentsResponse::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ListDocumentsResponse)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .google.firestore.v1.Document documents = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_documents_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, this->_internal_documents(i), target, stream);
  }

  // string next_page_token = 2;
  if (this->next_page_token().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_next_page_token().data(), static_cast<int>(this->_internal_next_page_token().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.ListDocumentsResponse.next_page_token");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_next_page_token(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ListDocumentsResponse)
  return target;
}

size_t ListDocumentsResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ListDocumentsResponse)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .google.firestore.v1.Document documents = 1;
  total_size += 1UL * this->_internal_documents_size();
  for (const auto& msg : this->documents_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // string next_page_token = 2;
  if (this->next_page_token().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_next_page_token());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void ListDocumentsResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ListDocumentsResponse)
  GOOGLE_DCHECK_NE(&from, this);
  const ListDocumentsResponse* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ListDocumentsResponse>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ListDocumentsResponse)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ListDocumentsResponse)
    MergeFrom(*source);
  }
}

void ListDocumentsResponse::MergeFrom(const ListDocumentsResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ListDocumentsResponse)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  documents_.MergeFrom(from.documents_);
  if (from.next_page_token().size() > 0) {

    next_page_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.next_page_token_);
  }
}

void ListDocumentsResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ListDocumentsResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ListDocumentsResponse::CopyFrom(const ListDocumentsResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ListDocumentsResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ListDocumentsResponse::IsInitialized() const {
  return true;
}

void ListDocumentsResponse::InternalSwap(ListDocumentsResponse* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  documents_.InternalSwap(&other->documents_);
  next_page_token_.Swap(&other->next_page_token_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
}

::PROTOBUF_NAMESPACE_ID::Metadata ListDocumentsResponse::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void CreateDocumentRequest::InitAsDefaultInstance() {
  ::google::firestore::v1::_CreateDocumentRequest_default_instance_._instance.get_mutable()->document_ = const_cast< ::google::firestore::v1::Document*>(
      ::google::firestore::v1::Document::internal_default_instance());
  ::google::firestore::v1::_CreateDocumentRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1::DocumentMask*>(
      ::google::firestore::v1::DocumentMask::internal_default_instance());
}
class CreateDocumentRequest::_Internal {
 public:
  static const ::google::firestore::v1::Document& document(const CreateDocumentRequest* msg);
  static const ::google::firestore::v1::DocumentMask& mask(const CreateDocumentRequest* msg);
};

const ::google::firestore::v1::Document&
CreateDocumentRequest::_Internal::document(const CreateDocumentRequest* msg) {
  return *msg->document_;
}
const ::google::firestore::v1::DocumentMask&
CreateDocumentRequest::_Internal::mask(const CreateDocumentRequest* msg) {
  return *msg->mask_;
}
void CreateDocumentRequest::clear_document() {
  if (GetArenaNoVirtual() == nullptr && document_ != nullptr) {
    delete document_;
  }
  document_ = nullptr;
}
void CreateDocumentRequest::clear_mask() {
  if (GetArenaNoVirtual() == nullptr && mask_ != nullptr) {
    delete mask_;
  }
  mask_ = nullptr;
}
CreateDocumentRequest::CreateDocumentRequest()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.CreateDocumentRequest)
}
CreateDocumentRequest::CreateDocumentRequest(const CreateDocumentRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  parent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_parent().empty()) {
    parent_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parent_);
  }
  collection_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_collection_id().empty()) {
    collection_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.collection_id_);
  }
  document_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_document_id().empty()) {
    document_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.document_id_);
  }
  if (from._internal_has_document()) {
    document_ = new ::google::firestore::v1::Document(*from.document_);
  } else {
    document_ = nullptr;
  }
  if (from._internal_has_mask()) {
    mask_ = new ::google::firestore::v1::DocumentMask(*from.mask_);
  } else {
    mask_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.CreateDocumentRequest)
}

void CreateDocumentRequest::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_CreateDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  parent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  collection_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  document_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  ::memset(&document_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&mask_) -
      reinterpret_cast<char*>(&document_)) + sizeof(mask_));
}

CreateDocumentRequest::~CreateDocumentRequest() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.CreateDocumentRequest)
  SharedDtor();
}

void CreateDocumentRequest::SharedDtor() {
  parent_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  collection_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  document_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete document_;
  if (this != internal_default_instance()) delete mask_;
}

void CreateDocumentRequest::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const CreateDocumentRequest& CreateDocumentRequest::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_CreateDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  return *internal_default_instance();
}


void CreateDocumentRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.CreateDocumentRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  parent_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  collection_id_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  document_id_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == nullptr && document_ != nullptr) {
    delete document_;
  }
  document_ = nullptr;
  if (GetArenaNoVirtual() == nullptr && mask_ != nullptr) {
    delete mask_;
  }
  mask_ = nullptr;
  _internal_metadata_.Clear();
}

const char* CreateDocumentRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // string parent = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          auto str = _internal_mutable_parent();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.CreateDocumentRequest.parent"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // string collection_id = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          auto str = _internal_mutable_collection_id();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.CreateDocumentRequest.collection_id"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // string document_id = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
          auto str = _internal_mutable_document_id();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.CreateDocumentRequest.document_id"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.Document document = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_document(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.DocumentMask mask = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_mask(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* CreateDocumentRequest::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.CreateDocumentRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string parent = 1;
  if (this->parent().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_parent().data(), static_cast<int>(this->_internal_parent().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.CreateDocumentRequest.parent");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_parent(), target);
  }

  // string collection_id = 2;
  if (this->collection_id().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_collection_id().data(), static_cast<int>(this->_internal_collection_id().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.CreateDocumentRequest.collection_id");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_collection_id(), target);
  }

  // string document_id = 3;
  if (this->document_id().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_document_id().data(), static_cast<int>(this->_internal_document_id().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.CreateDocumentRequest.document_id");
    target = stream->WriteStringMaybeAliased(
        3, this->_internal_document_id(), target);
  }

  // .google.firestore.v1.Document document = 4;
  if (this->has_document()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        4, _Internal::document(this), target, stream);
  }

  // .google.firestore.v1.DocumentMask mask = 5;
  if (this->has_mask()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        5, _Internal::mask(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.CreateDocumentRequest)
  return target;
}

size_t CreateDocumentRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.CreateDocumentRequest)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // string parent = 1;
  if (this->parent().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_parent());
  }

  // string collection_id = 2;
  if (this->collection_id().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_collection_id());
  }

  // string document_id = 3;
  if (this->document_id().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_document_id());
  }

  // .google.firestore.v1.Document document = 4;
  if (this->has_document()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *document_);
  }

  // .google.firestore.v1.DocumentMask mask = 5;
  if (this->has_mask()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *mask_);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void CreateDocumentRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.CreateDocumentRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const CreateDocumentRequest* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<CreateDocumentRequest>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.CreateDocumentRequest)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.CreateDocumentRequest)
    MergeFrom(*source);
  }
}

void CreateDocumentRequest::MergeFrom(const CreateDocumentRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.CreateDocumentRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.parent().size() > 0) {

    parent_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parent_);
  }
  if (from.collection_id().size() > 0) {

    collection_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.collection_id_);
  }
  if (from.document_id().size() > 0) {

    document_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.document_id_);
  }
  if (from.has_document()) {
    _internal_mutable_document()->::google::firestore::v1::Document::MergeFrom(from._internal_document());
  }
  if (from.has_mask()) {
    _internal_mutable_mask()->::google::firestore::v1::DocumentMask::MergeFrom(from._internal_mask());
  }
}

void CreateDocumentRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.CreateDocumentRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void CreateDocumentRequest::CopyFrom(const CreateDocumentRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.CreateDocumentRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool CreateDocumentRequest::IsInitialized() const {
  return true;
}

void CreateDocumentRequest::InternalSwap(CreateDocumentRequest* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  parent_.Swap(&other->parent_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  collection_id_.Swap(&other->collection_id_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  document_id_.Swap(&other->document_id_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(document_, other->document_);
  swap(mask_, other->mask_);
}

::PROTOBUF_NAMESPACE_ID::Metadata CreateDocumentRequest::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void UpdateDocumentRequest::InitAsDefaultInstance() {
  ::google::firestore::v1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->document_ = const_cast< ::google::firestore::v1::Document*>(
      ::google::firestore::v1::Document::internal_default_instance());
  ::google::firestore::v1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->update_mask_ = const_cast< ::google::firestore::v1::DocumentMask*>(
      ::google::firestore::v1::DocumentMask::internal_default_instance());
  ::google::firestore::v1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1::DocumentMask*>(
      ::google::firestore::v1::DocumentMask::internal_default_instance());
  ::google::firestore::v1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->current_document_ = const_cast< ::google::firestore::v1::Precondition*>(
      ::google::firestore::v1::Precondition::internal_default_instance());
}
class UpdateDocumentRequest::_Internal {
 public:
  static const ::google::firestore::v1::Document& document(const UpdateDocumentRequest* msg);
  static const ::google::firestore::v1::DocumentMask& update_mask(const UpdateDocumentRequest* msg);
  static const ::google::firestore::v1::DocumentMask& mask(const UpdateDocumentRequest* msg);
  static const ::google::firestore::v1::Precondition& current_document(const UpdateDocumentRequest* msg);
};

const ::google::firestore::v1::Document&
UpdateDocumentRequest::_Internal::document(const UpdateDocumentRequest* msg) {
  return *msg->document_;
}
const ::google::firestore::v1::DocumentMask&
UpdateDocumentRequest::_Internal::update_mask(const UpdateDocumentRequest* msg) {
  return *msg->update_mask_;
}
const ::google::firestore::v1::DocumentMask&
UpdateDocumentRequest::_Internal::mask(const UpdateDocumentRequest* msg) {
  return *msg->mask_;
}
const ::google::firestore::v1::Precondition&
UpdateDocumentRequest::_Internal::current_document(const UpdateDocumentRequest* msg) {
  return *msg->current_document_;
}
void UpdateDocumentRequest::clear_document() {
  if (GetArenaNoVirtual() == nullptr && document_ != nullptr) {
    delete document_;
  }
  document_ = nullptr;
}
void UpdateDocumentRequest::clear_update_mask() {
  if (GetArenaNoVirtual() == nullptr && update_mask_ != nullptr) {
    delete update_mask_;
  }
  update_mask_ = nullptr;
}
void UpdateDocumentRequest::clear_mask() {
  if (GetArenaNoVirtual() == nullptr && mask_ != nullptr) {
    delete mask_;
  }
  mask_ = nullptr;
}
void UpdateDocumentRequest::clear_current_document() {
  if (GetArenaNoVirtual() == nullptr && current_document_ != nullptr) {
    delete current_document_;
  }
  current_document_ = nullptr;
}
UpdateDocumentRequest::UpdateDocumentRequest()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.UpdateDocumentRequest)
}
UpdateDocumentRequest::UpdateDocumentRequest(const UpdateDocumentRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from._internal_has_document()) {
    document_ = new ::google::firestore::v1::Document(*from.document_);
  } else {
    document_ = nullptr;
  }
  if (from._internal_has_update_mask()) {
    update_mask_ = new ::google::firestore::v1::DocumentMask(*from.update_mask_);
  } else {
    update_mask_ = nullptr;
  }
  if (from._internal_has_mask()) {
    mask_ = new ::google::firestore::v1::DocumentMask(*from.mask_);
  } else {
    mask_ = nullptr;
  }
  if (from._internal_has_current_document()) {
    current_document_ = new ::google::firestore::v1::Precondition(*from.current_document_);
  } else {
    current_document_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.UpdateDocumentRequest)
}

void UpdateDocumentRequest::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_UpdateDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  ::memset(&document_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&current_document_) -
      reinterpret_cast<char*>(&document_)) + sizeof(current_document_));
}

UpdateDocumentRequest::~UpdateDocumentRequest() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.UpdateDocumentRequest)
  SharedDtor();
}

void UpdateDocumentRequest::SharedDtor() {
  if (this != internal_default_instance()) delete document_;
  if (this != internal_default_instance()) delete update_mask_;
  if (this != internal_default_instance()) delete mask_;
  if (this != internal_default_instance()) delete current_document_;
}

void UpdateDocumentRequest::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const UpdateDocumentRequest& UpdateDocumentRequest::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_UpdateDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  return *internal_default_instance();
}


void UpdateDocumentRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.UpdateDocumentRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  if (GetArenaNoVirtual() == nullptr && document_ != nullptr) {
    delete document_;
  }
  document_ = nullptr;
  if (GetArenaNoVirtual() == nullptr && update_mask_ != nullptr) {
    delete update_mask_;
  }
  update_mask_ = nullptr;
  if (GetArenaNoVirtual() == nullptr && mask_ != nullptr) {
    delete mask_;
  }
  mask_ = nullptr;
  if (GetArenaNoVirtual() == nullptr && current_document_ != nullptr) {
    delete current_document_;
  }
  current_document_ = nullptr;
  _internal_metadata_.Clear();
}

const char* UpdateDocumentRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // .google.firestore.v1.Document document = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_document(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.DocumentMask update_mask = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_update_mask(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.DocumentMask mask = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_mask(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.Precondition current_document = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_current_document(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* UpdateDocumentRequest::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.UpdateDocumentRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.firestore.v1.Document document = 1;
  if (this->has_document()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::document(this), target, stream);
  }

  // .google.firestore.v1.DocumentMask update_mask = 2;
  if (this->has_update_mask()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        2, _Internal::update_mask(this), target, stream);
  }

  // .google.firestore.v1.DocumentMask mask = 3;
  if (this->has_mask()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        3, _Internal::mask(this), target, stream);
  }

  // .google.firestore.v1.Precondition current_document = 4;
  if (this->has_current_document()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        4, _Internal::current_document(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.UpdateDocumentRequest)
  return target;
}

size_t UpdateDocumentRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.UpdateDocumentRequest)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // .google.firestore.v1.Document document = 1;
  if (this->has_document()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *document_);
  }

  // .google.firestore.v1.DocumentMask update_mask = 2;
  if (this->has_update_mask()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *update_mask_);
  }

  // .google.firestore.v1.DocumentMask mask = 3;
  if (this->has_mask()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *mask_);
  }

  // .google.firestore.v1.Precondition current_document = 4;
  if (this->has_current_document()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *current_document_);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void UpdateDocumentRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.UpdateDocumentRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const UpdateDocumentRequest* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<UpdateDocumentRequest>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.UpdateDocumentRequest)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.UpdateDocumentRequest)
    MergeFrom(*source);
  }
}

void UpdateDocumentRequest::MergeFrom(const UpdateDocumentRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.UpdateDocumentRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.has_document()) {
    _internal_mutable_document()->::google::firestore::v1::Document::MergeFrom(from._internal_document());
  }
  if (from.has_update_mask()) {
    _internal_mutable_update_mask()->::google::firestore::v1::DocumentMask::MergeFrom(from._internal_update_mask());
  }
  if (from.has_mask()) {
    _internal_mutable_mask()->::google::firestore::v1::DocumentMask::MergeFrom(from._internal_mask());
  }
  if (from.has_current_document()) {
    _internal_mutable_current_document()->::google::firestore::v1::Precondition::MergeFrom(from._internal_current_document());
  }
}

void UpdateDocumentRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.UpdateDocumentRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void UpdateDocumentRequest::CopyFrom(const UpdateDocumentRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.UpdateDocumentRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool UpdateDocumentRequest::IsInitialized() const {
  return true;
}

void UpdateDocumentRequest::InternalSwap(UpdateDocumentRequest* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(document_, other->document_);
  swap(update_mask_, other->update_mask_);
  swap(mask_, other->mask_);
  swap(current_document_, other->current_document_);
}

::PROTOBUF_NAMESPACE_ID::Metadata UpdateDocumentRequest::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void DeleteDocumentRequest::InitAsDefaultInstance() {
  ::google::firestore::v1::_DeleteDocumentRequest_default_instance_._instance.get_mutable()->current_document_ = const_cast< ::google::firestore::v1::Precondition*>(
      ::google::firestore::v1::Precondition::internal_default_instance());
}
class DeleteDocumentRequest::_Internal {
 public:
  static const ::google::firestore::v1::Precondition& current_document(const DeleteDocumentRequest* msg);
};

const ::google::firestore::v1::Precondition&
DeleteDocumentRequest::_Internal::current_document(const DeleteDocumentRequest* msg) {
  return *msg->current_document_;
}
void DeleteDocumentRequest::clear_current_document() {
  if (GetArenaNoVirtual() == nullptr && current_document_ != nullptr) {
    delete current_document_;
  }
  current_document_ = nullptr;
}
DeleteDocumentRequest::DeleteDocumentRequest()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.DeleteDocumentRequest)
}
DeleteDocumentRequest::DeleteDocumentRequest(const DeleteDocumentRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_name().empty()) {
    name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
  }
  if (from._internal_has_current_document()) {
    current_document_ = new ::google::firestore::v1::Precondition(*from.current_document_);
  } else {
    current_document_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.DeleteDocumentRequest)
}

void DeleteDocumentRequest::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_DeleteDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  current_document_ = nullptr;
}

DeleteDocumentRequest::~DeleteDocumentRequest() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.DeleteDocumentRequest)
  SharedDtor();
}

void DeleteDocumentRequest::SharedDtor() {
  name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete current_document_;
}

void DeleteDocumentRequest::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const DeleteDocumentRequest& DeleteDocumentRequest::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DeleteDocumentRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  return *internal_default_instance();
}


void DeleteDocumentRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.DeleteDocumentRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == nullptr && current_document_ != nullptr) {
    delete current_document_;
  }
  current_document_ = nullptr;
  _internal_metadata_.Clear();
}

const char* DeleteDocumentRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // string name = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          auto str = _internal_mutable_name();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.DeleteDocumentRequest.name"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.Precondition current_document = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_current_document(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* DeleteDocumentRequest::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.DeleteDocumentRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string name = 1;
  if (this->name().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.DeleteDocumentRequest.name");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_name(), target);
  }

  // .google.firestore.v1.Precondition current_document = 2;
  if (this->has_current_document()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        2, _Internal::current_document(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.DeleteDocumentRequest)
  return target;
}

size_t DeleteDocumentRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.DeleteDocumentRequest)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // string name = 1;
  if (this->name().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_name());
  }

  // .google.firestore.v1.Precondition current_document = 2;
  if (this->has_current_document()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *current_document_);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void DeleteDocumentRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.DeleteDocumentRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const DeleteDocumentRequest* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<DeleteDocumentRequest>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.DeleteDocumentRequest)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.DeleteDocumentRequest)
    MergeFrom(*source);
  }
}

void DeleteDocumentRequest::MergeFrom(const DeleteDocumentRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.DeleteDocumentRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.name().size() > 0) {

    name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_);
  }
  if (from.has_current_document()) {
    _internal_mutable_current_document()->::google::firestore::v1::Precondition::MergeFrom(from._internal_current_document());
  }
}

void DeleteDocumentRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.DeleteDocumentRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void DeleteDocumentRequest::CopyFrom(const DeleteDocumentRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.DeleteDocumentRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool DeleteDocumentRequest::IsInitialized() const {
  return true;
}

void DeleteDocumentRequest::InternalSwap(DeleteDocumentRequest* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(current_document_, other->current_document_);
}

::PROTOBUF_NAMESPACE_ID::Metadata DeleteDocumentRequest::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void BatchGetDocumentsRequest::InitAsDefaultInstance() {
  ::google::firestore::v1::_BatchGetDocumentsRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1::DocumentMask*>(
      ::google::firestore::v1::DocumentMask::internal_default_instance());
  ::google::firestore::v1::_BatchGetDocumentsRequest_default_instance_.transaction_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  ::google::firestore::v1::_BatchGetDocumentsRequest_default_instance_.new_transaction_ = const_cast< ::google::firestore::v1::TransactionOptions*>(
      ::google::firestore::v1::TransactionOptions::internal_default_instance());
  ::google::firestore::v1::_BatchGetDocumentsRequest_default_instance_.read_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
      PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
}
class BatchGetDocumentsRequest::_Internal {
 public:
  static const ::google::firestore::v1::DocumentMask& mask(const BatchGetDocumentsRequest* msg);
  static const ::google::firestore::v1::TransactionOptions& new_transaction(const BatchGetDocumentsRequest* msg);
  static const PROTOBUF_NAMESPACE_ID::Timestamp& read_time(const BatchGetDocumentsRequest* msg);
};

const ::google::firestore::v1::DocumentMask&
BatchGetDocumentsRequest::_Internal::mask(const BatchGetDocumentsRequest* msg) {
  return *msg->mask_;
}
const ::google::firestore::v1::TransactionOptions&
BatchGetDocumentsRequest::_Internal::new_transaction(const BatchGetDocumentsRequest* msg) {
  return *msg->consistency_selector_.new_transaction_;
}
const PROTOBUF_NAMESPACE_ID::Timestamp&
BatchGetDocumentsRequest::_Internal::read_time(const BatchGetDocumentsRequest* msg) {
  return *msg->consistency_selector_.read_time_;
}
void BatchGetDocumentsRequest::clear_mask() {
  if (GetArenaNoVirtual() == nullptr && mask_ != nullptr) {
    delete mask_;
  }
  mask_ = nullptr;
}
void BatchGetDocumentsRequest::set_allocated_new_transaction(::google::firestore::v1::TransactionOptions* new_transaction) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_consistency_selector();
  if (new_transaction) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
    if (message_arena != submessage_arena) {
      new_transaction = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, new_transaction, submessage_arena);
    }
    set_has_new_transaction();
    consistency_selector_.new_transaction_ = new_transaction;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.BatchGetDocumentsRequest.new_transaction)
}
void BatchGetDocumentsRequest::clear_new_transaction() {
  if (_internal_has_new_transaction()) {
    delete consistency_selector_.new_transaction_;
    clear_has_consistency_selector();
  }
}
void BatchGetDocumentsRequest::set_allocated_read_time(PROTOBUF_NAMESPACE_ID::Timestamp* read_time) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_consistency_selector();
  if (read_time) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(read_time)->GetArena();
    if (message_arena != submessage_arena) {
      read_time = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, read_time, submessage_arena);
    }
    set_has_read_time();
    consistency_selector_.read_time_ = read_time;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.BatchGetDocumentsRequest.read_time)
}
void BatchGetDocumentsRequest::clear_read_time() {
  if (_internal_has_read_time()) {
    delete consistency_selector_.read_time_;
    clear_has_consistency_selector();
  }
}
BatchGetDocumentsRequest::BatchGetDocumentsRequest()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.BatchGetDocumentsRequest)
}
BatchGetDocumentsRequest::BatchGetDocumentsRequest(const BatchGetDocumentsRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr),
      documents_(from.documents_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  database_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_database().empty()) {
    database_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.database_);
  }
  if (from._internal_has_mask()) {
    mask_ = new ::google::firestore::v1::DocumentMask(*from.mask_);
  } else {
    mask_ = nullptr;
  }
  clear_has_consistency_selector();
  switch (from.consistency_selector_case()) {
    case kTransaction: {
      _internal_set_transaction(from._internal_transaction());
      break;
    }
    case kNewTransaction: {
      _internal_mutable_new_transaction()->::google::firestore::v1::TransactionOptions::MergeFrom(from._internal_new_transaction());
      break;
    }
    case kReadTime: {
      _internal_mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_read_time());
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.BatchGetDocumentsRequest)
}

void BatchGetDocumentsRequest::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_BatchGetDocumentsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  database_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  mask_ = nullptr;
  clear_has_consistency_selector();
}

BatchGetDocumentsRequest::~BatchGetDocumentsRequest() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.BatchGetDocumentsRequest)
  SharedDtor();
}

void BatchGetDocumentsRequest::SharedDtor() {
  database_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete mask_;
  if (has_consistency_selector()) {
    clear_consistency_selector();
  }
}

void BatchGetDocumentsRequest::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const BatchGetDocumentsRequest& BatchGetDocumentsRequest::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_BatchGetDocumentsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  return *internal_default_instance();
}


void BatchGetDocumentsRequest::clear_consistency_selector() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.BatchGetDocumentsRequest)
  switch (consistency_selector_case()) {
    case kTransaction: {
      consistency_selector_.transaction_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
      break;
    }
    case kNewTransaction: {
      delete consistency_selector_.new_transaction_;
      break;
    }
    case kReadTime: {
      delete consistency_selector_.read_time_;
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = CONSISTENCY_SELECTOR_NOT_SET;
}


void BatchGetDocumentsRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.BatchGetDocumentsRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  documents_.Clear();
  database_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == nullptr && mask_ != nullptr) {
    delete mask_;
  }
  mask_ = nullptr;
  clear_consistency_selector();
  _internal_metadata_.Clear();
}

const char* BatchGetDocumentsRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // string database = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          auto str = _internal_mutable_database();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.BatchGetDocumentsRequest.database"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // repeated string documents = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_documents();
            ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.BatchGetDocumentsRequest.documents"));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.DocumentMask mask = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_mask(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // bytes transaction = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
          auto str = _internal_mutable_transaction();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.TransactionOptions new_transaction = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_new_transaction(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.protobuf.Timestamp read_time = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
          ptr = ctx->ParseMessage(_internal_mutable_read_time(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* BatchGetDocumentsRequest::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.BatchGetDocumentsRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string database = 1;
  if (this->database().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_database().data(), static_cast<int>(this->_internal_database().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.BatchGetDocumentsRequest.database");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_database(), target);
  }

  // repeated string documents = 2;
  for (int i = 0, n = this->_internal_documents_size(); i < n; i++) {
    const auto& s = this->_internal_documents(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      s.data(), static_cast<int>(s.length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.BatchGetDocumentsRequest.documents");
    target = stream->WriteString(2, s, target);
  }

  // .google.firestore.v1.DocumentMask mask = 3;
  if (this->has_mask()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        3, _Internal::mask(this), target, stream);
  }

  // bytes transaction = 4;
  if (_internal_has_transaction()) {
    target = stream->WriteBytesMaybeAliased(
        4, this->_internal_transaction(), target);
  }

  // .google.firestore.v1.TransactionOptions new_transaction = 5;
  if (_internal_has_new_transaction()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        5, _Internal::new_transaction(this), target, stream);
  }

  // .google.protobuf.Timestamp read_time = 7;
  if (_internal_has_read_time()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        7, _Internal::read_time(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.BatchGetDocumentsRequest)
  return target;
}

size_t BatchGetDocumentsRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.BatchGetDocumentsRequest)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated string documents = 2;
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(documents_.size());
  for (int i = 0, n = documents_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      documents_.Get(i));
  }

  // string database = 1;
  if (this->database().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_database());
  }

  // .google.firestore.v1.DocumentMask mask = 3;
  if (this->has_mask()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *mask_);
  }

  switch (consistency_selector_case()) {
    // bytes transaction = 4;
    case kTransaction: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
          this->_internal_transaction());
      break;
    }
    // .google.firestore.v1.TransactionOptions new_transaction = 5;
    case kNewTransaction: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *consistency_selector_.new_transaction_);
      break;
    }
    // .google.protobuf.Timestamp read_time = 7;
    case kReadTime: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *consistency_selector_.read_time_);
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void BatchGetDocumentsRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.BatchGetDocumentsRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const BatchGetDocumentsRequest* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<BatchGetDocumentsRequest>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.BatchGetDocumentsRequest)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.BatchGetDocumentsRequest)
    MergeFrom(*source);
  }
}

void BatchGetDocumentsRequest::MergeFrom(const BatchGetDocumentsRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.BatchGetDocumentsRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  documents_.MergeFrom(from.documents_);
  if (from.database().size() > 0) {

    database_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.database_);
  }
  if (from.has_mask()) {
    _internal_mutable_mask()->::google::firestore::v1::DocumentMask::MergeFrom(from._internal_mask());
  }
  switch (from.consistency_selector_case()) {
    case kTransaction: {
      _internal_set_transaction(from._internal_transaction());
      break;
    }
    case kNewTransaction: {
      _internal_mutable_new_transaction()->::google::firestore::v1::TransactionOptions::MergeFrom(from._internal_new_transaction());
      break;
    }
    case kReadTime: {
      _internal_mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_read_time());
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
}

void BatchGetDocumentsRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.BatchGetDocumentsRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void BatchGetDocumentsRequest::CopyFrom(const BatchGetDocumentsRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.BatchGetDocumentsRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool BatchGetDocumentsRequest::IsInitialized() const {
  return true;
}

void BatchGetDocumentsRequest::InternalSwap(BatchGetDocumentsRequest* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  documents_.InternalSwap(&other->documents_);
  database_.Swap(&other->database_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(mask_, other->mask_);
  swap(consistency_selector_, other->consistency_selector_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
}

::PROTOBUF_NAMESPACE_ID::Metadata BatchGetDocumentsRequest::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void BatchGetDocumentsResponse::InitAsDefaultInstance() {
  ::google::firestore::v1::_BatchGetDocumentsResponse_default_instance_.found_ = const_cast< ::google::firestore::v1::Document*>(
      ::google::firestore::v1::Document::internal_default_instance());
  ::google::firestore::v1::_BatchGetDocumentsResponse_default_instance_.missing_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  ::google::firestore::v1::_BatchGetDocumentsResponse_default_instance_._instance.get_mutable()->read_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
      PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
}
class BatchGetDocumentsResponse::_Internal {
 public:
  static const ::google::firestore::v1::Document& found(const BatchGetDocumentsResponse* msg);
  static const PROTOBUF_NAMESPACE_ID::Timestamp& read_time(const BatchGetDocumentsResponse* msg);
};

const ::google::firestore::v1::Document&
BatchGetDocumentsResponse::_Internal::found(const BatchGetDocumentsResponse* msg) {
  return *msg->result_.found_;
}
const PROTOBUF_NAMESPACE_ID::Timestamp&
BatchGetDocumentsResponse::_Internal::read_time(const BatchGetDocumentsResponse* msg) {
  return *msg->read_time_;
}
void BatchGetDocumentsResponse::set_allocated_found(::google::firestore::v1::Document* found) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_result();
  if (found) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
    if (message_arena != submessage_arena) {
      found = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, found, submessage_arena);
    }
    set_has_found();
    result_.found_ = found;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.BatchGetDocumentsResponse.found)
}
void BatchGetDocumentsResponse::clear_found() {
  if (_internal_has_found()) {
    delete result_.found_;
    clear_has_result();
  }
}
void BatchGetDocumentsResponse::clear_read_time() {
  if (GetArenaNoVirtual() == nullptr && read_time_ != nullptr) {
    delete read_time_;
  }
  read_time_ = nullptr;
}
BatchGetDocumentsResponse::BatchGetDocumentsResponse()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.BatchGetDocumentsResponse)
}
BatchGetDocumentsResponse::BatchGetDocumentsResponse(const BatchGetDocumentsResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  transaction_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_transaction().empty()) {
    transaction_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  }
  if (from._internal_has_read_time()) {
    read_time_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.read_time_);
  } else {
    read_time_ = nullptr;
  }
  clear_has_result();
  switch (from.result_case()) {
    case kFound: {
      _internal_mutable_found()->::google::firestore::v1::Document::MergeFrom(from._internal_found());
      break;
    }
    case kMissing: {
      _internal_set_missing(from._internal_missing());
      break;
    }
    case RESULT_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.BatchGetDocumentsResponse)
}

void BatchGetDocumentsResponse::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_BatchGetDocumentsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  transaction_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  read_time_ = nullptr;
  clear_has_result();
}

BatchGetDocumentsResponse::~BatchGetDocumentsResponse() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.BatchGetDocumentsResponse)
  SharedDtor();
}

void BatchGetDocumentsResponse::SharedDtor() {
  transaction_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete read_time_;
  if (has_result()) {
    clear_result();
  }
}

void BatchGetDocumentsResponse::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const BatchGetDocumentsResponse& BatchGetDocumentsResponse::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_BatchGetDocumentsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  return *internal_default_instance();
}


void BatchGetDocumentsResponse::clear_result() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.BatchGetDocumentsResponse)
  switch (result_case()) {
    case kFound: {
      delete result_.found_;
      break;
    }
    case kMissing: {
      result_.missing_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
      break;
    }
    case RESULT_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = RESULT_NOT_SET;
}


void BatchGetDocumentsResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.BatchGetDocumentsResponse)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  transaction_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == nullptr && read_time_ != nullptr) {
    delete read_time_;
  }
  read_time_ = nullptr;
  clear_result();
  _internal_metadata_.Clear();
}

const char* BatchGetDocumentsResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // .google.firestore.v1.Document found = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_found(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // string missing = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          auto str = _internal_mutable_missing();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.BatchGetDocumentsResponse.missing"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // bytes transaction = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
          auto str = _internal_mutable_transaction();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.protobuf.Timestamp read_time = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_read_time(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* BatchGetDocumentsResponse::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.BatchGetDocumentsResponse)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.firestore.v1.Document found = 1;
  if (_internal_has_found()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::found(this), target, stream);
  }

  // string missing = 2;
  if (_internal_has_missing()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_missing().data(), static_cast<int>(this->_internal_missing().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.BatchGetDocumentsResponse.missing");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_missing(), target);
  }

  // bytes transaction = 3;
  if (this->transaction().size() > 0) {
    target = stream->WriteBytesMaybeAliased(
        3, this->_internal_transaction(), target);
  }

  // .google.protobuf.Timestamp read_time = 4;
  if (this->has_read_time()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        4, _Internal::read_time(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.BatchGetDocumentsResponse)
  return target;
}

size_t BatchGetDocumentsResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.BatchGetDocumentsResponse)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // bytes transaction = 3;
  if (this->transaction().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
        this->_internal_transaction());
  }

  // .google.protobuf.Timestamp read_time = 4;
  if (this->has_read_time()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *read_time_);
  }

  switch (result_case()) {
    // .google.firestore.v1.Document found = 1;
    case kFound: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *result_.found_);
      break;
    }
    // string missing = 2;
    case kMissing: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_missing());
      break;
    }
    case RESULT_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void BatchGetDocumentsResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.BatchGetDocumentsResponse)
  GOOGLE_DCHECK_NE(&from, this);
  const BatchGetDocumentsResponse* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<BatchGetDocumentsResponse>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.BatchGetDocumentsResponse)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.BatchGetDocumentsResponse)
    MergeFrom(*source);
  }
}

void BatchGetDocumentsResponse::MergeFrom(const BatchGetDocumentsResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.BatchGetDocumentsResponse)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.transaction().size() > 0) {

    transaction_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  }
  if (from.has_read_time()) {
    _internal_mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_read_time());
  }
  switch (from.result_case()) {
    case kFound: {
      _internal_mutable_found()->::google::firestore::v1::Document::MergeFrom(from._internal_found());
      break;
    }
    case kMissing: {
      _internal_set_missing(from._internal_missing());
      break;
    }
    case RESULT_NOT_SET: {
      break;
    }
  }
}

void BatchGetDocumentsResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.BatchGetDocumentsResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void BatchGetDocumentsResponse::CopyFrom(const BatchGetDocumentsResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.BatchGetDocumentsResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool BatchGetDocumentsResponse::IsInitialized() const {
  return true;
}

void BatchGetDocumentsResponse::InternalSwap(BatchGetDocumentsResponse* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  transaction_.Swap(&other->transaction_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(read_time_, other->read_time_);
  swap(result_, other->result_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
}

::PROTOBUF_NAMESPACE_ID::Metadata BatchGetDocumentsResponse::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void BeginTransactionRequest::InitAsDefaultInstance() {
  ::google::firestore::v1::_BeginTransactionRequest_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::firestore::v1::TransactionOptions*>(
      ::google::firestore::v1::TransactionOptions::internal_default_instance());
}
class BeginTransactionRequest::_Internal {
 public:
  static const ::google::firestore::v1::TransactionOptions& options(const BeginTransactionRequest* msg);
};

const ::google::firestore::v1::TransactionOptions&
BeginTransactionRequest::_Internal::options(const BeginTransactionRequest* msg) {
  return *msg->options_;
}
void BeginTransactionRequest::clear_options() {
  if (GetArenaNoVirtual() == nullptr && options_ != nullptr) {
    delete options_;
  }
  options_ = nullptr;
}
BeginTransactionRequest::BeginTransactionRequest()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.BeginTransactionRequest)
}
BeginTransactionRequest::BeginTransactionRequest(const BeginTransactionRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  database_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_database().empty()) {
    database_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.database_);
  }
  if (from._internal_has_options()) {
    options_ = new ::google::firestore::v1::TransactionOptions(*from.options_);
  } else {
    options_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.BeginTransactionRequest)
}

void BeginTransactionRequest::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_BeginTransactionRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  database_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  options_ = nullptr;
}

BeginTransactionRequest::~BeginTransactionRequest() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.BeginTransactionRequest)
  SharedDtor();
}

void BeginTransactionRequest::SharedDtor() {
  database_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete options_;
}

void BeginTransactionRequest::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const BeginTransactionRequest& BeginTransactionRequest::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_BeginTransactionRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  return *internal_default_instance();
}


void BeginTransactionRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.BeginTransactionRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  database_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == nullptr && options_ != nullptr) {
    delete options_;
  }
  options_ = nullptr;
  _internal_metadata_.Clear();
}

const char* BeginTransactionRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // string database = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          auto str = _internal_mutable_database();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.BeginTransactionRequest.database"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.TransactionOptions options = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_options(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* BeginTransactionRequest::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.BeginTransactionRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string database = 1;
  if (this->database().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_database().data(), static_cast<int>(this->_internal_database().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.BeginTransactionRequest.database");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_database(), target);
  }

  // .google.firestore.v1.TransactionOptions options = 2;
  if (this->has_options()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        2, _Internal::options(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.BeginTransactionRequest)
  return target;
}

size_t BeginTransactionRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.BeginTransactionRequest)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // string database = 1;
  if (this->database().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_database());
  }

  // .google.firestore.v1.TransactionOptions options = 2;
  if (this->has_options()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *options_);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void BeginTransactionRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.BeginTransactionRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const BeginTransactionRequest* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<BeginTransactionRequest>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.BeginTransactionRequest)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.BeginTransactionRequest)
    MergeFrom(*source);
  }
}

void BeginTransactionRequest::MergeFrom(const BeginTransactionRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.BeginTransactionRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.database().size() > 0) {

    database_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.database_);
  }
  if (from.has_options()) {
    _internal_mutable_options()->::google::firestore::v1::TransactionOptions::MergeFrom(from._internal_options());
  }
}

void BeginTransactionRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.BeginTransactionRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void BeginTransactionRequest::CopyFrom(const BeginTransactionRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.BeginTransactionRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool BeginTransactionRequest::IsInitialized() const {
  return true;
}

void BeginTransactionRequest::InternalSwap(BeginTransactionRequest* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  database_.Swap(&other->database_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(options_, other->options_);
}

::PROTOBUF_NAMESPACE_ID::Metadata BeginTransactionRequest::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void BeginTransactionResponse::InitAsDefaultInstance() {
}
class BeginTransactionResponse::_Internal {
 public:
};

BeginTransactionResponse::BeginTransactionResponse()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.BeginTransactionResponse)
}
BeginTransactionResponse::BeginTransactionResponse(const BeginTransactionResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  transaction_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_transaction().empty()) {
    transaction_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.BeginTransactionResponse)
}

void BeginTransactionResponse::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_BeginTransactionResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  transaction_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

BeginTransactionResponse::~BeginTransactionResponse() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.BeginTransactionResponse)
  SharedDtor();
}

void BeginTransactionResponse::SharedDtor() {
  transaction_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void BeginTransactionResponse::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const BeginTransactionResponse& BeginTransactionResponse::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_BeginTransactionResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  return *internal_default_instance();
}


void BeginTransactionResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.BeginTransactionResponse)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  transaction_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  _internal_metadata_.Clear();
}

const char* BeginTransactionResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // bytes transaction = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          auto str = _internal_mutable_transaction();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* BeginTransactionResponse::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.BeginTransactionResponse)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // bytes transaction = 1;
  if (this->transaction().size() > 0) {
    target = stream->WriteBytesMaybeAliased(
        1, this->_internal_transaction(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.BeginTransactionResponse)
  return target;
}

size_t BeginTransactionResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.BeginTransactionResponse)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // bytes transaction = 1;
  if (this->transaction().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
        this->_internal_transaction());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void BeginTransactionResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.BeginTransactionResponse)
  GOOGLE_DCHECK_NE(&from, this);
  const BeginTransactionResponse* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<BeginTransactionResponse>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.BeginTransactionResponse)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.BeginTransactionResponse)
    MergeFrom(*source);
  }
}

void BeginTransactionResponse::MergeFrom(const BeginTransactionResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.BeginTransactionResponse)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.transaction().size() > 0) {

    transaction_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  }
}

void BeginTransactionResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.BeginTransactionResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void BeginTransactionResponse::CopyFrom(const BeginTransactionResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.BeginTransactionResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool BeginTransactionResponse::IsInitialized() const {
  return true;
}

void BeginTransactionResponse::InternalSwap(BeginTransactionResponse* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  transaction_.Swap(&other->transaction_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
}

::PROTOBUF_NAMESPACE_ID::Metadata BeginTransactionResponse::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void CommitRequest::InitAsDefaultInstance() {
}
class CommitRequest::_Internal {
 public:
};

void CommitRequest::clear_writes() {
  writes_.Clear();
}
CommitRequest::CommitRequest()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.CommitRequest)
}
CommitRequest::CommitRequest(const CommitRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr),
      writes_(from.writes_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  database_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_database().empty()) {
    database_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.database_);
  }
  transaction_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_transaction().empty()) {
    transaction_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.CommitRequest)
}

void CommitRequest::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_CommitRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  database_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  transaction_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

CommitRequest::~CommitRequest() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.CommitRequest)
  SharedDtor();
}

void CommitRequest::SharedDtor() {
  database_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  transaction_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void CommitRequest::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const CommitRequest& CommitRequest::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_CommitRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  return *internal_default_instance();
}


void CommitRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.CommitRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  writes_.Clear();
  database_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  transaction_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  _internal_metadata_.Clear();
}

const char* CommitRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // string database = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          auto str = _internal_mutable_database();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.CommitRequest.database"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // repeated .google.firestore.v1.Write writes = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_writes(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
        } else goto handle_unusual;
        continue;
      // bytes transaction = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
          auto str = _internal_mutable_transaction();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* CommitRequest::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.CommitRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string database = 1;
  if (this->database().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_database().data(), static_cast<int>(this->_internal_database().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.CommitRequest.database");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_database(), target);
  }

  // repeated .google.firestore.v1.Write writes = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_writes_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, this->_internal_writes(i), target, stream);
  }

  // bytes transaction = 3;
  if (this->transaction().size() > 0) {
    target = stream->WriteBytesMaybeAliased(
        3, this->_internal_transaction(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.CommitRequest)
  return target;
}

size_t CommitRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.CommitRequest)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .google.firestore.v1.Write writes = 2;
  total_size += 1UL * this->_internal_writes_size();
  for (const auto& msg : this->writes_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // string database = 1;
  if (this->database().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_database());
  }

  // bytes transaction = 3;
  if (this->transaction().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
        this->_internal_transaction());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void CommitRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.CommitRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const CommitRequest* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<CommitRequest>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.CommitRequest)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.CommitRequest)
    MergeFrom(*source);
  }
}

void CommitRequest::MergeFrom(const CommitRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.CommitRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  writes_.MergeFrom(from.writes_);
  if (from.database().size() > 0) {

    database_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.database_);
  }
  if (from.transaction().size() > 0) {

    transaction_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  }
}

void CommitRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.CommitRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void CommitRequest::CopyFrom(const CommitRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.CommitRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool CommitRequest::IsInitialized() const {
  return true;
}

void CommitRequest::InternalSwap(CommitRequest* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  writes_.InternalSwap(&other->writes_);
  database_.Swap(&other->database_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  transaction_.Swap(&other->transaction_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
}

::PROTOBUF_NAMESPACE_ID::Metadata CommitRequest::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void CommitResponse::InitAsDefaultInstance() {
  ::google::firestore::v1::_CommitResponse_default_instance_._instance.get_mutable()->commit_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
      PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
}
class CommitResponse::_Internal {
 public:
  static const PROTOBUF_NAMESPACE_ID::Timestamp& commit_time(const CommitResponse* msg);
};

const PROTOBUF_NAMESPACE_ID::Timestamp&
CommitResponse::_Internal::commit_time(const CommitResponse* msg) {
  return *msg->commit_time_;
}
void CommitResponse::clear_write_results() {
  write_results_.Clear();
}
void CommitResponse::clear_commit_time() {
  if (GetArenaNoVirtual() == nullptr && commit_time_ != nullptr) {
    delete commit_time_;
  }
  commit_time_ = nullptr;
}
CommitResponse::CommitResponse()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.CommitResponse)
}
CommitResponse::CommitResponse(const CommitResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr),
      write_results_(from.write_results_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from._internal_has_commit_time()) {
    commit_time_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.commit_time_);
  } else {
    commit_time_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.CommitResponse)
}

void CommitResponse::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_CommitResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  commit_time_ = nullptr;
}

CommitResponse::~CommitResponse() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.CommitResponse)
  SharedDtor();
}

void CommitResponse::SharedDtor() {
  if (this != internal_default_instance()) delete commit_time_;
}

void CommitResponse::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const CommitResponse& CommitResponse::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_CommitResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  return *internal_default_instance();
}


void CommitResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.CommitResponse)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  write_results_.Clear();
  if (GetArenaNoVirtual() == nullptr && commit_time_ != nullptr) {
    delete commit_time_;
  }
  commit_time_ = nullptr;
  _internal_metadata_.Clear();
}

const char* CommitResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // repeated .google.firestore.v1.WriteResult write_results = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_write_results(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
        } else goto handle_unusual;
        continue;
      // .google.protobuf.Timestamp commit_time = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_commit_time(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* CommitResponse::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.CommitResponse)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .google.firestore.v1.WriteResult write_results = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_write_results_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, this->_internal_write_results(i), target, stream);
  }

  // .google.protobuf.Timestamp commit_time = 2;
  if (this->has_commit_time()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        2, _Internal::commit_time(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.CommitResponse)
  return target;
}

size_t CommitResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.CommitResponse)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .google.firestore.v1.WriteResult write_results = 1;
  total_size += 1UL * this->_internal_write_results_size();
  for (const auto& msg : this->write_results_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // .google.protobuf.Timestamp commit_time = 2;
  if (this->has_commit_time()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *commit_time_);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void CommitResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.CommitResponse)
  GOOGLE_DCHECK_NE(&from, this);
  const CommitResponse* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<CommitResponse>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.CommitResponse)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.CommitResponse)
    MergeFrom(*source);
  }
}

void CommitResponse::MergeFrom(const CommitResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.CommitResponse)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  write_results_.MergeFrom(from.write_results_);
  if (from.has_commit_time()) {
    _internal_mutable_commit_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_commit_time());
  }
}

void CommitResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.CommitResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void CommitResponse::CopyFrom(const CommitResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.CommitResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool CommitResponse::IsInitialized() const {
  return true;
}

void CommitResponse::InternalSwap(CommitResponse* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  write_results_.InternalSwap(&other->write_results_);
  swap(commit_time_, other->commit_time_);
}

::PROTOBUF_NAMESPACE_ID::Metadata CommitResponse::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void RollbackRequest::InitAsDefaultInstance() {
}
class RollbackRequest::_Internal {
 public:
};

RollbackRequest::RollbackRequest()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.RollbackRequest)
}
RollbackRequest::RollbackRequest(const RollbackRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  database_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_database().empty()) {
    database_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.database_);
  }
  transaction_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_transaction().empty()) {
    transaction_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.RollbackRequest)
}

void RollbackRequest::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_RollbackRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  database_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  transaction_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

RollbackRequest::~RollbackRequest() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.RollbackRequest)
  SharedDtor();
}

void RollbackRequest::SharedDtor() {
  database_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  transaction_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void RollbackRequest::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const RollbackRequest& RollbackRequest::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RollbackRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  return *internal_default_instance();
}


void RollbackRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.RollbackRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  database_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  transaction_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  _internal_metadata_.Clear();
}

const char* RollbackRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // string database = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          auto str = _internal_mutable_database();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.RollbackRequest.database"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // bytes transaction = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          auto str = _internal_mutable_transaction();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* RollbackRequest::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.RollbackRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string database = 1;
  if (this->database().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_database().data(), static_cast<int>(this->_internal_database().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.RollbackRequest.database");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_database(), target);
  }

  // bytes transaction = 2;
  if (this->transaction().size() > 0) {
    target = stream->WriteBytesMaybeAliased(
        2, this->_internal_transaction(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.RollbackRequest)
  return target;
}

size_t RollbackRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.RollbackRequest)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // string database = 1;
  if (this->database().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_database());
  }

  // bytes transaction = 2;
  if (this->transaction().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
        this->_internal_transaction());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void RollbackRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.RollbackRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const RollbackRequest* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<RollbackRequest>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.RollbackRequest)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.RollbackRequest)
    MergeFrom(*source);
  }
}

void RollbackRequest::MergeFrom(const RollbackRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.RollbackRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.database().size() > 0) {

    database_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.database_);
  }
  if (from.transaction().size() > 0) {

    transaction_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  }
}

void RollbackRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.RollbackRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void RollbackRequest::CopyFrom(const RollbackRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.RollbackRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool RollbackRequest::IsInitialized() const {
  return true;
}

void RollbackRequest::InternalSwap(RollbackRequest* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  database_.Swap(&other->database_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  transaction_.Swap(&other->transaction_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
}

::PROTOBUF_NAMESPACE_ID::Metadata RollbackRequest::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void RunQueryRequest::InitAsDefaultInstance() {
  ::google::firestore::v1::_RunQueryRequest_default_instance_.structured_query_ = const_cast< ::google::firestore::v1::StructuredQuery*>(
      ::google::firestore::v1::StructuredQuery::internal_default_instance());
  ::google::firestore::v1::_RunQueryRequest_default_instance_.transaction_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  ::google::firestore::v1::_RunQueryRequest_default_instance_.new_transaction_ = const_cast< ::google::firestore::v1::TransactionOptions*>(
      ::google::firestore::v1::TransactionOptions::internal_default_instance());
  ::google::firestore::v1::_RunQueryRequest_default_instance_.read_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
      PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
}
class RunQueryRequest::_Internal {
 public:
  static const ::google::firestore::v1::StructuredQuery& structured_query(const RunQueryRequest* msg);
  static const ::google::firestore::v1::TransactionOptions& new_transaction(const RunQueryRequest* msg);
  static const PROTOBUF_NAMESPACE_ID::Timestamp& read_time(const RunQueryRequest* msg);
};

const ::google::firestore::v1::StructuredQuery&
RunQueryRequest::_Internal::structured_query(const RunQueryRequest* msg) {
  return *msg->query_type_.structured_query_;
}
const ::google::firestore::v1::TransactionOptions&
RunQueryRequest::_Internal::new_transaction(const RunQueryRequest* msg) {
  return *msg->consistency_selector_.new_transaction_;
}
const PROTOBUF_NAMESPACE_ID::Timestamp&
RunQueryRequest::_Internal::read_time(const RunQueryRequest* msg) {
  return *msg->consistency_selector_.read_time_;
}
void RunQueryRequest::set_allocated_structured_query(::google::firestore::v1::StructuredQuery* structured_query) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_query_type();
  if (structured_query) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
    if (message_arena != submessage_arena) {
      structured_query = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, structured_query, submessage_arena);
    }
    set_has_structured_query();
    query_type_.structured_query_ = structured_query;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.RunQueryRequest.structured_query)
}
void RunQueryRequest::clear_structured_query() {
  if (_internal_has_structured_query()) {
    delete query_type_.structured_query_;
    clear_has_query_type();
  }
}
void RunQueryRequest::set_allocated_new_transaction(::google::firestore::v1::TransactionOptions* new_transaction) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_consistency_selector();
  if (new_transaction) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
    if (message_arena != submessage_arena) {
      new_transaction = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, new_transaction, submessage_arena);
    }
    set_has_new_transaction();
    consistency_selector_.new_transaction_ = new_transaction;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.RunQueryRequest.new_transaction)
}
void RunQueryRequest::clear_new_transaction() {
  if (_internal_has_new_transaction()) {
    delete consistency_selector_.new_transaction_;
    clear_has_consistency_selector();
  }
}
void RunQueryRequest::set_allocated_read_time(PROTOBUF_NAMESPACE_ID::Timestamp* read_time) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_consistency_selector();
  if (read_time) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(read_time)->GetArena();
    if (message_arena != submessage_arena) {
      read_time = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, read_time, submessage_arena);
    }
    set_has_read_time();
    consistency_selector_.read_time_ = read_time;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.RunQueryRequest.read_time)
}
void RunQueryRequest::clear_read_time() {
  if (_internal_has_read_time()) {
    delete consistency_selector_.read_time_;
    clear_has_consistency_selector();
  }
}
RunQueryRequest::RunQueryRequest()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.RunQueryRequest)
}
RunQueryRequest::RunQueryRequest(const RunQueryRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  parent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_parent().empty()) {
    parent_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parent_);
  }
  clear_has_query_type();
  switch (from.query_type_case()) {
    case kStructuredQuery: {
      _internal_mutable_structured_query()->::google::firestore::v1::StructuredQuery::MergeFrom(from._internal_structured_query());
      break;
    }
    case QUERY_TYPE_NOT_SET: {
      break;
    }
  }
  clear_has_consistency_selector();
  switch (from.consistency_selector_case()) {
    case kTransaction: {
      _internal_set_transaction(from._internal_transaction());
      break;
    }
    case kNewTransaction: {
      _internal_mutable_new_transaction()->::google::firestore::v1::TransactionOptions::MergeFrom(from._internal_new_transaction());
      break;
    }
    case kReadTime: {
      _internal_mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_read_time());
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.RunQueryRequest)
}

void RunQueryRequest::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_RunQueryRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  parent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  clear_has_query_type();
  clear_has_consistency_selector();
}

RunQueryRequest::~RunQueryRequest() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.RunQueryRequest)
  SharedDtor();
}

void RunQueryRequest::SharedDtor() {
  parent_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (has_query_type()) {
    clear_query_type();
  }
  if (has_consistency_selector()) {
    clear_consistency_selector();
  }
}

void RunQueryRequest::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const RunQueryRequest& RunQueryRequest::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RunQueryRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  return *internal_default_instance();
}


void RunQueryRequest::clear_query_type() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.RunQueryRequest)
  switch (query_type_case()) {
    case kStructuredQuery: {
      delete query_type_.structured_query_;
      break;
    }
    case QUERY_TYPE_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = QUERY_TYPE_NOT_SET;
}

void RunQueryRequest::clear_consistency_selector() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.RunQueryRequest)
  switch (consistency_selector_case()) {
    case kTransaction: {
      consistency_selector_.transaction_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
      break;
    }
    case kNewTransaction: {
      delete consistency_selector_.new_transaction_;
      break;
    }
    case kReadTime: {
      delete consistency_selector_.read_time_;
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
  _oneof_case_[1] = CONSISTENCY_SELECTOR_NOT_SET;
}


void RunQueryRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.RunQueryRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  parent_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  clear_query_type();
  clear_consistency_selector();
  _internal_metadata_.Clear();
}

const char* RunQueryRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // string parent = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          auto str = _internal_mutable_parent();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.RunQueryRequest.parent"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.StructuredQuery structured_query = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_structured_query(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // bytes transaction = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
          auto str = _internal_mutable_transaction();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.TransactionOptions new_transaction = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_new_transaction(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.protobuf.Timestamp read_time = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
          ptr = ctx->ParseMessage(_internal_mutable_read_time(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* RunQueryRequest::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.RunQueryRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string parent = 1;
  if (this->parent().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_parent().data(), static_cast<int>(this->_internal_parent().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.RunQueryRequest.parent");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_parent(), target);
  }

  // .google.firestore.v1.StructuredQuery structured_query = 2;
  if (_internal_has_structured_query()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        2, _Internal::structured_query(this), target, stream);
  }

  // bytes transaction = 5;
  if (_internal_has_transaction()) {
    target = stream->WriteBytesMaybeAliased(
        5, this->_internal_transaction(), target);
  }

  // .google.firestore.v1.TransactionOptions new_transaction = 6;
  if (_internal_has_new_transaction()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        6, _Internal::new_transaction(this), target, stream);
  }

  // .google.protobuf.Timestamp read_time = 7;
  if (_internal_has_read_time()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        7, _Internal::read_time(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.RunQueryRequest)
  return target;
}

size_t RunQueryRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.RunQueryRequest)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // string parent = 1;
  if (this->parent().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_parent());
  }

  switch (query_type_case()) {
    // .google.firestore.v1.StructuredQuery structured_query = 2;
    case kStructuredQuery: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *query_type_.structured_query_);
      break;
    }
    case QUERY_TYPE_NOT_SET: {
      break;
    }
  }
  switch (consistency_selector_case()) {
    // bytes transaction = 5;
    case kTransaction: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
          this->_internal_transaction());
      break;
    }
    // .google.firestore.v1.TransactionOptions new_transaction = 6;
    case kNewTransaction: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *consistency_selector_.new_transaction_);
      break;
    }
    // .google.protobuf.Timestamp read_time = 7;
    case kReadTime: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *consistency_selector_.read_time_);
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void RunQueryRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.RunQueryRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const RunQueryRequest* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<RunQueryRequest>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.RunQueryRequest)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.RunQueryRequest)
    MergeFrom(*source);
  }
}

void RunQueryRequest::MergeFrom(const RunQueryRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.RunQueryRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.parent().size() > 0) {

    parent_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parent_);
  }
  switch (from.query_type_case()) {
    case kStructuredQuery: {
      _internal_mutable_structured_query()->::google::firestore::v1::StructuredQuery::MergeFrom(from._internal_structured_query());
      break;
    }
    case QUERY_TYPE_NOT_SET: {
      break;
    }
  }
  switch (from.consistency_selector_case()) {
    case kTransaction: {
      _internal_set_transaction(from._internal_transaction());
      break;
    }
    case kNewTransaction: {
      _internal_mutable_new_transaction()->::google::firestore::v1::TransactionOptions::MergeFrom(from._internal_new_transaction());
      break;
    }
    case kReadTime: {
      _internal_mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_read_time());
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
}

void RunQueryRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.RunQueryRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void RunQueryRequest::CopyFrom(const RunQueryRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.RunQueryRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool RunQueryRequest::IsInitialized() const {
  return true;
}

void RunQueryRequest::InternalSwap(RunQueryRequest* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  parent_.Swap(&other->parent_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(query_type_, other->query_type_);
  swap(consistency_selector_, other->consistency_selector_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
  swap(_oneof_case_[1], other->_oneof_case_[1]);
}

::PROTOBUF_NAMESPACE_ID::Metadata RunQueryRequest::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void RunQueryResponse::InitAsDefaultInstance() {
  ::google::firestore::v1::_RunQueryResponse_default_instance_._instance.get_mutable()->document_ = const_cast< ::google::firestore::v1::Document*>(
      ::google::firestore::v1::Document::internal_default_instance());
  ::google::firestore::v1::_RunQueryResponse_default_instance_._instance.get_mutable()->read_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
      PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
}
class RunQueryResponse::_Internal {
 public:
  static const ::google::firestore::v1::Document& document(const RunQueryResponse* msg);
  static const PROTOBUF_NAMESPACE_ID::Timestamp& read_time(const RunQueryResponse* msg);
};

const ::google::firestore::v1::Document&
RunQueryResponse::_Internal::document(const RunQueryResponse* msg) {
  return *msg->document_;
}
const PROTOBUF_NAMESPACE_ID::Timestamp&
RunQueryResponse::_Internal::read_time(const RunQueryResponse* msg) {
  return *msg->read_time_;
}
void RunQueryResponse::clear_document() {
  if (GetArenaNoVirtual() == nullptr && document_ != nullptr) {
    delete document_;
  }
  document_ = nullptr;
}
void RunQueryResponse::clear_read_time() {
  if (GetArenaNoVirtual() == nullptr && read_time_ != nullptr) {
    delete read_time_;
  }
  read_time_ = nullptr;
}
RunQueryResponse::RunQueryResponse()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.RunQueryResponse)
}
RunQueryResponse::RunQueryResponse(const RunQueryResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  transaction_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_transaction().empty()) {
    transaction_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  }
  if (from._internal_has_document()) {
    document_ = new ::google::firestore::v1::Document(*from.document_);
  } else {
    document_ = nullptr;
  }
  if (from._internal_has_read_time()) {
    read_time_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.read_time_);
  } else {
    read_time_ = nullptr;
  }
  skipped_results_ = from.skipped_results_;
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.RunQueryResponse)
}

void RunQueryResponse::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_RunQueryResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  transaction_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  ::memset(&document_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&skipped_results_) -
      reinterpret_cast<char*>(&document_)) + sizeof(skipped_results_));
}

RunQueryResponse::~RunQueryResponse() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.RunQueryResponse)
  SharedDtor();
}

void RunQueryResponse::SharedDtor() {
  transaction_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete document_;
  if (this != internal_default_instance()) delete read_time_;
}

void RunQueryResponse::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const RunQueryResponse& RunQueryResponse::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RunQueryResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  return *internal_default_instance();
}


void RunQueryResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.RunQueryResponse)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  transaction_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == nullptr && document_ != nullptr) {
    delete document_;
  }
  document_ = nullptr;
  if (GetArenaNoVirtual() == nullptr && read_time_ != nullptr) {
    delete read_time_;
  }
  read_time_ = nullptr;
  skipped_results_ = 0;
  _internal_metadata_.Clear();
}

const char* RunQueryResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // .google.firestore.v1.Document document = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_document(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // bytes transaction = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          auto str = _internal_mutable_transaction();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.protobuf.Timestamp read_time = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_read_time(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // int32 skipped_results = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
          skipped_results_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* RunQueryResponse::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.RunQueryResponse)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.firestore.v1.Document document = 1;
  if (this->has_document()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::document(this), target, stream);
  }

  // bytes transaction = 2;
  if (this->transaction().size() > 0) {
    target = stream->WriteBytesMaybeAliased(
        2, this->_internal_transaction(), target);
  }

  // .google.protobuf.Timestamp read_time = 3;
  if (this->has_read_time()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        3, _Internal::read_time(this), target, stream);
  }

  // int32 skipped_results = 4;
  if (this->skipped_results() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_skipped_results(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.RunQueryResponse)
  return target;
}

size_t RunQueryResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.RunQueryResponse)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // bytes transaction = 2;
  if (this->transaction().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
        this->_internal_transaction());
  }

  // .google.firestore.v1.Document document = 1;
  if (this->has_document()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *document_);
  }

  // .google.protobuf.Timestamp read_time = 3;
  if (this->has_read_time()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *read_time_);
  }

  // int32 skipped_results = 4;
  if (this->skipped_results() != 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
        this->_internal_skipped_results());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void RunQueryResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.RunQueryResponse)
  GOOGLE_DCHECK_NE(&from, this);
  const RunQueryResponse* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<RunQueryResponse>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.RunQueryResponse)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.RunQueryResponse)
    MergeFrom(*source);
  }
}

void RunQueryResponse::MergeFrom(const RunQueryResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.RunQueryResponse)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.transaction().size() > 0) {

    transaction_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  }
  if (from.has_document()) {
    _internal_mutable_document()->::google::firestore::v1::Document::MergeFrom(from._internal_document());
  }
  if (from.has_read_time()) {
    _internal_mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_read_time());
  }
  if (from.skipped_results() != 0) {
    _internal_set_skipped_results(from._internal_skipped_results());
  }
}

void RunQueryResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.RunQueryResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void RunQueryResponse::CopyFrom(const RunQueryResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.RunQueryResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool RunQueryResponse::IsInitialized() const {
  return true;
}

void RunQueryResponse::InternalSwap(RunQueryResponse* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  transaction_.Swap(&other->transaction_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(document_, other->document_);
  swap(read_time_, other->read_time_);
  swap(skipped_results_, other->skipped_results_);
}

::PROTOBUF_NAMESPACE_ID::Metadata RunQueryResponse::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void RunAggregationQueryRequest::InitAsDefaultInstance() {
  ::google::firestore::v1::_RunAggregationQueryRequest_default_instance_.structured_aggregation_query_ = const_cast< ::google::firestore::v1::StructuredAggregationQuery*>(
      ::google::firestore::v1::StructuredAggregationQuery::internal_default_instance());
  ::google::firestore::v1::_RunAggregationQueryRequest_default_instance_.transaction_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  ::google::firestore::v1::_RunAggregationQueryRequest_default_instance_.new_transaction_ = const_cast< ::google::firestore::v1::TransactionOptions*>(
      ::google::firestore::v1::TransactionOptions::internal_default_instance());
  ::google::firestore::v1::_RunAggregationQueryRequest_default_instance_.read_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
      PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
}
class RunAggregationQueryRequest::_Internal {
 public:
  static const ::google::firestore::v1::StructuredAggregationQuery& structured_aggregation_query(const RunAggregationQueryRequest* msg);
  static const ::google::firestore::v1::TransactionOptions& new_transaction(const RunAggregationQueryRequest* msg);
  static const PROTOBUF_NAMESPACE_ID::Timestamp& read_time(const RunAggregationQueryRequest* msg);
};

const ::google::firestore::v1::StructuredAggregationQuery&
RunAggregationQueryRequest::_Internal::structured_aggregation_query(const RunAggregationQueryRequest* msg) {
  return *msg->query_type_.structured_aggregation_query_;
}
const ::google::firestore::v1::TransactionOptions&
RunAggregationQueryRequest::_Internal::new_transaction(const RunAggregationQueryRequest* msg) {
  return *msg->consistency_selector_.new_transaction_;
}
const PROTOBUF_NAMESPACE_ID::Timestamp&
RunAggregationQueryRequest::_Internal::read_time(const RunAggregationQueryRequest* msg) {
  return *msg->consistency_selector_.read_time_;
}
void RunAggregationQueryRequest::set_allocated_structured_aggregation_query(::google::firestore::v1::StructuredAggregationQuery* structured_aggregation_query) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_query_type();
  if (structured_aggregation_query) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
    if (message_arena != submessage_arena) {
      structured_aggregation_query = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, structured_aggregation_query, submessage_arena);
    }
    set_has_structured_aggregation_query();
    query_type_.structured_aggregation_query_ = structured_aggregation_query;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.RunAggregationQueryRequest.structured_aggregation_query)
}
void RunAggregationQueryRequest::clear_structured_aggregation_query() {
  if (_internal_has_structured_aggregation_query()) {
    delete query_type_.structured_aggregation_query_;
    clear_has_query_type();
  }
}
void RunAggregationQueryRequest::set_allocated_new_transaction(::google::firestore::v1::TransactionOptions* new_transaction) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_consistency_selector();
  if (new_transaction) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
    if (message_arena != submessage_arena) {
      new_transaction = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, new_transaction, submessage_arena);
    }
    set_has_new_transaction();
    consistency_selector_.new_transaction_ = new_transaction;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.RunAggregationQueryRequest.new_transaction)
}
void RunAggregationQueryRequest::clear_new_transaction() {
  if (_internal_has_new_transaction()) {
    delete consistency_selector_.new_transaction_;
    clear_has_consistency_selector();
  }
}
void RunAggregationQueryRequest::set_allocated_read_time(PROTOBUF_NAMESPACE_ID::Timestamp* read_time) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_consistency_selector();
  if (read_time) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(read_time)->GetArena();
    if (message_arena != submessage_arena) {
      read_time = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, read_time, submessage_arena);
    }
    set_has_read_time();
    consistency_selector_.read_time_ = read_time;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.RunAggregationQueryRequest.read_time)
}
void RunAggregationQueryRequest::clear_read_time() {
  if (_internal_has_read_time()) {
    delete consistency_selector_.read_time_;
    clear_has_consistency_selector();
  }
}
RunAggregationQueryRequest::RunAggregationQueryRequest()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.RunAggregationQueryRequest)
}
RunAggregationQueryRequest::RunAggregationQueryRequest(const RunAggregationQueryRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  parent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_parent().empty()) {
    parent_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parent_);
  }
  clear_has_query_type();
  switch (from.query_type_case()) {
    case kStructuredAggregationQuery: {
      _internal_mutable_structured_aggregation_query()->::google::firestore::v1::StructuredAggregationQuery::MergeFrom(from._internal_structured_aggregation_query());
      break;
    }
    case QUERY_TYPE_NOT_SET: {
      break;
    }
  }
  clear_has_consistency_selector();
  switch (from.consistency_selector_case()) {
    case kTransaction: {
      _internal_set_transaction(from._internal_transaction());
      break;
    }
    case kNewTransaction: {
      _internal_mutable_new_transaction()->::google::firestore::v1::TransactionOptions::MergeFrom(from._internal_new_transaction());
      break;
    }
    case kReadTime: {
      _internal_mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_read_time());
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.RunAggregationQueryRequest)
}

void RunAggregationQueryRequest::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_RunAggregationQueryRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  parent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  clear_has_query_type();
  clear_has_consistency_selector();
}

RunAggregationQueryRequest::~RunAggregationQueryRequest() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.RunAggregationQueryRequest)
  SharedDtor();
}

void RunAggregationQueryRequest::SharedDtor() {
  parent_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (has_query_type()) {
    clear_query_type();
  }
  if (has_consistency_selector()) {
    clear_consistency_selector();
  }
}

void RunAggregationQueryRequest::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const RunAggregationQueryRequest& RunAggregationQueryRequest::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RunAggregationQueryRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  return *internal_default_instance();
}


void RunAggregationQueryRequest::clear_query_type() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.RunAggregationQueryRequest)
  switch (query_type_case()) {
    case kStructuredAggregationQuery: {
      delete query_type_.structured_aggregation_query_;
      break;
    }
    case QUERY_TYPE_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = QUERY_TYPE_NOT_SET;
}

void RunAggregationQueryRequest::clear_consistency_selector() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.RunAggregationQueryRequest)
  switch (consistency_selector_case()) {
    case kTransaction: {
      consistency_selector_.transaction_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
      break;
    }
    case kNewTransaction: {
      delete consistency_selector_.new_transaction_;
      break;
    }
    case kReadTime: {
      delete consistency_selector_.read_time_;
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
  _oneof_case_[1] = CONSISTENCY_SELECTOR_NOT_SET;
}


void RunAggregationQueryRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.RunAggregationQueryRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  parent_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  clear_query_type();
  clear_consistency_selector();
  _internal_metadata_.Clear();
}

const char* RunAggregationQueryRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // string parent = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          auto str = _internal_mutable_parent();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.RunAggregationQueryRequest.parent"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.StructuredAggregationQuery structured_aggregation_query = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_structured_aggregation_query(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // bytes transaction = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
          auto str = _internal_mutable_transaction();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.TransactionOptions new_transaction = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_new_transaction(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.protobuf.Timestamp read_time = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_read_time(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* RunAggregationQueryRequest::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.RunAggregationQueryRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string parent = 1;
  if (this->parent().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_parent().data(), static_cast<int>(this->_internal_parent().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.RunAggregationQueryRequest.parent");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_parent(), target);
  }

  // .google.firestore.v1.StructuredAggregationQuery structured_aggregation_query = 2;
  if (_internal_has_structured_aggregation_query()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        2, _Internal::structured_aggregation_query(this), target, stream);
  }

  // bytes transaction = 4;
  if (_internal_has_transaction()) {
    target = stream->WriteBytesMaybeAliased(
        4, this->_internal_transaction(), target);
  }

  // .google.firestore.v1.TransactionOptions new_transaction = 5;
  if (_internal_has_new_transaction()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        5, _Internal::new_transaction(this), target, stream);
  }

  // .google.protobuf.Timestamp read_time = 6;
  if (_internal_has_read_time()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        6, _Internal::read_time(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.RunAggregationQueryRequest)
  return target;
}

size_t RunAggregationQueryRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.RunAggregationQueryRequest)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // string parent = 1;
  if (this->parent().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_parent());
  }

  switch (query_type_case()) {
    // .google.firestore.v1.StructuredAggregationQuery structured_aggregation_query = 2;
    case kStructuredAggregationQuery: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *query_type_.structured_aggregation_query_);
      break;
    }
    case QUERY_TYPE_NOT_SET: {
      break;
    }
  }
  switch (consistency_selector_case()) {
    // bytes transaction = 4;
    case kTransaction: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
          this->_internal_transaction());
      break;
    }
    // .google.firestore.v1.TransactionOptions new_transaction = 5;
    case kNewTransaction: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *consistency_selector_.new_transaction_);
      break;
    }
    // .google.protobuf.Timestamp read_time = 6;
    case kReadTime: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *consistency_selector_.read_time_);
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void RunAggregationQueryRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.RunAggregationQueryRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const RunAggregationQueryRequest* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<RunAggregationQueryRequest>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.RunAggregationQueryRequest)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.RunAggregationQueryRequest)
    MergeFrom(*source);
  }
}

void RunAggregationQueryRequest::MergeFrom(const RunAggregationQueryRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.RunAggregationQueryRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.parent().size() > 0) {

    parent_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parent_);
  }
  switch (from.query_type_case()) {
    case kStructuredAggregationQuery: {
      _internal_mutable_structured_aggregation_query()->::google::firestore::v1::StructuredAggregationQuery::MergeFrom(from._internal_structured_aggregation_query());
      break;
    }
    case QUERY_TYPE_NOT_SET: {
      break;
    }
  }
  switch (from.consistency_selector_case()) {
    case kTransaction: {
      _internal_set_transaction(from._internal_transaction());
      break;
    }
    case kNewTransaction: {
      _internal_mutable_new_transaction()->::google::firestore::v1::TransactionOptions::MergeFrom(from._internal_new_transaction());
      break;
    }
    case kReadTime: {
      _internal_mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_read_time());
      break;
    }
    case CONSISTENCY_SELECTOR_NOT_SET: {
      break;
    }
  }
}

void RunAggregationQueryRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.RunAggregationQueryRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void RunAggregationQueryRequest::CopyFrom(const RunAggregationQueryRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.RunAggregationQueryRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool RunAggregationQueryRequest::IsInitialized() const {
  return true;
}

void RunAggregationQueryRequest::InternalSwap(RunAggregationQueryRequest* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  parent_.Swap(&other->parent_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(query_type_, other->query_type_);
  swap(consistency_selector_, other->consistency_selector_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
  swap(_oneof_case_[1], other->_oneof_case_[1]);
}

::PROTOBUF_NAMESPACE_ID::Metadata RunAggregationQueryRequest::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void RunAggregationQueryResponse::InitAsDefaultInstance() {
  ::google::firestore::v1::_RunAggregationQueryResponse_default_instance_._instance.get_mutable()->result_ = const_cast< ::google::firestore::v1::AggregationResult*>(
      ::google::firestore::v1::AggregationResult::internal_default_instance());
  ::google::firestore::v1::_RunAggregationQueryResponse_default_instance_._instance.get_mutable()->read_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
      PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
}
class RunAggregationQueryResponse::_Internal {
 public:
  static const ::google::firestore::v1::AggregationResult& result(const RunAggregationQueryResponse* msg);
  static const PROTOBUF_NAMESPACE_ID::Timestamp& read_time(const RunAggregationQueryResponse* msg);
};

const ::google::firestore::v1::AggregationResult&
RunAggregationQueryResponse::_Internal::result(const RunAggregationQueryResponse* msg) {
  return *msg->result_;
}
const PROTOBUF_NAMESPACE_ID::Timestamp&
RunAggregationQueryResponse::_Internal::read_time(const RunAggregationQueryResponse* msg) {
  return *msg->read_time_;
}
void RunAggregationQueryResponse::clear_result() {
  if (GetArenaNoVirtual() == nullptr && result_ != nullptr) {
    delete result_;
  }
  result_ = nullptr;
}
void RunAggregationQueryResponse::clear_read_time() {
  if (GetArenaNoVirtual() == nullptr && read_time_ != nullptr) {
    delete read_time_;
  }
  read_time_ = nullptr;
}
RunAggregationQueryResponse::RunAggregationQueryResponse()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.RunAggregationQueryResponse)
}
RunAggregationQueryResponse::RunAggregationQueryResponse(const RunAggregationQueryResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  transaction_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_transaction().empty()) {
    transaction_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  }
  if (from._internal_has_result()) {
    result_ = new ::google::firestore::v1::AggregationResult(*from.result_);
  } else {
    result_ = nullptr;
  }
  if (from._internal_has_read_time()) {
    read_time_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.read_time_);
  } else {
    read_time_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.RunAggregationQueryResponse)
}

void RunAggregationQueryResponse::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_RunAggregationQueryResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  transaction_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  ::memset(&result_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&read_time_) -
      reinterpret_cast<char*>(&result_)) + sizeof(read_time_));
}

RunAggregationQueryResponse::~RunAggregationQueryResponse() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.RunAggregationQueryResponse)
  SharedDtor();
}

void RunAggregationQueryResponse::SharedDtor() {
  transaction_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete result_;
  if (this != internal_default_instance()) delete read_time_;
}

void RunAggregationQueryResponse::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const RunAggregationQueryResponse& RunAggregationQueryResponse::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RunAggregationQueryResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  return *internal_default_instance();
}


void RunAggregationQueryResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.RunAggregationQueryResponse)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  transaction_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == nullptr && result_ != nullptr) {
    delete result_;
  }
  result_ = nullptr;
  if (GetArenaNoVirtual() == nullptr && read_time_ != nullptr) {
    delete read_time_;
  }
  read_time_ = nullptr;
  _internal_metadata_.Clear();
}

const char* RunAggregationQueryResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // .google.firestore.v1.AggregationResult result = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_result(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // bytes transaction = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          auto str = _internal_mutable_transaction();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.protobuf.Timestamp read_time = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_read_time(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* RunAggregationQueryResponse::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.RunAggregationQueryResponse)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.firestore.v1.AggregationResult result = 1;
  if (this->has_result()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::result(this), target, stream);
  }

  // bytes transaction = 2;
  if (this->transaction().size() > 0) {
    target = stream->WriteBytesMaybeAliased(
        2, this->_internal_transaction(), target);
  }

  // .google.protobuf.Timestamp read_time = 3;
  if (this->has_read_time()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        3, _Internal::read_time(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.RunAggregationQueryResponse)
  return target;
}

size_t RunAggregationQueryResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.RunAggregationQueryResponse)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // bytes transaction = 2;
  if (this->transaction().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
        this->_internal_transaction());
  }

  // .google.firestore.v1.AggregationResult result = 1;
  if (this->has_result()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *result_);
  }

  // .google.protobuf.Timestamp read_time = 3;
  if (this->has_read_time()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *read_time_);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void RunAggregationQueryResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.RunAggregationQueryResponse)
  GOOGLE_DCHECK_NE(&from, this);
  const RunAggregationQueryResponse* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<RunAggregationQueryResponse>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.RunAggregationQueryResponse)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.RunAggregationQueryResponse)
    MergeFrom(*source);
  }
}

void RunAggregationQueryResponse::MergeFrom(const RunAggregationQueryResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.RunAggregationQueryResponse)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.transaction().size() > 0) {

    transaction_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.transaction_);
  }
  if (from.has_result()) {
    _internal_mutable_result()->::google::firestore::v1::AggregationResult::MergeFrom(from._internal_result());
  }
  if (from.has_read_time()) {
    _internal_mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_read_time());
  }
}

void RunAggregationQueryResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.RunAggregationQueryResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void RunAggregationQueryResponse::CopyFrom(const RunAggregationQueryResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.RunAggregationQueryResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool RunAggregationQueryResponse::IsInitialized() const {
  return true;
}

void RunAggregationQueryResponse::InternalSwap(RunAggregationQueryResponse* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  transaction_.Swap(&other->transaction_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(result_, other->result_);
  swap(read_time_, other->read_time_);
}

::PROTOBUF_NAMESPACE_ID::Metadata RunAggregationQueryResponse::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

WriteRequest_LabelsEntry_DoNotUse::WriteRequest_LabelsEntry_DoNotUse() {}
WriteRequest_LabelsEntry_DoNotUse::WriteRequest_LabelsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
    : SuperType(arena) {}
void WriteRequest_LabelsEntry_DoNotUse::MergeFrom(const WriteRequest_LabelsEntry_DoNotUse& other) {
  MergeFromInternal(other);
}
::PROTOBUF_NAMESPACE_ID::Metadata WriteRequest_LabelsEntry_DoNotUse::GetMetadata() const {
  return GetMetadataStatic();
}
void WriteRequest_LabelsEntry_DoNotUse::MergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::Message& other) {
  ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other);
}


// ===================================================================

void WriteRequest::InitAsDefaultInstance() {
}
class WriteRequest::_Internal {
 public:
};

void WriteRequest::clear_writes() {
  writes_.Clear();
}
WriteRequest::WriteRequest()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.WriteRequest)
}
WriteRequest::WriteRequest(const WriteRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr),
      writes_(from.writes_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  labels_.MergeFrom(from.labels_);
  database_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_database().empty()) {
    database_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.database_);
  }
  stream_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_stream_id().empty()) {
    stream_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.stream_id_);
  }
  stream_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_stream_token().empty()) {
    stream_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.stream_token_);
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.WriteRequest)
}

void WriteRequest::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_WriteRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  database_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  stream_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  stream_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

WriteRequest::~WriteRequest() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.WriteRequest)
  SharedDtor();
}

void WriteRequest::SharedDtor() {
  database_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  stream_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  stream_token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void WriteRequest::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const WriteRequest& WriteRequest::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_WriteRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  return *internal_default_instance();
}


void WriteRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.WriteRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  writes_.Clear();
  labels_.Clear();
  database_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  stream_id_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  stream_token_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  _internal_metadata_.Clear();
}

const char* WriteRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // string database = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          auto str = _internal_mutable_database();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.WriteRequest.database"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // string stream_id = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          auto str = _internal_mutable_stream_id();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.WriteRequest.stream_id"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // repeated .google.firestore.v1.Write writes = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_writes(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
        } else goto handle_unusual;
        continue;
      // bytes stream_token = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
          auto str = _internal_mutable_stream_token();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // map<string, string> labels = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(&labels_, ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* WriteRequest::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.WriteRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string database = 1;
  if (this->database().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_database().data(), static_cast<int>(this->_internal_database().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.WriteRequest.database");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_database(), target);
  }

  // string stream_id = 2;
  if (this->stream_id().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_stream_id().data(), static_cast<int>(this->_internal_stream_id().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.WriteRequest.stream_id");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_stream_id(), target);
  }

  // repeated .google.firestore.v1.Write writes = 3;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_writes_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(3, this->_internal_writes(i), target, stream);
  }

  // bytes stream_token = 4;
  if (this->stream_token().size() > 0) {
    target = stream->WriteBytesMaybeAliased(
        4, this->_internal_stream_token(), target);
  }

  // map<string, string> labels = 5;
  if (!this->_internal_labels().empty()) {
    typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_pointer
        ConstPtr;
    typedef ConstPtr SortItem;
    typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less;
    struct Utf8Check {
      static void Check(ConstPtr p) {
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
          p->first.data(), static_cast<int>(p->first.length()),
          ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
          "google.firestore.v1.WriteRequest.LabelsEntry.key");
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
          p->second.data(), static_cast<int>(p->second.length()),
          ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
          "google.firestore.v1.WriteRequest.LabelsEntry.value");
      }
    };

    if (stream->IsSerializationDeterministic() &&
        this->_internal_labels().size() > 1) {
      ::std::unique_ptr<SortItem[]> items(
          new SortItem[this->_internal_labels().size()]);
      typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::size_type size_type;
      size_type n = 0;
      for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
          it = this->_internal_labels().begin();
          it != this->_internal_labels().end(); ++it, ++n) {
        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
      }
      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
      for (size_type i = 0; i < n; i++) {
        target = WriteRequest_LabelsEntry_DoNotUse::Funcs::InternalSerialize(5, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target, stream);
        Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
      }
    } else {
      for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
          it = this->_internal_labels().begin();
          it != this->_internal_labels().end(); ++it) {
        target = WriteRequest_LabelsEntry_DoNotUse::Funcs::InternalSerialize(5, it->first, it->second, target, stream);
        Utf8Check::Check(&(*it));
      }
    }
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.WriteRequest)
  return target;
}

size_t WriteRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.WriteRequest)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .google.firestore.v1.Write writes = 3;
  total_size += 1UL * this->_internal_writes_size();
  for (const auto& msg : this->writes_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // map<string, string> labels = 5;
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_labels_size());
  for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
      it = this->_internal_labels().begin();
      it != this->_internal_labels().end(); ++it) {
    total_size += WriteRequest_LabelsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
  }

  // string database = 1;
  if (this->database().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_database());
  }

  // string stream_id = 2;
  if (this->stream_id().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_stream_id());
  }

  // bytes stream_token = 4;
  if (this->stream_token().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
        this->_internal_stream_token());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void WriteRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.WriteRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const WriteRequest* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<WriteRequest>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.WriteRequest)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.WriteRequest)
    MergeFrom(*source);
  }
}

void WriteRequest::MergeFrom(const WriteRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.WriteRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  writes_.MergeFrom(from.writes_);
  labels_.MergeFrom(from.labels_);
  if (from.database().size() > 0) {

    database_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.database_);
  }
  if (from.stream_id().size() > 0) {

    stream_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.stream_id_);
  }
  if (from.stream_token().size() > 0) {

    stream_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.stream_token_);
  }
}

void WriteRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.WriteRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void WriteRequest::CopyFrom(const WriteRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.WriteRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool WriteRequest::IsInitialized() const {
  return true;
}

void WriteRequest::InternalSwap(WriteRequest* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  writes_.InternalSwap(&other->writes_);
  labels_.Swap(&other->labels_);
  database_.Swap(&other->database_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  stream_id_.Swap(&other->stream_id_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  stream_token_.Swap(&other->stream_token_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
}

::PROTOBUF_NAMESPACE_ID::Metadata WriteRequest::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void WriteResponse::InitAsDefaultInstance() {
  ::google::firestore::v1::_WriteResponse_default_instance_._instance.get_mutable()->commit_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
      PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
}
class WriteResponse::_Internal {
 public:
  static const PROTOBUF_NAMESPACE_ID::Timestamp& commit_time(const WriteResponse* msg);
};

const PROTOBUF_NAMESPACE_ID::Timestamp&
WriteResponse::_Internal::commit_time(const WriteResponse* msg) {
  return *msg->commit_time_;
}
void WriteResponse::clear_write_results() {
  write_results_.Clear();
}
void WriteResponse::clear_commit_time() {
  if (GetArenaNoVirtual() == nullptr && commit_time_ != nullptr) {
    delete commit_time_;
  }
  commit_time_ = nullptr;
}
WriteResponse::WriteResponse()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.WriteResponse)
}
WriteResponse::WriteResponse(const WriteResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr),
      write_results_(from.write_results_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  stream_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_stream_id().empty()) {
    stream_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.stream_id_);
  }
  stream_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_stream_token().empty()) {
    stream_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.stream_token_);
  }
  if (from._internal_has_commit_time()) {
    commit_time_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.commit_time_);
  } else {
    commit_time_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.WriteResponse)
}

void WriteResponse::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_WriteResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  stream_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  stream_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  commit_time_ = nullptr;
}

WriteResponse::~WriteResponse() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.WriteResponse)
  SharedDtor();
}

void WriteResponse::SharedDtor() {
  stream_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  stream_token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete commit_time_;
}

void WriteResponse::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const WriteResponse& WriteResponse::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_WriteResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  return *internal_default_instance();
}


void WriteResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.WriteResponse)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  write_results_.Clear();
  stream_id_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  stream_token_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == nullptr && commit_time_ != nullptr) {
    delete commit_time_;
  }
  commit_time_ = nullptr;
  _internal_metadata_.Clear();
}

const char* WriteResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // string stream_id = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          auto str = _internal_mutable_stream_id();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.WriteResponse.stream_id"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // bytes stream_token = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          auto str = _internal_mutable_stream_token();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // repeated .google.firestore.v1.WriteResult write_results = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_write_results(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
        } else goto handle_unusual;
        continue;
      // .google.protobuf.Timestamp commit_time = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_commit_time(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* WriteResponse::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.WriteResponse)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string stream_id = 1;
  if (this->stream_id().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_stream_id().data(), static_cast<int>(this->_internal_stream_id().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.WriteResponse.stream_id");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_stream_id(), target);
  }

  // bytes stream_token = 2;
  if (this->stream_token().size() > 0) {
    target = stream->WriteBytesMaybeAliased(
        2, this->_internal_stream_token(), target);
  }

  // repeated .google.firestore.v1.WriteResult write_results = 3;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_write_results_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(3, this->_internal_write_results(i), target, stream);
  }

  // .google.protobuf.Timestamp commit_time = 4;
  if (this->has_commit_time()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        4, _Internal::commit_time(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.WriteResponse)
  return target;
}

size_t WriteResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.WriteResponse)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .google.firestore.v1.WriteResult write_results = 3;
  total_size += 1UL * this->_internal_write_results_size();
  for (const auto& msg : this->write_results_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // string stream_id = 1;
  if (this->stream_id().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_stream_id());
  }

  // bytes stream_token = 2;
  if (this->stream_token().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
        this->_internal_stream_token());
  }

  // .google.protobuf.Timestamp commit_time = 4;
  if (this->has_commit_time()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *commit_time_);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void WriteResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.WriteResponse)
  GOOGLE_DCHECK_NE(&from, this);
  const WriteResponse* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<WriteResponse>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.WriteResponse)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.WriteResponse)
    MergeFrom(*source);
  }
}

void WriteResponse::MergeFrom(const WriteResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.WriteResponse)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  write_results_.MergeFrom(from.write_results_);
  if (from.stream_id().size() > 0) {

    stream_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.stream_id_);
  }
  if (from.stream_token().size() > 0) {

    stream_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.stream_token_);
  }
  if (from.has_commit_time()) {
    _internal_mutable_commit_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_commit_time());
  }
}

void WriteResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.WriteResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void WriteResponse::CopyFrom(const WriteResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.WriteResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool WriteResponse::IsInitialized() const {
  return true;
}

void WriteResponse::InternalSwap(WriteResponse* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  write_results_.InternalSwap(&other->write_results_);
  stream_id_.Swap(&other->stream_id_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  stream_token_.Swap(&other->stream_token_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(commit_time_, other->commit_time_);
}

::PROTOBUF_NAMESPACE_ID::Metadata WriteResponse::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

ListenRequest_LabelsEntry_DoNotUse::ListenRequest_LabelsEntry_DoNotUse() {}
ListenRequest_LabelsEntry_DoNotUse::ListenRequest_LabelsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
    : SuperType(arena) {}
void ListenRequest_LabelsEntry_DoNotUse::MergeFrom(const ListenRequest_LabelsEntry_DoNotUse& other) {
  MergeFromInternal(other);
}
::PROTOBUF_NAMESPACE_ID::Metadata ListenRequest_LabelsEntry_DoNotUse::GetMetadata() const {
  return GetMetadataStatic();
}
void ListenRequest_LabelsEntry_DoNotUse::MergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::Message& other) {
  ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other);
}


// ===================================================================

void ListenRequest::InitAsDefaultInstance() {
  ::google::firestore::v1::_ListenRequest_default_instance_.add_target_ = const_cast< ::google::firestore::v1::Target*>(
      ::google::firestore::v1::Target::internal_default_instance());
  ::google::firestore::v1::_ListenRequest_default_instance_.remove_target_ = 0;
}
class ListenRequest::_Internal {
 public:
  static const ::google::firestore::v1::Target& add_target(const ListenRequest* msg);
};

const ::google::firestore::v1::Target&
ListenRequest::_Internal::add_target(const ListenRequest* msg) {
  return *msg->target_change_.add_target_;
}
void ListenRequest::set_allocated_add_target(::google::firestore::v1::Target* add_target) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_target_change();
  if (add_target) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
    if (message_arena != submessage_arena) {
      add_target = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, add_target, submessage_arena);
    }
    set_has_add_target();
    target_change_.add_target_ = add_target;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListenRequest.add_target)
}
ListenRequest::ListenRequest()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.ListenRequest)
}
ListenRequest::ListenRequest(const ListenRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  labels_.MergeFrom(from.labels_);
  database_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_database().empty()) {
    database_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.database_);
  }
  clear_has_target_change();
  switch (from.target_change_case()) {
    case kAddTarget: {
      _internal_mutable_add_target()->::google::firestore::v1::Target::MergeFrom(from._internal_add_target());
      break;
    }
    case kRemoveTarget: {
      _internal_set_remove_target(from._internal_remove_target());
      break;
    }
    case TARGET_CHANGE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ListenRequest)
}

void ListenRequest::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ListenRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  database_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  clear_has_target_change();
}

ListenRequest::~ListenRequest() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.ListenRequest)
  SharedDtor();
}

void ListenRequest::SharedDtor() {
  database_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (has_target_change()) {
    clear_target_change();
  }
}

void ListenRequest::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ListenRequest& ListenRequest::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ListenRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  return *internal_default_instance();
}


void ListenRequest::clear_target_change() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.ListenRequest)
  switch (target_change_case()) {
    case kAddTarget: {
      delete target_change_.add_target_;
      break;
    }
    case kRemoveTarget: {
      // No need to clear
      break;
    }
    case TARGET_CHANGE_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = TARGET_CHANGE_NOT_SET;
}


void ListenRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.ListenRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  labels_.Clear();
  database_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  clear_target_change();
  _internal_metadata_.Clear();
}

const char* ListenRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // string database = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          auto str = _internal_mutable_database();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.ListenRequest.database"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.Target add_target = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_add_target(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // int32 remove_target = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
          _internal_set_remove_target(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // map<string, string> labels = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(&labels_, ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* ListenRequest::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ListenRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string database = 1;
  if (this->database().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_database().data(), static_cast<int>(this->_internal_database().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.ListenRequest.database");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_database(), target);
  }

  // .google.firestore.v1.Target add_target = 2;
  if (_internal_has_add_target()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        2, _Internal::add_target(this), target, stream);
  }

  // int32 remove_target = 3;
  if (_internal_has_remove_target()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_remove_target(), target);
  }

  // map<string, string> labels = 4;
  if (!this->_internal_labels().empty()) {
    typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_pointer
        ConstPtr;
    typedef ConstPtr SortItem;
    typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less;
    struct Utf8Check {
      static void Check(ConstPtr p) {
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
          p->first.data(), static_cast<int>(p->first.length()),
          ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
          "google.firestore.v1.ListenRequest.LabelsEntry.key");
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
          p->second.data(), static_cast<int>(p->second.length()),
          ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
          "google.firestore.v1.ListenRequest.LabelsEntry.value");
      }
    };

    if (stream->IsSerializationDeterministic() &&
        this->_internal_labels().size() > 1) {
      ::std::unique_ptr<SortItem[]> items(
          new SortItem[this->_internal_labels().size()]);
      typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::size_type size_type;
      size_type n = 0;
      for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
          it = this->_internal_labels().begin();
          it != this->_internal_labels().end(); ++it, ++n) {
        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
      }
      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
      for (size_type i = 0; i < n; i++) {
        target = ListenRequest_LabelsEntry_DoNotUse::Funcs::InternalSerialize(4, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target, stream);
        Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
      }
    } else {
      for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
          it = this->_internal_labels().begin();
          it != this->_internal_labels().end(); ++it) {
        target = ListenRequest_LabelsEntry_DoNotUse::Funcs::InternalSerialize(4, it->first, it->second, target, stream);
        Utf8Check::Check(&(*it));
      }
    }
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ListenRequest)
  return target;
}

size_t ListenRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ListenRequest)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // map<string, string> labels = 4;
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_labels_size());
  for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
      it = this->_internal_labels().begin();
      it != this->_internal_labels().end(); ++it) {
    total_size += ListenRequest_LabelsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
  }

  // string database = 1;
  if (this->database().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_database());
  }

  switch (target_change_case()) {
    // .google.firestore.v1.Target add_target = 2;
    case kAddTarget: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *target_change_.add_target_);
      break;
    }
    // int32 remove_target = 3;
    case kRemoveTarget: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_remove_target());
      break;
    }
    case TARGET_CHANGE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void ListenRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ListenRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const ListenRequest* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ListenRequest>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ListenRequest)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ListenRequest)
    MergeFrom(*source);
  }
}

void ListenRequest::MergeFrom(const ListenRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ListenRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  labels_.MergeFrom(from.labels_);
  if (from.database().size() > 0) {

    database_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.database_);
  }
  switch (from.target_change_case()) {
    case kAddTarget: {
      _internal_mutable_add_target()->::google::firestore::v1::Target::MergeFrom(from._internal_add_target());
      break;
    }
    case kRemoveTarget: {
      _internal_set_remove_target(from._internal_remove_target());
      break;
    }
    case TARGET_CHANGE_NOT_SET: {
      break;
    }
  }
}

void ListenRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ListenRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ListenRequest::CopyFrom(const ListenRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ListenRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ListenRequest::IsInitialized() const {
  return true;
}

void ListenRequest::InternalSwap(ListenRequest* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  labels_.Swap(&other->labels_);
  database_.Swap(&other->database_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(target_change_, other->target_change_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
}

::PROTOBUF_NAMESPACE_ID::Metadata ListenRequest::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void ListenResponse::InitAsDefaultInstance() {
  ::google::firestore::v1::_ListenResponse_default_instance_.target_change_ = const_cast< ::google::firestore::v1::TargetChange*>(
      ::google::firestore::v1::TargetChange::internal_default_instance());
  ::google::firestore::v1::_ListenResponse_default_instance_.document_change_ = const_cast< ::google::firestore::v1::DocumentChange*>(
      ::google::firestore::v1::DocumentChange::internal_default_instance());
  ::google::firestore::v1::_ListenResponse_default_instance_.document_delete_ = const_cast< ::google::firestore::v1::DocumentDelete*>(
      ::google::firestore::v1::DocumentDelete::internal_default_instance());
  ::google::firestore::v1::_ListenResponse_default_instance_.document_remove_ = const_cast< ::google::firestore::v1::DocumentRemove*>(
      ::google::firestore::v1::DocumentRemove::internal_default_instance());
  ::google::firestore::v1::_ListenResponse_default_instance_.filter_ = const_cast< ::google::firestore::v1::ExistenceFilter*>(
      ::google::firestore::v1::ExistenceFilter::internal_default_instance());
}
class ListenResponse::_Internal {
 public:
  static const ::google::firestore::v1::TargetChange& target_change(const ListenResponse* msg);
  static const ::google::firestore::v1::DocumentChange& document_change(const ListenResponse* msg);
  static const ::google::firestore::v1::DocumentDelete& document_delete(const ListenResponse* msg);
  static const ::google::firestore::v1::DocumentRemove& document_remove(const ListenResponse* msg);
  static const ::google::firestore::v1::ExistenceFilter& filter(const ListenResponse* msg);
};

const ::google::firestore::v1::TargetChange&
ListenResponse::_Internal::target_change(const ListenResponse* msg) {
  return *msg->response_type_.target_change_;
}
const ::google::firestore::v1::DocumentChange&
ListenResponse::_Internal::document_change(const ListenResponse* msg) {
  return *msg->response_type_.document_change_;
}
const ::google::firestore::v1::DocumentDelete&
ListenResponse::_Internal::document_delete(const ListenResponse* msg) {
  return *msg->response_type_.document_delete_;
}
const ::google::firestore::v1::DocumentRemove&
ListenResponse::_Internal::document_remove(const ListenResponse* msg) {
  return *msg->response_type_.document_remove_;
}
const ::google::firestore::v1::ExistenceFilter&
ListenResponse::_Internal::filter(const ListenResponse* msg) {
  return *msg->response_type_.filter_;
}
void ListenResponse::set_allocated_target_change(::google::firestore::v1::TargetChange* target_change) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_response_type();
  if (target_change) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
    if (message_arena != submessage_arena) {
      target_change = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, target_change, submessage_arena);
    }
    set_has_target_change();
    response_type_.target_change_ = target_change;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListenResponse.target_change)
}
void ListenResponse::set_allocated_document_change(::google::firestore::v1::DocumentChange* document_change) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_response_type();
  if (document_change) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
    if (message_arena != submessage_arena) {
      document_change = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, document_change, submessage_arena);
    }
    set_has_document_change();
    response_type_.document_change_ = document_change;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListenResponse.document_change)
}
void ListenResponse::clear_document_change() {
  if (_internal_has_document_change()) {
    delete response_type_.document_change_;
    clear_has_response_type();
  }
}
void ListenResponse::set_allocated_document_delete(::google::firestore::v1::DocumentDelete* document_delete) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_response_type();
  if (document_delete) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
    if (message_arena != submessage_arena) {
      document_delete = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, document_delete, submessage_arena);
    }
    set_has_document_delete();
    response_type_.document_delete_ = document_delete;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListenResponse.document_delete)
}
void ListenResponse::clear_document_delete() {
  if (_internal_has_document_delete()) {
    delete response_type_.document_delete_;
    clear_has_response_type();
  }
}
void ListenResponse::set_allocated_document_remove(::google::firestore::v1::DocumentRemove* document_remove) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_response_type();
  if (document_remove) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
    if (message_arena != submessage_arena) {
      document_remove = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, document_remove, submessage_arena);
    }
    set_has_document_remove();
    response_type_.document_remove_ = document_remove;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListenResponse.document_remove)
}
void ListenResponse::clear_document_remove() {
  if (_internal_has_document_remove()) {
    delete response_type_.document_remove_;
    clear_has_response_type();
  }
}
void ListenResponse::set_allocated_filter(::google::firestore::v1::ExistenceFilter* filter) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_response_type();
  if (filter) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
    if (message_arena != submessage_arena) {
      filter = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, filter, submessage_arena);
    }
    set_has_filter();
    response_type_.filter_ = filter;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListenResponse.filter)
}
void ListenResponse::clear_filter() {
  if (_internal_has_filter()) {
    delete response_type_.filter_;
    clear_has_response_type();
  }
}
ListenResponse::ListenResponse()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.ListenResponse)
}
ListenResponse::ListenResponse(const ListenResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  clear_has_response_type();
  switch (from.response_type_case()) {
    case kTargetChange: {
      _internal_mutable_target_change()->::google::firestore::v1::TargetChange::MergeFrom(from._internal_target_change());
      break;
    }
    case kDocumentChange: {
      _internal_mutable_document_change()->::google::firestore::v1::DocumentChange::MergeFrom(from._internal_document_change());
      break;
    }
    case kDocumentDelete: {
      _internal_mutable_document_delete()->::google::firestore::v1::DocumentDelete::MergeFrom(from._internal_document_delete());
      break;
    }
    case kDocumentRemove: {
      _internal_mutable_document_remove()->::google::firestore::v1::DocumentRemove::MergeFrom(from._internal_document_remove());
      break;
    }
    case kFilter: {
      _internal_mutable_filter()->::google::firestore::v1::ExistenceFilter::MergeFrom(from._internal_filter());
      break;
    }
    case RESPONSE_TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ListenResponse)
}

void ListenResponse::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ListenResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  clear_has_response_type();
}

ListenResponse::~ListenResponse() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.ListenResponse)
  SharedDtor();
}

void ListenResponse::SharedDtor() {
  if (has_response_type()) {
    clear_response_type();
  }
}

void ListenResponse::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ListenResponse& ListenResponse::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ListenResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  return *internal_default_instance();
}


void ListenResponse::clear_response_type() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.ListenResponse)
  switch (response_type_case()) {
    case kTargetChange: {
      delete response_type_.target_change_;
      break;
    }
    case kDocumentChange: {
      delete response_type_.document_change_;
      break;
    }
    case kDocumentDelete: {
      delete response_type_.document_delete_;
      break;
    }
    case kDocumentRemove: {
      delete response_type_.document_remove_;
      break;
    }
    case kFilter: {
      delete response_type_.filter_;
      break;
    }
    case RESPONSE_TYPE_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = RESPONSE_TYPE_NOT_SET;
}


void ListenResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.ListenResponse)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  clear_response_type();
  _internal_metadata_.Clear();
}

const char* ListenResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // .google.firestore.v1.TargetChange target_change = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_target_change(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.DocumentChange document_change = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_document_change(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.DocumentDelete document_delete = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_document_delete(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.ExistenceFilter filter = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_filter(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.DocumentRemove document_remove = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_document_remove(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* ListenResponse::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ListenResponse)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.firestore.v1.TargetChange target_change = 2;
  if (_internal_has_target_change()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        2, _Internal::target_change(this), target, stream);
  }

  // .google.firestore.v1.DocumentChange document_change = 3;
  if (_internal_has_document_change()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        3, _Internal::document_change(this), target, stream);
  }

  // .google.firestore.v1.DocumentDelete document_delete = 4;
  if (_internal_has_document_delete()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        4, _Internal::document_delete(this), target, stream);
  }

  // .google.firestore.v1.ExistenceFilter filter = 5;
  if (_internal_has_filter()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        5, _Internal::filter(this), target, stream);
  }

  // .google.firestore.v1.DocumentRemove document_remove = 6;
  if (_internal_has_document_remove()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        6, _Internal::document_remove(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ListenResponse)
  return target;
}

size_t ListenResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ListenResponse)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  switch (response_type_case()) {
    // .google.firestore.v1.TargetChange target_change = 2;
    case kTargetChange: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *response_type_.target_change_);
      break;
    }
    // .google.firestore.v1.DocumentChange document_change = 3;
    case kDocumentChange: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *response_type_.document_change_);
      break;
    }
    // .google.firestore.v1.DocumentDelete document_delete = 4;
    case kDocumentDelete: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *response_type_.document_delete_);
      break;
    }
    // .google.firestore.v1.DocumentRemove document_remove = 6;
    case kDocumentRemove: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *response_type_.document_remove_);
      break;
    }
    // .google.firestore.v1.ExistenceFilter filter = 5;
    case kFilter: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *response_type_.filter_);
      break;
    }
    case RESPONSE_TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void ListenResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ListenResponse)
  GOOGLE_DCHECK_NE(&from, this);
  const ListenResponse* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ListenResponse>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ListenResponse)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ListenResponse)
    MergeFrom(*source);
  }
}

void ListenResponse::MergeFrom(const ListenResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ListenResponse)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.response_type_case()) {
    case kTargetChange: {
      _internal_mutable_target_change()->::google::firestore::v1::TargetChange::MergeFrom(from._internal_target_change());
      break;
    }
    case kDocumentChange: {
      _internal_mutable_document_change()->::google::firestore::v1::DocumentChange::MergeFrom(from._internal_document_change());
      break;
    }
    case kDocumentDelete: {
      _internal_mutable_document_delete()->::google::firestore::v1::DocumentDelete::MergeFrom(from._internal_document_delete());
      break;
    }
    case kDocumentRemove: {
      _internal_mutable_document_remove()->::google::firestore::v1::DocumentRemove::MergeFrom(from._internal_document_remove());
      break;
    }
    case kFilter: {
      _internal_mutable_filter()->::google::firestore::v1::ExistenceFilter::MergeFrom(from._internal_filter());
      break;
    }
    case RESPONSE_TYPE_NOT_SET: {
      break;
    }
  }
}

void ListenResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ListenResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ListenResponse::CopyFrom(const ListenResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ListenResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ListenResponse::IsInitialized() const {
  return true;
}

void ListenResponse::InternalSwap(ListenResponse* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(response_type_, other->response_type_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
}

::PROTOBUF_NAMESPACE_ID::Metadata ListenResponse::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void Target_DocumentsTarget::InitAsDefaultInstance() {
}
class Target_DocumentsTarget::_Internal {
 public:
};

Target_DocumentsTarget::Target_DocumentsTarget()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.Target.DocumentsTarget)
}
Target_DocumentsTarget::Target_DocumentsTarget(const Target_DocumentsTarget& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr),
      documents_(from.documents_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.Target.DocumentsTarget)
}

void Target_DocumentsTarget::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Target_DocumentsTarget_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
}

Target_DocumentsTarget::~Target_DocumentsTarget() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.Target.DocumentsTarget)
  SharedDtor();
}

void Target_DocumentsTarget::SharedDtor() {
}

void Target_DocumentsTarget::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const Target_DocumentsTarget& Target_DocumentsTarget::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Target_DocumentsTarget_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  return *internal_default_instance();
}


void Target_DocumentsTarget::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.Target.DocumentsTarget)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  documents_.Clear();
  _internal_metadata_.Clear();
}

const char* Target_DocumentsTarget::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // repeated string documents = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_documents();
            ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.Target.DocumentsTarget.documents"));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* Target_DocumentsTarget::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Target.DocumentsTarget)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated string documents = 2;
  for (int i = 0, n = this->_internal_documents_size(); i < n; i++) {
    const auto& s = this->_internal_documents(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      s.data(), static_cast<int>(s.length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.Target.DocumentsTarget.documents");
    target = stream->WriteString(2, s, target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Target.DocumentsTarget)
  return target;
}

size_t Target_DocumentsTarget::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Target.DocumentsTarget)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated string documents = 2;
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(documents_.size());
  for (int i = 0, n = documents_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      documents_.Get(i));
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void Target_DocumentsTarget::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.Target.DocumentsTarget)
  GOOGLE_DCHECK_NE(&from, this);
  const Target_DocumentsTarget* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Target_DocumentsTarget>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.Target.DocumentsTarget)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.Target.DocumentsTarget)
    MergeFrom(*source);
  }
}

void Target_DocumentsTarget::MergeFrom(const Target_DocumentsTarget& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.Target.DocumentsTarget)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  documents_.MergeFrom(from.documents_);
}

void Target_DocumentsTarget::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.Target.DocumentsTarget)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void Target_DocumentsTarget::CopyFrom(const Target_DocumentsTarget& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.Target.DocumentsTarget)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Target_DocumentsTarget::IsInitialized() const {
  return true;
}

void Target_DocumentsTarget::InternalSwap(Target_DocumentsTarget* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  documents_.InternalSwap(&other->documents_);
}

::PROTOBUF_NAMESPACE_ID::Metadata Target_DocumentsTarget::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void Target_QueryTarget::InitAsDefaultInstance() {
  ::google::firestore::v1::_Target_QueryTarget_default_instance_.structured_query_ = const_cast< ::google::firestore::v1::StructuredQuery*>(
      ::google::firestore::v1::StructuredQuery::internal_default_instance());
}
class Target_QueryTarget::_Internal {
 public:
  static const ::google::firestore::v1::StructuredQuery& structured_query(const Target_QueryTarget* msg);
};

const ::google::firestore::v1::StructuredQuery&
Target_QueryTarget::_Internal::structured_query(const Target_QueryTarget* msg) {
  return *msg->query_type_.structured_query_;
}
void Target_QueryTarget::set_allocated_structured_query(::google::firestore::v1::StructuredQuery* structured_query) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_query_type();
  if (structured_query) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
    if (message_arena != submessage_arena) {
      structured_query = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, structured_query, submessage_arena);
    }
    set_has_structured_query();
    query_type_.structured_query_ = structured_query;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Target.QueryTarget.structured_query)
}
void Target_QueryTarget::clear_structured_query() {
  if (_internal_has_structured_query()) {
    delete query_type_.structured_query_;
    clear_has_query_type();
  }
}
Target_QueryTarget::Target_QueryTarget()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.Target.QueryTarget)
}
Target_QueryTarget::Target_QueryTarget(const Target_QueryTarget& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  parent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_parent().empty()) {
    parent_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parent_);
  }
  clear_has_query_type();
  switch (from.query_type_case()) {
    case kStructuredQuery: {
      _internal_mutable_structured_query()->::google::firestore::v1::StructuredQuery::MergeFrom(from._internal_structured_query());
      break;
    }
    case QUERY_TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.Target.QueryTarget)
}

void Target_QueryTarget::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Target_QueryTarget_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  parent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  clear_has_query_type();
}

Target_QueryTarget::~Target_QueryTarget() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.Target.QueryTarget)
  SharedDtor();
}

void Target_QueryTarget::SharedDtor() {
  parent_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (has_query_type()) {
    clear_query_type();
  }
}

void Target_QueryTarget::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const Target_QueryTarget& Target_QueryTarget::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Target_QueryTarget_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  return *internal_default_instance();
}


void Target_QueryTarget::clear_query_type() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.Target.QueryTarget)
  switch (query_type_case()) {
    case kStructuredQuery: {
      delete query_type_.structured_query_;
      break;
    }
    case QUERY_TYPE_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = QUERY_TYPE_NOT_SET;
}


void Target_QueryTarget::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.Target.QueryTarget)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  parent_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  clear_query_type();
  _internal_metadata_.Clear();
}

const char* Target_QueryTarget::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // string parent = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          auto str = _internal_mutable_parent();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.Target.QueryTarget.parent"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.StructuredQuery structured_query = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_structured_query(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* Target_QueryTarget::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Target.QueryTarget)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string parent = 1;
  if (this->parent().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_parent().data(), static_cast<int>(this->_internal_parent().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.Target.QueryTarget.parent");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_parent(), target);
  }

  // .google.firestore.v1.StructuredQuery structured_query = 2;
  if (_internal_has_structured_query()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        2, _Internal::structured_query(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Target.QueryTarget)
  return target;
}

size_t Target_QueryTarget::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Target.QueryTarget)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // string parent = 1;
  if (this->parent().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_parent());
  }

  switch (query_type_case()) {
    // .google.firestore.v1.StructuredQuery structured_query = 2;
    case kStructuredQuery: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *query_type_.structured_query_);
      break;
    }
    case QUERY_TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void Target_QueryTarget::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.Target.QueryTarget)
  GOOGLE_DCHECK_NE(&from, this);
  const Target_QueryTarget* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Target_QueryTarget>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.Target.QueryTarget)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.Target.QueryTarget)
    MergeFrom(*source);
  }
}

void Target_QueryTarget::MergeFrom(const Target_QueryTarget& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.Target.QueryTarget)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.parent().size() > 0) {

    parent_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parent_);
  }
  switch (from.query_type_case()) {
    case kStructuredQuery: {
      _internal_mutable_structured_query()->::google::firestore::v1::StructuredQuery::MergeFrom(from._internal_structured_query());
      break;
    }
    case QUERY_TYPE_NOT_SET: {
      break;
    }
  }
}

void Target_QueryTarget::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.Target.QueryTarget)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void Target_QueryTarget::CopyFrom(const Target_QueryTarget& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.Target.QueryTarget)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Target_QueryTarget::IsInitialized() const {
  return true;
}

void Target_QueryTarget::InternalSwap(Target_QueryTarget* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  parent_.Swap(&other->parent_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(query_type_, other->query_type_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
}

::PROTOBUF_NAMESPACE_ID::Metadata Target_QueryTarget::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void Target::InitAsDefaultInstance() {
  ::google::firestore::v1::_Target_default_instance_.query_ = const_cast< ::google::firestore::v1::Target_QueryTarget*>(
      ::google::firestore::v1::Target_QueryTarget::internal_default_instance());
  ::google::firestore::v1::_Target_default_instance_.documents_ = const_cast< ::google::firestore::v1::Target_DocumentsTarget*>(
      ::google::firestore::v1::Target_DocumentsTarget::internal_default_instance());
  ::google::firestore::v1::_Target_default_instance_.resume_token_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  ::google::firestore::v1::_Target_default_instance_.read_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
      PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
}
class Target::_Internal {
 public:
  static const ::google::firestore::v1::Target_QueryTarget& query(const Target* msg);
  static const ::google::firestore::v1::Target_DocumentsTarget& documents(const Target* msg);
  static const PROTOBUF_NAMESPACE_ID::Timestamp& read_time(const Target* msg);
};

const ::google::firestore::v1::Target_QueryTarget&
Target::_Internal::query(const Target* msg) {
  return *msg->target_type_.query_;
}
const ::google::firestore::v1::Target_DocumentsTarget&
Target::_Internal::documents(const Target* msg) {
  return *msg->target_type_.documents_;
}
const PROTOBUF_NAMESPACE_ID::Timestamp&
Target::_Internal::read_time(const Target* msg) {
  return *msg->resume_type_.read_time_;
}
void Target::set_allocated_query(::google::firestore::v1::Target_QueryTarget* query) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_target_type();
  if (query) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
    if (message_arena != submessage_arena) {
      query = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, query, submessage_arena);
    }
    set_has_query();
    target_type_.query_ = query;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Target.query)
}
void Target::set_allocated_documents(::google::firestore::v1::Target_DocumentsTarget* documents) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_target_type();
  if (documents) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
    if (message_arena != submessage_arena) {
      documents = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, documents, submessage_arena);
    }
    set_has_documents();
    target_type_.documents_ = documents;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Target.documents)
}
void Target::set_allocated_read_time(PROTOBUF_NAMESPACE_ID::Timestamp* read_time) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_resume_type();
  if (read_time) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(read_time)->GetArena();
    if (message_arena != submessage_arena) {
      read_time = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, read_time, submessage_arena);
    }
    set_has_read_time();
    resume_type_.read_time_ = read_time;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Target.read_time)
}
void Target::clear_read_time() {
  if (_internal_has_read_time()) {
    delete resume_type_.read_time_;
    clear_has_resume_type();
  }
}
Target::Target()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.Target)
}
Target::Target(const Target& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::memcpy(&target_id_, &from.target_id_,
    static_cast<size_t>(reinterpret_cast<char*>(&once_) -
    reinterpret_cast<char*>(&target_id_)) + sizeof(once_));
  clear_has_target_type();
  switch (from.target_type_case()) {
    case kQuery: {
      _internal_mutable_query()->::google::firestore::v1::Target_QueryTarget::MergeFrom(from._internal_query());
      break;
    }
    case kDocuments: {
      _internal_mutable_documents()->::google::firestore::v1::Target_DocumentsTarget::MergeFrom(from._internal_documents());
      break;
    }
    case TARGET_TYPE_NOT_SET: {
      break;
    }
  }
  clear_has_resume_type();
  switch (from.resume_type_case()) {
    case kResumeToken: {
      _internal_set_resume_token(from._internal_resume_token());
      break;
    }
    case kReadTime: {
      _internal_mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_read_time());
      break;
    }
    case RESUME_TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.Target)
}

void Target::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Target_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  ::memset(&target_id_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&once_) -
      reinterpret_cast<char*>(&target_id_)) + sizeof(once_));
  clear_has_target_type();
  clear_has_resume_type();
}

Target::~Target() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.Target)
  SharedDtor();
}

void Target::SharedDtor() {
  if (has_target_type()) {
    clear_target_type();
  }
  if (has_resume_type()) {
    clear_resume_type();
  }
}

void Target::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const Target& Target::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Target_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  return *internal_default_instance();
}


void Target::clear_target_type() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.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_resume_type() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.Target)
  switch (resume_type_case()) {
    case kResumeToken: {
      resume_type_.resume_token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
      break;
    }
    case kReadTime: {
      delete resume_type_.read_time_;
      break;
    }
    case RESUME_TYPE_NOT_SET: {
      break;
    }
  }
  _oneof_case_[1] = RESUME_TYPE_NOT_SET;
}


void Target::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.Target)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  ::memset(&target_id_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&once_) -
      reinterpret_cast<char*>(&target_id_)) + sizeof(once_));
  clear_target_type();
  clear_resume_type();
  _internal_metadata_.Clear();
}

const char* Target::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // .google.firestore.v1.Target.QueryTarget query = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_query(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.Target.DocumentsTarget documents = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_documents(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // bytes resume_token = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
          auto str = _internal_mutable_resume_token();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // int32 target_id = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
          target_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // bool once = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) {
          once_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.protobuf.Timestamp read_time = 11;
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 90)) {
          ptr = ctx->ParseMessage(_internal_mutable_read_time(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* Target::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Target)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.firestore.v1.Target.QueryTarget query = 2;
  if (_internal_has_query()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        2, _Internal::query(this), target, stream);
  }

  // .google.firestore.v1.Target.DocumentsTarget documents = 3;
  if (_internal_has_documents()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        3, _Internal::documents(this), target, stream);
  }

  // bytes resume_token = 4;
  if (_internal_has_resume_token()) {
    target = stream->WriteBytesMaybeAliased(
        4, this->_internal_resume_token(), target);
  }

  // int32 target_id = 5;
  if (this->target_id() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(5, this->_internal_target_id(), target);
  }

  // bool once = 6;
  if (this->once() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_once(), target);
  }

  // .google.protobuf.Timestamp read_time = 11;
  if (_internal_has_read_time()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        11, _Internal::read_time(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Target)
  return target;
}

size_t Target::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Target)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // int32 target_id = 5;
  if (this->target_id() != 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
        this->_internal_target_id());
  }

  // bool once = 6;
  if (this->once() != 0) {
    total_size += 1 + 1;
  }

  switch (target_type_case()) {
    // .google.firestore.v1.Target.QueryTarget query = 2;
    case kQuery: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *target_type_.query_);
      break;
    }
    // .google.firestore.v1.Target.DocumentsTarget documents = 3;
    case kDocuments: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *target_type_.documents_);
      break;
    }
    case TARGET_TYPE_NOT_SET: {
      break;
    }
  }
  switch (resume_type_case()) {
    // bytes resume_token = 4;
    case kResumeToken: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
          this->_internal_resume_token());
      break;
    }
    // .google.protobuf.Timestamp read_time = 11;
    case kReadTime: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *resume_type_.read_time_);
      break;
    }
    case RESUME_TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void Target::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.Target)
  GOOGLE_DCHECK_NE(&from, this);
  const Target* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Target>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.Target)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.Target)
    MergeFrom(*source);
  }
}

void Target::MergeFrom(const Target& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.Target)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.target_id() != 0) {
    _internal_set_target_id(from._internal_target_id());
  }
  if (from.once() != 0) {
    _internal_set_once(from._internal_once());
  }
  switch (from.target_type_case()) {
    case kQuery: {
      _internal_mutable_query()->::google::firestore::v1::Target_QueryTarget::MergeFrom(from._internal_query());
      break;
    }
    case kDocuments: {
      _internal_mutable_documents()->::google::firestore::v1::Target_DocumentsTarget::MergeFrom(from._internal_documents());
      break;
    }
    case TARGET_TYPE_NOT_SET: {
      break;
    }
  }
  switch (from.resume_type_case()) {
    case kResumeToken: {
      _internal_set_resume_token(from._internal_resume_token());
      break;
    }
    case kReadTime: {
      _internal_mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_read_time());
      break;
    }
    case RESUME_TYPE_NOT_SET: {
      break;
    }
  }
}

void Target::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.Target)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void Target::CopyFrom(const Target& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.Target)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Target::IsInitialized() const {
  return true;
}

void Target::InternalSwap(Target* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(target_id_, other->target_id_);
  swap(once_, other->once_);
  swap(target_type_, other->target_type_);
  swap(resume_type_, other->resume_type_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
  swap(_oneof_case_[1], other->_oneof_case_[1]);
}

::PROTOBUF_NAMESPACE_ID::Metadata Target::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void TargetChange::InitAsDefaultInstance() {
  ::google::firestore::v1::_TargetChange_default_instance_._instance.get_mutable()->cause_ = const_cast< ::google::rpc::Status*>(
      ::google::rpc::Status::internal_default_instance());
  ::google::firestore::v1::_TargetChange_default_instance_._instance.get_mutable()->read_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
      PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
}
class TargetChange::_Internal {
 public:
  static const ::google::rpc::Status& cause(const TargetChange* msg);
  static const PROTOBUF_NAMESPACE_ID::Timestamp& read_time(const TargetChange* msg);
};

const ::google::rpc::Status&
TargetChange::_Internal::cause(const TargetChange* msg) {
  return *msg->cause_;
}
const PROTOBUF_NAMESPACE_ID::Timestamp&
TargetChange::_Internal::read_time(const TargetChange* msg) {
  return *msg->read_time_;
}
void TargetChange::clear_cause() {
  if (GetArenaNoVirtual() == nullptr && cause_ != nullptr) {
    delete cause_;
  }
  cause_ = nullptr;
}
void TargetChange::clear_read_time() {
  if (GetArenaNoVirtual() == nullptr && read_time_ != nullptr) {
    delete read_time_;
  }
  read_time_ = nullptr;
}
TargetChange::TargetChange()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.TargetChange)
}
TargetChange::TargetChange(const TargetChange& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr),
      target_ids_(from.target_ids_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  resume_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_resume_token().empty()) {
    resume_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.resume_token_);
  }
  if (from._internal_has_cause()) {
    cause_ = new ::google::rpc::Status(*from.cause_);
  } else {
    cause_ = nullptr;
  }
  if (from._internal_has_read_time()) {
    read_time_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.read_time_);
  } else {
    read_time_ = nullptr;
  }
  target_change_type_ = from.target_change_type_;
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.TargetChange)
}

void TargetChange::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_TargetChange_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  resume_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  ::memset(&cause_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&target_change_type_) -
      reinterpret_cast<char*>(&cause_)) + sizeof(target_change_type_));
}

TargetChange::~TargetChange() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.TargetChange)
  SharedDtor();
}

void TargetChange::SharedDtor() {
  resume_token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete cause_;
  if (this != internal_default_instance()) delete read_time_;
}

void TargetChange::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const TargetChange& TargetChange::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_TargetChange_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  return *internal_default_instance();
}


void TargetChange::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.TargetChange)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  target_ids_.Clear();
  resume_token_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == nullptr && cause_ != nullptr) {
    delete cause_;
  }
  cause_ = nullptr;
  if (GetArenaNoVirtual() == nullptr && read_time_ != nullptr) {
    delete read_time_;
  }
  read_time_ = nullptr;
  target_change_type_ = 0;
  _internal_metadata_.Clear();
}

const char* TargetChange::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
          ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
          _internal_set_target_change_type(static_cast<::google::firestore::v1::TargetChange_TargetChangeType>(val));
        } else goto handle_unusual;
        continue;
      // repeated int32 target_ids = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_target_ids(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16) {
          _internal_add_target_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.rpc.Status cause = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_cause(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // bytes resume_token = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
          auto str = _internal_mutable_resume_token();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.protobuf.Timestamp read_time = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_read_time(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* TargetChange::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.TargetChange)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1;
  if (this->target_change_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      1, this->_internal_target_change_type(), target);
  }

  // repeated int32 target_ids = 2;
  {
    int byte_size = _target_ids_cached_byte_size_.load(std::memory_order_relaxed);
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(
          2, _internal_target_ids(), byte_size, target);
    }
  }

  // .google.rpc.Status cause = 3;
  if (this->has_cause()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        3, _Internal::cause(this), target, stream);
  }

  // bytes resume_token = 4;
  if (this->resume_token().size() > 0) {
    target = stream->WriteBytesMaybeAliased(
        4, this->_internal_resume_token(), target);
  }

  // .google.protobuf.Timestamp read_time = 6;
  if (this->has_read_time()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        6, _Internal::read_time(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.TargetChange)
  return target;
}

size_t TargetChange::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.TargetChange)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated int32 target_ids = 2;
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      Int32Size(this->target_ids_);
    if (data_size > 0) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
            static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size));
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
    _target_ids_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

  // bytes resume_token = 4;
  if (this->resume_token().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
        this->_internal_resume_token());
  }

  // .google.rpc.Status cause = 3;
  if (this->has_cause()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *cause_);
  }

  // .google.protobuf.Timestamp read_time = 6;
  if (this->has_read_time()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *read_time_);
  }

  // .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1;
  if (this->target_change_type() != 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_target_change_type());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void TargetChange::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.TargetChange)
  GOOGLE_DCHECK_NE(&from, this);
  const TargetChange* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<TargetChange>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.TargetChange)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.TargetChange)
    MergeFrom(*source);
  }
}

void TargetChange::MergeFrom(const TargetChange& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.TargetChange)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  target_ids_.MergeFrom(from.target_ids_);
  if (from.resume_token().size() > 0) {

    resume_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.resume_token_);
  }
  if (from.has_cause()) {
    _internal_mutable_cause()->::google::rpc::Status::MergeFrom(from._internal_cause());
  }
  if (from.has_read_time()) {
    _internal_mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_read_time());
  }
  if (from.target_change_type() != 0) {
    _internal_set_target_change_type(from._internal_target_change_type());
  }
}

void TargetChange::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.TargetChange)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TargetChange::CopyFrom(const TargetChange& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.TargetChange)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TargetChange::IsInitialized() const {
  return true;
}

void TargetChange::InternalSwap(TargetChange* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  target_ids_.InternalSwap(&other->target_ids_);
  resume_token_.Swap(&other->resume_token_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(cause_, other->cause_);
  swap(read_time_, other->read_time_);
  swap(target_change_type_, other->target_change_type_);
}

::PROTOBUF_NAMESPACE_ID::Metadata TargetChange::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void ListCollectionIdsRequest::InitAsDefaultInstance() {
}
class ListCollectionIdsRequest::_Internal {
 public:
};

ListCollectionIdsRequest::ListCollectionIdsRequest()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.ListCollectionIdsRequest)
}
ListCollectionIdsRequest::ListCollectionIdsRequest(const ListCollectionIdsRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  parent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_parent().empty()) {
    parent_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parent_);
  }
  page_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_page_token().empty()) {
    page_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.page_token_);
  }
  page_size_ = from.page_size_;
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ListCollectionIdsRequest)
}

void ListCollectionIdsRequest::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ListCollectionIdsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  parent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  page_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  page_size_ = 0;
}

ListCollectionIdsRequest::~ListCollectionIdsRequest() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.ListCollectionIdsRequest)
  SharedDtor();
}

void ListCollectionIdsRequest::SharedDtor() {
  parent_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  page_token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void ListCollectionIdsRequest::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ListCollectionIdsRequest& ListCollectionIdsRequest::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ListCollectionIdsRequest_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  return *internal_default_instance();
}


void ListCollectionIdsRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.ListCollectionIdsRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  parent_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  page_token_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  page_size_ = 0;
  _internal_metadata_.Clear();
}

const char* ListCollectionIdsRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // string parent = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          auto str = _internal_mutable_parent();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.ListCollectionIdsRequest.parent"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // int32 page_size = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
          page_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // string page_token = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
          auto str = _internal_mutable_page_token();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.ListCollectionIdsRequest.page_token"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* ListCollectionIdsRequest::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ListCollectionIdsRequest)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string parent = 1;
  if (this->parent().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_parent().data(), static_cast<int>(this->_internal_parent().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.ListCollectionIdsRequest.parent");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_parent(), target);
  }

  // int32 page_size = 2;
  if (this->page_size() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_page_size(), target);
  }

  // string page_token = 3;
  if (this->page_token().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_page_token().data(), static_cast<int>(this->_internal_page_token().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.ListCollectionIdsRequest.page_token");
    target = stream->WriteStringMaybeAliased(
        3, this->_internal_page_token(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ListCollectionIdsRequest)
  return target;
}

size_t ListCollectionIdsRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ListCollectionIdsRequest)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // string parent = 1;
  if (this->parent().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_parent());
  }

  // string page_token = 3;
  if (this->page_token().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_page_token());
  }

  // int32 page_size = 2;
  if (this->page_size() != 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
        this->_internal_page_size());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void ListCollectionIdsRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ListCollectionIdsRequest)
  GOOGLE_DCHECK_NE(&from, this);
  const ListCollectionIdsRequest* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ListCollectionIdsRequest>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ListCollectionIdsRequest)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ListCollectionIdsRequest)
    MergeFrom(*source);
  }
}

void ListCollectionIdsRequest::MergeFrom(const ListCollectionIdsRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ListCollectionIdsRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.parent().size() > 0) {

    parent_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parent_);
  }
  if (from.page_token().size() > 0) {

    page_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.page_token_);
  }
  if (from.page_size() != 0) {
    _internal_set_page_size(from._internal_page_size());
  }
}

void ListCollectionIdsRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ListCollectionIdsRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ListCollectionIdsRequest::CopyFrom(const ListCollectionIdsRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ListCollectionIdsRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ListCollectionIdsRequest::IsInitialized() const {
  return true;
}

void ListCollectionIdsRequest::InternalSwap(ListCollectionIdsRequest* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  parent_.Swap(&other->parent_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  page_token_.Swap(&other->page_token_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(page_size_, other->page_size_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ListCollectionIdsRequest::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void ListCollectionIdsResponse::InitAsDefaultInstance() {
}
class ListCollectionIdsResponse::_Internal {
 public:
};

ListCollectionIdsResponse::ListCollectionIdsResponse()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.ListCollectionIdsResponse)
}
ListCollectionIdsResponse::ListCollectionIdsResponse(const ListCollectionIdsResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr),
      collection_ids_(from.collection_ids_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  next_page_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_next_page_token().empty()) {
    next_page_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.next_page_token_);
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ListCollectionIdsResponse)
}

void ListCollectionIdsResponse::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ListCollectionIdsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  next_page_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

ListCollectionIdsResponse::~ListCollectionIdsResponse() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.ListCollectionIdsResponse)
  SharedDtor();
}

void ListCollectionIdsResponse::SharedDtor() {
  next_page_token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void ListCollectionIdsResponse::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ListCollectionIdsResponse& ListCollectionIdsResponse::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ListCollectionIdsResponse_google_2ffirestore_2fv1_2ffirestore_2eproto.base);
  return *internal_default_instance();
}


void ListCollectionIdsResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.ListCollectionIdsResponse)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  collection_ids_.Clear();
  next_page_token_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  _internal_metadata_.Clear();
}

const char* ListCollectionIdsResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // repeated string collection_ids = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_collection_ids();
            ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.ListCollectionIdsResponse.collection_ids"));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
        } else goto handle_unusual;
        continue;
      // string next_page_token = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          auto str = _internal_mutable_next_page_token();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.ListCollectionIdsResponse.next_page_token"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* ListCollectionIdsResponse::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ListCollectionIdsResponse)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated string collection_ids = 1;
  for (int i = 0, n = this->_internal_collection_ids_size(); i < n; i++) {
    const auto& s = this->_internal_collection_ids(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      s.data(), static_cast<int>(s.length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.ListCollectionIdsResponse.collection_ids");
    target = stream->WriteString(1, s, target);
  }

  // string next_page_token = 2;
  if (this->next_page_token().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_next_page_token().data(), static_cast<int>(this->_internal_next_page_token().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.ListCollectionIdsResponse.next_page_token");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_next_page_token(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ListCollectionIdsResponse)
  return target;
}

size_t ListCollectionIdsResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ListCollectionIdsResponse)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated string collection_ids = 1;
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(collection_ids_.size());
  for (int i = 0, n = collection_ids_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      collection_ids_.Get(i));
  }

  // string next_page_token = 2;
  if (this->next_page_token().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_next_page_token());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void ListCollectionIdsResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ListCollectionIdsResponse)
  GOOGLE_DCHECK_NE(&from, this);
  const ListCollectionIdsResponse* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ListCollectionIdsResponse>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ListCollectionIdsResponse)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ListCollectionIdsResponse)
    MergeFrom(*source);
  }
}

void ListCollectionIdsResponse::MergeFrom(const ListCollectionIdsResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ListCollectionIdsResponse)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  collection_ids_.MergeFrom(from.collection_ids_);
  if (from.next_page_token().size() > 0) {

    next_page_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.next_page_token_);
  }
}

void ListCollectionIdsResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ListCollectionIdsResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ListCollectionIdsResponse::CopyFrom(const ListCollectionIdsResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ListCollectionIdsResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ListCollectionIdsResponse::IsInitialized() const {
  return true;
}

void ListCollectionIdsResponse::InternalSwap(ListCollectionIdsResponse* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  collection_ids_.InternalSwap(&other->collection_ids_);
  next_page_token_.Swap(&other->next_page_token_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
}

::PROTOBUF_NAMESPACE_ID::Metadata ListCollectionIdsResponse::GetMetadata() const {
  return GetMetadataStatic();
}


// @@protoc_insertion_point(namespace_scope)
}  // namespace v1
}  // namespace firestore
}  // namespace google
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::google::firestore::v1::GetDocumentRequest* Arena::CreateMaybeMessage< ::google::firestore::v1::GetDocumentRequest >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::GetDocumentRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::ListDocumentsRequest* Arena::CreateMaybeMessage< ::google::firestore::v1::ListDocumentsRequest >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::ListDocumentsRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::ListDocumentsResponse* Arena::CreateMaybeMessage< ::google::firestore::v1::ListDocumentsResponse >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::ListDocumentsResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::CreateDocumentRequest* Arena::CreateMaybeMessage< ::google::firestore::v1::CreateDocumentRequest >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::CreateDocumentRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::UpdateDocumentRequest* Arena::CreateMaybeMessage< ::google::firestore::v1::UpdateDocumentRequest >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::UpdateDocumentRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::DeleteDocumentRequest* Arena::CreateMaybeMessage< ::google::firestore::v1::DeleteDocumentRequest >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::DeleteDocumentRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::BatchGetDocumentsRequest* Arena::CreateMaybeMessage< ::google::firestore::v1::BatchGetDocumentsRequest >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::BatchGetDocumentsRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::BatchGetDocumentsResponse* Arena::CreateMaybeMessage< ::google::firestore::v1::BatchGetDocumentsResponse >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::BatchGetDocumentsResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::BeginTransactionRequest* Arena::CreateMaybeMessage< ::google::firestore::v1::BeginTransactionRequest >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::BeginTransactionRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::BeginTransactionResponse* Arena::CreateMaybeMessage< ::google::firestore::v1::BeginTransactionResponse >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::BeginTransactionResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::CommitRequest* Arena::CreateMaybeMessage< ::google::firestore::v1::CommitRequest >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::CommitRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::CommitResponse* Arena::CreateMaybeMessage< ::google::firestore::v1::CommitResponse >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::CommitResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::RollbackRequest* Arena::CreateMaybeMessage< ::google::firestore::v1::RollbackRequest >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::RollbackRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::RunQueryRequest* Arena::CreateMaybeMessage< ::google::firestore::v1::RunQueryRequest >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::RunQueryRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::RunQueryResponse* Arena::CreateMaybeMessage< ::google::firestore::v1::RunQueryResponse >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::RunQueryResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::RunAggregationQueryRequest* Arena::CreateMaybeMessage< ::google::firestore::v1::RunAggregationQueryRequest >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::RunAggregationQueryRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::RunAggregationQueryResponse* Arena::CreateMaybeMessage< ::google::firestore::v1::RunAggregationQueryResponse >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::RunAggregationQueryResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::WriteRequest* Arena::CreateMaybeMessage< ::google::firestore::v1::WriteRequest >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::WriteRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::WriteResponse* Arena::CreateMaybeMessage< ::google::firestore::v1::WriteResponse >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::WriteResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::ListenRequest* Arena::CreateMaybeMessage< ::google::firestore::v1::ListenRequest >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::ListenRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::ListenResponse* Arena::CreateMaybeMessage< ::google::firestore::v1::ListenResponse >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::ListenResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::Target_DocumentsTarget* Arena::CreateMaybeMessage< ::google::firestore::v1::Target_DocumentsTarget >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::Target_DocumentsTarget >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::Target_QueryTarget* Arena::CreateMaybeMessage< ::google::firestore::v1::Target_QueryTarget >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::Target_QueryTarget >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::Target* Arena::CreateMaybeMessage< ::google::firestore::v1::Target >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::Target >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::TargetChange* Arena::CreateMaybeMessage< ::google::firestore::v1::TargetChange >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::TargetChange >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::ListCollectionIdsRequest* Arena::CreateMaybeMessage< ::google::firestore::v1::ListCollectionIdsRequest >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::ListCollectionIdsRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::ListCollectionIdsResponse* Arena::CreateMaybeMessage< ::google::firestore::v1::ListCollectionIdsResponse >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::ListCollectionIdsResponse >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
