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

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

#ifndef GOOGLE_PROTOBUF_INCLUDED_firestore_2flocal_2fmaybe_5fdocument_2eproto_2epb_2eh
#define GOOGLE_PROTOBUF_INCLUDED_firestore_2flocal_2fmaybe_5fdocument_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/unknown_field_set.h"
#include "google/firestore/v1/document.pb.h"
#include "google/protobuf/timestamp.pb.h"
// @@protoc_insertion_point(includes)

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

#define PROTOBUF_INTERNAL_EXPORT_firestore_2flocal_2fmaybe_5fdocument_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_firestore_2flocal_2fmaybe_5fdocument_2eproto {
  static const ::uint32_t offsets[];
};
extern const ::google::protobuf::internal::DescriptorTable
    descriptor_table_firestore_2flocal_2fmaybe_5fdocument_2eproto;
namespace firestore {
namespace client {
class MaybeDocument;
struct MaybeDocumentDefaultTypeInternal;
extern MaybeDocumentDefaultTypeInternal _MaybeDocument_default_instance_;
class NoDocument;
struct NoDocumentDefaultTypeInternal;
extern NoDocumentDefaultTypeInternal _NoDocument_default_instance_;
class UnknownDocument;
struct UnknownDocumentDefaultTypeInternal;
extern UnknownDocumentDefaultTypeInternal _UnknownDocument_default_instance_;
}  // namespace client
}  // namespace firestore
namespace google {
namespace protobuf {
}  // namespace protobuf
}  // namespace google

namespace firestore {
namespace client {

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


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

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

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

