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

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/firestore/v1/document.proto
// Protobuf C++ Version: 4.25.1

#ifndef GOOGLE_PROTOBUF_INCLUDED_google_2ffirestore_2fv1_2fdocument_2eproto_2epb_2eh
#define GOOGLE_PROTOBUF_INCLUDED_google_2ffirestore_2fv1_2fdocument_2eproto_2epb_2eh

#include <limits>
#include <string>
#include <type_traits>
#include <utility>

#include "google/protobuf/port_def.inc"
#if PROTOBUF_VERSION < 4025000
#error "This file was generated by a newer version of protoc which is"
#error "incompatible with your Protocol Buffer headers. Please update"
#error "your headers."
#endif  // PROTOBUF_VERSION

#if 4025001 < PROTOBUF_MIN_PROTOC_VERSION
#error "This file was generated by an older version of protoc which is"
#error "incompatible with your Protocol Buffer headers. Please"
#error "regenerate this file with a newer version of protoc."
#endif  // PROTOBUF_MIN_PROTOC_VERSION
#include "google/protobuf/port_undef.inc"
#include "google/protobuf/io/coded_stream.h"
#include "google/protobuf/arena.h"
#include "google/protobuf/arenastring.h"
#include "google/protobuf/generated_message_tctable_decl.h"
#include "google/protobuf/generated_message_util.h"
#include "google/protobuf/metadata_lite.h"
#include "google/protobuf/generated_message_reflection.h"
#include "google/protobuf/message.h"
#include "google/protobuf/repeated_field.h"  // IWYU pragma: export
#include "google/protobuf/extension_set.h"  // IWYU pragma: export
#include "google/protobuf/map.h"  // IWYU pragma: export
#include "google/protobuf/map_entry.h"
#include "google/protobuf/map_field_inl.h"
#include "google/protobuf/unknown_field_set.h"
#include "google/protobuf/struct.pb.h"
#include "google/protobuf/timestamp.pb.h"
#include "google/type/latlng.pb.h"
// @@protoc_insertion_point(includes)

// Must be included last.
#include "google/protobuf/port_def.inc"

#define PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fdocument_2eproto

namespace google {
namespace protobuf {
namespace internal {
class AnyMetadata;
}  // namespace internal
}  // namespace protobuf
}  // namespace google

// Internal implementation detail -- do not use these members.
struct TableStruct_google_2ffirestore_2fv1_2fdocument_2eproto {
  static const ::uint32_t offsets[];
};
extern const ::google::protobuf::internal::DescriptorTable
    descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto;
namespace google {
namespace firestore {
namespace v1 {
class ArrayValue;
struct ArrayValueDefaultTypeInternal;
extern ArrayValueDefaultTypeInternal _ArrayValue_default_instance_;
class Document;
struct DocumentDefaultTypeInternal;
extern DocumentDefaultTypeInternal _Document_default_instance_;
class Document_FieldsEntry_DoNotUse;
struct Document_FieldsEntry_DoNotUseDefaultTypeInternal;
extern Document_FieldsEntry_DoNotUseDefaultTypeInternal _Document_FieldsEntry_DoNotUse_default_instance_;
class MapValue;
struct MapValueDefaultTypeInternal;
extern MapValueDefaultTypeInternal _MapValue_default_instance_;
class MapValue_FieldsEntry_DoNotUse;
struct MapValue_FieldsEntry_DoNotUseDefaultTypeInternal;
extern MapValue_FieldsEntry_DoNotUseDefaultTypeInternal _MapValue_FieldsEntry_DoNotUse_default_instance_;
class Value;
struct ValueDefaultTypeInternal;
extern ValueDefaultTypeInternal _Value_default_instance_;
}  // namespace v1
}  // namespace firestore
namespace protobuf {
}  // namespace protobuf
}  // namespace google

