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

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

#ifndef GOOGLE_PROTOBUF_INCLUDED_firestore_2fbundle_2eproto_2epb_2eh
#define GOOGLE_PROTOBUF_INCLUDED_firestore_2fbundle_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/generated_enum_reflection.h"
#include "google/protobuf/unknown_field_set.h"
#include "google/firestore/v1/document.pb.h"
#include "google/firestore/v1/query.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_2fbundle_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_2fbundle_2eproto {
  static const ::uint32_t offsets[];
};
extern const ::google::protobuf::internal::DescriptorTable
    descriptor_table_firestore_2fbundle_2eproto;
namespace firestore {
class BundleElement;
struct BundleElementDefaultTypeInternal;
extern BundleElementDefaultTypeInternal _BundleElement_default_instance_;
class BundleMetadata;
struct BundleMetadataDefaultTypeInternal;
extern BundleMetadataDefaultTypeInternal _BundleMetadata_default_instance_;
class BundledDocumentMetadata;
struct BundledDocumentMetadataDefaultTypeInternal;
extern BundledDocumentMetadataDefaultTypeInternal _BundledDocumentMetadata_default_instance_;
class BundledQuery;
struct BundledQueryDefaultTypeInternal;
extern BundledQueryDefaultTypeInternal _BundledQuery_default_instance_;
class NamedQuery;
struct NamedQueryDefaultTypeInternal;
extern NamedQueryDefaultTypeInternal _NamedQuery_default_instance_;
}  // namespace firestore
namespace google {
namespace protobuf {
}  // namespace protobuf
}  // namespace google

namespace firestore {
enum BundledQuery_LimitType : int {
  BundledQuery_LimitType_FIRST = 0,
  BundledQuery_LimitType_LAST = 1,
  BundledQuery_LimitType_BundledQuery_LimitType_INT_MIN_SENTINEL_DO_NOT_USE_ =
      std::numeric_limits<::int32_t>::min(),
  BundledQuery_LimitType_BundledQuery_LimitType_INT_MAX_SENTINEL_DO_NOT_USE_ =
      std::numeric_limits<::int32_t>::max(),
};

bool BundledQuery_LimitType_IsValid(int value);
extern const uint32_t BundledQuery_LimitType_internal_data_[];
constexpr BundledQuery_LimitType BundledQuery_LimitType_LimitType_MIN = static_cast<BundledQuery_LimitType>(0);
constexpr BundledQuery_LimitType BundledQuery_LimitType_LimitType_MAX = static_cast<BundledQuery_LimitType>(1);
constexpr int BundledQuery_LimitType_LimitType_ARRAYSIZE = 1 + 1;
const ::google::protobuf::EnumDescriptor*
BundledQuery_LimitType_descriptor();
template <typename T>
const std::string& BundledQuery_LimitType_Name(T value) {
  static_assert(std::is_same<T, BundledQuery_LimitType>::value ||
                    std::is_integral<T>::value,
                "Incorrect type passed to LimitType_Name().");
  return BundledQuery_LimitType_Name(static_cast<BundledQuery_LimitType>(value));
}
template <>
inline const std::string& BundledQuery_LimitType_Name(BundledQuery_LimitType value) {
  return ::google::protobuf::internal::NameOfDenseEnum<BundledQuery_LimitType_descriptor,
                                                 0, 1>(
      static_cast<int>(value));
}
inline bool BundledQuery_LimitType_Parse(absl::string_view name, BundledQuery_LimitType* value) {
  return ::google::protobuf::internal::ParseNamedEnum<BundledQuery_LimitType>(
      BundledQuery_LimitType_descriptor(), name, value);
}

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


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

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

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

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

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

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

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

  private:
  friend class ::google::protobuf::internal::AnyMetadata;
  static ::absl::string_view FullMessageName() {
    return "firestore.BundledDocumentMetadata";
  }
  protected:
  explicit BundledDocumentMetadata(::google::protobuf::Arena* arena);
  BundledDocumentMetadata(::google::protobuf::Arena* arena, const BundledDocumentMetadata& 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 {
    kQueriesFieldNumber = 4,
    kNameFieldNumber = 1,
    kReadTimeFieldNumber = 2,
    kExistsFieldNumber = 3,
  };
  // repeated string queries = 4;
  int queries_size() const;
  private:
  int _internal_queries_size() const;

  public:
  void clear_queries() ;
  const std::string& queries(int index) const;
  std::string* mutable_queries(int index);
  void set_queries(int index, const std::string& value);
  void set_queries(int index, std::string&& value);
  void set_queries(int index, const char* value);
  void set_queries(int index, const char* value, std::size_t size);
  void set_queries(int index, absl::string_view value);
  std::string* add_queries();
  void add_queries(const std::string& value);
  void add_queries(std::string&& value);
  void add_queries(const char* value);
  void add_queries(const char* value, std::size_t size);
  void add_queries(absl::string_view value);
  const ::google::protobuf::RepeatedPtrField<std::string>& queries() const;
  ::google::protobuf::RepeatedPtrField<std::string>* mutable_queries();

  private:
  const ::google::protobuf::RepeatedPtrField<std::string>& _internal_queries() const;
  ::google::protobuf::RepeatedPtrField<std::string>* _internal_mutable_queries();

  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 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:
  // bool exists = 3;
  void clear_exists() ;
  bool exists() const;
  void set_exists(bool value);

  private:
  bool _internal_exists() const;
  void _internal_set_exists(bool value);

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

  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<
      2, 4, 1,
      53, 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::RepeatedPtrField<std::string> queries_;
    ::google::protobuf::internal::ArenaStringPtr name_;
    ::google::protobuf::Timestamp* read_time_;
    bool exists_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_firestore_2fbundle_2eproto;
};// -------------------------------------------------------------------

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

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

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

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

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

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