  inline UnknownDocument& operator=(const UnknownDocument& from) {
    CopyFrom(from);
    return *this;
  }
  inline UnknownDocument& operator=(UnknownDocument&& 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 UnknownDocument& default_instance() {
    return *internal_default_instance();
  }
  static inline const UnknownDocument* internal_default_instance() {
    return reinterpret_cast<const UnknownDocument*>(
               &_UnknownDocument_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    1;

  friend void swap(UnknownDocument& a, UnknownDocument& b) {
    a.Swap(&b);
  }
  inline void Swap(UnknownDocument* 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(UnknownDocument* other) {
    if (other == this) return;
    ABSL_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

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

  UnknownDocument* New(::google::protobuf::Arena* arena = nullptr) const final {
    return CreateMaybeMessage<UnknownDocument>(arena);
  }
  using ::google::protobuf::Message::CopyFrom;
  void CopyFrom(const UnknownDocument& from);
  using ::google::protobuf::Message::MergeFrom;
  void MergeFrom( const UnknownDocument& from) {
    UnknownDocument::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(UnknownDocument* other);

  private:
  friend class ::google::protobuf::internal::AnyMetadata;
  static ::absl::string_view FullMessageName() {
    return "firestore.client.UnknownDocument";
  }
  protected:
  explicit UnknownDocument(::google::protobuf::Arena* arena);
  UnknownDocument(::google::protobuf::Arena* arena, const UnknownDocument& 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 {
    kNameFieldNumber = 1,
    kVersionFieldNumber = 2,
  };
  // 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 version = 2;
  bool has_version() const;
  void clear_version() ;
  const ::google::protobuf::Timestamp& version() const;
  PROTOBUF_NODISCARD ::google::protobuf::Timestamp* release_version();
  ::google::protobuf::Timestamp* mutable_version();
  void set_allocated_version(::google::protobuf::Timestamp* value);
  void unsafe_arena_set_allocated_version(::google::protobuf::Timestamp* value);
  ::google::protobuf::Timestamp* unsafe_arena_release_version();

  private:
  const ::google::protobuf::Timestamp& _internal_version() const;
  ::google::protobuf::Timestamp* _internal_mutable_version();

  public:
  // @@protoc_insertion_point(class_scope:firestore.client.UnknownDocument)
 private:
  class _Internal;

  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<
      1, 2, 1,
      45, 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::ArenaStringPtr name_;
    ::google::protobuf::Timestamp* version_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_firestore_2flocal_2fmaybe_5fdocument_2eproto;
};// -------------------------------------------------------------------

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

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

  inline NoDocument& operator=(const NoDocument& from) {
    CopyFrom(from);
    return *this;
  }
  inline NoDocument& operator=(NoDocument&& 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 NoDocument& default_instance() {
    return *internal_default_instance();
  }
  static inline const NoDocument* internal_default_instance() {
    return reinterpret_cast<const NoDocument*>(
               &_NoDocument_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    0;

  friend void swap(NoDocument& a, NoDocument& b) {
    a.Swap(&b);
  }
  inline void Swap(NoDocument* 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(NoDocument* other) {
    if (other == this) return;
    ABSL_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

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

  NoDocument* New(::google::protobuf::Arena* arena = nullptr) const final {
    return CreateMaybeMessage<NoDocument>(arena);
  }
  using ::google::protobuf::Message::CopyFrom;
  void CopyFrom(const NoDocument& from);
  using ::google::protobuf::Message::MergeFrom;
  void MergeFrom( const NoDocument& from) {
    NoDocument::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(NoDocument* other);

  private:
  friend class ::google::protobuf::internal::AnyMetadata;
  static ::absl::string_view FullMessageName() {
    return "firestore.client.NoDocument";
  }
  protected:
  explicit NoDocument(::google::protobuf::Arena* arena);
  NoDocument(::google::protobuf::Arena* arena, const NoDocument& 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 {
    kNameFieldNumber = 1,
    kReadTimeFieldNumber = 2,
  };
  // 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 read_time = 2;
  bool has_read_time() const;
  void clear_read_time() ;
  const ::google::protobuf::Timestamp& read_time() const;
  PROTOBUF_NODISCARD ::google::protobuf::Timestamp* release_read_time();
  ::google::protobuf::Timestamp* mutable_read_time();
  void set_allocated_read_time(::google::protobuf::Timestamp* value);
  void unsafe_arena_set_allocated_read_time(::google::protobuf::Timestamp* value);
  ::google::protobuf::Timestamp* unsafe_arena_release_read_time();

  private:
  const ::google::protobuf::Timestamp& _internal_read_time() const;
  ::google::protobuf::Timestamp* _internal_mutable_read_time();

  public:
  // @@protoc_insertion_point(class_scope:firestore.client.NoDocument)
 private:
  class _Internal;

  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<
      1, 2, 1,
      40, 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::ArenaStringPtr name_;
    ::google::protobuf::Timestamp* read_time_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_firestore_2flocal_2fmaybe_5fdocument_2eproto;
};// -------------------------------------------------------------------

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

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

  inline MaybeDocument& operator=(const MaybeDocument& from) {
    CopyFrom(from);
    return *this;
  }
  inline MaybeDocument& operator=(MaybeDocument&& 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 MaybeDocument& default_instance() {
    return *internal_default_instance();
  }
  enum DocumentTypeCase {
    kNoDocument = 1,
    kDocument = 2,
    kUnknownDocument = 3,
    DOCUMENT_TYPE_NOT_SET = 0,
  };

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

  friend void swap(MaybeDocument& a, MaybeDocument& b) {
    a.Swap(&b);
  }
  inline void Swap(MaybeDocument* 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(MaybeDocument* other) {
    if (other == this) return;
    ABSL_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

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

  MaybeDocument* New(::google::protobuf::Arena* arena = nullptr) const final {
    return CreateMaybeMessage<MaybeDocument>(arena);
  }
  using ::google::protobuf::Message::CopyFrom;
  void CopyFrom(const MaybeDocument& from);
  using ::google::protobuf::Message::MergeFrom;
  void MergeFrom( const MaybeDocument& from) {
    MaybeDocument::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(MaybeDocument* other);

  private:
  friend class ::google::protobuf::internal::AnyMetadata;
  static ::absl::string_view FullMessageName() {
    return "firestore.client.MaybeDocument";
  }
  protected:
  explicit MaybeDocument(::google::protobuf::Arena* arena);
  MaybeDocument(::google::protobuf::Arena* arena, const MaybeDocument& 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 {
    kHasCommittedMutationsFieldNumber = 4,
    kNoDocumentFieldNumber = 1,
    kDocumentFieldNumber = 2,
    kUnknownDocumentFieldNumber = 3,
  };
  // bool has_committed_mutations = 4;
  void clear_has_committed_mutations() ;
  bool has_committed_mutations() const;
  void set_has_committed_mutations(bool value);

  private:
  bool _internal_has_committed_mutations() const;
  void _internal_set_has_committed_mutations(bool value);

  public:
  // .firestore.client.NoDocument no_document = 1;
  bool has_no_document() const;
  private:
  bool _internal_has_no_document() const;

  public:
  void clear_no_document() ;
  const ::firestore::client::NoDocument& no_document() const;
  PROTOBUF_NODISCARD ::firestore::client::NoDocument* release_no_document();
  ::firestore::client::NoDocument* mutable_no_document();
  void set_allocated_no_document(::firestore::client::NoDocument* value);
  void unsafe_arena_set_allocated_no_document(::firestore::client::NoDocument* value);
  ::firestore::client::NoDocument* unsafe_arena_release_no_document();

  private:
  const ::firestore::client::NoDocument& _internal_no_document() const;
  ::firestore::client::NoDocument* _internal_mutable_no_document();

  public:
  // .google.firestore.v1.Document document = 2;
  bool has_document() const;
  private:
  bool _internal_has_document() const;

  public:
  void clear_document() ;
  const ::google::firestore::v1::Document& document() const;
  PROTOBUF_NODISCARD ::google::firestore::v1::Document* release_document();
  ::google::firestore::v1::Document* mutable_document();
  void set_allocated_document(::google::firestore::v1::Document* value);
  void unsafe_arena_set_allocated_document(::google::firestore::v1::Document* value);
  ::google::firestore::v1::Document* unsafe_arena_release_document();

  private:
  const ::google::firestore::v1::Document& _internal_document() const;
  ::google::firestore::v1::Document* _internal_mutable_document();

  public:
  // .firestore.client.UnknownDocument unknown_document = 3;
  bool has_unknown_document() const;
  private:
  bool _internal_has_unknown_document() const;

  public:
  void clear_unknown_document() ;
  const ::firestore::client::UnknownDocument& unknown_document() const;
  PROTOBUF_NODISCARD ::firestore::client::UnknownDocument* release_unknown_document();
  ::firestore::client::UnknownDocument* mutable_unknown_document();
  void set_allocated_unknown_document(::firestore::client::UnknownDocument* value);
  void unsafe_arena_set_allocated_unknown_document(::firestore::client::UnknownDocument* value);
  ::firestore::client::UnknownDocument* unsafe_arena_release_unknown_document();

  private:
  const ::firestore::client::UnknownDocument& _internal_unknown_document() const;
  ::firestore::client::UnknownDocument* _internal_mutable_unknown_document();

  public:
  void clear_document_type();
  DocumentTypeCase document_type_case() const;
  // @@protoc_insertion_point(class_scope:firestore.client.MaybeDocument)
 private:
  class _Internal;
  void set_has_no_document();
  void set_has_document();
  void set_has_unknown_document();

  inline bool has_document_type() const;
  inline void clear_has_document_type();

  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<
      0, 4, 3,
      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);
    bool has_committed_mutations_;
    union DocumentTypeUnion {
      constexpr DocumentTypeUnion() : _constinit_{} {}
        ::google::protobuf::internal::ConstantInitialized _constinit_;
      ::firestore::client::NoDocument* no_document_;
      ::google::firestore::v1::Document* document_;
      ::firestore::client::UnknownDocument* unknown_document_;
    } document_type_;
    mutable ::google::protobuf::internal::CachedSize _cached_size_;
    ::uint32_t _oneof_case_[1];

    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_firestore_2flocal_2fmaybe_5fdocument_2eproto;
};

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




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


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

// NoDocument

// string name = 1;
inline void NoDocument::clear_name() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.name_.ClearToEmpty();
}
inline const std::string& NoDocument::name() const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:firestore.client.NoDocument.name)
  return _internal_name();
}
template <typename Arg_, typename... Args_>
inline PROTOBUF_ALWAYS_INLINE void NoDocument::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:firestore.client.NoDocument.name)
}
inline std::string* NoDocument::mutable_name() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  std::string* _s = _internal_mutable_name();
  // @@protoc_insertion_point(field_mutable:firestore.client.NoDocument.name)
  return _s;
}
inline const std::string& NoDocument::_internal_name() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return _impl_.name_.Get();
}
inline void NoDocument::_internal_set_name(const std::string& value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  _impl_.name_.Set(value, GetArena());
}
inline std::string* NoDocument::_internal_mutable_name() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  return _impl_.name_.Mutable( GetArena());
}
inline std::string* NoDocument::release_name() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:firestore.client.NoDocument.name)
  return _impl_.name_.Release();
}
inline void NoDocument::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:firestore.client.NoDocument.name)
}

// .google.protobuf.Timestamp read_time = 2;
inline bool NoDocument::has_read_time() const {
  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.read_time_ != nullptr);
  return value;
}
inline const ::google::protobuf::Timestamp& NoDocument::_internal_read_time() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  const ::google::protobuf::Timestamp* p = _impl_.read_time_;
  return p != nullptr ? *p : reinterpret_cast<const ::google::protobuf::Timestamp&>(::google::protobuf::_Timestamp_default_instance_);
}
inline const ::google::protobuf::Timestamp& NoDocument::read_time() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:firestore.client.NoDocument.read_time)
  return _internal_read_time();
}
inline void NoDocument::unsafe_arena_set_allocated_read_time(::google::protobuf::Timestamp* value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.read_time_);
  }
  _impl_.read_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:firestore.client.NoDocument.read_time)
}
inline ::google::protobuf::Timestamp* NoDocument::release_read_time() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::google::protobuf::Timestamp* released = _impl_.read_time_;
  _impl_.read_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* NoDocument::unsafe_arena_release_read_time() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:firestore.client.NoDocument.read_time)

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::google::protobuf::Timestamp* temp = _impl_.read_time_;
  _impl_.read_time_ = nullptr;
  return temp;
}
inline ::google::protobuf::Timestamp* NoDocument::_internal_mutable_read_time() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_._has_bits_[0] |= 0x00000001u;
  if (_impl_.read_time_ == nullptr) {
    auto* p = CreateMaybeMessage<::google::protobuf::Timestamp>(GetArena());
    _impl_.read_time_ = reinterpret_cast<::google::protobuf::Timestamp*>(p);
  }
  return _impl_.read_time_;
}
inline ::google::protobuf::Timestamp* NoDocument::mutable_read_time() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::protobuf::Timestamp* _msg = _internal_mutable_read_time();
  // @@protoc_insertion_point(field_mutable:firestore.client.NoDocument.read_time)
  return _msg;
}
inline void NoDocument::set_allocated_read_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_.read_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_.read_time_ = reinterpret_cast<::google::protobuf::Timestamp*>(value);
  // @@protoc_insertion_point(field_set_allocated:firestore.client.NoDocument.read_time)
}

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