namespace google {
namespace firestore {
namespace v1 {

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


// -------------------------------------------------------------------

class ArrayValue final :
    public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.ArrayValue) */ {
 public:
  inline ArrayValue() : ArrayValue(nullptr) {}
  ~ArrayValue() override;
  template<typename = void>
  explicit PROTOBUF_CONSTEXPR ArrayValue(::google::protobuf::internal::ConstantInitialized);

  inline ArrayValue(const ArrayValue& from)
      : ArrayValue(nullptr, from) {}
  ArrayValue(ArrayValue&& from) noexcept
    : ArrayValue() {
    *this = ::std::move(from);
  }

  inline ArrayValue& operator=(const ArrayValue& from) {
    CopyFrom(from);
    return *this;
  }
  inline ArrayValue& operator=(ArrayValue&& from) noexcept {
    if (this == &from) return *this;
    if (GetArena() == from.GetArena()
  #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
        && GetArena() != nullptr
  #endif  // !PROTOBUF_FORCE_COPY_IN_MOVE
    ) {
      InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance);
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields()
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>();
  }

  static const ::google::protobuf::Descriptor* descriptor() {
    return GetDescriptor();
  }
  static const ::google::protobuf::Descriptor* GetDescriptor() {
    return default_instance().GetMetadata().descriptor;
  }
  static const ::google::protobuf::Reflection* GetReflection() {
    return default_instance().GetMetadata().reflection;
  }
  static const ArrayValue& default_instance() {
    return *internal_default_instance();
  }
  static inline const ArrayValue* internal_default_instance() {
    return reinterpret_cast<const ArrayValue*>(
               &_ArrayValue_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    3;

  friend void swap(ArrayValue& a, ArrayValue& b) {
    a.Swap(&b);
  }
  inline void Swap(ArrayValue* other) {
    if (other == this) return;
  #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
    if (GetArena() != nullptr &&
        GetArena() == other->GetArena()) {
   #else  // PROTOBUF_FORCE_COPY_IN_SWAP
    if (GetArena() == other->GetArena()) {
  #endif  // !PROTOBUF_FORCE_COPY_IN_SWAP
      InternalSwap(other);
    } else {
      ::google::protobuf::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(ArrayValue* other) {
    if (other == this) return;
    ABSL_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  ArrayValue* New(::google::protobuf::Arena* arena = nullptr) const final {
    return CreateMaybeMessage<ArrayValue>(arena);
  }
  using ::google::protobuf::Message::CopyFrom;
  void CopyFrom(const ArrayValue& from);
  using ::google::protobuf::Message::MergeFrom;
  void MergeFrom( const ArrayValue& from) {
    ArrayValue::MergeImpl(*this, from);
  }
  private:
  static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg);
  public:
  PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  bool IsInitialized() const final;

  ::size_t ByteSizeLong() const final;
  const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final;
  ::uint8_t* _InternalSerialize(
      ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final;
  int GetCachedSize() const { return _impl_._cached_size_.Get(); }

  private:
  ::google::protobuf::internal::CachedSize* AccessCachedSize() const final;
  void SharedCtor(::google::protobuf::Arena* arena);
  void SharedDtor();
  void InternalSwap(ArrayValue* other);

  private:
  friend class ::google::protobuf::internal::AnyMetadata;
  static ::absl::string_view FullMessageName() {
    return "google.firestore.v1.ArrayValue";
  }
  protected:
  explicit ArrayValue(::google::protobuf::Arena* arena);
  ArrayValue(::google::protobuf::Arena* arena, const ArrayValue& from);
  public:

  static const ClassData _class_data_;
  const ::google::protobuf::Message::ClassData*GetClassData() const final;

  ::google::protobuf::Metadata GetMetadata() const final;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  enum : int {
    kValuesFieldNumber = 1,
  };
  // repeated .google.firestore.v1.Value values = 1;
  int values_size() const;
  private:
  int _internal_values_size() const;

  public:
  void clear_values() ;
  ::google::firestore::v1::Value* mutable_values(int index);
  ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Value >*
      mutable_values();
  private:
  const ::google::protobuf::RepeatedPtrField<::google::firestore::v1::Value>& _internal_values() const;
  ::google::protobuf::RepeatedPtrField<::google::firestore::v1::Value>* _internal_mutable_values();
  public:
  const ::google::firestore::v1::Value& values(int index) const;
  ::google::firestore::v1::Value* add_values();
  const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Value >&
      values() const;
  // @@protoc_insertion_point(class_scope:google.firestore.v1.ArrayValue)
 private:
  class _Internal;

  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<
      0, 1, 1,
      0, 2>
      _table_;
  friend class ::google::protobuf::MessageLite;
  friend class ::google::protobuf::Arena;
  template <typename T>
  friend class ::google::protobuf::Arena::InternalHelper;
  using InternalArenaConstructable_ = void;
  using DestructorSkippable_ = void;
  struct Impl_ {

        inline explicit constexpr Impl_(
            ::google::protobuf::internal::ConstantInitialized) noexcept;
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena);
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena, const Impl_& from);
    ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Value > values_;
    mutable ::google::protobuf::internal::CachedSize _cached_size_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_google_2ffirestore_2fv1_2fdocument_2eproto;
};// -------------------------------------------------------------------

class MapValue final :
    public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.MapValue) */ {
 public:
  inline MapValue() : MapValue(nullptr) {}
  ~MapValue() override;
  template<typename = void>
  explicit PROTOBUF_CONSTEXPR MapValue(::google::protobuf::internal::ConstantInitialized);

  inline MapValue(const MapValue& from)
      : MapValue(nullptr, from) {}
  MapValue(MapValue&& from) noexcept
    : MapValue() {
    *this = ::std::move(from);
  }

  inline MapValue& operator=(const MapValue& from) {
    CopyFrom(from);
    return *this;
  }
  inline MapValue& operator=(MapValue&& from) noexcept {
    if (this == &from) return *this;
    if (GetArena() == from.GetArena()
  #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
        && GetArena() != nullptr
  #endif  // !PROTOBUF_FORCE_COPY_IN_MOVE
    ) {
      InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance);
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields()
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>();
  }

  static const ::google::protobuf::Descriptor* descriptor() {
    return GetDescriptor();
  }
  static const ::google::protobuf::Descriptor* GetDescriptor() {
    return default_instance().GetMetadata().descriptor;
  }
  static const ::google::protobuf::Reflection* GetReflection() {
    return default_instance().GetMetadata().reflection;
  }
  static const MapValue& default_instance() {
    return *internal_default_instance();
  }
  static inline const MapValue* internal_default_instance() {
    return reinterpret_cast<const MapValue*>(
               &_MapValue_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    5;

  friend void swap(MapValue& a, MapValue& b) {
    a.Swap(&b);
  }
  inline void Swap(MapValue* other) {
    if (other == this) return;
  #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
    if (GetArena() != nullptr &&
        GetArena() == other->GetArena()) {
   #else  // PROTOBUF_FORCE_COPY_IN_SWAP
    if (GetArena() == other->GetArena()) {
  #endif  // !PROTOBUF_FORCE_COPY_IN_SWAP
      InternalSwap(other);
    } else {
      ::google::protobuf::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(MapValue* other) {
    if (other == this) return;
    ABSL_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  MapValue* New(::google::protobuf::Arena* arena = nullptr) const final {
    return CreateMaybeMessage<MapValue>(arena);
  }
  using ::google::protobuf::Message::CopyFrom;
  void CopyFrom(const MapValue& from);
  using ::google::protobuf::Message::MergeFrom;
  void MergeFrom( const MapValue& from) {
    MapValue::MergeImpl(*this, from);
  }
  private:
  static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg);
  public:
  PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  bool IsInitialized() const final;

  ::size_t ByteSizeLong() const final;
  const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final;
  ::uint8_t* _InternalSerialize(
      ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final;
  int GetCachedSize() const { return _impl_._cached_size_.Get(); }

  private:
  ::google::protobuf::internal::CachedSize* AccessCachedSize() const final;
  void SharedCtor(::google::protobuf::Arena* arena);
  void SharedDtor();
  void InternalSwap(MapValue* other);

  private:
  friend class ::google::protobuf::internal::AnyMetadata;
  static ::absl::string_view FullMessageName() {
    return "google.firestore.v1.MapValue";
  }
  protected:
  explicit MapValue(::google::protobuf::Arena* arena);
  MapValue(::google::protobuf::Arena* arena, const MapValue& from);
  public:

  static const ClassData _class_data_;
  const ::google::protobuf::Message::ClassData*GetClassData() const final;

  ::google::protobuf::Metadata GetMetadata() const final;

  // nested types ----------------------------------------------------


  // accessors -------------------------------------------------------

  enum : int {
    kFieldsFieldNumber = 1,
  };
  // map<string, .google.firestore.v1.Value> fields = 1;
  int fields_size() const;
  private:
  int _internal_fields_size() const;

  public:
  void clear_fields() ;
  const ::google::protobuf::Map<std::string, ::google::firestore::v1::Value>& fields() const;
  ::google::protobuf::Map<std::string, ::google::firestore::v1::Value>* mutable_fields();

  private:
  const ::google::protobuf::Map<std::string, ::google::firestore::v1::Value>& _internal_fields() const;
  ::google::protobuf::Map<std::string, ::google::firestore::v1::Value>* _internal_mutable_fields();

  public:
  // @@protoc_insertion_point(class_scope:google.firestore.v1.MapValue)
 private:
  class _Internal;

  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<
      0, 1, 2,
      43, 2>
      _table_;
  friend class ::google::protobuf::MessageLite;
  friend class ::google::protobuf::Arena;
  template <typename T>
  friend class ::google::protobuf::Arena::InternalHelper;
  using InternalArenaConstructable_ = void;
  using DestructorSkippable_ = void;
  struct Impl_ {

        inline explicit constexpr Impl_(
            ::google::protobuf::internal::ConstantInitialized) noexcept;
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena);
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena, const Impl_& from);
    ::google::protobuf::internal::MapField<MapValue_FieldsEntry_DoNotUse, std::string, ::google::firestore::v1::Value,
                      ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
                      ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE>
        fields_;
    mutable ::google::protobuf::internal::CachedSize _cached_size_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_google_2ffirestore_2fv1_2fdocument_2eproto;
};// -------------------------------------------------------------------

class MapValue_FieldsEntry_DoNotUse final
    : public ::google::protobuf::internal::MapEntry<
          MapValue_FieldsEntry_DoNotUse, std::string, ::google::firestore::v1::Value,
          ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
          ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE> {
 public:
  using SuperType = ::google::protobuf::internal::MapEntry<
      MapValue_FieldsEntry_DoNotUse, std::string, ::google::firestore::v1::Value,
      ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
      ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE>;
  MapValue_FieldsEntry_DoNotUse();
  template <typename = void>
  explicit PROTOBUF_CONSTEXPR MapValue_FieldsEntry_DoNotUse(
      ::google::protobuf::internal::ConstantInitialized);
  explicit MapValue_FieldsEntry_DoNotUse(::google::protobuf::Arena* arena);
  static const MapValue_FieldsEntry_DoNotUse* internal_default_instance() {
    return reinterpret_cast<const MapValue_FieldsEntry_DoNotUse*>(
        &_MapValue_FieldsEntry_DoNotUse_default_instance_);
  }
  static bool ValidateKey(std::string* s) {
    return ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast<int>(s->size()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.firestore.v1.MapValue.FieldsEntry.key");
 }
  static bool ValidateValue(void*) { return true; }
  ::google::protobuf::Metadata GetMetadata() const final;
  friend struct ::TableStruct_google_2ffirestore_2fv1_2fdocument_2eproto;
};
// -------------------------------------------------------------------

class Value final :
    public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.Value) */ {
 public:
  inline Value() : Value(nullptr) {}
  ~Value() override;
  template<typename = void>
  explicit PROTOBUF_CONSTEXPR Value(::google::protobuf::internal::ConstantInitialized);

  inline Value(const Value& from)
      : Value(nullptr, from) {}
  Value(Value&& from) noexcept
    : Value() {
    *this = ::std::move(from);
  }

  inline Value& operator=(const Value& from) {
    CopyFrom(from);
    return *this;
  }
  inline Value& operator=(Value&& from) noexcept {
    if (this == &from) return *this;
    if (GetArena() == from.GetArena()
  #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
        && GetArena() != nullptr
  #endif  // !PROTOBUF_FORCE_COPY_IN_MOVE
    ) {
      InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance);
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields()
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>();
  }

  static const ::google::protobuf::Descriptor* descriptor() {
    return GetDescriptor();
  }
  static const ::google::protobuf::Descriptor* GetDescriptor() {
    return default_instance().GetMetadata().descriptor;
  }
  static const ::google::protobuf::Reflection* GetReflection() {
    return default_instance().GetMetadata().reflection;
  }
  static const Value& default_instance() {
    return *internal_default_instance();
  }
  enum ValueTypeCase {
    kNullValue = 11,
    kBooleanValue = 1,
    kIntegerValue = 2,
    kDoubleValue = 3,
    kTimestampValue = 10,
    kStringValue = 17,
    kBytesValue = 18,
    kReferenceValue = 5,
    kGeoPointValue = 8,
    kArrayValue = 9,
    kMapValue = 6,
    VALUE_TYPE_NOT_SET = 0,
  };

  static inline const Value* internal_default_instance() {
    return reinterpret_cast<const Value*>(
               &_Value_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    2;

  friend void swap(Value& a, Value& b) {
    a.Swap(&b);
  }
  inline void Swap(Value* other) {
    if (other == this) return;
  #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
    if (GetArena() != nullptr &&
        GetArena() == other->GetArena()) {
   #else  // PROTOBUF_FORCE_COPY_IN_SWAP
    if (GetArena() == other->GetArena()) {
  #endif  // !PROTOBUF_FORCE_COPY_IN_SWAP
      InternalSwap(other);
    } else {
      ::google::protobuf::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(Value* other) {
    if (other == this) return;
    ABSL_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  Value* New(::google::protobuf::Arena* arena = nullptr) const final {
    return CreateMaybeMessage<Value>(arena);
  }
  using ::google::protobuf::Message::CopyFrom;
  void CopyFrom(const Value& from);
  using ::google::protobuf::Message::MergeFrom;
  void MergeFrom( const Value& from) {
    Value::MergeImpl(*this, from);
  }
  private:
  static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg);
  public:
  PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  bool IsInitialized() const final;

  ::size_t ByteSizeLong() const final;
  const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final;
  ::uint8_t* _InternalSerialize(
      ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final;
  int GetCachedSize() const { return _impl_._cached_size_.Get(); }

  private:
  ::google::protobuf::internal::CachedSize* AccessCachedSize() const final;
  void SharedCtor(::google::protobuf::Arena* arena);
  void SharedDtor();
  void InternalSwap(Value* other);

  private:
  friend class ::google::protobuf::internal::AnyMetadata;
  static ::absl::string_view FullMessageName() {
    return "google.firestore.v1.Value";
  }
  protected:
  explicit Value(::google::protobuf::Arena* arena);
  Value(::google::protobuf::Arena* arena, const Value& from);
  public:

  static const ClassData _class_data_;
  const ::google::protobuf::Message::ClassData*GetClassData() const final;

  ::google::protobuf::Metadata GetMetadata() const final;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  enum : int {
    kNullValueFieldNumber = 11,
    kBooleanValueFieldNumber = 1,
    kIntegerValueFieldNumber = 2,
    kDoubleValueFieldNumber = 3,
    kTimestampValueFieldNumber = 10,
    kStringValueFieldNumber = 17,
    kBytesValueFieldNumber = 18,
    kReferenceValueFieldNumber = 5,
    kGeoPointValueFieldNumber = 8,
    kArrayValueFieldNumber = 9,
    kMapValueFieldNumber = 6,
  };
  // .google.protobuf.NullValue null_value = 11;
  bool has_null_value() const;
  void clear_null_value() ;
  ::google::protobuf::NullValue null_value() const;
  void set_null_value(::google::protobuf::NullValue value);

  private:
  ::google::protobuf::NullValue _internal_null_value() const;
  void _internal_set_null_value(::google::protobuf::NullValue value);

  public:
  // bool boolean_value = 1;
  bool has_boolean_value() const;
  void clear_boolean_value() ;
  bool boolean_value() const;
  void set_boolean_value(bool value);

  private:
  bool _internal_boolean_value() const;
  void _internal_set_boolean_value(bool value);

  public:
  // int64 integer_value = 2;
  bool has_integer_value() const;
  void clear_integer_value() ;
  ::int64_t integer_value() const;
  void set_integer_value(::int64_t value);

  private:
  ::int64_t _internal_integer_value() const;
  void _internal_set_integer_value(::int64_t value);

  public:
  // double double_value = 3;
  bool has_double_value() const;
  void clear_double_value() ;
  double double_value() const;
  void set_double_value(double value);

  private:
  double _internal_double_value() const;
  void _internal_set_double_value(double value);

  public:
  // .google.protobuf.Timestamp timestamp_value = 10;
  bool has_timestamp_value() const;
  private:
  bool _internal_has_timestamp_value() const;

  public:
  void clear_timestamp_value() ;
  const ::google::protobuf::Timestamp& timestamp_value() const;
  PROTOBUF_NODISCARD ::google::protobuf::Timestamp* release_timestamp_value();
  ::google::protobuf::Timestamp* mutable_timestamp_value();
  void set_allocated_timestamp_value(::google::protobuf::Timestamp* value);
  void unsafe_arena_set_allocated_timestamp_value(::google::protobuf::Timestamp* value);
  ::google::protobuf::Timestamp* unsafe_arena_release_timestamp_value();

  private:
  const ::google::protobuf::Timestamp& _internal_timestamp_value() const;
  ::google::protobuf::Timestamp* _internal_mutable_timestamp_value();

  public:
  // string string_value = 17;
  bool has_string_value() const;
  void clear_string_value() ;
  const std::string& string_value() const;
  template <typename Arg_ = const std::string&, typename... Args_>
  void set_string_value(Arg_&& arg, Args_... args);
  std::string* mutable_string_value();
  PROTOBUF_NODISCARD std::string* release_string_value();
  void set_allocated_string_value(std::string* value);

  private:
  const std::string& _internal_string_value() const;
  inline PROTOBUF_ALWAYS_INLINE void _internal_set_string_value(
      const std::string& value);
  std::string* _internal_mutable_string_value();

  public:
  // bytes bytes_value = 18;
  bool has_bytes_value() const;
  void clear_bytes_value() ;
  const std::string& bytes_value() const;
  template <typename Arg_ = const std::string&, typename... Args_>
  void set_bytes_value(Arg_&& arg, Args_... args);
  std::string* mutable_bytes_value();
  PROTOBUF_NODISCARD std::string* release_bytes_value();
  void set_allocated_bytes_value(std::string* value);

  private:
  const std::string& _internal_bytes_value() const;
  inline PROTOBUF_ALWAYS_INLINE void _internal_set_bytes_value(
      const std::string& value);
  std::string* _internal_mutable_bytes_value();

  public:
  // string reference_value = 5;
  bool has_reference_value() const;
  void clear_reference_value() ;
  const std::string& reference_value() const;
  template <typename Arg_ = const std::string&, typename... Args_>
  void set_reference_value(Arg_&& arg, Args_... args);
  std::string* mutable_reference_value();
  PROTOBUF_NODISCARD std::string* release_reference_value();
  void set_allocated_reference_value(std::string* value);

  private:
  const std::string& _internal_reference_value() const;
  inline PROTOBUF_ALWAYS_INLINE void _internal_set_reference_value(
      const std::string& value);
  std::string* _internal_mutable_reference_value();

  public:
  // .google.type.LatLng geo_point_value = 8;
  bool has_geo_point_value() const;
  private:
  bool _internal_has_geo_point_value() const;

  public:
  void clear_geo_point_value() ;
  const ::google::type::LatLng& geo_point_value() const;
  PROTOBUF_NODISCARD ::google::type::LatLng* release_geo_point_value();
  ::google::type::LatLng* mutable_geo_point_value();
  void set_allocated_geo_point_value(::google::type::LatLng* value);
  void unsafe_arena_set_allocated_geo_point_value(::google::type::LatLng* value);
  ::google::type::LatLng* unsafe_arena_release_geo_point_value();

  private:
  const ::google::type::LatLng& _internal_geo_point_value() const;
  ::google::type::LatLng* _internal_mutable_geo_point_value();

  public:
  // .google.firestore.v1.ArrayValue array_value = 9;
  bool has_array_value() const;
  private:
  bool _internal_has_array_value() const;

  public:
  void clear_array_value() ;
  const ::google::firestore::v1::ArrayValue& array_value() const;
  PROTOBUF_NODISCARD ::google::firestore::v1::ArrayValue* release_array_value();
  ::google::firestore::v1::ArrayValue* mutable_array_value();
  void set_allocated_array_value(::google::firestore::v1::ArrayValue* value);
  void unsafe_arena_set_allocated_array_value(::google::firestore::v1::ArrayValue* value);
  ::google::firestore::v1::ArrayValue* unsafe_arena_release_array_value();

  private:
  const ::google::firestore::v1::ArrayValue& _internal_array_value() const;
  ::google::firestore::v1::ArrayValue* _internal_mutable_array_value();

  public:
  // .google.firestore.v1.MapValue map_value = 6;
  bool has_map_value() const;
  private:
  bool _internal_has_map_value() const;

  public:
  void clear_map_value() ;
  const ::google::firestore::v1::MapValue& map_value() const;
  PROTOBUF_NODISCARD ::google::firestore::v1::MapValue* release_map_value();
  ::google::firestore::v1::MapValue* mutable_map_value();
  void set_allocated_map_value(::google::firestore::v1::MapValue* value);
  void unsafe_arena_set_allocated_map_value(::google::firestore::v1::MapValue* value);
  ::google::firestore::v1::MapValue* unsafe_arena_release_map_value();

  private:
  const ::google::firestore::v1::MapValue& _internal_map_value() const;
  ::google::firestore::v1::MapValue* _internal_mutable_map_value();

  public:
  void clear_value_type();
  ValueTypeCase value_type_case() const;
  // @@protoc_insertion_point(class_scope:google.firestore.v1.Value)
 private:
  class _Internal;
  void set_has_null_value();
  void set_has_boolean_value();
  void set_has_integer_value();
  void set_has_double_value();
  void set_has_timestamp_value();
  void set_has_string_value();
  void set_has_bytes_value();
  void set_has_reference_value();
  void set_has_geo_point_value();
  void set_has_array_value();
  void set_has_map_value();

  inline bool has_value_type() const;
  inline void clear_has_value_type();

  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<
      0, 11, 4,
      69, 2>
      _table_;
  friend class ::google::protobuf::MessageLite;
  friend class ::google::protobuf::Arena;
  template <typename T>
  friend class ::google::protobuf::Arena::InternalHelper;
  using InternalArenaConstructable_ = void;
  using DestructorSkippable_ = void;
  struct Impl_ {

        inline explicit constexpr Impl_(
            ::google::protobuf::internal::ConstantInitialized) noexcept;
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena);
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena, const Impl_& from);
    union ValueTypeUnion {
      constexpr ValueTypeUnion() : _constinit_{} {}
        ::google::protobuf::internal::ConstantInitialized _constinit_;
      int null_value_;
      bool boolean_value_;
      ::int64_t integer_value_;
      double double_value_;
      ::google::protobuf::Timestamp* timestamp_value_;
      ::google::protobuf::internal::ArenaStringPtr string_value_;
      ::google::protobuf::internal::ArenaStringPtr bytes_value_;
      ::google::protobuf::internal::ArenaStringPtr reference_value_;
      ::google::type::LatLng* geo_point_value_;
      ::google::firestore::v1::ArrayValue* array_value_;
      ::google::firestore::v1::MapValue* map_value_;
    } value_type_;
    mutable ::google::protobuf::internal::CachedSize _cached_size_;
    ::uint32_t _oneof_case_[1];

    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_google_2ffirestore_2fv1_2fdocument_2eproto;
};// -------------------------------------------------------------------

class Document_FieldsEntry_DoNotUse final
    : public ::google::protobuf::internal::MapEntry<
          Document_FieldsEntry_DoNotUse, std::string, ::google::firestore::v1::Value,
          ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
          ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE> {
 public:
  using SuperType = ::google::protobuf::internal::MapEntry<
      Document_FieldsEntry_DoNotUse, std::string, ::google::firestore::v1::Value,
      ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
      ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE>;
  Document_FieldsEntry_DoNotUse();
  template <typename = void>
  explicit PROTOBUF_CONSTEXPR Document_FieldsEntry_DoNotUse(
      ::google::protobuf::internal::ConstantInitialized);
  explicit Document_FieldsEntry_DoNotUse(::google::protobuf::Arena* arena);
  static const Document_FieldsEntry_DoNotUse* internal_default_instance() {
    return reinterpret_cast<const Document_FieldsEntry_DoNotUse*>(
        &_Document_FieldsEntry_DoNotUse_default_instance_);
  }
  static bool ValidateKey(std::string* s) {
    return ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast<int>(s->size()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.firestore.v1.Document.FieldsEntry.key");
 }
  static bool ValidateValue(void*) { return true; }
  ::google::protobuf::Metadata GetMetadata() const final;
  friend struct ::TableStruct_google_2ffirestore_2fv1_2fdocument_2eproto;
};
// -------------------------------------------------------------------

class Document final :
    public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.Document) */ {
 public:
  inline Document() : Document(nullptr) {}
  ~Document() override;
  template<typename = void>
  explicit PROTOBUF_CONSTEXPR Document(::google::protobuf::internal::ConstantInitialized);

  inline Document(const Document& from)
      : Document(nullptr, from) {}
  Document(Document&& from) noexcept
    : Document() {
    *this = ::std::move(from);
  }

  inline Document& operator=(const Document& from) {
    CopyFrom(from);
    return *this;
  }
  inline Document& operator=(Document&& from) noexcept {
    if (this == &from) return *this;
    if (GetArena() == from.GetArena()
  #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
        && GetArena() != nullptr
  #endif  // !PROTOBUF_FORCE_COPY_IN_MOVE
    ) {
      InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance);
  }
  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields()
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>();
  }

  static const ::google::protobuf::Descriptor* descriptor() {
    return GetDescriptor();
  }
  static const ::google::protobuf::Descriptor* GetDescriptor() {
    return default_instance().GetMetadata().descriptor;
  }
  static const ::google::protobuf::Reflection* GetReflection() {
    return default_instance().GetMetadata().reflection;
  }
  static const Document& default_instance() {
    return *internal_default_instance();
  }
  static inline const Document* internal_default_instance() {
    return reinterpret_cast<const Document*>(
               &_Document_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    1;

  friend void swap(Document& a, Document& b) {
    a.Swap(&b);
  }
  inline void Swap(Document* other) {
    if (other == this) return;
  #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
    if (GetArena() != nullptr &&
        GetArena() == other->GetArena()) {
   #else  // PROTOBUF_FORCE_COPY_IN_SWAP
    if (GetArena() == other->GetArena()) {
  #endif  // !PROTOBUF_FORCE_COPY_IN_SWAP
      InternalSwap(other);
    } else {
      ::google::protobuf::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(Document* other) {
    if (other == this) return;
    ABSL_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  Document* New(::google::protobuf::Arena* arena = nullptr) const final {
    return CreateMaybeMessage<Document>(arena);
  }
  using ::google::protobuf::Message::CopyFrom;
  void CopyFrom(const Document& from);
  using ::google::protobuf::Message::MergeFrom;
  void MergeFrom( const Document& from) {
    Document::MergeImpl(*this, from);
  }
  private:
  static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg);
  public:
  PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  bool IsInitialized() const final;

  ::size_t ByteSizeLong() const final;
  const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final;
  ::uint8_t* _InternalSerialize(
      ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final;
  int GetCachedSize() const { return _impl_._cached_size_.Get(); }

  private:
  ::google::protobuf::internal::CachedSize* AccessCachedSize() const final;
  void SharedCtor(::google::protobuf::Arena* arena);
  void SharedDtor();
  void InternalSwap(Document* other);

  private:
  friend class ::google::protobuf::internal::AnyMetadata;
  static ::absl::string_view FullMessageName() {
    return "google.firestore.v1.Document";
  }
  protected:
  explicit Document(::google::protobuf::Arena* arena);
  Document(::google::protobuf::Arena* arena, const Document& from);
  public:

  static const ClassData _class_data_;
  const ::google::protobuf::Message::ClassData*GetClassData() const final;

  ::google::protobuf::Metadata GetMetadata() const final;

  // nested types ----------------------------------------------------


  // accessors -------------------------------------------------------

  enum : int {
    kFieldsFieldNumber = 2,
    kNameFieldNumber = 1,
    kCreateTimeFieldNumber = 3,
    kUpdateTimeFieldNumber = 4,
  };
  // map<string, .google.firestore.v1.Value> fields = 2;
  int fields_size() const;
  private:
  int _internal_fields_size() const;

  public:
  void clear_fields() ;
  const ::google::protobuf::Map<std::string, ::google::firestore::v1::Value>& fields() const;
  ::google::protobuf::Map<std::string, ::google::firestore::v1::Value>* mutable_fields();

  private:
  const ::google::protobuf::Map<std::string, ::google::firestore::v1::Value>& _internal_fields() const;
  ::google::protobuf::Map<std::string, ::google::firestore::v1::Value>* _internal_mutable_fields();

  public:
  // string name = 1;
  void clear_name() ;
  const std::string& name() const;
  template <typename Arg_ = const std::string&, typename... Args_>
  void set_name(Arg_&& arg, Args_... args);
  std::string* mutable_name();
  PROTOBUF_NODISCARD std::string* release_name();
  void set_allocated_name(std::string* value);

  private:
  const std::string& _internal_name() const;
  inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(
      const std::string& value);
  std::string* _internal_mutable_name();

  public:
  // .google.protobuf.Timestamp create_time = 3;
  bool has_create_time() const;
  void clear_create_time() ;
  const ::google::protobuf::Timestamp& create_time() const;
  PROTOBUF_NODISCARD ::google::protobuf::Timestamp* release_create_time();
  ::google::protobuf::Timestamp* mutable_create_time();
  void set_allocated_create_time(::google::protobuf::Timestamp* value);
  void unsafe_arena_set_allocated_create_time(::google::protobuf::Timestamp* value);
  ::google::protobuf::Timestamp* unsafe_arena_release_create_time();

  private:
  const ::google::protobuf::Timestamp& _internal_create_time() const;
  ::google::protobuf::Timestamp* _internal_mutable_create_time();

  public:
  // .google.protobuf.Timestamp update_time = 4;
  bool has_update_time() const;
  void clear_update_time() ;
  const ::google::protobuf::Timestamp& update_time() const;
  PROTOBUF_NODISCARD ::google::protobuf::Timestamp* release_update_time();
  ::google::protobuf::Timestamp* mutable_update_time();
  void set_allocated_update_time(::google::protobuf::Timestamp* value);
  void unsafe_arena_set_allocated_update_time(::google::protobuf::Timestamp* value);
  ::google::protobuf::Timestamp* unsafe_arena_release_update_time();

  private:
  const ::google::protobuf::Timestamp& _internal_update_time() const;
  ::google::protobuf::Timestamp* _internal_mutable_update_time();

  public:
  // @@protoc_insertion_point(class_scope:google.firestore.v1.Document)
 private:
  class _Internal;

  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<
      2, 4, 4,
      47, 2>
      _table_;
  friend class ::google::protobuf::MessageLite;
  friend class ::google::protobuf::Arena;
  template <typename T>
  friend class ::google::protobuf::Arena::InternalHelper;
  using InternalArenaConstructable_ = void;
  using DestructorSkippable_ = void;
  struct Impl_ {

        inline explicit constexpr Impl_(
            ::google::protobuf::internal::ConstantInitialized) noexcept;
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena);
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena, const Impl_& from);
    ::google::protobuf::internal::HasBits<1> _has_bits_;
    mutable ::google::protobuf::internal::CachedSize _cached_size_;
    ::google::protobuf::internal::MapField<Document_FieldsEntry_DoNotUse, std::string, ::google::firestore::v1::Value,
                      ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
                      ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE>
        fields_;
    ::google::protobuf::internal::ArenaStringPtr name_;
    ::google::protobuf::Timestamp* create_time_;
    ::google::protobuf::Timestamp* update_time_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_google_2ffirestore_2fv1_2fdocument_2eproto;
};

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




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


#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif  // __GNUC__
// -------------------------------------------------------------------

// -------------------------------------------------------------------

// Document

// string name = 1;
inline void Document::clear_name() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.name_.ClearToEmpty();
}
inline const std::string& Document::name() const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.Document.name)
  return _internal_name();
}
template <typename Arg_, typename... Args_>
inline PROTOBUF_ALWAYS_INLINE void Document::set_name(Arg_&& arg,
                                                     Args_... args) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  _impl_.name_.Set(static_cast<Arg_&&>(arg), args..., GetArena());
  // @@protoc_insertion_point(field_set:google.firestore.v1.Document.name)
}
inline std::string* Document::mutable_name() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  std::string* _s = _internal_mutable_name();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.Document.name)
  return _s;
}
inline const std::string& Document::_internal_name() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return _impl_.name_.Get();
}
inline void Document::_internal_set_name(const std::string& value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  _impl_.name_.Set(value, GetArena());
}
inline std::string* Document::_internal_mutable_name() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  return _impl_.name_.Mutable( GetArena());
}
inline std::string* Document::release_name() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:google.firestore.v1.Document.name)
  return _impl_.name_.Release();
}
inline void Document::set_allocated_name(std::string* value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.name_.SetAllocated(value, GetArena());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        if (_impl_.name_.IsDefault()) {
          _impl_.name_.Set("", GetArena());
        }
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Document.name)
}

// map<string, .google.firestore.v1.Value> fields = 2;
inline int Document::_internal_fields_size() const {
  return _internal_fields().size();
}
inline int Document::fields_size() const {
  return _internal_fields_size();
}
inline void Document::clear_fields() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.fields_.Clear();
}
inline const ::google::protobuf::Map<std::string, ::google::firestore::v1::Value>& Document::_internal_fields() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return _impl_.fields_.GetMap();
}
inline const ::google::protobuf::Map<std::string, ::google::firestore::v1::Value>& Document::fields() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_map:google.firestore.v1.Document.fields)
  return _internal_fields();
}
inline ::google::protobuf::Map<std::string, ::google::firestore::v1::Value>* Document::_internal_mutable_fields() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  return _impl_.fields_.MutableMap();
}
inline ::google::protobuf::Map<std::string, ::google::firestore::v1::Value>* Document::mutable_fields() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_mutable_map:google.firestore.v1.Document.fields)
  return _internal_mutable_fields();
}

// .google.protobuf.Timestamp create_time = 3;
inline bool Document::has_create_time() const {
  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.create_time_ != nullptr);
  return value;
}
inline const ::google::protobuf::Timestamp& Document::_internal_create_time() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  const ::google::protobuf::Timestamp* p = _impl_.create_time_;
  return p != nullptr ? *p : reinterpret_cast<const ::google::protobuf::Timestamp&>(::google::protobuf::_Timestamp_default_instance_);
}
inline const ::google::protobuf::Timestamp& Document::create_time() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.Document.create_time)
  return _internal_create_time();
}
inline void Document::unsafe_arena_set_allocated_create_time(::google::protobuf::Timestamp* value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.create_time_);
  }
  _impl_.create_time_ = reinterpret_cast<::google::protobuf::Timestamp*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000001u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000001u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.firestore.v1.Document.create_time)
}
inline ::google::protobuf::Timestamp* Document::release_create_time() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::google::protobuf::Timestamp* released = _impl_.create_time_;
  _impl_.create_time_ = nullptr;
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
  auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released);
  released = ::google::protobuf::internal::DuplicateIfNonNull(released);
  if (GetArena() == nullptr) {
    delete old;
  }