  private:
  friend class ::google::protobuf::internal::AnyMetadata;
  static ::absl::string_view FullMessageName() {
    return "firestore.BundleMetadata";
  }
  protected:
  explicit BundleMetadata(::google::protobuf::Arena* arena);
  BundleMetadata(::google::protobuf::Arena* arena, const BundleMetadata& 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 {
    kIdFieldNumber = 1,
    kCreateTimeFieldNumber = 2,
    kVersionFieldNumber = 3,
    kTotalDocumentsFieldNumber = 4,
    kTotalBytesFieldNumber = 5,
  };
  // string id = 1;
  void clear_id() ;
  const std::string& id() const;
  template <typename Arg_ = const std::string&, typename... Args_>
  void set_id(Arg_&& arg, Args_... args);
  std::string* mutable_id();
  PROTOBUF_NODISCARD std::string* release_id();
  void set_allocated_id(std::string* value);

  private:
  const std::string& _internal_id() const;
  inline PROTOBUF_ALWAYS_INLINE void _internal_set_id(
      const std::string& value);
  std::string* _internal_mutable_id();

  public:
  // .google.protobuf.Timestamp create_time = 2;
  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:
  // uint32 version = 3;
  void clear_version() ;
  ::uint32_t version() const;
  void set_version(::uint32_t value);

  private:
  ::uint32_t _internal_version() const;
  void _internal_set_version(::uint32_t value);

  public:
  // uint32 total_documents = 4;
  void clear_total_documents() ;
  ::uint32_t total_documents() const;
  void set_total_documents(::uint32_t value);

  private:
  ::uint32_t _internal_total_documents() const;
  void _internal_set_total_documents(::uint32_t value);

  public:
  // uint64 total_bytes = 5;
  void clear_total_bytes() ;
  ::uint64_t total_bytes() const;
  void set_total_bytes(::uint64_t value);

  private:
  ::uint64_t _internal_total_bytes() const;
  void _internal_set_total_bytes(::uint64_t value);

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

  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<
      3, 5, 1,
      35, 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 id_;
    ::google::protobuf::Timestamp* create_time_;
    ::uint32_t version_;
    ::uint32_t total_documents_;
    ::uint64_t total_bytes_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_firestore_2fbundle_2eproto;
};// -------------------------------------------------------------------

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

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