// UnknownDocument

// string name = 1;
inline void UnknownDocument::clear_name() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.name_.ClearToEmpty();
}
inline const std::string& UnknownDocument::name() const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:firestore.client.UnknownDocument.name)
  return _internal_name();
}
template <typename Arg_, typename... Args_>
inline PROTOBUF_ALWAYS_INLINE void UnknownDocument::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:firestore.client.UnknownDocument.name)
}
inline std::string* UnknownDocument::mutable_name() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  std::string* _s = _internal_mutable_name();
  // @@protoc_insertion_point(field_mutable:firestore.client.UnknownDocument.name)
  return _s;
}
inline const std::string& UnknownDocument::_internal_name() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return _impl_.name_.Get();
}
inline void UnknownDocument::_internal_set_name(const std::string& value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  _impl_.name_.Set(value, GetArena());
}
inline std::string* UnknownDocument::_internal_mutable_name() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  return _impl_.name_.Mutable( GetArena());
}
inline std::string* UnknownDocument::release_name() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:firestore.client.UnknownDocument.name)
  return _impl_.name_.Release();
}
inline void UnknownDocument::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:firestore.client.UnknownDocument.name)
}

// .google.protobuf.Timestamp version = 2;
inline bool UnknownDocument::has_version() const {
  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.version_ != nullptr);
  return value;
}
inline const ::google::protobuf::Timestamp& UnknownDocument::_internal_version() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  const ::google::protobuf::Timestamp* p = _impl_.version_;
  return p != nullptr ? *p : reinterpret_cast<const ::google::protobuf::Timestamp&>(::google::protobuf::_Timestamp_default_instance_);
}
inline const ::google::protobuf::Timestamp& UnknownDocument::version() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:firestore.client.UnknownDocument.version)
  return _internal_version();
}
inline void UnknownDocument::unsafe_arena_set_allocated_version(::google::protobuf::Timestamp* value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.version_);
  }
  _impl_.version_ = 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:firestore.client.UnknownDocument.version)
}
inline ::google::protobuf::Timestamp* UnknownDocument::release_version() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::google::protobuf::Timestamp* released = _impl_.version_;
  _impl_.version_ = 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* UnknownDocument::unsafe_arena_release_version() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:firestore.client.UnknownDocument.version)

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::google::protobuf::Timestamp* temp = _impl_.version_;
  _impl_.version_ = nullptr;
  return temp;
}
inline ::google::protobuf::Timestamp* UnknownDocument::_internal_mutable_version() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_._has_bits_[0] |= 0x00000001u;
  if (_impl_.version_ == nullptr) {
    auto* p = CreateMaybeMessage<::google::protobuf::Timestamp>(GetArena());
    _impl_.version_ = reinterpret_cast<::google::protobuf::Timestamp*>(p);
  }
  return _impl_.version_;
}
inline ::google::protobuf::Timestamp* UnknownDocument::mutable_version() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::protobuf::Timestamp* _msg = _internal_mutable_version();
  // @@protoc_insertion_point(field_mutable:firestore.client.UnknownDocument.version)
  return _msg;
}
inline void UnknownDocument::set_allocated_version(::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_.version_);
  }

  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_.version_ = reinterpret_cast<::google::protobuf::Timestamp*>(value);
  // @@protoc_insertion_point(field_set_allocated:firestore.client.UnknownDocument.version)
}

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