#else   // PROTOBUF_FORCE_COPY_IN_RELEASE
  if (GetArena() != nullptr) {
    released = ::google::protobuf::internal::DuplicateIfNonNull(released);
  }
#endif  // !PROTOBUF_FORCE_COPY_IN_RELEASE
  return released;
}
inline ::google::protobuf::Timestamp* Document::unsafe_arena_release_create_time() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:google.firestore.v1.Document.create_time)

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::google::protobuf::Timestamp* temp = _impl_.create_time_;
  _impl_.create_time_ = nullptr;
  return temp;
}
inline ::google::protobuf::Timestamp* Document::_internal_mutable_create_time() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_._has_bits_[0] |= 0x00000001u;
  if (_impl_.create_time_ == nullptr) {
    auto* p = CreateMaybeMessage<::google::protobuf::Timestamp>(GetArena());
    _impl_.create_time_ = reinterpret_cast<::google::protobuf::Timestamp*>(p);
  }
  return _impl_.create_time_;
}
inline ::google::protobuf::Timestamp* Document::mutable_create_time() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::protobuf::Timestamp* _msg = _internal_mutable_create_time();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.Document.create_time)
  return _msg;
}
inline void Document::set_allocated_create_time(::google::protobuf::Timestamp* value) {
  ::google::protobuf::Arena* message_arena = GetArena();
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (message_arena == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.create_time_);
  }

  if (value != nullptr) {
    ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(value)->GetArena();
    if (message_arena != submessage_arena) {
      value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena);
    }
    _impl_._has_bits_[0] |= 0x00000001u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000001u;
  }

  _impl_.create_time_ = reinterpret_cast<::google::protobuf::Timestamp*>(value);
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Document.create_time)
}