  inline BundledQuery& operator=(const BundledQuery& from) {
    CopyFrom(from);
    return *this;
  }
  inline BundledQuery& operator=(BundledQuery&& 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 BundledQuery& default_instance() {
    return *internal_default_instance();
  }
  enum QueryTypeCase {
    kStructuredQuery = 2,
    QUERY_TYPE_NOT_SET = 0,
  };

  static inline const BundledQuery* internal_default_instance() {
    return reinterpret_cast<const BundledQuery*>(
               &_BundledQuery_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    0;

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

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

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

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

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

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

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

  using LimitType = BundledQuery_LimitType;
  static constexpr LimitType FIRST = BundledQuery_LimitType_FIRST;
  static constexpr LimitType LAST = BundledQuery_LimitType_LAST;
  static inline bool LimitType_IsValid(int value) {
    return BundledQuery_LimitType_IsValid(value);
  }
  static constexpr LimitType LimitType_MIN = BundledQuery_LimitType_LimitType_MIN;
  static constexpr LimitType LimitType_MAX = BundledQuery_LimitType_LimitType_MAX;
  static constexpr int LimitType_ARRAYSIZE = BundledQuery_LimitType_LimitType_ARRAYSIZE;
  static inline const ::google::protobuf::EnumDescriptor* LimitType_descriptor() {
    return BundledQuery_LimitType_descriptor();
  }
  template <typename T>
  static inline const std::string& LimitType_Name(T value) {
    return BundledQuery_LimitType_Name(value);
  }
  static inline bool LimitType_Parse(absl::string_view name, LimitType* value) {
    return BundledQuery_LimitType_Parse(name, value);
  }

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

  enum : int {
    kParentFieldNumber = 1,
    kLimitTypeFieldNumber = 3,
    kStructuredQueryFieldNumber = 2,
  };
  // string parent = 1;
  void clear_parent() ;
  const std::string& parent() const;
  template <typename Arg_ = const std::string&, typename... Args_>
  void set_parent(Arg_&& arg, Args_... args);
  std::string* mutable_parent();
  PROTOBUF_NODISCARD std::string* release_parent();
  void set_allocated_parent(std::string* value);

  private:
  const std::string& _internal_parent() const;
  inline PROTOBUF_ALWAYS_INLINE void _internal_set_parent(
      const std::string& value);
  std::string* _internal_mutable_parent();

  public:
  // .firestore.BundledQuery.LimitType limit_type = 3;
  void clear_limit_type() ;
  ::firestore::BundledQuery_LimitType limit_type() const;
  void set_limit_type(::firestore::BundledQuery_LimitType value);

  private:
  ::firestore::BundledQuery_LimitType _internal_limit_type() const;
  void _internal_set_limit_type(::firestore::BundledQuery_LimitType value);

  public:
  // .google.firestore.v1.StructuredQuery structured_query = 2;
  bool has_structured_query() const;
  private:
  bool _internal_has_structured_query() const;

  public:
  void clear_structured_query() ;
  const ::google::firestore::v1::StructuredQuery& structured_query() const;
  PROTOBUF_NODISCARD ::google::firestore::v1::StructuredQuery* release_structured_query();
  ::google::firestore::v1::StructuredQuery* mutable_structured_query();
  void set_allocated_structured_query(::google::firestore::v1::StructuredQuery* value);
  void unsafe_arena_set_allocated_structured_query(::google::firestore::v1::StructuredQuery* value);
  ::google::firestore::v1::StructuredQuery* unsafe_arena_release_structured_query();

  private:
  const ::google::firestore::v1::StructuredQuery& _internal_structured_query() const;
  ::google::firestore::v1::StructuredQuery* _internal_mutable_structured_query();

  public:
  void clear_query_type();
  QueryTypeCase query_type_case() const;
  // @@protoc_insertion_point(class_scope:firestore.BundledQuery)
 private:
  class _Internal;
  void set_has_structured_query();

  inline bool has_query_type() const;
  inline void clear_has_query_type();

  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<
      2, 3, 1,
      37, 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::ArenaStringPtr parent_;
    int limit_type_;
    union QueryTypeUnion {
      constexpr QueryTypeUnion() : _constinit_{} {}
        ::google::protobuf::internal::ConstantInitialized _constinit_;
      ::google::firestore::v1::StructuredQuery* structured_query_;
    } query_type_;
    mutable ::google::protobuf::internal::CachedSize _cached_size_;
    ::uint32_t _oneof_case_[1];

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

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

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

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

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

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

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

  private:
  friend class ::google::protobuf::internal::AnyMetadata;
  static ::absl::string_view FullMessageName() {
    return "firestore.NamedQuery";
  }
  protected:
  explicit NamedQuery(::google::protobuf::Arena* arena);
  NamedQuery(::google::protobuf::Arena* arena, const NamedQuery& 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,
    kBundledQueryFieldNumber = 2,
    kReadTimeFieldNumber = 3,
  };
  // 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:
  // .firestore.BundledQuery bundled_query = 2;
  bool has_bundled_query() const;
  void clear_bundled_query() ;
  const ::firestore::BundledQuery& bundled_query() const;
  PROTOBUF_NODISCARD ::firestore::BundledQuery* release_bundled_query();
  ::firestore::BundledQuery* mutable_bundled_query();
  void set_allocated_bundled_query(::firestore::BundledQuery* value);
  void unsafe_arena_set_allocated_bundled_query(::firestore::BundledQuery* value);
  ::firestore::BundledQuery* unsafe_arena_release_bundled_query();

  private:
  const ::firestore::BundledQuery& _internal_bundled_query() const;
  ::firestore::BundledQuery* _internal_mutable_bundled_query();

  public:
  // .google.protobuf.Timestamp read_time = 3;
  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.NamedQuery)
 private:
  class _Internal;

  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<
      2, 3, 2,
      33, 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_;
    ::firestore::BundledQuery* bundled_query_;
    ::google::protobuf::Timestamp* read_time_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_firestore_2fbundle_2eproto;
};// -------------------------------------------------------------------

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

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

  inline BundleElement& operator=(const BundleElement& from) {
    CopyFrom(from);
    return *this;
  }
  inline BundleElement& operator=(BundleElement&& 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 BundleElement& default_instance() {
    return *internal_default_instance();
  }
  enum ElementTypeCase {
    kMetadata = 1,
    kNamedQuery = 2,
    kDocumentMetadata = 3,
    kDocument = 4,
    ELEMENT_TYPE_NOT_SET = 0,
  };

  static inline const BundleElement* internal_default_instance() {
    return reinterpret_cast<const BundleElement*>(
               &_BundleElement_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    4;

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

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

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

  private:
  friend class ::google::protobuf::internal::AnyMetadata;
  static ::absl::string_view FullMessageName() {
    return "firestore.BundleElement";
  }
  protected:
  explicit BundleElement(::google::protobuf::Arena* arena);
  BundleElement(::google::protobuf::Arena* arena, const BundleElement& 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 {
    kMetadataFieldNumber = 1,
    kNamedQueryFieldNumber = 2,
    kDocumentMetadataFieldNumber = 3,
    kDocumentFieldNumber = 4,
  };
  // .firestore.BundleMetadata metadata = 1;
  bool has_metadata() const;
  private:
  bool _internal_has_metadata() const;

  public:
  void clear_metadata() ;
  const ::firestore::BundleMetadata& metadata() const;
  PROTOBUF_NODISCARD ::firestore::BundleMetadata* release_metadata();
  ::firestore::BundleMetadata* mutable_metadata();
  void set_allocated_metadata(::firestore::BundleMetadata* value);
  void unsafe_arena_set_allocated_metadata(::firestore::BundleMetadata* value);
  ::firestore::BundleMetadata* unsafe_arena_release_metadata();

  private:
  const ::firestore::BundleMetadata& _internal_metadata() const;
  ::firestore::BundleMetadata* _internal_mutable_metadata();

  public:
  // .firestore.NamedQuery named_query = 2;
  bool has_named_query() const;
  private:
  bool _internal_has_named_query() const;

  public:
  void clear_named_query() ;
  const ::firestore::NamedQuery& named_query() const;
  PROTOBUF_NODISCARD ::firestore::NamedQuery* release_named_query();
  ::firestore::NamedQuery* mutable_named_query();
  void set_allocated_named_query(::firestore::NamedQuery* value);
  void unsafe_arena_set_allocated_named_query(::firestore::NamedQuery* value);
  ::firestore::NamedQuery* unsafe_arena_release_named_query();

  private:
  const ::firestore::NamedQuery& _internal_named_query() const;
  ::firestore::NamedQuery* _internal_mutable_named_query();

  public:
  // .firestore.BundledDocumentMetadata document_metadata = 3;
  bool has_document_metadata() const;
  private:
  bool _internal_has_document_metadata() const;

  public:
  void clear_document_metadata() ;
  const ::firestore::BundledDocumentMetadata& document_metadata() const;
  PROTOBUF_NODISCARD ::firestore::BundledDocumentMetadata* release_document_metadata();
  ::firestore::BundledDocumentMetadata* mutable_document_metadata();
  void set_allocated_document_metadata(::firestore::BundledDocumentMetadata* value);
  void unsafe_arena_set_allocated_document_metadata(::firestore::BundledDocumentMetadata* value);
  ::firestore::BundledDocumentMetadata* unsafe_arena_release_document_metadata();

  private:
  const ::firestore::BundledDocumentMetadata& _internal_document_metadata() const;
  ::firestore::BundledDocumentMetadata* _internal_mutable_document_metadata();

  public:
  // .google.firestore.v1.Document document = 4;
  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:
  void clear_element_type();
  ElementTypeCase element_type_case() const;
  // @@protoc_insertion_point(class_scope:firestore.BundleElement)
 private:
  class _Internal;
  void set_has_metadata();
  void set_has_named_query();
  void set_has_document_metadata();
  void set_has_document();

  inline bool has_element_type() const;
  inline void clear_has_element_type();

  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<
      0, 4, 4,
      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);
    union ElementTypeUnion {
      constexpr ElementTypeUnion() : _constinit_{} {}
        ::google::protobuf::internal::ConstantInitialized _constinit_;
      ::firestore::BundleMetadata* metadata_;
      ::firestore::NamedQuery* named_query_;
      ::firestore::BundledDocumentMetadata* document_metadata_;
      ::google::firestore::v1::Document* document_;
    } element_type_;
    mutable ::google::protobuf::internal::CachedSize _cached_size_;
    ::uint32_t _oneof_case_[1];

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

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




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


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

// BundledQuery

// string parent = 1;
inline void BundledQuery::clear_parent() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.parent_.ClearToEmpty();
}
inline const std::string& BundledQuery::parent() const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:firestore.BundledQuery.parent)
  return _internal_parent();
}
template <typename Arg_, typename... Args_>
inline PROTOBUF_ALWAYS_INLINE void BundledQuery::set_parent(Arg_&& arg,
                                                     Args_... args) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  _impl_.parent_.Set(static_cast<Arg_&&>(arg), args..., GetArena());
  // @@protoc_insertion_point(field_set:firestore.BundledQuery.parent)
}
inline std::string* BundledQuery::mutable_parent() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  std::string* _s = _internal_mutable_parent();
  // @@protoc_insertion_point(field_mutable:firestore.BundledQuery.parent)
  return _s;
}
inline const std::string& BundledQuery::_internal_parent() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return _impl_.parent_.Get();
}
inline void BundledQuery::_internal_set_parent(const std::string& value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  _impl_.parent_.Set(value, GetArena());
}
inline std::string* BundledQuery::_internal_mutable_parent() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  return _impl_.parent_.Mutable( GetArena());
}
inline std::string* BundledQuery::release_parent() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:firestore.BundledQuery.parent)
  return _impl_.parent_.Release();
}
inline void BundledQuery::set_allocated_parent(std::string* value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.parent_.SetAllocated(value, GetArena());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        if (_impl_.parent_.IsDefault()) {
          _impl_.parent_.Set("", GetArena());
        }
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  // @@protoc_insertion_point(field_set_allocated:firestore.BundledQuery.parent)
}