// MaybeDocument

// .firestore.client.NoDocument no_document = 1;
inline bool MaybeDocument::has_no_document() const {
  return document_type_case() == kNoDocument;
}
inline bool MaybeDocument::_internal_has_no_document() const {
  return document_type_case() == kNoDocument;
}
inline void MaybeDocument::set_has_no_document() {
  _impl_._oneof_case_[0] = kNoDocument;
}
inline void MaybeDocument::clear_no_document() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (document_type_case() == kNoDocument) {
    if (GetArena() == nullptr) {
      delete _impl_.document_type_.no_document_;
    }
    clear_has_document_type();
  }
}
inline ::firestore::client::NoDocument* MaybeDocument::release_no_document() {
  // @@protoc_insertion_point(field_release:firestore.client.MaybeDocument.no_document)
  if (document_type_case() == kNoDocument) {
    clear_has_document_type();
    auto* temp = _impl_.document_type_.no_document_;
    if (GetArena() != nullptr) {
      temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
    }
    _impl_.document_type_.no_document_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline const ::firestore::client::NoDocument& MaybeDocument::_internal_no_document() const {
  return document_type_case() == kNoDocument ? *_impl_.document_type_.no_document_ : reinterpret_cast<::firestore::client::NoDocument&>(::firestore::client::_NoDocument_default_instance_);
}
inline const ::firestore::client::NoDocument& MaybeDocument::no_document() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:firestore.client.MaybeDocument.no_document)
  return _internal_no_document();
}
inline ::firestore::client::NoDocument* MaybeDocument::unsafe_arena_release_no_document() {
  // @@protoc_insertion_point(field_unsafe_arena_release:firestore.client.MaybeDocument.no_document)
  if (document_type_case() == kNoDocument) {
    clear_has_document_type();
    auto* temp = _impl_.document_type_.no_document_;
    _impl_.document_type_.no_document_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline void MaybeDocument::unsafe_arena_set_allocated_no_document(::firestore::client::NoDocument* 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_document_type();
  if (value) {
    set_has_no_document();
    _impl_.document_type_.no_document_ = value;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:firestore.client.MaybeDocument.no_document)
}
inline ::firestore::client::NoDocument* MaybeDocument::_internal_mutable_no_document() {
  if (document_type_case() != kNoDocument) {
    clear_document_type();
    set_has_no_document();
    _impl_.document_type_.no_document_ = CreateMaybeMessage<::firestore::client::NoDocument>(GetArena());
  }
  return _impl_.document_type_.no_document_;
}
inline ::firestore::client::NoDocument* MaybeDocument::mutable_no_document() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::firestore::client::NoDocument* _msg = _internal_mutable_no_document();
  // @@protoc_insertion_point(field_mutable:firestore.client.MaybeDocument.no_document)
  return _msg;
}

// .google.firestore.v1.Document document = 2;
inline bool MaybeDocument::has_document() const {
  return document_type_case() == kDocument;
}
inline bool MaybeDocument::_internal_has_document() const {
  return document_type_case() == kDocument;
}
inline void MaybeDocument::set_has_document() {
  _impl_._oneof_case_[0] = kDocument;
}
inline ::google::firestore::v1::Document* MaybeDocument::release_document() {
  // @@protoc_insertion_point(field_release:firestore.client.MaybeDocument.document)
  if (document_type_case() == kDocument) {
    clear_has_document_type();
    auto* temp = _impl_.document_type_.document_;
    if (GetArena() != nullptr) {
      temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
    }
    _impl_.document_type_.document_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline const ::google::firestore::v1::Document& MaybeDocument::_internal_document() const {
  return document_type_case() == kDocument ? *_impl_.document_type_.document_ : reinterpret_cast<::google::firestore::v1::Document&>(::google::firestore::v1::_Document_default_instance_);
}
inline const ::google::firestore::v1::Document& MaybeDocument::document() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:firestore.client.MaybeDocument.document)
  return _internal_document();
}
inline ::google::firestore::v1::Document* MaybeDocument::unsafe_arena_release_document() {
  // @@protoc_insertion_point(field_unsafe_arena_release:firestore.client.MaybeDocument.document)
  if (document_type_case() == kDocument) {
    clear_has_document_type();
    auto* temp = _impl_.document_type_.document_;
    _impl_.document_type_.document_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline void MaybeDocument::unsafe_arena_set_allocated_document(::google::firestore::v1::Document* 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_document_type();
  if (value) {
    set_has_document();
    _impl_.document_type_.document_ = value;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:firestore.client.MaybeDocument.document)
}
inline ::google::firestore::v1::Document* MaybeDocument::_internal_mutable_document() {
  if (document_type_case() != kDocument) {
    clear_document_type();
    set_has_document();
    _impl_.document_type_.document_ = CreateMaybeMessage<::google::firestore::v1::Document>(GetArena());
  }
  return _impl_.document_type_.document_;
}
inline ::google::firestore::v1::Document* MaybeDocument::mutable_document() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::firestore::v1::Document* _msg = _internal_mutable_document();
  // @@protoc_insertion_point(field_mutable:firestore.client.MaybeDocument.document)
  return _msg;
}

// .firestore.client.UnknownDocument unknown_document = 3;
inline bool MaybeDocument::has_unknown_document() const {
  return document_type_case() == kUnknownDocument;
}
inline bool MaybeDocument::_internal_has_unknown_document() const {
  return document_type_case() == kUnknownDocument;
}
inline void MaybeDocument::set_has_unknown_document() {
  _impl_._oneof_case_[0] = kUnknownDocument;
}
inline void MaybeDocument::clear_unknown_document() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (document_type_case() == kUnknownDocument) {
    if (GetArena() == nullptr) {
      delete _impl_.document_type_.unknown_document_;
    }
    clear_has_document_type();
  }
}
inline ::firestore::client::UnknownDocument* MaybeDocument::release_unknown_document() {
  // @@protoc_insertion_point(field_release:firestore.client.MaybeDocument.unknown_document)
  if (document_type_case() == kUnknownDocument) {
    clear_has_document_type();
    auto* temp = _impl_.document_type_.unknown_document_;
    if (GetArena() != nullptr) {
      temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
    }
    _impl_.document_type_.unknown_document_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline const ::firestore::client::UnknownDocument& MaybeDocument::_internal_unknown_document() const {
  return document_type_case() == kUnknownDocument ? *_impl_.document_type_.unknown_document_ : reinterpret_cast<::firestore::client::UnknownDocument&>(::firestore::client::_UnknownDocument_default_instance_);
}
inline const ::firestore::client::UnknownDocument& MaybeDocument::unknown_document() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:firestore.client.MaybeDocument.unknown_document)
  return _internal_unknown_document();
}
inline ::firestore::client::UnknownDocument* MaybeDocument::unsafe_arena_release_unknown_document() {
  // @@protoc_insertion_point(field_unsafe_arena_release:firestore.client.MaybeDocument.unknown_document)
  if (document_type_case() == kUnknownDocument) {
    clear_has_document_type();
    auto* temp = _impl_.document_type_.unknown_document_;
    _impl_.document_type_.unknown_document_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline void MaybeDocument::unsafe_arena_set_allocated_unknown_document(::firestore::client::UnknownDocument* 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_document_type();
  if (value) {
    set_has_unknown_document();
    _impl_.document_type_.unknown_document_ = value;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:firestore.client.MaybeDocument.unknown_document)
}
inline ::firestore::client::UnknownDocument* MaybeDocument::_internal_mutable_unknown_document() {
  if (document_type_case() != kUnknownDocument) {
    clear_document_type();
    set_has_unknown_document();
    _impl_.document_type_.unknown_document_ = CreateMaybeMessage<::firestore::client::UnknownDocument>(GetArena());
  }
  return _impl_.document_type_.unknown_document_;
}
inline ::firestore::client::UnknownDocument* MaybeDocument::mutable_unknown_document() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::firestore::client::UnknownDocument* _msg = _internal_mutable_unknown_document();
  // @@protoc_insertion_point(field_mutable:firestore.client.MaybeDocument.unknown_document)
  return _msg;
}

// bool has_committed_mutations = 4;
inline void MaybeDocument::clear_has_committed_mutations() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.has_committed_mutations_ = false;
}
inline bool MaybeDocument::has_committed_mutations() const {
  // @@protoc_insertion_point(field_get:firestore.client.MaybeDocument.has_committed_mutations)
  return _internal_has_committed_mutations();
}
inline void MaybeDocument::set_has_committed_mutations(bool value) {
  _internal_set_has_committed_mutations(value);
  // @@protoc_insertion_point(field_set:firestore.client.MaybeDocument.has_committed_mutations)
}
inline bool MaybeDocument::_internal_has_committed_mutations() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return _impl_.has_committed_mutations_;
}
inline void MaybeDocument::_internal_set_has_committed_mutations(bool value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  _impl_.has_committed_mutations_ = value;
}

inline bool MaybeDocument::has_document_type() const {
  return document_type_case() != DOCUMENT_TYPE_NOT_SET;
}
inline void MaybeDocument::clear_has_document_type() {
  _impl_._oneof_case_[0] = DOCUMENT_TYPE_NOT_SET;
}
inline MaybeDocument::DocumentTypeCase MaybeDocument::document_type_case() const {
  return MaybeDocument::DocumentTypeCase(_impl_._oneof_case_[0]);
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif  // __GNUC__

// @@protoc_insertion_point(namespace_scope)
}  // namespace client
}  // namespace firestore


// @@protoc_insertion_point(global_scope)

#include "google/protobuf/port_undef.inc"

#endif  // GOOGLE_PROTOBUF_INCLUDED_firestore_2flocal_2fmaybe_5fdocument_2eproto_2epb_2eh