// .google.protobuf.Timestamp update_time = 4;
inline bool Document::has_update_time() const {
  bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.update_time_ != nullptr);
  return value;
}
inline const ::google::protobuf::Timestamp& Document::_internal_update_time() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  const ::google::protobuf::Timestamp* p = _impl_.update_time_;
  return p != nullptr ? *p : reinterpret_cast<const ::google::protobuf::Timestamp&>(::google::protobuf::_Timestamp_default_instance_);
}
inline const ::google::protobuf::Timestamp& Document::update_time() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.Document.update_time)
  return _internal_update_time();
}
inline void Document::unsafe_arena_set_allocated_update_time(::google::protobuf::Timestamp* value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.update_time_);
  }
  _impl_.update_time_ = reinterpret_cast<::google::protobuf::Timestamp*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000002u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000002u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.firestore.v1.Document.update_time)
}
inline ::google::protobuf::Timestamp* Document::release_update_time() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);

  _impl_._has_bits_[0] &= ~0x00000002u;
  ::google::protobuf::Timestamp* released = _impl_.update_time_;
  _impl_.update_time_ = nullptr;
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
  auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released);
  released = ::google::protobuf::internal::DuplicateIfNonNull(released);
  if (GetArena() == nullptr) {
    delete old;
  }
#else   // PROTOBUF_FORCE_COPY_IN_RELEASE
  if (GetArena() != nullptr) {
    released = ::google::protobuf::internal::DuplicateIfNonNull(released);
  }