// .google.firestore.v1.StructuredQuery structured_query = 2;
inline bool BundledQuery::has_structured_query() const {
  return query_type_case() == kStructuredQuery;
}
inline bool BundledQuery::_internal_has_structured_query() const {
  return query_type_case() == kStructuredQuery;
}
inline void BundledQuery::set_has_structured_query() {
  _impl_._oneof_case_[0] = kStructuredQuery;
}
inline ::google::firestore::v1::StructuredQuery* BundledQuery::release_structured_query() {
  // @@protoc_insertion_point(field_release:firestore.BundledQuery.structured_query)
  if (query_type_case() == kStructuredQuery) {
    clear_has_query_type();
    auto* temp = _impl_.query_type_.structured_query_;
    if (GetArena() != nullptr) {
      temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
    }
    _impl_.query_type_.structured_query_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline const ::google::firestore::v1::StructuredQuery& BundledQuery::_internal_structured_query() const {
  return query_type_case() == kStructuredQuery ? *_impl_.query_type_.structured_query_ : reinterpret_cast<::google::firestore::v1::StructuredQuery&>(::google::firestore::v1::_StructuredQuery_default_instance_);
}
inline const ::google::firestore::v1::StructuredQuery& BundledQuery::structured_query() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:firestore.BundledQuery.structured_query)
  return _internal_structured_query();
}
inline ::google::firestore::v1::StructuredQuery* BundledQuery::unsafe_arena_release_structured_query() {
  // @@protoc_insertion_point(field_unsafe_arena_release:firestore.BundledQuery.structured_query)
  if (query_type_case() == kStructuredQuery) {
    clear_has_query_type();
    auto* temp = _impl_.query_type_.structured_query_;
    _impl_.query_type_.structured_query_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline void BundledQuery::unsafe_arena_set_allocated_structured_query(::google::firestore::v1::StructuredQuery* 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_query_type();
  if (value) {
    set_has_structured_query();
    _impl_.query_type_.structured_query_ = value;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:firestore.BundledQuery.structured_query)
}
inline ::google::firestore::v1::StructuredQuery* BundledQuery::_internal_mutable_structured_query() {
  if (query_type_case() != kStructuredQuery) {
    clear_query_type();
    set_has_structured_query();
    _impl_.query_type_.structured_query_ = CreateMaybeMessage<::google::firestore::v1::StructuredQuery>(GetArena());
  }
  return _impl_.query_type_.structured_query_;
}
inline ::google::firestore::v1::StructuredQuery* BundledQuery::mutable_structured_query() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::firestore::v1::StructuredQuery* _msg = _internal_mutable_structured_query();
  // @@protoc_insertion_point(field_mutable:firestore.BundledQuery.structured_query)
  return _msg;
}

// .firestore.BundledQuery.LimitType limit_type = 3;
inline void BundledQuery::clear_limit_type() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.limit_type_ = 0;
}
inline ::firestore::BundledQuery_LimitType BundledQuery::limit_type() const {
  // @@protoc_insertion_point(field_get:firestore.BundledQuery.limit_type)
  return _internal_limit_type();
}
inline void BundledQuery::set_limit_type(::firestore::BundledQuery_LimitType value) {
  _internal_set_limit_type(value);
  // @@protoc_insertion_point(field_set:firestore.BundledQuery.limit_type)
}
inline ::firestore::BundledQuery_LimitType BundledQuery::_internal_limit_type() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return static_cast<::firestore::BundledQuery_LimitType>(_impl_.limit_type_);
}
inline void BundledQuery::_internal_set_limit_type(::firestore::BundledQuery_LimitType value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  _impl_.limit_type_ = value;
}

inline bool BundledQuery::has_query_type() const {
  return query_type_case() != QUERY_TYPE_NOT_SET;
}
inline void BundledQuery::clear_has_query_type() {
  _impl_._oneof_case_[0] = QUERY_TYPE_NOT_SET;
}
inline BundledQuery::QueryTypeCase BundledQuery::query_type_case() const {
  return BundledQuery::QueryTypeCase(_impl_._oneof_case_[0]);
}
// -------------------------------------------------------------------

// NamedQuery

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

// .firestore.BundledQuery bundled_query = 2;
inline bool NamedQuery::has_bundled_query() const {
  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.bundled_query_ != nullptr);
  return value;
}
inline void NamedQuery::clear_bundled_query() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (_impl_.bundled_query_ != nullptr) _impl_.bundled_query_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const ::firestore::BundledQuery& NamedQuery::_internal_bundled_query() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  const ::firestore::BundledQuery* p = _impl_.bundled_query_;
  return p != nullptr ? *p : reinterpret_cast<const ::firestore::BundledQuery&>(::firestore::_BundledQuery_default_instance_);
}
inline const ::firestore::BundledQuery& NamedQuery::bundled_query() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:firestore.NamedQuery.bundled_query)
  return _internal_bundled_query();
}
inline void NamedQuery::unsafe_arena_set_allocated_bundled_query(::firestore::BundledQuery* value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.bundled_query_);
  }
  _impl_.bundled_query_ = reinterpret_cast<::firestore::BundledQuery*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000001u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000001u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:firestore.NamedQuery.bundled_query)
}
inline ::firestore::BundledQuery* NamedQuery::release_bundled_query() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::firestore::BundledQuery* released = _impl_.bundled_query_;
  _impl_.bundled_query_ = 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 ::firestore::BundledQuery* NamedQuery::unsafe_arena_release_bundled_query() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:firestore.NamedQuery.bundled_query)

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::firestore::BundledQuery* temp = _impl_.bundled_query_;
  _impl_.bundled_query_ = nullptr;
  return temp;
}
inline ::firestore::BundledQuery* NamedQuery::_internal_mutable_bundled_query() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_._has_bits_[0] |= 0x00000001u;
  if (_impl_.bundled_query_ == nullptr) {
    auto* p = CreateMaybeMessage<::firestore::BundledQuery>(GetArena());
    _impl_.bundled_query_ = reinterpret_cast<::firestore::BundledQuery*>(p);
  }
  return _impl_.bundled_query_;
}
inline ::firestore::BundledQuery* NamedQuery::mutable_bundled_query() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::firestore::BundledQuery* _msg = _internal_mutable_bundled_query();
  // @@protoc_insertion_point(field_mutable:firestore.NamedQuery.bundled_query)
  return _msg;
}
inline void NamedQuery::set_allocated_bundled_query(::firestore::BundledQuery* value) {
  ::google::protobuf::Arena* message_arena = GetArena();
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (message_arena == nullptr) {
    delete reinterpret_cast<::firestore::BundledQuery*>(_impl_.bundled_query_);
  }

  if (value != nullptr) {
    ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::firestore::BundledQuery*>(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_.bundled_query_ = reinterpret_cast<::firestore::BundledQuery*>(value);
  // @@protoc_insertion_point(field_set_allocated:firestore.NamedQuery.bundled_query)
}

// .google.protobuf.Timestamp read_time = 3;
inline bool NamedQuery::has_read_time() const {
  bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.read_time_ != nullptr);
  return value;
}
inline const ::google::protobuf::Timestamp& NamedQuery::_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& NamedQuery::read_time() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:firestore.NamedQuery.read_time)
  return _internal_read_time();
}
inline void NamedQuery::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] |= 0x00000002u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000002u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:firestore.NamedQuery.read_time)
}
inline ::google::protobuf::Timestamp* NamedQuery::release_read_time() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);

  _impl_._has_bits_[0] &= ~0x00000002u;
  ::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* NamedQuery::unsafe_arena_release_read_time() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:firestore.NamedQuery.read_time)

  _impl_._has_bits_[0] &= ~0x00000002u;
  ::google::protobuf::Timestamp* temp = _impl_.read_time_;
  _impl_.read_time_ = nullptr;
  return temp;
}
inline ::google::protobuf::Timestamp* NamedQuery::_internal_mutable_read_time() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_._has_bits_[0] |= 0x00000002u;
  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* NamedQuery::mutable_read_time() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::protobuf::Timestamp* _msg = _internal_mutable_read_time();
  // @@protoc_insertion_point(field_mutable:firestore.NamedQuery.read_time)
  return _msg;
}
inline void NamedQuery::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] |= 0x00000002u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000002u;
  }

  _impl_.read_time_ = reinterpret_cast<::google::protobuf::Timestamp*>(value);
  // @@protoc_insertion_point(field_set_allocated:firestore.NamedQuery.read_time)
}

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

// BundledDocumentMetadata

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

// .google.protobuf.Timestamp read_time = 2;
inline bool BundledDocumentMetadata::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& BundledDocumentMetadata::_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& BundledDocumentMetadata::read_time() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:firestore.BundledDocumentMetadata.read_time)
  return _internal_read_time();
}
inline void BundledDocumentMetadata::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.BundledDocumentMetadata.read_time)
}
inline ::google::protobuf::Timestamp* BundledDocumentMetadata::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* BundledDocumentMetadata::unsafe_arena_release_read_time() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:firestore.BundledDocumentMetadata.read_time)

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::google::protobuf::Timestamp* temp = _impl_.read_time_;
  _impl_.read_time_ = nullptr;
  return temp;
}
inline ::google::protobuf::Timestamp* BundledDocumentMetadata::_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* BundledDocumentMetadata::mutable_read_time() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::protobuf::Timestamp* _msg = _internal_mutable_read_time();
  // @@protoc_insertion_point(field_mutable:firestore.BundledDocumentMetadata.read_time)
  return _msg;
}
inline void BundledDocumentMetadata::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.BundledDocumentMetadata.read_time)
}

// bool exists = 3;
inline void BundledDocumentMetadata::clear_exists() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.exists_ = false;
}
inline bool BundledDocumentMetadata::exists() const {
  // @@protoc_insertion_point(field_get:firestore.BundledDocumentMetadata.exists)
  return _internal_exists();
}
inline void BundledDocumentMetadata::set_exists(bool value) {
  _internal_set_exists(value);
  // @@protoc_insertion_point(field_set:firestore.BundledDocumentMetadata.exists)
}
inline bool BundledDocumentMetadata::_internal_exists() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return _impl_.exists_;
}
inline void BundledDocumentMetadata::_internal_set_exists(bool value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  _impl_.exists_ = value;
}