#endif  // !PROTOBUF_FORCE_COPY_IN_RELEASE
  return released;
}
inline ::google::protobuf::Timestamp* Document::unsafe_arena_release_update_time() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:google.firestore.v1.Document.update_time)

  _impl_._has_bits_[0] &= ~0x00000002u;
  ::google::protobuf::Timestamp* temp = _impl_.update_time_;
  _impl_.update_time_ = nullptr;
  return temp;
}
inline ::google::protobuf::Timestamp* Document::_internal_mutable_update_time() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_._has_bits_[0] |= 0x00000002u;
  if (_impl_.update_time_ == nullptr) {
    auto* p = CreateMaybeMessage<::google::protobuf::Timestamp>(GetArena());
    _impl_.update_time_ = reinterpret_cast<::google::protobuf::Timestamp*>(p);
  }
  return _impl_.update_time_;
}
inline ::google::protobuf::Timestamp* Document::mutable_update_time() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::protobuf::Timestamp* _msg = _internal_mutable_update_time();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.Document.update_time)
  return _msg;
}
inline void Document::set_allocated_update_time(::google::protobuf::Timestamp* value) {
  ::google::protobuf::Arena* message_arena = GetArena();
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (message_arena == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.update_time_);
  }

  if (value != nullptr) {
    ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(value)->GetArena();
    if (message_arena != submessage_arena) {
      value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena);
    }
    _impl_._has_bits_[0] |= 0x00000002u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000002u;
  }

  _impl_.update_time_ = reinterpret_cast<::google::protobuf::Timestamp*>(value);
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Document.update_time)
}

// -------------------------------------------------------------------

// Value

// .google.protobuf.NullValue null_value = 11;
inline bool Value::has_null_value() const {
  return value_type_case() == kNullValue;
}
inline void Value::set_has_null_value() {
  _impl_._oneof_case_[0] = kNullValue;
}
inline void Value::clear_null_value() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (value_type_case() == kNullValue) {
    _impl_.value_type_.null_value_ = 0;
    clear_has_value_type();
  }
}
inline ::google::protobuf::NullValue Value::null_value() const {
  // @@protoc_insertion_point(field_get:google.firestore.v1.Value.null_value)
  return _internal_null_value();
}
inline void Value::set_null_value(::google::protobuf::NullValue value) {
  _internal_set_null_value(value);
  // @@protoc_insertion_point(field_set:google.firestore.v1.Value.null_value)
}
inline ::google::protobuf::NullValue Value::_internal_null_value() const {
  if (value_type_case() == kNullValue) {
    return static_cast<::google::protobuf::NullValue>(_impl_.value_type_.null_value_);
  }
  return static_cast<::google::protobuf::NullValue>(0);
}
inline void Value::_internal_set_null_value(::google::protobuf::NullValue value) {
  if (value_type_case() != kNullValue) {
    clear_value_type();
    set_has_null_value();
  }
  _impl_.value_type_.null_value_ = value;
}

// bool boolean_value = 1;
inline bool Value::has_boolean_value() const {
  return value_type_case() == kBooleanValue;
}
inline void Value::set_has_boolean_value() {
  _impl_._oneof_case_[0] = kBooleanValue;
}
inline void Value::clear_boolean_value() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (value_type_case() == kBooleanValue) {
    _impl_.value_type_.boolean_value_ = false;
    clear_has_value_type();
  }
}
inline bool Value::boolean_value() const {
  // @@protoc_insertion_point(field_get:google.firestore.v1.Value.boolean_value)
  return _internal_boolean_value();
}
inline void Value::set_boolean_value(bool value) {
  _internal_set_boolean_value(value);
  // @@protoc_insertion_point(field_set:google.firestore.v1.Value.boolean_value)
}
inline bool Value::_internal_boolean_value() const {
  if (value_type_case() == kBooleanValue) {
    return _impl_.value_type_.boolean_value_;
  }
  return false;
}
inline void Value::_internal_set_boolean_value(bool value) {
  if (value_type_case() != kBooleanValue) {
    clear_value_type();
    set_has_boolean_value();
  }
  _impl_.value_type_.boolean_value_ = value;
}

// int64 integer_value = 2;
inline bool Value::has_integer_value() const {
  return value_type_case() == kIntegerValue;
}
inline void Value::set_has_integer_value() {
  _impl_._oneof_case_[0] = kIntegerValue;
}
inline void Value::clear_integer_value() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (value_type_case() == kIntegerValue) {
    _impl_.value_type_.integer_value_ = ::int64_t{0};
    clear_has_value_type();
  }
}
inline ::int64_t Value::integer_value() const {
  // @@protoc_insertion_point(field_get:google.firestore.v1.Value.integer_value)
  return _internal_integer_value();
}
inline void Value::set_integer_value(::int64_t value) {
  _internal_set_integer_value(value);
  // @@protoc_insertion_point(field_set:google.firestore.v1.Value.integer_value)
}
inline ::int64_t Value::_internal_integer_value() const {
  if (value_type_case() == kIntegerValue) {
    return _impl_.value_type_.integer_value_;
  }
  return ::int64_t{0};
}
inline void Value::_internal_set_integer_value(::int64_t value) {
  if (value_type_case() != kIntegerValue) {
    clear_value_type();
    set_has_integer_value();
  }
  _impl_.value_type_.integer_value_ = value;
}

// double double_value = 3;
inline bool Value::has_double_value() const {
  return value_type_case() == kDoubleValue;
}
inline void Value::set_has_double_value() {
  _impl_._oneof_case_[0] = kDoubleValue;
}
inline void Value::clear_double_value() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (value_type_case() == kDoubleValue) {
    _impl_.value_type_.double_value_ = 0;
    clear_has_value_type();
  }
}
inline double Value::double_value() const {
  // @@protoc_insertion_point(field_get:google.firestore.v1.Value.double_value)
  return _internal_double_value();
}
inline void Value::set_double_value(double value) {
  _internal_set_double_value(value);
  // @@protoc_insertion_point(field_set:google.firestore.v1.Value.double_value)
}
inline double Value::_internal_double_value() const {
  if (value_type_case() == kDoubleValue) {
    return _impl_.value_type_.double_value_;
  }
  return 0;
}
inline void Value::_internal_set_double_value(double value) {
  if (value_type_case() != kDoubleValue) {
    clear_value_type();
    set_has_double_value();
  }
  _impl_.value_type_.double_value_ = value;
}

// .google.protobuf.Timestamp timestamp_value = 10;
inline bool Value::has_timestamp_value() const {
  return value_type_case() == kTimestampValue;
}
inline bool Value::_internal_has_timestamp_value() const {
  return value_type_case() == kTimestampValue;
}
inline void Value::set_has_timestamp_value() {
  _impl_._oneof_case_[0] = kTimestampValue;
}
inline ::google::protobuf::Timestamp* Value::release_timestamp_value() {
  // @@protoc_insertion_point(field_release:google.firestore.v1.Value.timestamp_value)
  if (value_type_case() == kTimestampValue) {
    clear_has_value_type();
    auto* temp = _impl_.value_type_.timestamp_value_;
    if (GetArena() != nullptr) {
      temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
    }
    _impl_.value_type_.timestamp_value_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline const ::google::protobuf::Timestamp& Value::_internal_timestamp_value() const {
  return value_type_case() == kTimestampValue ? *_impl_.value_type_.timestamp_value_ : reinterpret_cast<::google::protobuf::Timestamp&>(::google::protobuf::_Timestamp_default_instance_);
}
inline const ::google::protobuf::Timestamp& Value::timestamp_value() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.Value.timestamp_value)
  return _internal_timestamp_value();
}
inline ::google::protobuf::Timestamp* Value::unsafe_arena_release_timestamp_value() {
  // @@protoc_insertion_point(field_unsafe_arena_release:google.firestore.v1.Value.timestamp_value)
  if (value_type_case() == kTimestampValue) {
    clear_has_value_type();
    auto* temp = _impl_.value_type_.timestamp_value_;
    _impl_.value_type_.timestamp_value_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline void Value::unsafe_arena_set_allocated_timestamp_value(::google::protobuf::Timestamp* value) {
  // We rely on the oneof clear method to free the earlier contents
  // of this oneof. We can directly use the pointer we're given to
  // set the new value.
  clear_value_type();
  if (value) {
    set_has_timestamp_value();
    _impl_.value_type_.timestamp_value_ = value;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.firestore.v1.Value.timestamp_value)
}
inline ::google::protobuf::Timestamp* Value::_internal_mutable_timestamp_value() {
  if (value_type_case() != kTimestampValue) {
    clear_value_type();
    set_has_timestamp_value();
    _impl_.value_type_.timestamp_value_ = CreateMaybeMessage<::google::protobuf::Timestamp>(GetArena());
  }
  return _impl_.value_type_.timestamp_value_;
}
inline ::google::protobuf::Timestamp* Value::mutable_timestamp_value() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::protobuf::Timestamp* _msg = _internal_mutable_timestamp_value();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.Value.timestamp_value)
  return _msg;
}