// repeated string queries = 4;
inline int BundledDocumentMetadata::_internal_queries_size() const {
  return _internal_queries().size();
}
inline int BundledDocumentMetadata::queries_size() const {
  return _internal_queries_size();
}
inline void BundledDocumentMetadata::clear_queries() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.queries_.Clear();
}
inline std::string* BundledDocumentMetadata::add_queries()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  std::string* _s = _internal_mutable_queries()->Add();
  // @@protoc_insertion_point(field_add_mutable:firestore.BundledDocumentMetadata.queries)
  return _s;
}
inline const std::string& BundledDocumentMetadata::queries(int index) const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:firestore.BundledDocumentMetadata.queries)
  return _internal_queries().Get(index);
}
inline std::string* BundledDocumentMetadata::mutable_queries(int index)
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_mutable:firestore.BundledDocumentMetadata.queries)
  return _internal_mutable_queries()->Mutable(index);
}
inline void BundledDocumentMetadata::set_queries(int index, const std::string& value) {
  _internal_mutable_queries()->Mutable(index)->assign(value);
  // @@protoc_insertion_point(field_set:firestore.BundledDocumentMetadata.queries)
}
inline void BundledDocumentMetadata::set_queries(int index, std::string&& value) {
  _internal_mutable_queries()->Mutable(index)->assign(std::move(value));
  // @@protoc_insertion_point(field_set:firestore.BundledDocumentMetadata.queries)
}
inline void BundledDocumentMetadata::set_queries(int index, const char* value) {
  ABSL_DCHECK(value != nullptr);
  _internal_mutable_queries()->Mutable(index)->assign(value);
  // @@protoc_insertion_point(field_set_char:firestore.BundledDocumentMetadata.queries)
}
inline void BundledDocumentMetadata::set_queries(int index, const char* value,
                              std::size_t size) {
  _internal_mutable_queries()->Mutable(index)->assign(
      reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_set_pointer:firestore.BundledDocumentMetadata.queries)
}
inline void BundledDocumentMetadata::set_queries(int index, absl::string_view value) {
  _internal_mutable_queries()->Mutable(index)->assign(value.data(),
                                                     value.size());
  // @@protoc_insertion_point(field_set_string_piece:firestore.BundledDocumentMetadata.queries)
}
inline void BundledDocumentMetadata::add_queries(const std::string& value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _internal_mutable_queries()->Add()->assign(value);
  // @@protoc_insertion_point(field_add:firestore.BundledDocumentMetadata.queries)
}
inline void BundledDocumentMetadata::add_queries(std::string&& value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _internal_mutable_queries()->Add(std::move(value));
  // @@protoc_insertion_point(field_add:firestore.BundledDocumentMetadata.queries)
}
inline void BundledDocumentMetadata::add_queries(const char* value) {
  ABSL_DCHECK(value != nullptr);
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _internal_mutable_queries()->Add()->assign(value);
  // @@protoc_insertion_point(field_add_char:firestore.BundledDocumentMetadata.queries)
}
inline void BundledDocumentMetadata::add_queries(const char* value, std::size_t size) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _internal_mutable_queries()->Add()->assign(
      reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_add_pointer:firestore.BundledDocumentMetadata.queries)
}
inline void BundledDocumentMetadata::add_queries(absl::string_view value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _internal_mutable_queries()->Add()->assign(value.data(), value.size());
  // @@protoc_insertion_point(field_add_string_piece:firestore.BundledDocumentMetadata.queries)
}
inline const ::google::protobuf::RepeatedPtrField<std::string>&
BundledDocumentMetadata::queries() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_list:firestore.BundledDocumentMetadata.queries)
  return _internal_queries();
}
inline ::google::protobuf::RepeatedPtrField<std::string>*
BundledDocumentMetadata::mutable_queries() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_mutable_list:firestore.BundledDocumentMetadata.queries)
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  return _internal_mutable_queries();
}
inline const ::google::protobuf::RepeatedPtrField<std::string>&
BundledDocumentMetadata::_internal_queries() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return _impl_.queries_;
}
inline ::google::protobuf::RepeatedPtrField<std::string>*
BundledDocumentMetadata::_internal_mutable_queries() {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return &_impl_.queries_;
}

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

// BundleMetadata

// string id = 1;
inline void BundleMetadata::clear_id() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.id_.ClearToEmpty();
}
inline const std::string& BundleMetadata::id() const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:firestore.BundleMetadata.id)
  return _internal_id();
}
template <typename Arg_, typename... Args_>
inline PROTOBUF_ALWAYS_INLINE void BundleMetadata::set_id(Arg_&& arg,
                                                     Args_... args) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  _impl_.id_.Set(static_cast<Arg_&&>(arg), args..., GetArena());
  // @@protoc_insertion_point(field_set:firestore.BundleMetadata.id)
}
inline std::string* BundleMetadata::mutable_id() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  std::string* _s = _internal_mutable_id();
  // @@protoc_insertion_point(field_mutable:firestore.BundleMetadata.id)
  return _s;
}
inline const std::string& BundleMetadata::_internal_id() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return _impl_.id_.Get();
}
inline void BundleMetadata::_internal_set_id(const std::string& value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  _impl_.id_.Set(value, GetArena());
}
inline std::string* BundleMetadata::_internal_mutable_id() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  return _impl_.id_.Mutable( GetArena());
}
inline std::string* BundleMetadata::release_id() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:firestore.BundleMetadata.id)
  return _impl_.id_.Release();
}
inline void BundleMetadata::set_allocated_id(std::string* value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.id_.SetAllocated(value, GetArena());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        if (_impl_.id_.IsDefault()) {
          _impl_.id_.Set("", GetArena());
        }
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  // @@protoc_insertion_point(field_set_allocated:firestore.BundleMetadata.id)
}