// string string_value = 17;
inline bool Value::has_string_value() const {
  return value_type_case() == kStringValue;
}
inline void Value::set_has_string_value() {
  _impl_._oneof_case_[0] = kStringValue;
}
inline void Value::clear_string_value() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (value_type_case() == kStringValue) {
    _impl_.value_type_.string_value_.Destroy();
    clear_has_value_type();
  }
}
inline const std::string& Value::string_value() const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.Value.string_value)
  return _internal_string_value();
}
template <typename Arg_, typename... Args_>
inline PROTOBUF_ALWAYS_INLINE void Value::set_string_value(Arg_&& arg,
                                                     Args_... args) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (value_type_case() != kStringValue) {
    clear_value_type();

    set_has_string_value();
    _impl_.value_type_.string_value_.InitDefault();
  }
  _impl_.value_type_.string_value_.Set(static_cast<Arg_&&>(arg), args..., GetArena());
  // @@protoc_insertion_point(field_set:google.firestore.v1.Value.string_value)
}
inline std::string* Value::mutable_string_value() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  std::string* _s = _internal_mutable_string_value();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.Value.string_value)
  return _s;
}
inline const std::string& Value::_internal_string_value() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  if (value_type_case() != kStringValue) {
    return ::google::protobuf::internal::GetEmptyStringAlreadyInited();
  }
  return _impl_.value_type_.string_value_.Get();
}
inline void Value::_internal_set_string_value(const std::string& value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (value_type_case() != kStringValue) {
    clear_value_type();

    set_has_string_value();
    _impl_.value_type_.string_value_.InitDefault();
  }
  _impl_.value_type_.string_value_.Set(value, GetArena());
}
inline std::string* Value::_internal_mutable_string_value() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (value_type_case() != kStringValue) {
    clear_value_type();

    set_has_string_value();
    _impl_.value_type_.string_value_.InitDefault();
  }
  return _impl_.value_type_.string_value_.Mutable( GetArena());
}
inline std::string* Value::release_string_value() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:google.firestore.v1.Value.string_value)
  if (value_type_case() != kStringValue) {
    return nullptr;
  }
  clear_has_value_type();
  return _impl_.value_type_.string_value_.Release();
}
inline void Value::set_allocated_string_value(std::string* value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (has_value_type()) {
    clear_value_type();
  }
  if (value != nullptr) {
    set_has_string_value();
    _impl_.value_type_.string_value_.InitAllocated(value, GetArena());
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Value.string_value)
}

// bytes bytes_value = 18;
inline bool Value::has_bytes_value() const {
  return value_type_case() == kBytesValue;
}
inline void Value::set_has_bytes_value() {
  _impl_._oneof_case_[0] = kBytesValue;
}
inline void Value::clear_bytes_value() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (value_type_case() == kBytesValue) {
    _impl_.value_type_.bytes_value_.Destroy();
    clear_has_value_type();
  }
}
inline const std::string& Value::bytes_value() const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.Value.bytes_value)
  return _internal_bytes_value();
}
template <typename Arg_, typename... Args_>
inline PROTOBUF_ALWAYS_INLINE void Value::set_bytes_value(Arg_&& arg,
                                                     Args_... args) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (value_type_case() != kBytesValue) {
    clear_value_type();

    set_has_bytes_value();
    _impl_.value_type_.bytes_value_.InitDefault();
  }
  _impl_.value_type_.bytes_value_.SetBytes(static_cast<Arg_&&>(arg), args..., GetArena());
  // @@protoc_insertion_point(field_set:google.firestore.v1.Value.bytes_value)
}
inline std::string* Value::mutable_bytes_value() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  std::string* _s = _internal_mutable_bytes_value();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.Value.bytes_value)
  return _s;
}
inline const std::string& Value::_internal_bytes_value() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  if (value_type_case() != kBytesValue) {
    return ::google::protobuf::internal::GetEmptyStringAlreadyInited();
  }
  return _impl_.value_type_.bytes_value_.Get();
}
inline void Value::_internal_set_bytes_value(const std::string& value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (value_type_case() != kBytesValue) {
    clear_value_type();

    set_has_bytes_value();
    _impl_.value_type_.bytes_value_.InitDefault();
  }
  _impl_.value_type_.bytes_value_.Set(value, GetArena());
}
inline std::string* Value::_internal_mutable_bytes_value() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (value_type_case() != kBytesValue) {
    clear_value_type();

    set_has_bytes_value();
    _impl_.value_type_.bytes_value_.InitDefault();
  }
  return _impl_.value_type_.bytes_value_.Mutable( GetArena());
}
inline std::string* Value::release_bytes_value() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:google.firestore.v1.Value.bytes_value)
  if (value_type_case() != kBytesValue) {
    return nullptr;
  }
  clear_has_value_type();
  return _impl_.value_type_.bytes_value_.Release();
}
inline void Value::set_allocated_bytes_value(std::string* value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (has_value_type()) {
    clear_value_type();
  }
  if (value != nullptr) {
    set_has_bytes_value();
    _impl_.value_type_.bytes_value_.InitAllocated(value, GetArena());
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Value.bytes_value)
}

// string reference_value = 5;
inline bool Value::has_reference_value() const {
  return value_type_case() == kReferenceValue;
}
inline void Value::set_has_reference_value() {
  _impl_._oneof_case_[0] = kReferenceValue;
}
inline void Value::clear_reference_value() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (value_type_case() == kReferenceValue) {
    _impl_.value_type_.reference_value_.Destroy();
    clear_has_value_type();
  }
}
inline const std::string& Value::reference_value() const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.Value.reference_value)
  return _internal_reference_value();
}
template <typename Arg_, typename... Args_>
inline PROTOBUF_ALWAYS_INLINE void Value::set_reference_value(Arg_&& arg,
                                                     Args_... args) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (value_type_case() != kReferenceValue) {
    clear_value_type();

    set_has_reference_value();
    _impl_.value_type_.reference_value_.InitDefault();
  }
  _impl_.value_type_.reference_value_.Set(static_cast<Arg_&&>(arg), args..., GetArena());
  // @@protoc_insertion_point(field_set:google.firestore.v1.Value.reference_value)
}
inline std::string* Value::mutable_reference_value() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  std::string* _s = _internal_mutable_reference_value();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.Value.reference_value)
  return _s;
}
inline const std::string& Value::_internal_reference_value() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  if (value_type_case() != kReferenceValue) {
    return ::google::protobuf::internal::GetEmptyStringAlreadyInited();
  }
  return _impl_.value_type_.reference_value_.Get();
}
inline void Value::_internal_set_reference_value(const std::string& value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (value_type_case() != kReferenceValue) {
    clear_value_type();

    set_has_reference_value();
    _impl_.value_type_.reference_value_.InitDefault();
  }
  _impl_.value_type_.reference_value_.Set(value, GetArena());
}
inline std::string* Value::_internal_mutable_reference_value() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (value_type_case() != kReferenceValue) {
    clear_value_type();

    set_has_reference_value();
    _impl_.value_type_.reference_value_.InitDefault();
  }
  return _impl_.value_type_.reference_value_.Mutable( GetArena());
}
inline std::string* Value::release_reference_value() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:google.firestore.v1.Value.reference_value)
  if (value_type_case() != kReferenceValue) {
    return nullptr;
  }
  clear_has_value_type();
  return _impl_.value_type_.reference_value_.Release();
}
inline void Value::set_allocated_reference_value(std::string* value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (has_value_type()) {
    clear_value_type();
  }
  if (value != nullptr) {
    set_has_reference_value();
    _impl_.value_type_.reference_value_.InitAllocated(value, GetArena());
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Value.reference_value)
}

// .google.type.LatLng geo_point_value = 8;
inline bool Value::has_geo_point_value() const {
  return value_type_case() == kGeoPointValue;
}
inline bool Value::_internal_has_geo_point_value() const {
  return value_type_case() == kGeoPointValue;
}
inline void Value::set_has_geo_point_value() {
  _impl_._oneof_case_[0] = kGeoPointValue;
}
inline ::google::type::LatLng* Value::release_geo_point_value() {
  // @@protoc_insertion_point(field_release:google.firestore.v1.Value.geo_point_value)
  if (value_type_case() == kGeoPointValue) {
    clear_has_value_type();
    auto* temp = _impl_.value_type_.geo_point_value_;
    if (GetArena() != nullptr) {
      temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
    }
    _impl_.value_type_.geo_point_value_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline const ::google::type::LatLng& Value::_internal_geo_point_value() const {
  return value_type_case() == kGeoPointValue ? *_impl_.value_type_.geo_point_value_ : reinterpret_cast<::google::type::LatLng&>(::google::type::_LatLng_default_instance_);
}
inline const ::google::type::LatLng& Value::geo_point_value() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.Value.geo_point_value)
  return _internal_geo_point_value();
}
inline ::google::type::LatLng* Value::unsafe_arena_release_geo_point_value() {
  // @@protoc_insertion_point(field_unsafe_arena_release:google.firestore.v1.Value.geo_point_value)
  if (value_type_case() == kGeoPointValue) {
    clear_has_value_type();
    auto* temp = _impl_.value_type_.geo_point_value_;
    _impl_.value_type_.geo_point_value_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline void Value::unsafe_arena_set_allocated_geo_point_value(::google::type::LatLng* value) {
  // We rely on the oneof clear method to free the earlier contents
  // of this oneof. We can directly use the pointer we're given to
  // set the new value.
  clear_value_type();
  if (value) {
    set_has_geo_point_value();
    _impl_.value_type_.geo_point_value_ = value;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.firestore.v1.Value.geo_point_value)
}
inline ::google::type::LatLng* Value::_internal_mutable_geo_point_value() {
  if (value_type_case() != kGeoPointValue) {
    clear_value_type();
    set_has_geo_point_value();
    _impl_.value_type_.geo_point_value_ = CreateMaybeMessage<::google::type::LatLng>(GetArena());
  }
  return _impl_.value_type_.geo_point_value_;
}
inline ::google::type::LatLng* Value::mutable_geo_point_value() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::type::LatLng* _msg = _internal_mutable_geo_point_value();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.Value.geo_point_value)
  return _msg;
}

// .google.firestore.v1.ArrayValue array_value = 9;
inline bool Value::has_array_value() const {
  return value_type_case() == kArrayValue;
}
inline bool Value::_internal_has_array_value() const {
  return value_type_case() == kArrayValue;
}
inline void Value::set_has_array_value() {
  _impl_._oneof_case_[0] = kArrayValue;
}
inline void Value::clear_array_value() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (value_type_case() == kArrayValue) {
    if (GetArena() == nullptr) {
      delete _impl_.value_type_.array_value_;
    }
    clear_has_value_type();
  }
}
inline ::google::firestore::v1::ArrayValue* Value::release_array_value() {
  // @@protoc_insertion_point(field_release:google.firestore.v1.Value.array_value)
  if (value_type_case() == kArrayValue) {
    clear_has_value_type();
    auto* temp = _impl_.value_type_.array_value_;
    if (GetArena() != nullptr) {
      temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
    }
    _impl_.value_type_.array_value_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline const ::google::firestore::v1::ArrayValue& Value::_internal_array_value() const {
  return value_type_case() == kArrayValue ? *_impl_.value_type_.array_value_ : reinterpret_cast<::google::firestore::v1::ArrayValue&>(::google::firestore::v1::_ArrayValue_default_instance_);
}
inline const ::google::firestore::v1::ArrayValue& Value::array_value() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.Value.array_value)
  return _internal_array_value();
}
inline ::google::firestore::v1::ArrayValue* Value::unsafe_arena_release_array_value() {
  // @@protoc_insertion_point(field_unsafe_arena_release:google.firestore.v1.Value.array_value)
  if (value_type_case() == kArrayValue) {
    clear_has_value_type();
    auto* temp = _impl_.value_type_.array_value_;
    _impl_.value_type_.array_value_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline void Value::unsafe_arena_set_allocated_array_value(::google::firestore::v1::ArrayValue* value) {
  // We rely on the oneof clear method to free the earlier contents
  // of this oneof. We can directly use the pointer we're given to
  // set the new value.
  clear_value_type();
  if (value) {
    set_has_array_value();
    _impl_.value_type_.array_value_ = value;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.firestore.v1.Value.array_value)
}
inline ::google::firestore::v1::ArrayValue* Value::_internal_mutable_array_value() {
  if (value_type_case() != kArrayValue) {
    clear_value_type();
    set_has_array_value();
    _impl_.value_type_.array_value_ = CreateMaybeMessage<::google::firestore::v1::ArrayValue>(GetArena());
  }
  return _impl_.value_type_.array_value_;
}
inline ::google::firestore::v1::ArrayValue* Value::mutable_array_value() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::firestore::v1::ArrayValue* _msg = _internal_mutable_array_value();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.Value.array_value)
  return _msg;
}

// .google.firestore.v1.MapValue map_value = 6;
inline bool Value::has_map_value() const {
  return value_type_case() == kMapValue;
}
inline bool Value::_internal_has_map_value() const {
  return value_type_case() == kMapValue;
}
inline void Value::set_has_map_value() {
  _impl_._oneof_case_[0] = kMapValue;
}
inline void Value::clear_map_value() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (value_type_case() == kMapValue) {
    if (GetArena() == nullptr) {
      delete _impl_.value_type_.map_value_;
    }
    clear_has_value_type();
  }
}
inline ::google::firestore::v1::MapValue* Value::release_map_value() {
  // @@protoc_insertion_point(field_release:google.firestore.v1.Value.map_value)
  if (value_type_case() == kMapValue) {
    clear_has_value_type();
    auto* temp = _impl_.value_type_.map_value_;
    if (GetArena() != nullptr) {
      temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
    }
    _impl_.value_type_.map_value_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline const ::google::firestore::v1::MapValue& Value::_internal_map_value() const {
  return value_type_case() == kMapValue ? *_impl_.value_type_.map_value_ : reinterpret_cast<::google::firestore::v1::MapValue&>(::google::firestore::v1::_MapValue_default_instance_);
}
inline const ::google::firestore::v1::MapValue& Value::map_value() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.Value.map_value)
  return _internal_map_value();
}
inline ::google::firestore::v1::MapValue* Value::unsafe_arena_release_map_value() {
  // @@protoc_insertion_point(field_unsafe_arena_release:google.firestore.v1.Value.map_value)
  if (value_type_case() == kMapValue) {
    clear_has_value_type();
    auto* temp = _impl_.value_type_.map_value_;
    _impl_.value_type_.map_value_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline void Value::unsafe_arena_set_allocated_map_value(::google::firestore::v1::MapValue* value) {
  // We rely on the oneof clear method to free the earlier contents
  // of this oneof. We can directly use the pointer we're given to
  // set the new value.
  clear_value_type();
  if (value) {
    set_has_map_value();
    _impl_.value_type_.map_value_ = value;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.firestore.v1.Value.map_value)
}
inline ::google::firestore::v1::MapValue* Value::_internal_mutable_map_value() {
  if (value_type_case() != kMapValue) {
    clear_value_type();
    set_has_map_value();
    _impl_.value_type_.map_value_ = CreateMaybeMessage<::google::firestore::v1::MapValue>(GetArena());
  }
  return _impl_.value_type_.map_value_;
}
inline ::google::firestore::v1::MapValue* Value::mutable_map_value() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::firestore::v1::MapValue* _msg = _internal_mutable_map_value();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.Value.map_value)
  return _msg;
}

inline bool Value::has_value_type() const {
  return value_type_case() != VALUE_TYPE_NOT_SET;
}
inline void Value::clear_has_value_type() {
  _impl_._oneof_case_[0] = VALUE_TYPE_NOT_SET;
}
inline Value::ValueTypeCase Value::value_type_case() const {
  return Value::ValueTypeCase(_impl_._oneof_case_[0]);
}
// -------------------------------------------------------------------

// ArrayValue

// repeated .google.firestore.v1.Value values = 1;
inline int ArrayValue::_internal_values_size() const {
  return _internal_values().size();
}
inline int ArrayValue::values_size() const {
  return _internal_values_size();
}
inline void ArrayValue::clear_values() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.values_.Clear();
}
inline ::google::firestore::v1::Value* ArrayValue::mutable_values(int index)
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.ArrayValue.values)
  return _internal_mutable_values()->Mutable(index);
}
inline ::google::protobuf::RepeatedPtrField<::google::firestore::v1::Value>* ArrayValue::mutable_values()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.ArrayValue.values)
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  return _internal_mutable_values();
}
inline const ::google::firestore::v1::Value& ArrayValue::values(int index) const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.ArrayValue.values)
  return _internal_values().Get(index);
}
inline ::google::firestore::v1::Value* ArrayValue::add_values() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ::google::firestore::v1::Value* _add = _internal_mutable_values()->Add();
  // @@protoc_insertion_point(field_add:google.firestore.v1.ArrayValue.values)
  return _add;
}
inline const ::google::protobuf::RepeatedPtrField<::google::firestore::v1::Value>& ArrayValue::values() const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_list:google.firestore.v1.ArrayValue.values)
  return _internal_values();
}
inline const ::google::protobuf::RepeatedPtrField<::google::firestore::v1::Value>&
ArrayValue::_internal_values() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return _impl_.values_;
}
inline ::google::protobuf::RepeatedPtrField<::google::firestore::v1::Value>*
ArrayValue::_internal_mutable_values() {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return &_impl_.values_;
}

// -------------------------------------------------------------------

// -------------------------------------------------------------------

// MapValue

// map<string, .google.firestore.v1.Value> fields = 1;
inline int MapValue::_internal_fields_size() const {
  return _internal_fields().size();
}
inline int MapValue::fields_size() const {
  return _internal_fields_size();
}
inline void MapValue::clear_fields() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.fields_.Clear();
}
inline const ::google::protobuf::Map<std::string, ::google::firestore::v1::Value>& MapValue::_internal_fields() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return _impl_.fields_.GetMap();
}
inline const ::google::protobuf::Map<std::string, ::google::firestore::v1::Value>& MapValue::fields() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_map:google.firestore.v1.MapValue.fields)
  return _internal_fields();
}
inline ::google::protobuf::Map<std::string, ::google::firestore::v1::Value>* MapValue::_internal_mutable_fields() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  return _impl_.fields_.MutableMap();
}
inline ::google::protobuf::Map<std::string, ::google::firestore::v1::Value>* MapValue::mutable_fields() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_mutable_map:google.firestore.v1.MapValue.fields)
  return _internal_mutable_fields();
}

#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif  // __GNUC__

// @@protoc_insertion_point(namespace_scope)
}  // namespace v1
}  // namespace firestore
}  // namespace google


// @@protoc_insertion_point(global_scope)

#include "google/protobuf/port_undef.inc"

#endif  // GOOGLE_PROTOBUF_INCLUDED_google_2ffirestore_2fv1_2fdocument_2eproto_2epb_2eh