// .google.protobuf.Timestamp create_time = 2;
inline bool BundleMetadata::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& BundleMetadata::_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& BundleMetadata::create_time() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:firestore.BundleMetadata.create_time)
  return _internal_create_time();
}
inline void BundleMetadata::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:firestore.BundleMetadata.create_time)
}
inline ::google::protobuf::Timestamp* BundleMetadata::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* BundleMetadata::unsafe_arena_release_create_time() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:firestore.BundleMetadata.create_time)

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::google::protobuf::Timestamp* temp = _impl_.create_time_;
  _impl_.create_time_ = nullptr;
  return temp;
}
inline ::google::protobuf::Timestamp* BundleMetadata::_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* BundleMetadata::mutable_create_time() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::protobuf::Timestamp* _msg = _internal_mutable_create_time();
  // @@protoc_insertion_point(field_mutable:firestore.BundleMetadata.create_time)
  return _msg;
}
inline void BundleMetadata::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:firestore.BundleMetadata.create_time)
}

// uint32 version = 3;
inline void BundleMetadata::clear_version() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.version_ = 0u;
}
inline ::uint32_t BundleMetadata::version() const {
  // @@protoc_insertion_point(field_get:firestore.BundleMetadata.version)
  return _internal_version();
}
inline void BundleMetadata::set_version(::uint32_t value) {
  _internal_set_version(value);
  // @@protoc_insertion_point(field_set:firestore.BundleMetadata.version)
}
inline ::uint32_t BundleMetadata::_internal_version() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return _impl_.version_;
}
inline void BundleMetadata::_internal_set_version(::uint32_t value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  _impl_.version_ = value;
}

// uint32 total_documents = 4;
inline void BundleMetadata::clear_total_documents() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.total_documents_ = 0u;
}
inline ::uint32_t BundleMetadata::total_documents() const {
  // @@protoc_insertion_point(field_get:firestore.BundleMetadata.total_documents)
  return _internal_total_documents();
}
inline void BundleMetadata::set_total_documents(::uint32_t value) {
  _internal_set_total_documents(value);
  // @@protoc_insertion_point(field_set:firestore.BundleMetadata.total_documents)
}
inline ::uint32_t BundleMetadata::_internal_total_documents() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return _impl_.total_documents_;
}
inline void BundleMetadata::_internal_set_total_documents(::uint32_t value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  _impl_.total_documents_ = value;
}

// uint64 total_bytes = 5;
inline void BundleMetadata::clear_total_bytes() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.total_bytes_ = ::uint64_t{0u};
}
inline ::uint64_t BundleMetadata::total_bytes() const {
  // @@protoc_insertion_point(field_get:firestore.BundleMetadata.total_bytes)
  return _internal_total_bytes();
}
inline void BundleMetadata::set_total_bytes(::uint64_t value) {
  _internal_set_total_bytes(value);
  // @@protoc_insertion_point(field_set:firestore.BundleMetadata.total_bytes)
}
inline ::uint64_t BundleMetadata::_internal_total_bytes() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return _impl_.total_bytes_;
}
inline void BundleMetadata::_internal_set_total_bytes(::uint64_t value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  _impl_.total_bytes_ = value;
}

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

// BundleElement

// .firestore.BundleMetadata metadata = 1;
inline bool BundleElement::has_metadata() const {
  return element_type_case() == kMetadata;
}
inline bool BundleElement::_internal_has_metadata() const {
  return element_type_case() == kMetadata;
}
inline void BundleElement::set_has_metadata() {
  _impl_._oneof_case_[0] = kMetadata;
}
inline void BundleElement::clear_metadata() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (element_type_case() == kMetadata) {
    if (GetArena() == nullptr) {
      delete _impl_.element_type_.metadata_;
    }
    clear_has_element_type();
  }
}
inline ::firestore::BundleMetadata* BundleElement::release_metadata() {
  // @@protoc_insertion_point(field_release:firestore.BundleElement.metadata)
  if (element_type_case() == kMetadata) {
    clear_has_element_type();
    auto* temp = _impl_.element_type_.metadata_;
    if (GetArena() != nullptr) {
      temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
    }
    _impl_.element_type_.metadata_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline const ::firestore::BundleMetadata& BundleElement::_internal_metadata() const {
  return element_type_case() == kMetadata ? *_impl_.element_type_.metadata_ : reinterpret_cast<::firestore::BundleMetadata&>(::firestore::_BundleMetadata_default_instance_);
}
inline const ::firestore::BundleMetadata& BundleElement::metadata() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:firestore.BundleElement.metadata)
  return _internal_metadata();
}
inline ::firestore::BundleMetadata* BundleElement::unsafe_arena_release_metadata() {
  // @@protoc_insertion_point(field_unsafe_arena_release:firestore.BundleElement.metadata)
  if (element_type_case() == kMetadata) {
    clear_has_element_type();
    auto* temp = _impl_.element_type_.metadata_;
    _impl_.element_type_.metadata_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline void BundleElement::unsafe_arena_set_allocated_metadata(::firestore::BundleMetadata* 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_element_type();
  if (value) {
    set_has_metadata();
    _impl_.element_type_.metadata_ = value;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:firestore.BundleElement.metadata)
}
inline ::firestore::BundleMetadata* BundleElement::_internal_mutable_metadata() {
  if (element_type_case() != kMetadata) {
    clear_element_type();
    set_has_metadata();
    _impl_.element_type_.metadata_ = CreateMaybeMessage<::firestore::BundleMetadata>(GetArena());
  }
  return _impl_.element_type_.metadata_;
}
inline ::firestore::BundleMetadata* BundleElement::mutable_metadata() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::firestore::BundleMetadata* _msg = _internal_mutable_metadata();
  // @@protoc_insertion_point(field_mutable:firestore.BundleElement.metadata)
  return _msg;
}

// .firestore.NamedQuery named_query = 2;
inline bool BundleElement::has_named_query() const {
  return element_type_case() == kNamedQuery;
}
inline bool BundleElement::_internal_has_named_query() const {
  return element_type_case() == kNamedQuery;
}
inline void BundleElement::set_has_named_query() {
  _impl_._oneof_case_[0] = kNamedQuery;
}
inline void BundleElement::clear_named_query() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (element_type_case() == kNamedQuery) {
    if (GetArena() == nullptr) {
      delete _impl_.element_type_.named_query_;
    }
    clear_has_element_type();
  }
}
inline ::firestore::NamedQuery* BundleElement::release_named_query() {
  // @@protoc_insertion_point(field_release:firestore.BundleElement.named_query)
  if (element_type_case() == kNamedQuery) {
    clear_has_element_type();
    auto* temp = _impl_.element_type_.named_query_;
    if (GetArena() != nullptr) {
      temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
    }
    _impl_.element_type_.named_query_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline const ::firestore::NamedQuery& BundleElement::_internal_named_query() const {
  return element_type_case() == kNamedQuery ? *_impl_.element_type_.named_query_ : reinterpret_cast<::firestore::NamedQuery&>(::firestore::_NamedQuery_default_instance_);
}
inline const ::firestore::NamedQuery& BundleElement::named_query() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:firestore.BundleElement.named_query)
  return _internal_named_query();
}
inline ::firestore::NamedQuery* BundleElement::unsafe_arena_release_named_query() {
  // @@protoc_insertion_point(field_unsafe_arena_release:firestore.BundleElement.named_query)
  if (element_type_case() == kNamedQuery) {
    clear_has_element_type();
    auto* temp = _impl_.element_type_.named_query_;
    _impl_.element_type_.named_query_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline void BundleElement::unsafe_arena_set_allocated_named_query(::firestore::NamedQuery* 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_element_type();
  if (value) {
    set_has_named_query();
    _impl_.element_type_.named_query_ = value;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:firestore.BundleElement.named_query)
}
inline ::firestore::NamedQuery* BundleElement::_internal_mutable_named_query() {
  if (element_type_case() != kNamedQuery) {
    clear_element_type();
    set_has_named_query();
    _impl_.element_type_.named_query_ = CreateMaybeMessage<::firestore::NamedQuery>(GetArena());
  }
  return _impl_.element_type_.named_query_;
}
inline ::firestore::NamedQuery* BundleElement::mutable_named_query() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::firestore::NamedQuery* _msg = _internal_mutable_named_query();
  // @@protoc_insertion_point(field_mutable:firestore.BundleElement.named_query)
  return _msg;
}

// .firestore.BundledDocumentMetadata document_metadata = 3;
inline bool BundleElement::has_document_metadata() const {
  return element_type_case() == kDocumentMetadata;
}
inline bool BundleElement::_internal_has_document_metadata() const {
  return element_type_case() == kDocumentMetadata;
}
inline void BundleElement::set_has_document_metadata() {
  _impl_._oneof_case_[0] = kDocumentMetadata;
}
inline void BundleElement::clear_document_metadata() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (element_type_case() == kDocumentMetadata) {
    if (GetArena() == nullptr) {
      delete _impl_.element_type_.document_metadata_;
    }
    clear_has_element_type();
  }
}
inline ::firestore::BundledDocumentMetadata* BundleElement::release_document_metadata() {
  // @@protoc_insertion_point(field_release:firestore.BundleElement.document_metadata)
  if (element_type_case() == kDocumentMetadata) {
    clear_has_element_type();
    auto* temp = _impl_.element_type_.document_metadata_;
    if (GetArena() != nullptr) {
      temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
    }
    _impl_.element_type_.document_metadata_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline const ::firestore::BundledDocumentMetadata& BundleElement::_internal_document_metadata() const {
  return element_type_case() == kDocumentMetadata ? *_impl_.element_type_.document_metadata_ : reinterpret_cast<::firestore::BundledDocumentMetadata&>(::firestore::_BundledDocumentMetadata_default_instance_);
}
inline const ::firestore::BundledDocumentMetadata& BundleElement::document_metadata() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:firestore.BundleElement.document_metadata)
  return _internal_document_metadata();
}
inline ::firestore::BundledDocumentMetadata* BundleElement::unsafe_arena_release_document_metadata() {
  // @@protoc_insertion_point(field_unsafe_arena_release:firestore.BundleElement.document_metadata)
  if (element_type_case() == kDocumentMetadata) {
    clear_has_element_type();
    auto* temp = _impl_.element_type_.document_metadata_;
    _impl_.element_type_.document_metadata_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline void BundleElement::unsafe_arena_set_allocated_document_metadata(::firestore::BundledDocumentMetadata* 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_element_type();
  if (value) {
    set_has_document_metadata();
    _impl_.element_type_.document_metadata_ = value;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:firestore.BundleElement.document_metadata)
}
inline ::firestore::BundledDocumentMetadata* BundleElement::_internal_mutable_document_metadata() {
  if (element_type_case() != kDocumentMetadata) {
    clear_element_type();
    set_has_document_metadata();
    _impl_.element_type_.document_metadata_ = CreateMaybeMessage<::firestore::BundledDocumentMetadata>(GetArena());
  }
  return _impl_.element_type_.document_metadata_;
}
inline ::firestore::BundledDocumentMetadata* BundleElement::mutable_document_metadata() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::firestore::BundledDocumentMetadata* _msg = _internal_mutable_document_metadata();
  // @@protoc_insertion_point(field_mutable:firestore.BundleElement.document_metadata)
  return _msg;
}

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

inline bool BundleElement::has_element_type() const {
  return element_type_case() != ELEMENT_TYPE_NOT_SET;
}
inline void BundleElement::clear_has_element_type() {
  _impl_._oneof_case_[0] = ELEMENT_TYPE_NOT_SET;
}
inline BundleElement::ElementTypeCase BundleElement::element_type_case() const {
  return BundleElement::ElementTypeCase(_impl_._oneof_case_[0]);
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif  // __GNUC__

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


namespace google {
namespace protobuf {

template <>
struct is_proto_enum<::firestore::BundledQuery_LimitType> : std::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor<::firestore::BundledQuery_LimitType>() {
  return ::firestore::BundledQuery_LimitType_descriptor();
}

}  // namespace protobuf
}  // namespace google

// @@protoc_insertion_point(global_scope)

#include "google/protobuf/port_undef.inc"

#endif  // GOOGLE_PROTOBUF_INCLUDED_firestore_2fbundle_2eproto_2epb_2eh
