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

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

#ifndef GOOGLE_PROTOBUF_INCLUDED_google_2ffirestore_2fv1_2fquery_2eproto_2epb_2eh
#define GOOGLE_PROTOBUF_INCLUDED_google_2ffirestore_2fv1_2fquery_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/protobuf/wrappers.pb.h"
// @@protoc_insertion_point(includes)

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

#define PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fquery_2eproto

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

// Internal implementation detail -- do not use these members.
struct TableStruct_google_2ffirestore_2fv1_2fquery_2eproto {
  static const ::uint32_t offsets[];
};
extern const ::google::protobuf::internal::DescriptorTable
    descriptor_table_google_2ffirestore_2fv1_2fquery_2eproto;
namespace google {
namespace firestore {
namespace v1 {
class Cursor;
struct CursorDefaultTypeInternal;
extern CursorDefaultTypeInternal _Cursor_default_instance_;
class StructuredAggregationQuery;
struct StructuredAggregationQueryDefaultTypeInternal;
extern StructuredAggregationQueryDefaultTypeInternal _StructuredAggregationQuery_default_instance_;
class StructuredAggregationQuery_Aggregation;
struct StructuredAggregationQuery_AggregationDefaultTypeInternal;
extern StructuredAggregationQuery_AggregationDefaultTypeInternal _StructuredAggregationQuery_Aggregation_default_instance_;
class StructuredAggregationQuery_Aggregation_Avg;
struct StructuredAggregationQuery_Aggregation_AvgDefaultTypeInternal;
extern StructuredAggregationQuery_Aggregation_AvgDefaultTypeInternal _StructuredAggregationQuery_Aggregation_Avg_default_instance_;
class StructuredAggregationQuery_Aggregation_Count;
struct StructuredAggregationQuery_Aggregation_CountDefaultTypeInternal;
extern StructuredAggregationQuery_Aggregation_CountDefaultTypeInternal _StructuredAggregationQuery_Aggregation_Count_default_instance_;
class StructuredAggregationQuery_Aggregation_Sum;
struct StructuredAggregationQuery_Aggregation_SumDefaultTypeInternal;
extern StructuredAggregationQuery_Aggregation_SumDefaultTypeInternal _StructuredAggregationQuery_Aggregation_Sum_default_instance_;
class StructuredQuery;
struct StructuredQueryDefaultTypeInternal;
extern StructuredQueryDefaultTypeInternal _StructuredQuery_default_instance_;
class StructuredQuery_CollectionSelector;
struct StructuredQuery_CollectionSelectorDefaultTypeInternal;
extern StructuredQuery_CollectionSelectorDefaultTypeInternal _StructuredQuery_CollectionSelector_default_instance_;
class StructuredQuery_CompositeFilter;
struct StructuredQuery_CompositeFilterDefaultTypeInternal;
extern StructuredQuery_CompositeFilterDefaultTypeInternal _StructuredQuery_CompositeFilter_default_instance_;
class StructuredQuery_FieldFilter;
struct StructuredQuery_FieldFilterDefaultTypeInternal;
extern StructuredQuery_FieldFilterDefaultTypeInternal _StructuredQuery_FieldFilter_default_instance_;
class StructuredQuery_FieldReference;
struct StructuredQuery_FieldReferenceDefaultTypeInternal;
extern StructuredQuery_FieldReferenceDefaultTypeInternal _StructuredQuery_FieldReference_default_instance_;
class StructuredQuery_Filter;
struct StructuredQuery_FilterDefaultTypeInternal;
extern StructuredQuery_FilterDefaultTypeInternal _StructuredQuery_Filter_default_instance_;
class StructuredQuery_Order;
struct StructuredQuery_OrderDefaultTypeInternal;
extern StructuredQuery_OrderDefaultTypeInternal _StructuredQuery_Order_default_instance_;
class StructuredQuery_Projection;
struct StructuredQuery_ProjectionDefaultTypeInternal;
extern StructuredQuery_ProjectionDefaultTypeInternal _StructuredQuery_Projection_default_instance_;
class StructuredQuery_UnaryFilter;
struct StructuredQuery_UnaryFilterDefaultTypeInternal;
extern StructuredQuery_UnaryFilterDefaultTypeInternal _StructuredQuery_UnaryFilter_default_instance_;
}  // namespace v1
}  // namespace firestore
namespace protobuf {
}  // namespace protobuf
}  // namespace google

namespace google {
namespace firestore {
namespace v1 {
enum StructuredQuery_CompositeFilter_Operator : int {
  StructuredQuery_CompositeFilter_Operator_OPERATOR_UNSPECIFIED = 0,
  StructuredQuery_CompositeFilter_Operator_AND = 1,
  StructuredQuery_CompositeFilter_Operator_OR = 2,
  StructuredQuery_CompositeFilter_Operator_StructuredQuery_CompositeFilter_Operator_INT_MIN_SENTINEL_DO_NOT_USE_ =
      std::numeric_limits<::int32_t>::min(),
  StructuredQuery_CompositeFilter_Operator_StructuredQuery_CompositeFilter_Operator_INT_MAX_SENTINEL_DO_NOT_USE_ =
      std::numeric_limits<::int32_t>::max(),
};

bool StructuredQuery_CompositeFilter_Operator_IsValid(int value);
extern const uint32_t StructuredQuery_CompositeFilter_Operator_internal_data_[];
constexpr StructuredQuery_CompositeFilter_Operator StructuredQuery_CompositeFilter_Operator_Operator_MIN = static_cast<StructuredQuery_CompositeFilter_Operator>(0);
constexpr StructuredQuery_CompositeFilter_Operator StructuredQuery_CompositeFilter_Operator_Operator_MAX = static_cast<StructuredQuery_CompositeFilter_Operator>(2);
constexpr int StructuredQuery_CompositeFilter_Operator_Operator_ARRAYSIZE = 2 + 1;
const ::google::protobuf::EnumDescriptor*
StructuredQuery_CompositeFilter_Operator_descriptor();
template <typename T>
const std::string& StructuredQuery_CompositeFilter_Operator_Name(T value) {
  static_assert(std::is_same<T, StructuredQuery_CompositeFilter_Operator>::value ||
                    std::is_integral<T>::value,
                "Incorrect type passed to Operator_Name().");
  return StructuredQuery_CompositeFilter_Operator_Name(static_cast<StructuredQuery_CompositeFilter_Operator>(value));
}
template <>
inline const std::string& StructuredQuery_CompositeFilter_Operator_Name(StructuredQuery_CompositeFilter_Operator value) {
  return ::google::protobuf::internal::NameOfDenseEnum<StructuredQuery_CompositeFilter_Operator_descriptor,
                                                 0, 2>(
      static_cast<int>(value));
}
inline bool StructuredQuery_CompositeFilter_Operator_Parse(absl::string_view name, StructuredQuery_CompositeFilter_Operator* value) {
  return ::google::protobuf::internal::ParseNamedEnum<StructuredQuery_CompositeFilter_Operator>(
      StructuredQuery_CompositeFilter_Operator_descriptor(), name, value);
}
enum StructuredQuery_FieldFilter_Operator : int {
  StructuredQuery_FieldFilter_Operator_OPERATOR_UNSPECIFIED = 0,
  StructuredQuery_FieldFilter_Operator_LESS_THAN = 1,
  StructuredQuery_FieldFilter_Operator_LESS_THAN_OR_EQUAL = 2,
  StructuredQuery_FieldFilter_Operator_GREATER_THAN = 3,
  StructuredQuery_FieldFilter_Operator_GREATER_THAN_OR_EQUAL = 4,
  StructuredQuery_FieldFilter_Operator_EQUAL = 5,
  StructuredQuery_FieldFilter_Operator_NOT_EQUAL = 6,
  StructuredQuery_FieldFilter_Operator_ARRAY_CONTAINS = 7,
  StructuredQuery_FieldFilter_Operator_IN = 8,
  StructuredQuery_FieldFilter_Operator_ARRAY_CONTAINS_ANY = 9,
  StructuredQuery_FieldFilter_Operator_NOT_IN = 10,
  StructuredQuery_FieldFilter_Operator_StructuredQuery_FieldFilter_Operator_INT_MIN_SENTINEL_DO_NOT_USE_ =
      std::numeric_limits<::int32_t>::min(),
  StructuredQuery_FieldFilter_Operator_StructuredQuery_FieldFilter_Operator_INT_MAX_SENTINEL_DO_NOT_USE_ =
      std::numeric_limits<::int32_t>::max(),
};

bool StructuredQuery_FieldFilter_Operator_IsValid(int value);
extern const uint32_t StructuredQuery_FieldFilter_Operator_internal_data_[];
constexpr StructuredQuery_FieldFilter_Operator StructuredQuery_FieldFilter_Operator_Operator_MIN = static_cast<StructuredQuery_FieldFilter_Operator>(0);
constexpr StructuredQuery_FieldFilter_Operator StructuredQuery_FieldFilter_Operator_Operator_MAX = static_cast<StructuredQuery_FieldFilter_Operator>(10);
constexpr int StructuredQuery_FieldFilter_Operator_Operator_ARRAYSIZE = 10 + 1;
const ::google::protobuf::EnumDescriptor*
StructuredQuery_FieldFilter_Operator_descriptor();
template <typename T>
const std::string& StructuredQuery_FieldFilter_Operator_Name(T value) {
  static_assert(std::is_same<T, StructuredQuery_FieldFilter_Operator>::value ||
                    std::is_integral<T>::value,
                "Incorrect type passed to Operator_Name().");
  return StructuredQuery_FieldFilter_Operator_Name(static_cast<StructuredQuery_FieldFilter_Operator>(value));
}
template <>
inline const std::string& StructuredQuery_FieldFilter_Operator_Name(StructuredQuery_FieldFilter_Operator value) {
  return ::google::protobuf::internal::NameOfDenseEnum<StructuredQuery_FieldFilter_Operator_descriptor,
                                                 0, 10>(
      static_cast<int>(value));
}
inline bool StructuredQuery_FieldFilter_Operator_Parse(absl::string_view name, StructuredQuery_FieldFilter_Operator* value) {
  return ::google::protobuf::internal::ParseNamedEnum<StructuredQuery_FieldFilter_Operator>(
      StructuredQuery_FieldFilter_Operator_descriptor(), name, value);
}
enum StructuredQuery_UnaryFilter_Operator : int {
  StructuredQuery_UnaryFilter_Operator_OPERATOR_UNSPECIFIED = 0,
  StructuredQuery_UnaryFilter_Operator_IS_NAN = 2,
  StructuredQuery_UnaryFilter_Operator_IS_NULL = 3,
  StructuredQuery_UnaryFilter_Operator_IS_NOT_NAN = 4,
  StructuredQuery_UnaryFilter_Operator_IS_NOT_NULL = 5,
  StructuredQuery_UnaryFilter_Operator_StructuredQuery_UnaryFilter_Operator_INT_MIN_SENTINEL_DO_NOT_USE_ =
      std::numeric_limits<::int32_t>::min(),
  StructuredQuery_UnaryFilter_Operator_StructuredQuery_UnaryFilter_Operator_INT_MAX_SENTINEL_DO_NOT_USE_ =
      std::numeric_limits<::int32_t>::max(),
};

bool StructuredQuery_UnaryFilter_Operator_IsValid(int value);
extern const uint32_t StructuredQuery_UnaryFilter_Operator_internal_data_[];
constexpr StructuredQuery_UnaryFilter_Operator StructuredQuery_UnaryFilter_Operator_Operator_MIN = static_cast<StructuredQuery_UnaryFilter_Operator>(0);
constexpr StructuredQuery_UnaryFilter_Operator StructuredQuery_UnaryFilter_Operator_Operator_MAX = static_cast<StructuredQuery_UnaryFilter_Operator>(5);
constexpr int StructuredQuery_UnaryFilter_Operator_Operator_ARRAYSIZE = 5 + 1;
const ::google::protobuf::EnumDescriptor*
StructuredQuery_UnaryFilter_Operator_descriptor();
template <typename T>
const std::string& StructuredQuery_UnaryFilter_Operator_Name(T value) {
  static_assert(std::is_same<T, StructuredQuery_UnaryFilter_Operator>::value ||
                    std::is_integral<T>::value,
                "Incorrect type passed to Operator_Name().");
  return StructuredQuery_UnaryFilter_Operator_Name(static_cast<StructuredQuery_UnaryFilter_Operator>(value));
}
template <>
inline const std::string& StructuredQuery_UnaryFilter_Operator_Name(StructuredQuery_UnaryFilter_Operator value) {
  return ::google::protobuf::internal::NameOfDenseEnum<StructuredQuery_UnaryFilter_Operator_descriptor,
                                                 0, 5>(
      static_cast<int>(value));
}
inline bool StructuredQuery_UnaryFilter_Operator_Parse(absl::string_view name, StructuredQuery_UnaryFilter_Operator* value) {
  return ::google::protobuf::internal::ParseNamedEnum<StructuredQuery_UnaryFilter_Operator>(
      StructuredQuery_UnaryFilter_Operator_descriptor(), name, value);
}
enum StructuredQuery_Direction : int {
  StructuredQuery_Direction_DIRECTION_UNSPECIFIED = 0,
  StructuredQuery_Direction_ASCENDING = 1,
  StructuredQuery_Direction_DESCENDING = 2,
  StructuredQuery_Direction_StructuredQuery_Direction_INT_MIN_SENTINEL_DO_NOT_USE_ =
      std::numeric_limits<::int32_t>::min(),
  StructuredQuery_Direction_StructuredQuery_Direction_INT_MAX_SENTINEL_DO_NOT_USE_ =
      std::numeric_limits<::int32_t>::max(),
};

bool StructuredQuery_Direction_IsValid(int value);
extern const uint32_t StructuredQuery_Direction_internal_data_[];
constexpr StructuredQuery_Direction StructuredQuery_Direction_Direction_MIN = static_cast<StructuredQuery_Direction>(0);
constexpr StructuredQuery_Direction StructuredQuery_Direction_Direction_MAX = static_cast<StructuredQuery_Direction>(2);
constexpr int StructuredQuery_Direction_Direction_ARRAYSIZE = 2 + 1;
const ::google::protobuf::EnumDescriptor*
StructuredQuery_Direction_descriptor();
template <typename T>
const std::string& StructuredQuery_Direction_Name(T value) {
  static_assert(std::is_same<T, StructuredQuery_Direction>::value ||
                    std::is_integral<T>::value,
                "Incorrect type passed to Direction_Name().");
  return StructuredQuery_Direction_Name(static_cast<StructuredQuery_Direction>(value));
}
template <>
inline const std::string& StructuredQuery_Direction_Name(StructuredQuery_Direction value) {
  return ::google::protobuf::internal::NameOfDenseEnum<StructuredQuery_Direction_descriptor,
                                                 0, 2>(
      static_cast<int>(value));
}
inline bool StructuredQuery_Direction_Parse(absl::string_view name, StructuredQuery_Direction* value) {
  return ::google::protobuf::internal::ParseNamedEnum<StructuredQuery_Direction>(
      StructuredQuery_Direction_descriptor(), name, value);
}

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


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

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

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

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

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

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

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

  private:
  friend class ::google::protobuf::internal::AnyMetadata;
  static ::absl::string_view FullMessageName() {
    return "google.firestore.v1.StructuredQuery.FieldReference";
  }
  protected:
  explicit StructuredQuery_FieldReference(::google::protobuf::Arena* arena);
  StructuredQuery_FieldReference(::google::protobuf::Arena* arena, const StructuredQuery_FieldReference& 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 {
    kFieldPathFieldNumber = 2,
  };
  // string field_path = 2;
  void clear_field_path() ;
  const std::string& field_path() const;
  template <typename Arg_ = const std::string&, typename... Args_>
  void set_field_path(Arg_&& arg, Args_... args);
  std::string* mutable_field_path();
  PROTOBUF_NODISCARD std::string* release_field_path();
  void set_allocated_field_path(std::string* value);

  private:
  const std::string& _internal_field_path() const;
  inline PROTOBUF_ALWAYS_INLINE void _internal_set_field_path(
      const std::string& value);
  std::string* _internal_mutable_field_path();

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

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

        inline explicit constexpr Impl_(
            ::google::protobuf::internal::ConstantInitialized) noexcept;
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena);
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena, const Impl_& from);
    ::google::protobuf::internal::ArenaStringPtr field_path_;
    mutable ::google::protobuf::internal::CachedSize _cached_size_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_google_2ffirestore_2fv1_2fquery_2eproto;
};// -------------------------------------------------------------------

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

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

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

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

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

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

  private:
  friend class ::google::protobuf::internal::AnyMetadata;
  static ::absl::string_view FullMessageName() {
    return "google.firestore.v1.StructuredQuery.CollectionSelector";
  }
  protected:
  explicit StructuredQuery_CollectionSelector(::google::protobuf::Arena* arena);
  StructuredQuery_CollectionSelector(::google::protobuf::Arena* arena, const StructuredQuery_CollectionSelector& 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 {
    kCollectionIdFieldNumber = 2,
    kAllDescendantsFieldNumber = 3,
  };
  // string collection_id = 2;
  void clear_collection_id() ;
  const std::string& collection_id() const;
  template <typename Arg_ = const std::string&, typename... Args_>
  void set_collection_id(Arg_&& arg, Args_... args);
  std::string* mutable_collection_id();
  PROTOBUF_NODISCARD std::string* release_collection_id();
  void set_allocated_collection_id(std::string* value);

  private:
  const std::string& _internal_collection_id() const;
  inline PROTOBUF_ALWAYS_INLINE void _internal_set_collection_id(
      const std::string& value);
  std::string* _internal_mutable_collection_id();

  public:
  // bool all_descendants = 3;
  void clear_all_descendants() ;
  bool all_descendants() const;
  void set_all_descendants(bool value);

  private:
  bool _internal_all_descendants() const;
  void _internal_set_all_descendants(bool value);

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

  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<
      1, 2, 0,
      76, 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 collection_id_;
    bool all_descendants_;
    mutable ::google::protobuf::internal::CachedSize _cached_size_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_google_2ffirestore_2fv1_2fquery_2eproto;
};// -------------------------------------------------------------------

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

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

  inline StructuredQuery_UnaryFilter& operator=(const StructuredQuery_UnaryFilter& from) {
    CopyFrom(from);
    return *this;
  }
  inline StructuredQuery_UnaryFilter& operator=(StructuredQuery_UnaryFilter&& 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 StructuredQuery_UnaryFilter& default_instance() {
    return *internal_default_instance();
  }
  enum OperandTypeCase {
    kField = 2,
    OPERAND_TYPE_NOT_SET = 0,
  };

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

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

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

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

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

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

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

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

  using Operator = StructuredQuery_UnaryFilter_Operator;
  static constexpr Operator OPERATOR_UNSPECIFIED = StructuredQuery_UnaryFilter_Operator_OPERATOR_UNSPECIFIED;
  static constexpr Operator IS_NAN = StructuredQuery_UnaryFilter_Operator_IS_NAN;
  static constexpr Operator IS_NULL = StructuredQuery_UnaryFilter_Operator_IS_NULL;
  static constexpr Operator IS_NOT_NAN = StructuredQuery_UnaryFilter_Operator_IS_NOT_NAN;
  static constexpr Operator IS_NOT_NULL = StructuredQuery_UnaryFilter_Operator_IS_NOT_NULL;
  static inline bool Operator_IsValid(int value) {
    return StructuredQuery_UnaryFilter_Operator_IsValid(value);
  }
  static constexpr Operator Operator_MIN = StructuredQuery_UnaryFilter_Operator_Operator_MIN;
  static constexpr Operator Operator_MAX = StructuredQuery_UnaryFilter_Operator_Operator_MAX;
  static constexpr int Operator_ARRAYSIZE = StructuredQuery_UnaryFilter_Operator_Operator_ARRAYSIZE;
  static inline const ::google::protobuf::EnumDescriptor* Operator_descriptor() {
    return StructuredQuery_UnaryFilter_Operator_descriptor();
  }
  template <typename T>
  static inline const std::string& Operator_Name(T value) {
    return StructuredQuery_UnaryFilter_Operator_Name(value);
  }
  static inline bool Operator_Parse(absl::string_view name, Operator* value) {
    return StructuredQuery_UnaryFilter_Operator_Parse(name, value);
  }

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

  enum : int {
    kOpFieldNumber = 1,
    kFieldFieldNumber = 2,
  };
  // .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1;
  void clear_op() ;
  ::google::firestore::v1::StructuredQuery_UnaryFilter_Operator op() const;
  void set_op(::google::firestore::v1::StructuredQuery_UnaryFilter_Operator value);

  private:
  ::google::firestore::v1::StructuredQuery_UnaryFilter_Operator _internal_op() const;
  void _internal_set_op(::google::firestore::v1::StructuredQuery_UnaryFilter_Operator value);

  public:
  // .google.firestore.v1.StructuredQuery.FieldReference field = 2;
  bool has_field() const;
  private:
  bool _internal_has_field() const;

  public:
  void clear_field() ;
  const ::google::firestore::v1::StructuredQuery_FieldReference& field() const;
  PROTOBUF_NODISCARD ::google::firestore::v1::StructuredQuery_FieldReference* release_field();
  ::google::firestore::v1::StructuredQuery_FieldReference* mutable_field();
  void set_allocated_field(::google::firestore::v1::StructuredQuery_FieldReference* value);
  void unsafe_arena_set_allocated_field(::google::firestore::v1::StructuredQuery_FieldReference* value);
  ::google::firestore::v1::StructuredQuery_FieldReference* unsafe_arena_release_field();

  private:
  const ::google::firestore::v1::StructuredQuery_FieldReference& _internal_field() const;
  ::google::firestore::v1::StructuredQuery_FieldReference* _internal_mutable_field();

  public:
  void clear_operand_type();
  OperandTypeCase operand_type_case() const;
  // @@protoc_insertion_point(class_scope:google.firestore.v1.StructuredQuery.UnaryFilter)
 private:
  class _Internal;
  void set_has_field();

  inline bool has_operand_type() const;
  inline void clear_has_operand_type();

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

        inline explicit constexpr Impl_(
            ::google::protobuf::internal::ConstantInitialized) noexcept;
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena);
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena, const Impl_& from);
    int op_;
    union OperandTypeUnion {
      constexpr OperandTypeUnion() : _constinit_{} {}
        ::google::protobuf::internal::ConstantInitialized _constinit_;
      ::google::firestore::v1::StructuredQuery_FieldReference* field_;
    } operand_type_;
    mutable ::google::protobuf::internal::CachedSize _cached_size_;
    ::uint32_t _oneof_case_[1];

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

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

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

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

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

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

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

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

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

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

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

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

  enum : int {
    kFieldsFieldNumber = 2,
  };
  // repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2;
  int fields_size() const;
  private:
  int _internal_fields_size() const;

  public:
  void clear_fields() ;
  ::google::firestore::v1::StructuredQuery_FieldReference* mutable_fields(int index);
  ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_FieldReference >*
      mutable_fields();
  private:
  const ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredQuery_FieldReference>& _internal_fields() const;
  ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredQuery_FieldReference>* _internal_mutable_fields();
  public:
  const ::google::firestore::v1::StructuredQuery_FieldReference& fields(int index) const;
  ::google::firestore::v1::StructuredQuery_FieldReference* add_fields();
  const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_FieldReference >&
      fields() const;
  // @@protoc_insertion_point(class_scope:google.firestore.v1.StructuredQuery.Projection)
 private:
  class _Internal;

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

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

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

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

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

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

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

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

  private:
  friend class ::google::protobuf::internal::AnyMetadata;
  static ::absl::string_view FullMessageName() {
    return "google.firestore.v1.StructuredQuery.Order";
  }
  protected:
  explicit StructuredQuery_Order(::google::protobuf::Arena* arena);
  StructuredQuery_Order(::google::protobuf::Arena* arena, const StructuredQuery_Order& 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 {
    kFieldFieldNumber = 1,
    kDirectionFieldNumber = 2,
  };
  // .google.firestore.v1.StructuredQuery.FieldReference field = 1;
  bool has_field() const;
  void clear_field() ;
  const ::google::firestore::v1::StructuredQuery_FieldReference& field() const;
  PROTOBUF_NODISCARD ::google::firestore::v1::StructuredQuery_FieldReference* release_field();
  ::google::firestore::v1::StructuredQuery_FieldReference* mutable_field();
  void set_allocated_field(::google::firestore::v1::StructuredQuery_FieldReference* value);
  void unsafe_arena_set_allocated_field(::google::firestore::v1::StructuredQuery_FieldReference* value);
  ::google::firestore::v1::StructuredQuery_FieldReference* unsafe_arena_release_field();

  private:
  const ::google::firestore::v1::StructuredQuery_FieldReference& _internal_field() const;
  ::google::firestore::v1::StructuredQuery_FieldReference* _internal_mutable_field();

  public:
  // .google.firestore.v1.StructuredQuery.Direction direction = 2;
  void clear_direction() ;
  ::google::firestore::v1::StructuredQuery_Direction direction() const;
  void set_direction(::google::firestore::v1::StructuredQuery_Direction value);

  private:
  ::google::firestore::v1::StructuredQuery_Direction _internal_direction() const;
  void _internal_set_direction(::google::firestore::v1::StructuredQuery_Direction value);

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

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

        inline explicit constexpr Impl_(
            ::google::protobuf::internal::ConstantInitialized) noexcept;
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena);
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena, const Impl_& from);
    ::google::protobuf::internal::HasBits<1> _has_bits_;
    mutable ::google::protobuf::internal::CachedSize _cached_size_;
    ::google::firestore::v1::StructuredQuery_FieldReference* field_;
    int direction_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_google_2ffirestore_2fv1_2fquery_2eproto;
};// -------------------------------------------------------------------

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

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

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

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

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

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

  private:
  friend class ::google::protobuf::internal::AnyMetadata;
  static ::absl::string_view FullMessageName() {
    return "google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum";
  }
  protected:
  explicit StructuredAggregationQuery_Aggregation_Sum(::google::protobuf::Arena* arena);
  StructuredAggregationQuery_Aggregation_Sum(::google::protobuf::Arena* arena, const StructuredAggregationQuery_Aggregation_Sum& 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 {
    kFieldFieldNumber = 1,
  };
  // .google.firestore.v1.StructuredQuery.FieldReference field = 1;
  bool has_field() const;
  void clear_field() ;
  const ::google::firestore::v1::StructuredQuery_FieldReference& field() const;
  PROTOBUF_NODISCARD ::google::firestore::v1::StructuredQuery_FieldReference* release_field();
  ::google::firestore::v1::StructuredQuery_FieldReference* mutable_field();
  void set_allocated_field(::google::firestore::v1::StructuredQuery_FieldReference* value);
  void unsafe_arena_set_allocated_field(::google::firestore::v1::StructuredQuery_FieldReference* value);
  ::google::firestore::v1::StructuredQuery_FieldReference* unsafe_arena_release_field();

  private:
  const ::google::firestore::v1::StructuredQuery_FieldReference& _internal_field() const;
  ::google::firestore::v1::StructuredQuery_FieldReference* _internal_mutable_field();

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

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

        inline explicit constexpr Impl_(
            ::google::protobuf::internal::ConstantInitialized) noexcept;
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena);
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena, const Impl_& from);
    ::google::protobuf::internal::HasBits<1> _has_bits_;
    mutable ::google::protobuf::internal::CachedSize _cached_size_;
    ::google::firestore::v1::StructuredQuery_FieldReference* field_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_google_2ffirestore_2fv1_2fquery_2eproto;
};// -------------------------------------------------------------------

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

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

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

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

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

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

  private:
  friend class ::google::protobuf::internal::AnyMetadata;
  static ::absl::string_view FullMessageName() {
    return "google.firestore.v1.StructuredAggregationQuery.Aggregation.Count";
  }
  protected:
  explicit StructuredAggregationQuery_Aggregation_Count(::google::protobuf::Arena* arena);
  StructuredAggregationQuery_Aggregation_Count(::google::protobuf::Arena* arena, const StructuredAggregationQuery_Aggregation_Count& 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 {
    kUpToFieldNumber = 1,
  };
  // .google.protobuf.Int64Value up_to = 1;
  bool has_up_to() const;
  void clear_up_to() ;
  const ::google::protobuf::Int64Value& up_to() const;
  PROTOBUF_NODISCARD ::google::protobuf::Int64Value* release_up_to();
  ::google::protobuf::Int64Value* mutable_up_to();
  void set_allocated_up_to(::google::protobuf::Int64Value* value);
  void unsafe_arena_set_allocated_up_to(::google::protobuf::Int64Value* value);
  ::google::protobuf::Int64Value* unsafe_arena_release_up_to();

  private:
  const ::google::protobuf::Int64Value& _internal_up_to() const;
  ::google::protobuf::Int64Value* _internal_mutable_up_to();

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

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

        inline explicit constexpr Impl_(
            ::google::protobuf::internal::ConstantInitialized) noexcept;
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena);
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena, const Impl_& from);
    ::google::protobuf::internal::HasBits<1> _has_bits_;
    mutable ::google::protobuf::internal::CachedSize _cached_size_;
    ::google::protobuf::Int64Value* up_to_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_google_2ffirestore_2fv1_2fquery_2eproto;
};// -------------------------------------------------------------------

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

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

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

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

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

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

  private:
  friend class ::google::protobuf::internal::AnyMetadata;
  static ::absl::string_view FullMessageName() {
    return "google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg";
  }
  protected:
  explicit StructuredAggregationQuery_Aggregation_Avg(::google::protobuf::Arena* arena);
  StructuredAggregationQuery_Aggregation_Avg(::google::protobuf::Arena* arena, const StructuredAggregationQuery_Aggregation_Avg& 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 {
    kFieldFieldNumber = 1,
  };
  // .google.firestore.v1.StructuredQuery.FieldReference field = 1;
  bool has_field() const;
  void clear_field() ;
  const ::google::firestore::v1::StructuredQuery_FieldReference& field() const;
  PROTOBUF_NODISCARD ::google::firestore::v1::StructuredQuery_FieldReference* release_field();
  ::google::firestore::v1::StructuredQuery_FieldReference* mutable_field();
  void set_allocated_field(::google::firestore::v1::StructuredQuery_FieldReference* value);
  void unsafe_arena_set_allocated_field(::google::firestore::v1::StructuredQuery_FieldReference* value);
  ::google::firestore::v1::StructuredQuery_FieldReference* unsafe_arena_release_field();

  private:
  const ::google::firestore::v1::StructuredQuery_FieldReference& _internal_field() const;
  ::google::firestore::v1::StructuredQuery_FieldReference* _internal_mutable_field();

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

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

        inline explicit constexpr Impl_(
            ::google::protobuf::internal::ConstantInitialized) noexcept;
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena);
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena, const Impl_& from);
    ::google::protobuf::internal::HasBits<1> _has_bits_;
    mutable ::google::protobuf::internal::CachedSize _cached_size_;
    ::google::firestore::v1::StructuredQuery_FieldReference* field_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_google_2ffirestore_2fv1_2fquery_2eproto;
};// -------------------------------------------------------------------

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

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

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

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

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

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

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

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

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

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

  using Operator = StructuredQuery_FieldFilter_Operator;
  static constexpr Operator OPERATOR_UNSPECIFIED = StructuredQuery_FieldFilter_Operator_OPERATOR_UNSPECIFIED;
  static constexpr Operator LESS_THAN = StructuredQuery_FieldFilter_Operator_LESS_THAN;
  static constexpr Operator LESS_THAN_OR_EQUAL = StructuredQuery_FieldFilter_Operator_LESS_THAN_OR_EQUAL;
  static constexpr Operator GREATER_THAN = StructuredQuery_FieldFilter_Operator_GREATER_THAN;
  static constexpr Operator GREATER_THAN_OR_EQUAL = StructuredQuery_FieldFilter_Operator_GREATER_THAN_OR_EQUAL;
  static constexpr Operator EQUAL = StructuredQuery_FieldFilter_Operator_EQUAL;
  static constexpr Operator NOT_EQUAL = StructuredQuery_FieldFilter_Operator_NOT_EQUAL;
  static constexpr Operator ARRAY_CONTAINS = StructuredQuery_FieldFilter_Operator_ARRAY_CONTAINS;
  static constexpr Operator IN_ = StructuredQuery_FieldFilter_Operator_IN;
  static constexpr Operator ARRAY_CONTAINS_ANY = StructuredQuery_FieldFilter_Operator_ARRAY_CONTAINS_ANY;
  static constexpr Operator NOT_IN = StructuredQuery_FieldFilter_Operator_NOT_IN;
  static inline bool Operator_IsValid(int value) {
    return StructuredQuery_FieldFilter_Operator_IsValid(value);
  }
  static constexpr Operator Operator_MIN = StructuredQuery_FieldFilter_Operator_Operator_MIN;
  static constexpr Operator Operator_MAX = StructuredQuery_FieldFilter_Operator_Operator_MAX;
  static constexpr int Operator_ARRAYSIZE = StructuredQuery_FieldFilter_Operator_Operator_ARRAYSIZE;
  static inline const ::google::protobuf::EnumDescriptor* Operator_descriptor() {
    return StructuredQuery_FieldFilter_Operator_descriptor();
  }
  template <typename T>
  static inline const std::string& Operator_Name(T value) {
    return StructuredQuery_FieldFilter_Operator_Name(value);
  }
  static inline bool Operator_Parse(absl::string_view name, Operator* value) {
    return StructuredQuery_FieldFilter_Operator_Parse(name, value);
  }

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

  enum : int {
    kFieldFieldNumber = 1,
    kValueFieldNumber = 3,
    kOpFieldNumber = 2,
  };
  // .google.firestore.v1.StructuredQuery.FieldReference field = 1;
  bool has_field() const;
  void clear_field() ;
  const ::google::firestore::v1::StructuredQuery_FieldReference& field() const;
  PROTOBUF_NODISCARD ::google::firestore::v1::StructuredQuery_FieldReference* release_field();
  ::google::firestore::v1::StructuredQuery_FieldReference* mutable_field();
  void set_allocated_field(::google::firestore::v1::StructuredQuery_FieldReference* value);
  void unsafe_arena_set_allocated_field(::google::firestore::v1::StructuredQuery_FieldReference* value);
  ::google::firestore::v1::StructuredQuery_FieldReference* unsafe_arena_release_field();

  private:
  const ::google::firestore::v1::StructuredQuery_FieldReference& _internal_field() const;
  ::google::firestore::v1::StructuredQuery_FieldReference* _internal_mutable_field();

  public:
  // .google.firestore.v1.Value value = 3;
  bool has_value() const;
  void clear_value() ;
  const ::google::firestore::v1::Value& value() const;
  PROTOBUF_NODISCARD ::google::firestore::v1::Value* release_value();
  ::google::firestore::v1::Value* mutable_value();
  void set_allocated_value(::google::firestore::v1::Value* value);
  void unsafe_arena_set_allocated_value(::google::firestore::v1::Value* value);
  ::google::firestore::v1::Value* unsafe_arena_release_value();

  private:
  const ::google::firestore::v1::Value& _internal_value() const;
  ::google::firestore::v1::Value* _internal_mutable_value();

  public:
  // .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2;
  void clear_op() ;
  ::google::firestore::v1::StructuredQuery_FieldFilter_Operator op() const;
  void set_op(::google::firestore::v1::StructuredQuery_FieldFilter_Operator value);

  private:
  ::google::firestore::v1::StructuredQuery_FieldFilter_Operator _internal_op() const;
  void _internal_set_op(::google::firestore::v1::StructuredQuery_FieldFilter_Operator value);

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

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

        inline explicit constexpr Impl_(
            ::google::protobuf::internal::ConstantInitialized) noexcept;
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena);
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena, const Impl_& from);
    ::google::protobuf::internal::HasBits<1> _has_bits_;
    mutable ::google::protobuf::internal::CachedSize _cached_size_;
    ::google::firestore::v1::StructuredQuery_FieldReference* field_;
    ::google::firestore::v1::Value* value_;
    int op_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_google_2ffirestore_2fv1_2fquery_2eproto;
};// -------------------------------------------------------------------

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

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

  inline StructuredAggregationQuery_Aggregation& operator=(const StructuredAggregationQuery_Aggregation& from) {
    CopyFrom(from);
    return *this;
  }
  inline StructuredAggregationQuery_Aggregation& operator=(StructuredAggregationQuery_Aggregation&& 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 StructuredAggregationQuery_Aggregation& default_instance() {
    return *internal_default_instance();
  }
  enum OperatorCase {
    kCount = 1,
    kSum = 2,
    kAvg = 3,
    OPERATOR_NOT_SET = 0,
  };

  static inline const StructuredAggregationQuery_Aggregation* internal_default_instance() {
    return reinterpret_cast<const StructuredAggregationQuery_Aggregation*>(
               &_StructuredAggregationQuery_Aggregation_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    12;

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

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

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

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

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

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

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

  using Count = StructuredAggregationQuery_Aggregation_Count;
  using Sum = StructuredAggregationQuery_Aggregation_Sum;
  using Avg = StructuredAggregationQuery_Aggregation_Avg;

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

  enum : int {
    kAliasFieldNumber = 7,
    kCountFieldNumber = 1,
    kSumFieldNumber = 2,
    kAvgFieldNumber = 3,
  };
  // string alias = 7;
  void clear_alias() ;
  const std::string& alias() const;
  template <typename Arg_ = const std::string&, typename... Args_>
  void set_alias(Arg_&& arg, Args_... args);
  std::string* mutable_alias();
  PROTOBUF_NODISCARD std::string* release_alias();
  void set_allocated_alias(std::string* value);

  private:
  const std::string& _internal_alias() const;
  inline PROTOBUF_ALWAYS_INLINE void _internal_set_alias(
      const std::string& value);
  std::string* _internal_mutable_alias();

  public:
  // .google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1;
  bool has_count() const;
  private:
  bool _internal_has_count() const;

  public:
  void clear_count() ;
  const ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Count& count() const;
  PROTOBUF_NODISCARD ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Count* release_count();
  ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Count* mutable_count();
  void set_allocated_count(::google::firestore::v1::StructuredAggregationQuery_Aggregation_Count* value);
  void unsafe_arena_set_allocated_count(::google::firestore::v1::StructuredAggregationQuery_Aggregation_Count* value);
  ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Count* unsafe_arena_release_count();

  private:
  const ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Count& _internal_count() const;
  ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Count* _internal_mutable_count();

  public:
  // .google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2;
  bool has_sum() const;
  private:
  bool _internal_has_sum() const;

  public:
  void clear_sum() ;
  const ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Sum& sum() const;
  PROTOBUF_NODISCARD ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Sum* release_sum();
  ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Sum* mutable_sum();
  void set_allocated_sum(::google::firestore::v1::StructuredAggregationQuery_Aggregation_Sum* value);
  void unsafe_arena_set_allocated_sum(::google::firestore::v1::StructuredAggregationQuery_Aggregation_Sum* value);
  ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Sum* unsafe_arena_release_sum();

  private:
  const ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Sum& _internal_sum() const;
  ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Sum* _internal_mutable_sum();

  public:
  // .google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3;
  bool has_avg() const;
  private:
  bool _internal_has_avg() const;

  public:
  void clear_avg() ;
  const ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Avg& avg() const;
  PROTOBUF_NODISCARD ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Avg* release_avg();
  ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Avg* mutable_avg();
  void set_allocated_avg(::google::firestore::v1::StructuredAggregationQuery_Aggregation_Avg* value);
  void unsafe_arena_set_allocated_avg(::google::firestore::v1::StructuredAggregationQuery_Aggregation_Avg* value);
  ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Avg* unsafe_arena_release_avg();

  private:
  const ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Avg& _internal_avg() const;
  ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Avg* _internal_mutable_avg();

  public:
  void clear_operator();
  OperatorCase operator_case() const;
  // @@protoc_insertion_point(class_scope:google.firestore.v1.StructuredAggregationQuery.Aggregation)
 private:
  class _Internal;
  void set_has_count();
  void set_has_sum();
  void set_has_avg();

  inline bool has_operator() const;
  inline void clear_has_operator();

  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<
      0, 4, 3,
      72, 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 alias_;
    union OperatorUnion {
      constexpr OperatorUnion() : _constinit_{} {}
        ::google::protobuf::internal::ConstantInitialized _constinit_;
      ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Count* count_;
      ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Sum* sum_;
      ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Avg* avg_;
    } operator_;
    mutable ::google::protobuf::internal::CachedSize _cached_size_;
    ::uint32_t _oneof_case_[1];

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

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

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

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

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

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

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

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

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

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

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

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

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

  public:
  void clear_values() ;
  ::google::firestore::v1::Value* mutable_values(int index);
  ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Value >*
      mutable_values();
  private:
  const ::google::protobuf::RepeatedPtrField<::google::firestore::v1::Value>& _internal_values() const;
  ::google::protobuf::RepeatedPtrField<::google::firestore::v1::Value>* _internal_mutable_values();
  public:
  const ::google::firestore::v1::Value& values(int index) const;
  ::google::firestore::v1::Value* add_values();
  const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Value >&
      values() const;
  // bool before = 2;
  void clear_before() ;
  bool before() const;
  void set_before(bool value);

  private:
  bool _internal_before() const;
  void _internal_set_before(bool value);

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

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

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

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

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

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

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

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

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

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

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

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

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

  using Operator = StructuredQuery_CompositeFilter_Operator;
  static constexpr Operator OPERATOR_UNSPECIFIED = StructuredQuery_CompositeFilter_Operator_OPERATOR_UNSPECIFIED;
  static constexpr Operator AND = StructuredQuery_CompositeFilter_Operator_AND;
  static constexpr Operator OR = StructuredQuery_CompositeFilter_Operator_OR;
  static inline bool Operator_IsValid(int value) {
    return StructuredQuery_CompositeFilter_Operator_IsValid(value);
  }
  static constexpr Operator Operator_MIN = StructuredQuery_CompositeFilter_Operator_Operator_MIN;
  static constexpr Operator Operator_MAX = StructuredQuery_CompositeFilter_Operator_Operator_MAX;
  static constexpr int Operator_ARRAYSIZE = StructuredQuery_CompositeFilter_Operator_Operator_ARRAYSIZE;
  static inline const ::google::protobuf::EnumDescriptor* Operator_descriptor() {
    return StructuredQuery_CompositeFilter_Operator_descriptor();
  }
  template <typename T>
  static inline const std::string& Operator_Name(T value) {
    return StructuredQuery_CompositeFilter_Operator_Name(value);
  }
  static inline bool Operator_Parse(absl::string_view name, Operator* value) {
    return StructuredQuery_CompositeFilter_Operator_Parse(name, value);
  }

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

  enum : int {
    kFiltersFieldNumber = 2,
    kOpFieldNumber = 1,
  };
  // repeated .google.firestore.v1.StructuredQuery.Filter filters = 2;
  int filters_size() const;
  private:
  int _internal_filters_size() const;

  public:
  void clear_filters() ;
  ::google::firestore::v1::StructuredQuery_Filter* mutable_filters(int index);
  ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_Filter >*
      mutable_filters();
  private:
  const ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredQuery_Filter>& _internal_filters() const;
  ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredQuery_Filter>* _internal_mutable_filters();
  public:
  const ::google::firestore::v1::StructuredQuery_Filter& filters(int index) const;
  ::google::firestore::v1::StructuredQuery_Filter* add_filters();
  const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_Filter >&
      filters() const;
  // .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1;
  void clear_op() ;
  ::google::firestore::v1::StructuredQuery_CompositeFilter_Operator op() const;
  void set_op(::google::firestore::v1::StructuredQuery_CompositeFilter_Operator value);

  private:
  ::google::firestore::v1::StructuredQuery_CompositeFilter_Operator _internal_op() const;
  void _internal_set_op(::google::firestore::v1::StructuredQuery_CompositeFilter_Operator value);

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

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

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

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

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

  inline StructuredQuery_Filter& operator=(const StructuredQuery_Filter& from) {
    CopyFrom(from);
    return *this;
  }
  inline StructuredQuery_Filter& operator=(StructuredQuery_Filter&& 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 StructuredQuery_Filter& default_instance() {
    return *internal_default_instance();
  }
  enum FilterTypeCase {
    kCompositeFilter = 1,
    kFieldFilter = 2,
    kUnaryFilter = 3,
    FILTER_TYPE_NOT_SET = 0,
  };

  static inline const StructuredQuery_Filter* internal_default_instance() {
    return reinterpret_cast<const StructuredQuery_Filter*>(
               &_StructuredQuery_Filter_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    1;

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

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

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

  private:
  friend class ::google::protobuf::internal::AnyMetadata;
  static ::absl::string_view FullMessageName() {
    return "google.firestore.v1.StructuredQuery.Filter";
  }
  protected:
  explicit StructuredQuery_Filter(::google::protobuf::Arena* arena);
  StructuredQuery_Filter(::google::protobuf::Arena* arena, const StructuredQuery_Filter& 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 {
    kCompositeFilterFieldNumber = 1,
    kFieldFilterFieldNumber = 2,
    kUnaryFilterFieldNumber = 3,
  };
  // .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1;
  bool has_composite_filter() const;
  private:
  bool _internal_has_composite_filter() const;

  public:
  void clear_composite_filter() ;
  const ::google::firestore::v1::StructuredQuery_CompositeFilter& composite_filter() const;
  PROTOBUF_NODISCARD ::google::firestore::v1::StructuredQuery_CompositeFilter* release_composite_filter();
  ::google::firestore::v1::StructuredQuery_CompositeFilter* mutable_composite_filter();
  void set_allocated_composite_filter(::google::firestore::v1::StructuredQuery_CompositeFilter* value);
  void unsafe_arena_set_allocated_composite_filter(::google::firestore::v1::StructuredQuery_CompositeFilter* value);
  ::google::firestore::v1::StructuredQuery_CompositeFilter* unsafe_arena_release_composite_filter();

  private:
  const ::google::firestore::v1::StructuredQuery_CompositeFilter& _internal_composite_filter() const;
  ::google::firestore::v1::StructuredQuery_CompositeFilter* _internal_mutable_composite_filter();

  public:
  // .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2;
  bool has_field_filter() const;
  private:
  bool _internal_has_field_filter() const;

  public:
  void clear_field_filter() ;
  const ::google::firestore::v1::StructuredQuery_FieldFilter& field_filter() const;
  PROTOBUF_NODISCARD ::google::firestore::v1::StructuredQuery_FieldFilter* release_field_filter();
  ::google::firestore::v1::StructuredQuery_FieldFilter* mutable_field_filter();
  void set_allocated_field_filter(::google::firestore::v1::StructuredQuery_FieldFilter* value);
  void unsafe_arena_set_allocated_field_filter(::google::firestore::v1::StructuredQuery_FieldFilter* value);
  ::google::firestore::v1::StructuredQuery_FieldFilter* unsafe_arena_release_field_filter();

  private:
  const ::google::firestore::v1::StructuredQuery_FieldFilter& _internal_field_filter() const;
  ::google::firestore::v1::StructuredQuery_FieldFilter* _internal_mutable_field_filter();

  public:
  // .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3;
  bool has_unary_filter() const;
  private:
  bool _internal_has_unary_filter() const;

  public:
  void clear_unary_filter() ;
  const ::google::firestore::v1::StructuredQuery_UnaryFilter& unary_filter() const;
  PROTOBUF_NODISCARD ::google::firestore::v1::StructuredQuery_UnaryFilter* release_unary_filter();
  ::google::firestore::v1::StructuredQuery_UnaryFilter* mutable_unary_filter();
  void set_allocated_unary_filter(::google::firestore::v1::StructuredQuery_UnaryFilter* value);
  void unsafe_arena_set_allocated_unary_filter(::google::firestore::v1::StructuredQuery_UnaryFilter* value);
  ::google::firestore::v1::StructuredQuery_UnaryFilter* unsafe_arena_release_unary_filter();

  private:
  const ::google::firestore::v1::StructuredQuery_UnaryFilter& _internal_unary_filter() const;
  ::google::firestore::v1::StructuredQuery_UnaryFilter* _internal_mutable_unary_filter();

  public:
  void clear_filter_type();
  FilterTypeCase filter_type_case() const;
  // @@protoc_insertion_point(class_scope:google.firestore.v1.StructuredQuery.Filter)
 private:
  class _Internal;
  void set_has_composite_filter();
  void set_has_field_filter();
  void set_has_unary_filter();

  inline bool has_filter_type() const;
  inline void clear_has_filter_type();

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

        inline explicit constexpr Impl_(
            ::google::protobuf::internal::ConstantInitialized) noexcept;
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena);
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena, const Impl_& from);
    union FilterTypeUnion {
      constexpr FilterTypeUnion() : _constinit_{} {}
        ::google::protobuf::internal::ConstantInitialized _constinit_;
      ::google::firestore::v1::StructuredQuery_CompositeFilter* composite_filter_;
      ::google::firestore::v1::StructuredQuery_FieldFilter* field_filter_;
      ::google::firestore::v1::StructuredQuery_UnaryFilter* unary_filter_;
    } filter_type_;
    mutable ::google::protobuf::internal::CachedSize _cached_size_;
    ::uint32_t _oneof_case_[1];

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

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

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

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

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

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

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

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

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

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

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

  using CollectionSelector = StructuredQuery_CollectionSelector;
  using Filter = StructuredQuery_Filter;
  using CompositeFilter = StructuredQuery_CompositeFilter;
  using FieldFilter = StructuredQuery_FieldFilter;
  using UnaryFilter = StructuredQuery_UnaryFilter;
  using Order = StructuredQuery_Order;
  using FieldReference = StructuredQuery_FieldReference;
  using Projection = StructuredQuery_Projection;

  using Direction = StructuredQuery_Direction;
  static constexpr Direction DIRECTION_UNSPECIFIED = StructuredQuery_Direction_DIRECTION_UNSPECIFIED;
  static constexpr Direction ASCENDING = StructuredQuery_Direction_ASCENDING;
  static constexpr Direction DESCENDING = StructuredQuery_Direction_DESCENDING;
  static inline bool Direction_IsValid(int value) {
    return StructuredQuery_Direction_IsValid(value);
  }
  static constexpr Direction Direction_MIN = StructuredQuery_Direction_Direction_MIN;
  static constexpr Direction Direction_MAX = StructuredQuery_Direction_Direction_MAX;
  static constexpr int Direction_ARRAYSIZE = StructuredQuery_Direction_Direction_ARRAYSIZE;
  static inline const ::google::protobuf::EnumDescriptor* Direction_descriptor() {
    return StructuredQuery_Direction_descriptor();
  }
  template <typename T>
  static inline const std::string& Direction_Name(T value) {
    return StructuredQuery_Direction_Name(value);
  }
  static inline bool Direction_Parse(absl::string_view name, Direction* value) {
    return StructuredQuery_Direction_Parse(name, value);
  }

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

  enum : int {
    kFromFieldNumber = 2,
    kOrderByFieldNumber = 4,
    kSelectFieldNumber = 1,
    kWhereFieldNumber = 3,
    kLimitFieldNumber = 5,
    kStartAtFieldNumber = 7,
    kEndAtFieldNumber = 8,
    kOffsetFieldNumber = 6,
  };
  // repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2;
  int from_size() const;
  private:
  int _internal_from_size() const;

  public:
  void clear_from() ;
  ::google::firestore::v1::StructuredQuery_CollectionSelector* mutable_from(int index);
  ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_CollectionSelector >*
      mutable_from();
  private:
  const ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredQuery_CollectionSelector>& _internal_from() const;
  ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredQuery_CollectionSelector>* _internal_mutable_from();
  public:
  const ::google::firestore::v1::StructuredQuery_CollectionSelector& from(int index) const;
  ::google::firestore::v1::StructuredQuery_CollectionSelector* add_from();
  const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_CollectionSelector >&
      from() const;
  // repeated .google.firestore.v1.StructuredQuery.Order order_by = 4;
  int order_by_size() const;
  private:
  int _internal_order_by_size() const;

  public:
  void clear_order_by() ;
  ::google::firestore::v1::StructuredQuery_Order* mutable_order_by(int index);
  ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_Order >*
      mutable_order_by();
  private:
  const ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredQuery_Order>& _internal_order_by() const;
  ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredQuery_Order>* _internal_mutable_order_by();
  public:
  const ::google::firestore::v1::StructuredQuery_Order& order_by(int index) const;
  ::google::firestore::v1::StructuredQuery_Order* add_order_by();
  const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_Order >&
      order_by() const;
  // .google.firestore.v1.StructuredQuery.Projection select = 1;
  bool has_select() const;
  void clear_select() ;
  const ::google::firestore::v1::StructuredQuery_Projection& select() const;
  PROTOBUF_NODISCARD ::google::firestore::v1::StructuredQuery_Projection* release_select();
  ::google::firestore::v1::StructuredQuery_Projection* mutable_select();
  void set_allocated_select(::google::firestore::v1::StructuredQuery_Projection* value);
  void unsafe_arena_set_allocated_select(::google::firestore::v1::StructuredQuery_Projection* value);
  ::google::firestore::v1::StructuredQuery_Projection* unsafe_arena_release_select();

  private:
  const ::google::firestore::v1::StructuredQuery_Projection& _internal_select() const;
  ::google::firestore::v1::StructuredQuery_Projection* _internal_mutable_select();

  public:
  // .google.firestore.v1.StructuredQuery.Filter where = 3;
  bool has_where() const;
  void clear_where() ;
  const ::google::firestore::v1::StructuredQuery_Filter& where() const;
  PROTOBUF_NODISCARD ::google::firestore::v1::StructuredQuery_Filter* release_where();
  ::google::firestore::v1::StructuredQuery_Filter* mutable_where();
  void set_allocated_where(::google::firestore::v1::StructuredQuery_Filter* value);
  void unsafe_arena_set_allocated_where(::google::firestore::v1::StructuredQuery_Filter* value);
  ::google::firestore::v1::StructuredQuery_Filter* unsafe_arena_release_where();

  private:
  const ::google::firestore::v1::StructuredQuery_Filter& _internal_where() const;
  ::google::firestore::v1::StructuredQuery_Filter* _internal_mutable_where();

  public:
  // .google.protobuf.Int32Value limit = 5;
  bool has_limit() const;
  void clear_limit() ;
  const ::google::protobuf::Int32Value& limit() const;
  PROTOBUF_NODISCARD ::google::protobuf::Int32Value* release_limit();
  ::google::protobuf::Int32Value* mutable_limit();
  void set_allocated_limit(::google::protobuf::Int32Value* value);
  void unsafe_arena_set_allocated_limit(::google::protobuf::Int32Value* value);
  ::google::protobuf::Int32Value* unsafe_arena_release_limit();

  private:
  const ::google::protobuf::Int32Value& _internal_limit() const;
  ::google::protobuf::Int32Value* _internal_mutable_limit();

  public:
  // .google.firestore.v1.Cursor start_at = 7;
  bool has_start_at() const;
  void clear_start_at() ;
  const ::google::firestore::v1::Cursor& start_at() const;
  PROTOBUF_NODISCARD ::google::firestore::v1::Cursor* release_start_at();
  ::google::firestore::v1::Cursor* mutable_start_at();
  void set_allocated_start_at(::google::firestore::v1::Cursor* value);
  void unsafe_arena_set_allocated_start_at(::google::firestore::v1::Cursor* value);
  ::google::firestore::v1::Cursor* unsafe_arena_release_start_at();

  private:
  const ::google::firestore::v1::Cursor& _internal_start_at() const;
  ::google::firestore::v1::Cursor* _internal_mutable_start_at();

  public:
  // .google.firestore.v1.Cursor end_at = 8;
  bool has_end_at() const;
  void clear_end_at() ;
  const ::google::firestore::v1::Cursor& end_at() const;
  PROTOBUF_NODISCARD ::google::firestore::v1::Cursor* release_end_at();
  ::google::firestore::v1::Cursor* mutable_end_at();
  void set_allocated_end_at(::google::firestore::v1::Cursor* value);
  void unsafe_arena_set_allocated_end_at(::google::firestore::v1::Cursor* value);
  ::google::firestore::v1::Cursor* unsafe_arena_release_end_at();

  private:
  const ::google::firestore::v1::Cursor& _internal_end_at() const;
  ::google::firestore::v1::Cursor* _internal_mutable_end_at();

  public:
  // int32 offset = 6;
  void clear_offset() ;
  ::int32_t offset() const;
  void set_offset(::int32_t value);

  private:
  ::int32_t _internal_offset() const;
  void _internal_set_offset(::int32_t value);

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

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

        inline explicit constexpr Impl_(
            ::google::protobuf::internal::ConstantInitialized) noexcept;
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena);
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena, const Impl_& from);
    ::google::protobuf::internal::HasBits<1> _has_bits_;
    mutable ::google::protobuf::internal::CachedSize _cached_size_;
    ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_CollectionSelector > from_;
    ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_Order > order_by_;
    ::google::firestore::v1::StructuredQuery_Projection* select_;
    ::google::firestore::v1::StructuredQuery_Filter* where_;
    ::google::protobuf::Int32Value* limit_;
    ::google::firestore::v1::Cursor* start_at_;
    ::google::firestore::v1::Cursor* end_at_;
    ::int32_t offset_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_google_2ffirestore_2fv1_2fquery_2eproto;
};// -------------------------------------------------------------------

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

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

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

  static inline const StructuredAggregationQuery* internal_default_instance() {
    return reinterpret_cast<const StructuredAggregationQuery*>(
               &_StructuredAggregationQuery_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    13;

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

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

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

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

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

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

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

  using Aggregation = StructuredAggregationQuery_Aggregation;

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

  enum : int {
    kAggregationsFieldNumber = 3,
    kStructuredQueryFieldNumber = 1,
  };
  // repeated .google.firestore.v1.StructuredAggregationQuery.Aggregation aggregations = 3;
  int aggregations_size() const;
  private:
  int _internal_aggregations_size() const;

  public:
  void clear_aggregations() ;
  ::google::firestore::v1::StructuredAggregationQuery_Aggregation* mutable_aggregations(int index);
  ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredAggregationQuery_Aggregation >*
      mutable_aggregations();
  private:
  const ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredAggregationQuery_Aggregation>& _internal_aggregations() const;
  ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredAggregationQuery_Aggregation>* _internal_mutable_aggregations();
  public:
  const ::google::firestore::v1::StructuredAggregationQuery_Aggregation& aggregations(int index) const;
  ::google::firestore::v1::StructuredAggregationQuery_Aggregation* add_aggregations();
  const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredAggregationQuery_Aggregation >&
      aggregations() const;
  // .google.firestore.v1.StructuredQuery structured_query = 1;
  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:google.firestore.v1.StructuredAggregationQuery)
 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<
      0, 2, 2,
      0, 2>
      _table_;
  friend class ::google::protobuf::MessageLite;
  friend class ::google::protobuf::Arena;
  template <typename T>
  friend class ::google::protobuf::Arena::InternalHelper;
  using InternalArenaConstructable_ = void;
  using DestructorSkippable_ = void;
  struct Impl_ {

        inline explicit constexpr Impl_(
            ::google::protobuf::internal::ConstantInitialized) noexcept;
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena);
        inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
                              ::google::protobuf::Arena* arena, const Impl_& from);
    ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredAggregationQuery_Aggregation > aggregations_;
    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_google_2ffirestore_2fv1_2fquery_2eproto;
};

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




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


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

// StructuredQuery_CollectionSelector

// string collection_id = 2;
inline void StructuredQuery_CollectionSelector::clear_collection_id() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.collection_id_.ClearToEmpty();
}
inline const std::string& StructuredQuery_CollectionSelector::collection_id() const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.CollectionSelector.collection_id)
  return _internal_collection_id();
}
template <typename Arg_, typename... Args_>
inline PROTOBUF_ALWAYS_INLINE void StructuredQuery_CollectionSelector::set_collection_id(Arg_&& arg,
                                                     Args_... args) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  _impl_.collection_id_.Set(static_cast<Arg_&&>(arg), args..., GetArena());
  // @@protoc_insertion_point(field_set:google.firestore.v1.StructuredQuery.CollectionSelector.collection_id)
}
inline std::string* StructuredQuery_CollectionSelector::mutable_collection_id() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  std::string* _s = _internal_mutable_collection_id();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.CollectionSelector.collection_id)
  return _s;
}
inline const std::string& StructuredQuery_CollectionSelector::_internal_collection_id() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return _impl_.collection_id_.Get();
}
inline void StructuredQuery_CollectionSelector::_internal_set_collection_id(const std::string& value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  _impl_.collection_id_.Set(value, GetArena());
}
inline std::string* StructuredQuery_CollectionSelector::_internal_mutable_collection_id() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  return _impl_.collection_id_.Mutable( GetArena());
}
inline std::string* StructuredQuery_CollectionSelector::release_collection_id() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.CollectionSelector.collection_id)
  return _impl_.collection_id_.Release();
}
inline void StructuredQuery_CollectionSelector::set_allocated_collection_id(std::string* value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.collection_id_.SetAllocated(value, GetArena());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        if (_impl_.collection_id_.IsDefault()) {
          _impl_.collection_id_.Set("", GetArena());
        }
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.CollectionSelector.collection_id)
}

// bool all_descendants = 3;
inline void StructuredQuery_CollectionSelector::clear_all_descendants() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.all_descendants_ = false;
}
inline bool StructuredQuery_CollectionSelector::all_descendants() const {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.CollectionSelector.all_descendants)
  return _internal_all_descendants();
}
inline void StructuredQuery_CollectionSelector::set_all_descendants(bool value) {
  _internal_set_all_descendants(value);
  // @@protoc_insertion_point(field_set:google.firestore.v1.StructuredQuery.CollectionSelector.all_descendants)
}
inline bool StructuredQuery_CollectionSelector::_internal_all_descendants() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return _impl_.all_descendants_;
}
inline void StructuredQuery_CollectionSelector::_internal_set_all_descendants(bool value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  _impl_.all_descendants_ = value;
}

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

// StructuredQuery_Filter

// .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1;
inline bool StructuredQuery_Filter::has_composite_filter() const {
  return filter_type_case() == kCompositeFilter;
}
inline bool StructuredQuery_Filter::_internal_has_composite_filter() const {
  return filter_type_case() == kCompositeFilter;
}
inline void StructuredQuery_Filter::set_has_composite_filter() {
  _impl_._oneof_case_[0] = kCompositeFilter;
}
inline void StructuredQuery_Filter::clear_composite_filter() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (filter_type_case() == kCompositeFilter) {
    if (GetArena() == nullptr) {
      delete _impl_.filter_type_.composite_filter_;
    }
    clear_has_filter_type();
  }
}
inline ::google::firestore::v1::StructuredQuery_CompositeFilter* StructuredQuery_Filter::release_composite_filter() {
  // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.Filter.composite_filter)
  if (filter_type_case() == kCompositeFilter) {
    clear_has_filter_type();
    auto* temp = _impl_.filter_type_.composite_filter_;
    if (GetArena() != nullptr) {
      temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
    }
    _impl_.filter_type_.composite_filter_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline const ::google::firestore::v1::StructuredQuery_CompositeFilter& StructuredQuery_Filter::_internal_composite_filter() const {
  return filter_type_case() == kCompositeFilter ? *_impl_.filter_type_.composite_filter_ : reinterpret_cast<::google::firestore::v1::StructuredQuery_CompositeFilter&>(::google::firestore::v1::_StructuredQuery_CompositeFilter_default_instance_);
}
inline const ::google::firestore::v1::StructuredQuery_CompositeFilter& StructuredQuery_Filter::composite_filter() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.Filter.composite_filter)
  return _internal_composite_filter();
}
inline ::google::firestore::v1::StructuredQuery_CompositeFilter* StructuredQuery_Filter::unsafe_arena_release_composite_filter() {
  // @@protoc_insertion_point(field_unsafe_arena_release:google.firestore.v1.StructuredQuery.Filter.composite_filter)
  if (filter_type_case() == kCompositeFilter) {
    clear_has_filter_type();
    auto* temp = _impl_.filter_type_.composite_filter_;
    _impl_.filter_type_.composite_filter_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline void StructuredQuery_Filter::unsafe_arena_set_allocated_composite_filter(::google::firestore::v1::StructuredQuery_CompositeFilter* 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_filter_type();
  if (value) {
    set_has_composite_filter();
    _impl_.filter_type_.composite_filter_ = value;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.firestore.v1.StructuredQuery.Filter.composite_filter)
}
inline ::google::firestore::v1::StructuredQuery_CompositeFilter* StructuredQuery_Filter::_internal_mutable_composite_filter() {
  if (filter_type_case() != kCompositeFilter) {
    clear_filter_type();
    set_has_composite_filter();
    _impl_.filter_type_.composite_filter_ = CreateMaybeMessage<::google::firestore::v1::StructuredQuery_CompositeFilter>(GetArena());
  }
  return _impl_.filter_type_.composite_filter_;
}
inline ::google::firestore::v1::StructuredQuery_CompositeFilter* StructuredQuery_Filter::mutable_composite_filter() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::firestore::v1::StructuredQuery_CompositeFilter* _msg = _internal_mutable_composite_filter();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.Filter.composite_filter)
  return _msg;
}

// .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2;
inline bool StructuredQuery_Filter::has_field_filter() const {
  return filter_type_case() == kFieldFilter;
}
inline bool StructuredQuery_Filter::_internal_has_field_filter() const {
  return filter_type_case() == kFieldFilter;
}
inline void StructuredQuery_Filter::set_has_field_filter() {
  _impl_._oneof_case_[0] = kFieldFilter;
}
inline void StructuredQuery_Filter::clear_field_filter() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (filter_type_case() == kFieldFilter) {
    if (GetArena() == nullptr) {
      delete _impl_.filter_type_.field_filter_;
    }
    clear_has_filter_type();
  }
}
inline ::google::firestore::v1::StructuredQuery_FieldFilter* StructuredQuery_Filter::release_field_filter() {
  // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.Filter.field_filter)
  if (filter_type_case() == kFieldFilter) {
    clear_has_filter_type();
    auto* temp = _impl_.filter_type_.field_filter_;
    if (GetArena() != nullptr) {
      temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
    }
    _impl_.filter_type_.field_filter_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline const ::google::firestore::v1::StructuredQuery_FieldFilter& StructuredQuery_Filter::_internal_field_filter() const {
  return filter_type_case() == kFieldFilter ? *_impl_.filter_type_.field_filter_ : reinterpret_cast<::google::firestore::v1::StructuredQuery_FieldFilter&>(::google::firestore::v1::_StructuredQuery_FieldFilter_default_instance_);
}
inline const ::google::firestore::v1::StructuredQuery_FieldFilter& StructuredQuery_Filter::field_filter() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.Filter.field_filter)
  return _internal_field_filter();
}
inline ::google::firestore::v1::StructuredQuery_FieldFilter* StructuredQuery_Filter::unsafe_arena_release_field_filter() {
  // @@protoc_insertion_point(field_unsafe_arena_release:google.firestore.v1.StructuredQuery.Filter.field_filter)
  if (filter_type_case() == kFieldFilter) {
    clear_has_filter_type();
    auto* temp = _impl_.filter_type_.field_filter_;
    _impl_.filter_type_.field_filter_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline void StructuredQuery_Filter::unsafe_arena_set_allocated_field_filter(::google::firestore::v1::StructuredQuery_FieldFilter* 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_filter_type();
  if (value) {
    set_has_field_filter();
    _impl_.filter_type_.field_filter_ = value;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.firestore.v1.StructuredQuery.Filter.field_filter)
}
inline ::google::firestore::v1::StructuredQuery_FieldFilter* StructuredQuery_Filter::_internal_mutable_field_filter() {
  if (filter_type_case() != kFieldFilter) {
    clear_filter_type();
    set_has_field_filter();
    _impl_.filter_type_.field_filter_ = CreateMaybeMessage<::google::firestore::v1::StructuredQuery_FieldFilter>(GetArena());
  }
  return _impl_.filter_type_.field_filter_;
}
inline ::google::firestore::v1::StructuredQuery_FieldFilter* StructuredQuery_Filter::mutable_field_filter() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::firestore::v1::StructuredQuery_FieldFilter* _msg = _internal_mutable_field_filter();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.Filter.field_filter)
  return _msg;
}

// .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3;
inline bool StructuredQuery_Filter::has_unary_filter() const {
  return filter_type_case() == kUnaryFilter;
}
inline bool StructuredQuery_Filter::_internal_has_unary_filter() const {
  return filter_type_case() == kUnaryFilter;
}
inline void StructuredQuery_Filter::set_has_unary_filter() {
  _impl_._oneof_case_[0] = kUnaryFilter;
}
inline void StructuredQuery_Filter::clear_unary_filter() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (filter_type_case() == kUnaryFilter) {
    if (GetArena() == nullptr) {
      delete _impl_.filter_type_.unary_filter_;
    }
    clear_has_filter_type();
  }
}
inline ::google::firestore::v1::StructuredQuery_UnaryFilter* StructuredQuery_Filter::release_unary_filter() {
  // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.Filter.unary_filter)
  if (filter_type_case() == kUnaryFilter) {
    clear_has_filter_type();
    auto* temp = _impl_.filter_type_.unary_filter_;
    if (GetArena() != nullptr) {
      temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
    }
    _impl_.filter_type_.unary_filter_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline const ::google::firestore::v1::StructuredQuery_UnaryFilter& StructuredQuery_Filter::_internal_unary_filter() const {
  return filter_type_case() == kUnaryFilter ? *_impl_.filter_type_.unary_filter_ : reinterpret_cast<::google::firestore::v1::StructuredQuery_UnaryFilter&>(::google::firestore::v1::_StructuredQuery_UnaryFilter_default_instance_);
}
inline const ::google::firestore::v1::StructuredQuery_UnaryFilter& StructuredQuery_Filter::unary_filter() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.Filter.unary_filter)
  return _internal_unary_filter();
}
inline ::google::firestore::v1::StructuredQuery_UnaryFilter* StructuredQuery_Filter::unsafe_arena_release_unary_filter() {
  // @@protoc_insertion_point(field_unsafe_arena_release:google.firestore.v1.StructuredQuery.Filter.unary_filter)
  if (filter_type_case() == kUnaryFilter) {
    clear_has_filter_type();
    auto* temp = _impl_.filter_type_.unary_filter_;
    _impl_.filter_type_.unary_filter_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline void StructuredQuery_Filter::unsafe_arena_set_allocated_unary_filter(::google::firestore::v1::StructuredQuery_UnaryFilter* 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_filter_type();
  if (value) {
    set_has_unary_filter();
    _impl_.filter_type_.unary_filter_ = value;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.firestore.v1.StructuredQuery.Filter.unary_filter)
}
inline ::google::firestore::v1::StructuredQuery_UnaryFilter* StructuredQuery_Filter::_internal_mutable_unary_filter() {
  if (filter_type_case() != kUnaryFilter) {
    clear_filter_type();
    set_has_unary_filter();
    _impl_.filter_type_.unary_filter_ = CreateMaybeMessage<::google::firestore::v1::StructuredQuery_UnaryFilter>(GetArena());
  }
  return _impl_.filter_type_.unary_filter_;
}
inline ::google::firestore::v1::StructuredQuery_UnaryFilter* StructuredQuery_Filter::mutable_unary_filter() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::firestore::v1::StructuredQuery_UnaryFilter* _msg = _internal_mutable_unary_filter();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.Filter.unary_filter)
  return _msg;
}

inline bool StructuredQuery_Filter::has_filter_type() const {
  return filter_type_case() != FILTER_TYPE_NOT_SET;
}
inline void StructuredQuery_Filter::clear_has_filter_type() {
  _impl_._oneof_case_[0] = FILTER_TYPE_NOT_SET;
}
inline StructuredQuery_Filter::FilterTypeCase StructuredQuery_Filter::filter_type_case() const {
  return StructuredQuery_Filter::FilterTypeCase(_impl_._oneof_case_[0]);
}
// -------------------------------------------------------------------

// StructuredQuery_CompositeFilter

// .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1;
inline void StructuredQuery_CompositeFilter::clear_op() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.op_ = 0;
}
inline ::google::firestore::v1::StructuredQuery_CompositeFilter_Operator StructuredQuery_CompositeFilter::op() const {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.CompositeFilter.op)
  return _internal_op();
}
inline void StructuredQuery_CompositeFilter::set_op(::google::firestore::v1::StructuredQuery_CompositeFilter_Operator value) {
  _internal_set_op(value);
  // @@protoc_insertion_point(field_set:google.firestore.v1.StructuredQuery.CompositeFilter.op)
}
inline ::google::firestore::v1::StructuredQuery_CompositeFilter_Operator StructuredQuery_CompositeFilter::_internal_op() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return static_cast<::google::firestore::v1::StructuredQuery_CompositeFilter_Operator>(_impl_.op_);
}
inline void StructuredQuery_CompositeFilter::_internal_set_op(::google::firestore::v1::StructuredQuery_CompositeFilter_Operator value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  _impl_.op_ = value;
}

// repeated .google.firestore.v1.StructuredQuery.Filter filters = 2;
inline int StructuredQuery_CompositeFilter::_internal_filters_size() const {
  return _internal_filters().size();
}
inline int StructuredQuery_CompositeFilter::filters_size() const {
  return _internal_filters_size();
}
inline void StructuredQuery_CompositeFilter::clear_filters() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.filters_.Clear();
}
inline ::google::firestore::v1::StructuredQuery_Filter* StructuredQuery_CompositeFilter::mutable_filters(int index)
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.CompositeFilter.filters)
  return _internal_mutable_filters()->Mutable(index);
}
inline ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredQuery_Filter>* StructuredQuery_CompositeFilter::mutable_filters()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.StructuredQuery.CompositeFilter.filters)
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  return _internal_mutable_filters();
}
inline const ::google::firestore::v1::StructuredQuery_Filter& StructuredQuery_CompositeFilter::filters(int index) const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.CompositeFilter.filters)
  return _internal_filters().Get(index);
}
inline ::google::firestore::v1::StructuredQuery_Filter* StructuredQuery_CompositeFilter::add_filters() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ::google::firestore::v1::StructuredQuery_Filter* _add = _internal_mutable_filters()->Add();
  // @@protoc_insertion_point(field_add:google.firestore.v1.StructuredQuery.CompositeFilter.filters)
  return _add;
}
inline const ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredQuery_Filter>& StructuredQuery_CompositeFilter::filters() const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_list:google.firestore.v1.StructuredQuery.CompositeFilter.filters)
  return _internal_filters();
}
inline const ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredQuery_Filter>&
StructuredQuery_CompositeFilter::_internal_filters() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return _impl_.filters_;
}
inline ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredQuery_Filter>*
StructuredQuery_CompositeFilter::_internal_mutable_filters() {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return &_impl_.filters_;
}

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

// StructuredQuery_FieldFilter

// .google.firestore.v1.StructuredQuery.FieldReference field = 1;
inline bool StructuredQuery_FieldFilter::has_field() const {
  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.field_ != nullptr);
  return value;
}
inline void StructuredQuery_FieldFilter::clear_field() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (_impl_.field_ != nullptr) _impl_.field_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const ::google::firestore::v1::StructuredQuery_FieldReference& StructuredQuery_FieldFilter::_internal_field() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  const ::google::firestore::v1::StructuredQuery_FieldReference* p = _impl_.field_;
  return p != nullptr ? *p : reinterpret_cast<const ::google::firestore::v1::StructuredQuery_FieldReference&>(::google::firestore::v1::_StructuredQuery_FieldReference_default_instance_);
}
inline const ::google::firestore::v1::StructuredQuery_FieldReference& StructuredQuery_FieldFilter::field() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.FieldFilter.field)
  return _internal_field();
}
inline void StructuredQuery_FieldFilter::unsafe_arena_set_allocated_field(::google::firestore::v1::StructuredQuery_FieldReference* value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.field_);
  }
  _impl_.field_ = reinterpret_cast<::google::firestore::v1::StructuredQuery_FieldReference*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000001u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000001u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.firestore.v1.StructuredQuery.FieldFilter.field)
}
inline ::google::firestore::v1::StructuredQuery_FieldReference* StructuredQuery_FieldFilter::release_field() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::google::firestore::v1::StructuredQuery_FieldReference* released = _impl_.field_;
  _impl_.field_ = 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::firestore::v1::StructuredQuery_FieldReference* StructuredQuery_FieldFilter::unsafe_arena_release_field() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.FieldFilter.field)

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::google::firestore::v1::StructuredQuery_FieldReference* temp = _impl_.field_;
  _impl_.field_ = nullptr;
  return temp;
}
inline ::google::firestore::v1::StructuredQuery_FieldReference* StructuredQuery_FieldFilter::_internal_mutable_field() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_._has_bits_[0] |= 0x00000001u;
  if (_impl_.field_ == nullptr) {
    auto* p = CreateMaybeMessage<::google::firestore::v1::StructuredQuery_FieldReference>(GetArena());
    _impl_.field_ = reinterpret_cast<::google::firestore::v1::StructuredQuery_FieldReference*>(p);
  }
  return _impl_.field_;
}
inline ::google::firestore::v1::StructuredQuery_FieldReference* StructuredQuery_FieldFilter::mutable_field() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::firestore::v1::StructuredQuery_FieldReference* _msg = _internal_mutable_field();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.FieldFilter.field)
  return _msg;
}
inline void StructuredQuery_FieldFilter::set_allocated_field(::google::firestore::v1::StructuredQuery_FieldReference* value) {
  ::google::protobuf::Arena* message_arena = GetArena();
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (message_arena == nullptr) {
    delete reinterpret_cast<::google::firestore::v1::StructuredQuery_FieldReference*>(_impl_.field_);
  }

  if (value != nullptr) {
    ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::firestore::v1::StructuredQuery_FieldReference*>(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_.field_ = reinterpret_cast<::google::firestore::v1::StructuredQuery_FieldReference*>(value);
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.FieldFilter.field)
}

// .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2;
inline void StructuredQuery_FieldFilter::clear_op() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.op_ = 0;
}
inline ::google::firestore::v1::StructuredQuery_FieldFilter_Operator StructuredQuery_FieldFilter::op() const {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.FieldFilter.op)
  return _internal_op();
}
inline void StructuredQuery_FieldFilter::set_op(::google::firestore::v1::StructuredQuery_FieldFilter_Operator value) {
  _internal_set_op(value);
  // @@protoc_insertion_point(field_set:google.firestore.v1.StructuredQuery.FieldFilter.op)
}
inline ::google::firestore::v1::StructuredQuery_FieldFilter_Operator StructuredQuery_FieldFilter::_internal_op() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return static_cast<::google::firestore::v1::StructuredQuery_FieldFilter_Operator>(_impl_.op_);
}
inline void StructuredQuery_FieldFilter::_internal_set_op(::google::firestore::v1::StructuredQuery_FieldFilter_Operator value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  _impl_.op_ = value;
}

// .google.firestore.v1.Value value = 3;
inline bool StructuredQuery_FieldFilter::has_value() const {
  bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.value_ != nullptr);
  return value;
}
inline const ::google::firestore::v1::Value& StructuredQuery_FieldFilter::_internal_value() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  const ::google::firestore::v1::Value* p = _impl_.value_;
  return p != nullptr ? *p : reinterpret_cast<const ::google::firestore::v1::Value&>(::google::firestore::v1::_Value_default_instance_);
}
inline const ::google::firestore::v1::Value& StructuredQuery_FieldFilter::value() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.FieldFilter.value)
  return _internal_value();
}
inline void StructuredQuery_FieldFilter::unsafe_arena_set_allocated_value(::google::firestore::v1::Value* value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.value_);
  }
  _impl_.value_ = reinterpret_cast<::google::firestore::v1::Value*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000002u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000002u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.firestore.v1.StructuredQuery.FieldFilter.value)
}
inline ::google::firestore::v1::Value* StructuredQuery_FieldFilter::release_value() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);

  _impl_._has_bits_[0] &= ~0x00000002u;
  ::google::firestore::v1::Value* released = _impl_.value_;
  _impl_.value_ = 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::firestore::v1::Value* StructuredQuery_FieldFilter::unsafe_arena_release_value() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.FieldFilter.value)

  _impl_._has_bits_[0] &= ~0x00000002u;
  ::google::firestore::v1::Value* temp = _impl_.value_;
  _impl_.value_ = nullptr;
  return temp;
}
inline ::google::firestore::v1::Value* StructuredQuery_FieldFilter::_internal_mutable_value() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_._has_bits_[0] |= 0x00000002u;
  if (_impl_.value_ == nullptr) {
    auto* p = CreateMaybeMessage<::google::firestore::v1::Value>(GetArena());
    _impl_.value_ = reinterpret_cast<::google::firestore::v1::Value*>(p);
  }
  return _impl_.value_;
}
inline ::google::firestore::v1::Value* StructuredQuery_FieldFilter::mutable_value() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::firestore::v1::Value* _msg = _internal_mutable_value();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.FieldFilter.value)
  return _msg;
}
inline void StructuredQuery_FieldFilter::set_allocated_value(::google::firestore::v1::Value* 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_.value_);
  }

  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_.value_ = reinterpret_cast<::google::firestore::v1::Value*>(value);
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.FieldFilter.value)
}

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

// StructuredQuery_UnaryFilter

// .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1;
inline void StructuredQuery_UnaryFilter::clear_op() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.op_ = 0;
}
inline ::google::firestore::v1::StructuredQuery_UnaryFilter_Operator StructuredQuery_UnaryFilter::op() const {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.UnaryFilter.op)
  return _internal_op();
}
inline void StructuredQuery_UnaryFilter::set_op(::google::firestore::v1::StructuredQuery_UnaryFilter_Operator value) {
  _internal_set_op(value);
  // @@protoc_insertion_point(field_set:google.firestore.v1.StructuredQuery.UnaryFilter.op)
}
inline ::google::firestore::v1::StructuredQuery_UnaryFilter_Operator StructuredQuery_UnaryFilter::_internal_op() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return static_cast<::google::firestore::v1::StructuredQuery_UnaryFilter_Operator>(_impl_.op_);
}
inline void StructuredQuery_UnaryFilter::_internal_set_op(::google::firestore::v1::StructuredQuery_UnaryFilter_Operator value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  _impl_.op_ = value;
}

// .google.firestore.v1.StructuredQuery.FieldReference field = 2;
inline bool StructuredQuery_UnaryFilter::has_field() const {
  return operand_type_case() == kField;
}
inline bool StructuredQuery_UnaryFilter::_internal_has_field() const {
  return operand_type_case() == kField;
}
inline void StructuredQuery_UnaryFilter::set_has_field() {
  _impl_._oneof_case_[0] = kField;
}
inline void StructuredQuery_UnaryFilter::clear_field() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (operand_type_case() == kField) {
    if (GetArena() == nullptr) {
      delete _impl_.operand_type_.field_;
    }
    clear_has_operand_type();
  }
}
inline ::google::firestore::v1::StructuredQuery_FieldReference* StructuredQuery_UnaryFilter::release_field() {
  // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.UnaryFilter.field)
  if (operand_type_case() == kField) {
    clear_has_operand_type();
    auto* temp = _impl_.operand_type_.field_;
    if (GetArena() != nullptr) {
      temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
    }
    _impl_.operand_type_.field_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline const ::google::firestore::v1::StructuredQuery_FieldReference& StructuredQuery_UnaryFilter::_internal_field() const {
  return operand_type_case() == kField ? *_impl_.operand_type_.field_ : reinterpret_cast<::google::firestore::v1::StructuredQuery_FieldReference&>(::google::firestore::v1::_StructuredQuery_FieldReference_default_instance_);
}
inline const ::google::firestore::v1::StructuredQuery_FieldReference& StructuredQuery_UnaryFilter::field() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.UnaryFilter.field)
  return _internal_field();
}
inline ::google::firestore::v1::StructuredQuery_FieldReference* StructuredQuery_UnaryFilter::unsafe_arena_release_field() {
  // @@protoc_insertion_point(field_unsafe_arena_release:google.firestore.v1.StructuredQuery.UnaryFilter.field)
  if (operand_type_case() == kField) {
    clear_has_operand_type();
    auto* temp = _impl_.operand_type_.field_;
    _impl_.operand_type_.field_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline void StructuredQuery_UnaryFilter::unsafe_arena_set_allocated_field(::google::firestore::v1::StructuredQuery_FieldReference* 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_operand_type();
  if (value) {
    set_has_field();
    _impl_.operand_type_.field_ = value;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.firestore.v1.StructuredQuery.UnaryFilter.field)
}
inline ::google::firestore::v1::StructuredQuery_FieldReference* StructuredQuery_UnaryFilter::_internal_mutable_field() {
  if (operand_type_case() != kField) {
    clear_operand_type();
    set_has_field();
    _impl_.operand_type_.field_ = CreateMaybeMessage<::google::firestore::v1::StructuredQuery_FieldReference>(GetArena());
  }
  return _impl_.operand_type_.field_;
}
inline ::google::firestore::v1::StructuredQuery_FieldReference* StructuredQuery_UnaryFilter::mutable_field() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::firestore::v1::StructuredQuery_FieldReference* _msg = _internal_mutable_field();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.UnaryFilter.field)
  return _msg;
}

inline bool StructuredQuery_UnaryFilter::has_operand_type() const {
  return operand_type_case() != OPERAND_TYPE_NOT_SET;
}
inline void StructuredQuery_UnaryFilter::clear_has_operand_type() {
  _impl_._oneof_case_[0] = OPERAND_TYPE_NOT_SET;
}
inline StructuredQuery_UnaryFilter::OperandTypeCase StructuredQuery_UnaryFilter::operand_type_case() const {
  return StructuredQuery_UnaryFilter::OperandTypeCase(_impl_._oneof_case_[0]);
}
// -------------------------------------------------------------------

// StructuredQuery_Order

// .google.firestore.v1.StructuredQuery.FieldReference field = 1;
inline bool StructuredQuery_Order::has_field() const {
  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.field_ != nullptr);
  return value;
}
inline void StructuredQuery_Order::clear_field() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (_impl_.field_ != nullptr) _impl_.field_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const ::google::firestore::v1::StructuredQuery_FieldReference& StructuredQuery_Order::_internal_field() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  const ::google::firestore::v1::StructuredQuery_FieldReference* p = _impl_.field_;
  return p != nullptr ? *p : reinterpret_cast<const ::google::firestore::v1::StructuredQuery_FieldReference&>(::google::firestore::v1::_StructuredQuery_FieldReference_default_instance_);
}
inline const ::google::firestore::v1::StructuredQuery_FieldReference& StructuredQuery_Order::field() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.Order.field)
  return _internal_field();
}
inline void StructuredQuery_Order::unsafe_arena_set_allocated_field(::google::firestore::v1::StructuredQuery_FieldReference* value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.field_);
  }
  _impl_.field_ = reinterpret_cast<::google::firestore::v1::StructuredQuery_FieldReference*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000001u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000001u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.firestore.v1.StructuredQuery.Order.field)
}
inline ::google::firestore::v1::StructuredQuery_FieldReference* StructuredQuery_Order::release_field() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::google::firestore::v1::StructuredQuery_FieldReference* released = _impl_.field_;
  _impl_.field_ = 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::firestore::v1::StructuredQuery_FieldReference* StructuredQuery_Order::unsafe_arena_release_field() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.Order.field)

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::google::firestore::v1::StructuredQuery_FieldReference* temp = _impl_.field_;
  _impl_.field_ = nullptr;
  return temp;
}
inline ::google::firestore::v1::StructuredQuery_FieldReference* StructuredQuery_Order::_internal_mutable_field() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_._has_bits_[0] |= 0x00000001u;
  if (_impl_.field_ == nullptr) {
    auto* p = CreateMaybeMessage<::google::firestore::v1::StructuredQuery_FieldReference>(GetArena());
    _impl_.field_ = reinterpret_cast<::google::firestore::v1::StructuredQuery_FieldReference*>(p);
  }
  return _impl_.field_;
}
inline ::google::firestore::v1::StructuredQuery_FieldReference* StructuredQuery_Order::mutable_field() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::firestore::v1::StructuredQuery_FieldReference* _msg = _internal_mutable_field();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.Order.field)
  return _msg;
}
inline void StructuredQuery_Order::set_allocated_field(::google::firestore::v1::StructuredQuery_FieldReference* value) {
  ::google::protobuf::Arena* message_arena = GetArena();
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (message_arena == nullptr) {
    delete reinterpret_cast<::google::firestore::v1::StructuredQuery_FieldReference*>(_impl_.field_);
  }

  if (value != nullptr) {
    ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::firestore::v1::StructuredQuery_FieldReference*>(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_.field_ = reinterpret_cast<::google::firestore::v1::StructuredQuery_FieldReference*>(value);
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.Order.field)
}

// .google.firestore.v1.StructuredQuery.Direction direction = 2;
inline void StructuredQuery_Order::clear_direction() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.direction_ = 0;
}
inline ::google::firestore::v1::StructuredQuery_Direction StructuredQuery_Order::direction() const {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.Order.direction)
  return _internal_direction();
}
inline void StructuredQuery_Order::set_direction(::google::firestore::v1::StructuredQuery_Direction value) {
  _internal_set_direction(value);
  // @@protoc_insertion_point(field_set:google.firestore.v1.StructuredQuery.Order.direction)
}
inline ::google::firestore::v1::StructuredQuery_Direction StructuredQuery_Order::_internal_direction() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return static_cast<::google::firestore::v1::StructuredQuery_Direction>(_impl_.direction_);
}
inline void StructuredQuery_Order::_internal_set_direction(::google::firestore::v1::StructuredQuery_Direction value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  _impl_.direction_ = value;
}

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

// StructuredQuery_FieldReference

// string field_path = 2;
inline void StructuredQuery_FieldReference::clear_field_path() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.field_path_.ClearToEmpty();
}
inline const std::string& StructuredQuery_FieldReference::field_path() const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.FieldReference.field_path)
  return _internal_field_path();
}
template <typename Arg_, typename... Args_>
inline PROTOBUF_ALWAYS_INLINE void StructuredQuery_FieldReference::set_field_path(Arg_&& arg,
                                                     Args_... args) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  _impl_.field_path_.Set(static_cast<Arg_&&>(arg), args..., GetArena());
  // @@protoc_insertion_point(field_set:google.firestore.v1.StructuredQuery.FieldReference.field_path)
}
inline std::string* StructuredQuery_FieldReference::mutable_field_path() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  std::string* _s = _internal_mutable_field_path();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.FieldReference.field_path)
  return _s;
}
inline const std::string& StructuredQuery_FieldReference::_internal_field_path() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return _impl_.field_path_.Get();
}
inline void StructuredQuery_FieldReference::_internal_set_field_path(const std::string& value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  _impl_.field_path_.Set(value, GetArena());
}
inline std::string* StructuredQuery_FieldReference::_internal_mutable_field_path() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  return _impl_.field_path_.Mutable( GetArena());
}
inline std::string* StructuredQuery_FieldReference::release_field_path() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.FieldReference.field_path)
  return _impl_.field_path_.Release();
}
inline void StructuredQuery_FieldReference::set_allocated_field_path(std::string* value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.field_path_.SetAllocated(value, GetArena());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        if (_impl_.field_path_.IsDefault()) {
          _impl_.field_path_.Set("", GetArena());
        }
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.FieldReference.field_path)
}

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

// StructuredQuery_Projection

// repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2;
inline int StructuredQuery_Projection::_internal_fields_size() const {
  return _internal_fields().size();
}
inline int StructuredQuery_Projection::fields_size() const {
  return _internal_fields_size();
}
inline void StructuredQuery_Projection::clear_fields() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.fields_.Clear();
}
inline ::google::firestore::v1::StructuredQuery_FieldReference* StructuredQuery_Projection::mutable_fields(int index)
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.Projection.fields)
  return _internal_mutable_fields()->Mutable(index);
}
inline ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredQuery_FieldReference>* StructuredQuery_Projection::mutable_fields()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.StructuredQuery.Projection.fields)
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  return _internal_mutable_fields();
}
inline const ::google::firestore::v1::StructuredQuery_FieldReference& StructuredQuery_Projection::fields(int index) const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.Projection.fields)
  return _internal_fields().Get(index);
}
inline ::google::firestore::v1::StructuredQuery_FieldReference* StructuredQuery_Projection::add_fields() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ::google::firestore::v1::StructuredQuery_FieldReference* _add = _internal_mutable_fields()->Add();
  // @@protoc_insertion_point(field_add:google.firestore.v1.StructuredQuery.Projection.fields)
  return _add;
}
inline const ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredQuery_FieldReference>& StructuredQuery_Projection::fields() const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_list:google.firestore.v1.StructuredQuery.Projection.fields)
  return _internal_fields();
}
inline const ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredQuery_FieldReference>&
StructuredQuery_Projection::_internal_fields() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return _impl_.fields_;
}
inline ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredQuery_FieldReference>*
StructuredQuery_Projection::_internal_mutable_fields() {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return &_impl_.fields_;
}

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

// StructuredQuery

// .google.firestore.v1.StructuredQuery.Projection select = 1;
inline bool StructuredQuery::has_select() const {
  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.select_ != nullptr);
  return value;
}
inline void StructuredQuery::clear_select() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (_impl_.select_ != nullptr) _impl_.select_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const ::google::firestore::v1::StructuredQuery_Projection& StructuredQuery::_internal_select() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  const ::google::firestore::v1::StructuredQuery_Projection* p = _impl_.select_;
  return p != nullptr ? *p : reinterpret_cast<const ::google::firestore::v1::StructuredQuery_Projection&>(::google::firestore::v1::_StructuredQuery_Projection_default_instance_);
}
inline const ::google::firestore::v1::StructuredQuery_Projection& StructuredQuery::select() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.select)
  return _internal_select();
}
inline void StructuredQuery::unsafe_arena_set_allocated_select(::google::firestore::v1::StructuredQuery_Projection* value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.select_);
  }
  _impl_.select_ = reinterpret_cast<::google::firestore::v1::StructuredQuery_Projection*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000001u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000001u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.firestore.v1.StructuredQuery.select)
}
inline ::google::firestore::v1::StructuredQuery_Projection* StructuredQuery::release_select() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::google::firestore::v1::StructuredQuery_Projection* released = _impl_.select_;
  _impl_.select_ = 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::firestore::v1::StructuredQuery_Projection* StructuredQuery::unsafe_arena_release_select() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.select)

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::google::firestore::v1::StructuredQuery_Projection* temp = _impl_.select_;
  _impl_.select_ = nullptr;
  return temp;
}
inline ::google::firestore::v1::StructuredQuery_Projection* StructuredQuery::_internal_mutable_select() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_._has_bits_[0] |= 0x00000001u;
  if (_impl_.select_ == nullptr) {
    auto* p = CreateMaybeMessage<::google::firestore::v1::StructuredQuery_Projection>(GetArena());
    _impl_.select_ = reinterpret_cast<::google::firestore::v1::StructuredQuery_Projection*>(p);
  }
  return _impl_.select_;
}
inline ::google::firestore::v1::StructuredQuery_Projection* StructuredQuery::mutable_select() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::firestore::v1::StructuredQuery_Projection* _msg = _internal_mutable_select();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.select)
  return _msg;
}
inline void StructuredQuery::set_allocated_select(::google::firestore::v1::StructuredQuery_Projection* value) {
  ::google::protobuf::Arena* message_arena = GetArena();
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (message_arena == nullptr) {
    delete reinterpret_cast<::google::firestore::v1::StructuredQuery_Projection*>(_impl_.select_);
  }

  if (value != nullptr) {
    ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::firestore::v1::StructuredQuery_Projection*>(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_.select_ = reinterpret_cast<::google::firestore::v1::StructuredQuery_Projection*>(value);
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.select)
}

// repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2;
inline int StructuredQuery::_internal_from_size() const {
  return _internal_from().size();
}
inline int StructuredQuery::from_size() const {
  return _internal_from_size();
}
inline void StructuredQuery::clear_from() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.from_.Clear();
}
inline ::google::firestore::v1::StructuredQuery_CollectionSelector* StructuredQuery::mutable_from(int index)
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.from)
  return _internal_mutable_from()->Mutable(index);
}
inline ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredQuery_CollectionSelector>* StructuredQuery::mutable_from()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.StructuredQuery.from)
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  return _internal_mutable_from();
}
inline const ::google::firestore::v1::StructuredQuery_CollectionSelector& StructuredQuery::from(int index) const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.from)
  return _internal_from().Get(index);
}
inline ::google::firestore::v1::StructuredQuery_CollectionSelector* StructuredQuery::add_from() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ::google::firestore::v1::StructuredQuery_CollectionSelector* _add = _internal_mutable_from()->Add();
  // @@protoc_insertion_point(field_add:google.firestore.v1.StructuredQuery.from)
  return _add;
}
inline const ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredQuery_CollectionSelector>& StructuredQuery::from() const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_list:google.firestore.v1.StructuredQuery.from)
  return _internal_from();
}
inline const ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredQuery_CollectionSelector>&
StructuredQuery::_internal_from() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return _impl_.from_;
}
inline ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredQuery_CollectionSelector>*
StructuredQuery::_internal_mutable_from() {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return &_impl_.from_;
}

// .google.firestore.v1.StructuredQuery.Filter where = 3;
inline bool StructuredQuery::has_where() const {
  bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.where_ != nullptr);
  return value;
}
inline void StructuredQuery::clear_where() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (_impl_.where_ != nullptr) _impl_.where_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
inline const ::google::firestore::v1::StructuredQuery_Filter& StructuredQuery::_internal_where() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  const ::google::firestore::v1::StructuredQuery_Filter* p = _impl_.where_;
  return p != nullptr ? *p : reinterpret_cast<const ::google::firestore::v1::StructuredQuery_Filter&>(::google::firestore::v1::_StructuredQuery_Filter_default_instance_);
}
inline const ::google::firestore::v1::StructuredQuery_Filter& StructuredQuery::where() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.where)
  return _internal_where();
}
inline void StructuredQuery::unsafe_arena_set_allocated_where(::google::firestore::v1::StructuredQuery_Filter* value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.where_);
  }
  _impl_.where_ = reinterpret_cast<::google::firestore::v1::StructuredQuery_Filter*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000002u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000002u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.firestore.v1.StructuredQuery.where)
}
inline ::google::firestore::v1::StructuredQuery_Filter* StructuredQuery::release_where() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);

  _impl_._has_bits_[0] &= ~0x00000002u;
  ::google::firestore::v1::StructuredQuery_Filter* released = _impl_.where_;
  _impl_.where_ = 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::firestore::v1::StructuredQuery_Filter* StructuredQuery::unsafe_arena_release_where() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.where)

  _impl_._has_bits_[0] &= ~0x00000002u;
  ::google::firestore::v1::StructuredQuery_Filter* temp = _impl_.where_;
  _impl_.where_ = nullptr;
  return temp;
}
inline ::google::firestore::v1::StructuredQuery_Filter* StructuredQuery::_internal_mutable_where() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_._has_bits_[0] |= 0x00000002u;
  if (_impl_.where_ == nullptr) {
    auto* p = CreateMaybeMessage<::google::firestore::v1::StructuredQuery_Filter>(GetArena());
    _impl_.where_ = reinterpret_cast<::google::firestore::v1::StructuredQuery_Filter*>(p);
  }
  return _impl_.where_;
}
inline ::google::firestore::v1::StructuredQuery_Filter* StructuredQuery::mutable_where() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::firestore::v1::StructuredQuery_Filter* _msg = _internal_mutable_where();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.where)
  return _msg;
}
inline void StructuredQuery::set_allocated_where(::google::firestore::v1::StructuredQuery_Filter* value) {
  ::google::protobuf::Arena* message_arena = GetArena();
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (message_arena == nullptr) {
    delete reinterpret_cast<::google::firestore::v1::StructuredQuery_Filter*>(_impl_.where_);
  }

  if (value != nullptr) {
    ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::firestore::v1::StructuredQuery_Filter*>(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_.where_ = reinterpret_cast<::google::firestore::v1::StructuredQuery_Filter*>(value);
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.where)
}

// repeated .google.firestore.v1.StructuredQuery.Order order_by = 4;
inline int StructuredQuery::_internal_order_by_size() const {
  return _internal_order_by().size();
}
inline int StructuredQuery::order_by_size() const {
  return _internal_order_by_size();
}
inline void StructuredQuery::clear_order_by() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.order_by_.Clear();
}
inline ::google::firestore::v1::StructuredQuery_Order* StructuredQuery::mutable_order_by(int index)
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.order_by)
  return _internal_mutable_order_by()->Mutable(index);
}
inline ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredQuery_Order>* StructuredQuery::mutable_order_by()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.StructuredQuery.order_by)
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  return _internal_mutable_order_by();
}
inline const ::google::firestore::v1::StructuredQuery_Order& StructuredQuery::order_by(int index) const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.order_by)
  return _internal_order_by().Get(index);
}
inline ::google::firestore::v1::StructuredQuery_Order* StructuredQuery::add_order_by() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ::google::firestore::v1::StructuredQuery_Order* _add = _internal_mutable_order_by()->Add();
  // @@protoc_insertion_point(field_add:google.firestore.v1.StructuredQuery.order_by)
  return _add;
}
inline const ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredQuery_Order>& StructuredQuery::order_by() const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_list:google.firestore.v1.StructuredQuery.order_by)
  return _internal_order_by();
}
inline const ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredQuery_Order>&
StructuredQuery::_internal_order_by() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return _impl_.order_by_;
}
inline ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredQuery_Order>*
StructuredQuery::_internal_mutable_order_by() {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return &_impl_.order_by_;
}

// .google.firestore.v1.Cursor start_at = 7;
inline bool StructuredQuery::has_start_at() const {
  bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.start_at_ != nullptr);
  return value;
}
inline void StructuredQuery::clear_start_at() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (_impl_.start_at_ != nullptr) _impl_.start_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000008u;
}
inline const ::google::firestore::v1::Cursor& StructuredQuery::_internal_start_at() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  const ::google::firestore::v1::Cursor* p = _impl_.start_at_;
  return p != nullptr ? *p : reinterpret_cast<const ::google::firestore::v1::Cursor&>(::google::firestore::v1::_Cursor_default_instance_);
}
inline const ::google::firestore::v1::Cursor& StructuredQuery::start_at() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.start_at)
  return _internal_start_at();
}
inline void StructuredQuery::unsafe_arena_set_allocated_start_at(::google::firestore::v1::Cursor* value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.start_at_);
  }
  _impl_.start_at_ = reinterpret_cast<::google::firestore::v1::Cursor*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000008u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000008u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.firestore.v1.StructuredQuery.start_at)
}
inline ::google::firestore::v1::Cursor* StructuredQuery::release_start_at() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);

  _impl_._has_bits_[0] &= ~0x00000008u;
  ::google::firestore::v1::Cursor* released = _impl_.start_at_;
  _impl_.start_at_ = 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::firestore::v1::Cursor* StructuredQuery::unsafe_arena_release_start_at() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.start_at)

  _impl_._has_bits_[0] &= ~0x00000008u;
  ::google::firestore::v1::Cursor* temp = _impl_.start_at_;
  _impl_.start_at_ = nullptr;
  return temp;
}
inline ::google::firestore::v1::Cursor* StructuredQuery::_internal_mutable_start_at() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_._has_bits_[0] |= 0x00000008u;
  if (_impl_.start_at_ == nullptr) {
    auto* p = CreateMaybeMessage<::google::firestore::v1::Cursor>(GetArena());
    _impl_.start_at_ = reinterpret_cast<::google::firestore::v1::Cursor*>(p);
  }
  return _impl_.start_at_;
}
inline ::google::firestore::v1::Cursor* StructuredQuery::mutable_start_at() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::firestore::v1::Cursor* _msg = _internal_mutable_start_at();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.start_at)
  return _msg;
}
inline void StructuredQuery::set_allocated_start_at(::google::firestore::v1::Cursor* value) {
  ::google::protobuf::Arena* message_arena = GetArena();
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (message_arena == nullptr) {
    delete reinterpret_cast<::google::firestore::v1::Cursor*>(_impl_.start_at_);
  }

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

  _impl_.start_at_ = reinterpret_cast<::google::firestore::v1::Cursor*>(value);
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.start_at)
}

// .google.firestore.v1.Cursor end_at = 8;
inline bool StructuredQuery::has_end_at() const {
  bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.end_at_ != nullptr);
  return value;
}
inline void StructuredQuery::clear_end_at() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (_impl_.end_at_ != nullptr) _impl_.end_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000010u;
}
inline const ::google::firestore::v1::Cursor& StructuredQuery::_internal_end_at() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  const ::google::firestore::v1::Cursor* p = _impl_.end_at_;
  return p != nullptr ? *p : reinterpret_cast<const ::google::firestore::v1::Cursor&>(::google::firestore::v1::_Cursor_default_instance_);
}
inline const ::google::firestore::v1::Cursor& StructuredQuery::end_at() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.end_at)
  return _internal_end_at();
}
inline void StructuredQuery::unsafe_arena_set_allocated_end_at(::google::firestore::v1::Cursor* value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.end_at_);
  }
  _impl_.end_at_ = reinterpret_cast<::google::firestore::v1::Cursor*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000010u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000010u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.firestore.v1.StructuredQuery.end_at)
}
inline ::google::firestore::v1::Cursor* StructuredQuery::release_end_at() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);

  _impl_._has_bits_[0] &= ~0x00000010u;
  ::google::firestore::v1::Cursor* released = _impl_.end_at_;
  _impl_.end_at_ = 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::firestore::v1::Cursor* StructuredQuery::unsafe_arena_release_end_at() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.end_at)

  _impl_._has_bits_[0] &= ~0x00000010u;
  ::google::firestore::v1::Cursor* temp = _impl_.end_at_;
  _impl_.end_at_ = nullptr;
  return temp;
}
inline ::google::firestore::v1::Cursor* StructuredQuery::_internal_mutable_end_at() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_._has_bits_[0] |= 0x00000010u;
  if (_impl_.end_at_ == nullptr) {
    auto* p = CreateMaybeMessage<::google::firestore::v1::Cursor>(GetArena());
    _impl_.end_at_ = reinterpret_cast<::google::firestore::v1::Cursor*>(p);
  }
  return _impl_.end_at_;
}
inline ::google::firestore::v1::Cursor* StructuredQuery::mutable_end_at() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::firestore::v1::Cursor* _msg = _internal_mutable_end_at();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.end_at)
  return _msg;
}
inline void StructuredQuery::set_allocated_end_at(::google::firestore::v1::Cursor* value) {
  ::google::protobuf::Arena* message_arena = GetArena();
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (message_arena == nullptr) {
    delete reinterpret_cast<::google::firestore::v1::Cursor*>(_impl_.end_at_);
  }

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

  _impl_.end_at_ = reinterpret_cast<::google::firestore::v1::Cursor*>(value);
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.end_at)
}

// int32 offset = 6;
inline void StructuredQuery::clear_offset() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.offset_ = 0;
}
inline ::int32_t StructuredQuery::offset() const {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.offset)
  return _internal_offset();
}
inline void StructuredQuery::set_offset(::int32_t value) {
  _internal_set_offset(value);
  // @@protoc_insertion_point(field_set:google.firestore.v1.StructuredQuery.offset)
}
inline ::int32_t StructuredQuery::_internal_offset() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return _impl_.offset_;
}
inline void StructuredQuery::_internal_set_offset(::int32_t value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  _impl_.offset_ = value;
}

// .google.protobuf.Int32Value limit = 5;
inline bool StructuredQuery::has_limit() const {
  bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.limit_ != nullptr);
  return value;
}
inline const ::google::protobuf::Int32Value& StructuredQuery::_internal_limit() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  const ::google::protobuf::Int32Value* p = _impl_.limit_;
  return p != nullptr ? *p : reinterpret_cast<const ::google::protobuf::Int32Value&>(::google::protobuf::_Int32Value_default_instance_);
}
inline const ::google::protobuf::Int32Value& StructuredQuery::limit() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.limit)
  return _internal_limit();
}
inline void StructuredQuery::unsafe_arena_set_allocated_limit(::google::protobuf::Int32Value* value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.limit_);
  }
  _impl_.limit_ = reinterpret_cast<::google::protobuf::Int32Value*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000004u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000004u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.firestore.v1.StructuredQuery.limit)
}
inline ::google::protobuf::Int32Value* StructuredQuery::release_limit() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);

  _impl_._has_bits_[0] &= ~0x00000004u;
  ::google::protobuf::Int32Value* released = _impl_.limit_;
  _impl_.limit_ = 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::Int32Value* StructuredQuery::unsafe_arena_release_limit() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.limit)

  _impl_._has_bits_[0] &= ~0x00000004u;
  ::google::protobuf::Int32Value* temp = _impl_.limit_;
  _impl_.limit_ = nullptr;
  return temp;
}
inline ::google::protobuf::Int32Value* StructuredQuery::_internal_mutable_limit() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_._has_bits_[0] |= 0x00000004u;
  if (_impl_.limit_ == nullptr) {
    auto* p = CreateMaybeMessage<::google::protobuf::Int32Value>(GetArena());
    _impl_.limit_ = reinterpret_cast<::google::protobuf::Int32Value*>(p);
  }
  return _impl_.limit_;
}
inline ::google::protobuf::Int32Value* StructuredQuery::mutable_limit() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::protobuf::Int32Value* _msg = _internal_mutable_limit();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.limit)
  return _msg;
}
inline void StructuredQuery::set_allocated_limit(::google::protobuf::Int32Value* 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_.limit_);
  }

  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] |= 0x00000004u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000004u;
  }

  _impl_.limit_ = reinterpret_cast<::google::protobuf::Int32Value*>(value);
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.limit)
}

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

// StructuredAggregationQuery_Aggregation_Count

// .google.protobuf.Int64Value up_to = 1;
inline bool StructuredAggregationQuery_Aggregation_Count::has_up_to() const {
  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.up_to_ != nullptr);
  return value;
}
inline const ::google::protobuf::Int64Value& StructuredAggregationQuery_Aggregation_Count::_internal_up_to() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  const ::google::protobuf::Int64Value* p = _impl_.up_to_;
  return p != nullptr ? *p : reinterpret_cast<const ::google::protobuf::Int64Value&>(::google::protobuf::_Int64Value_default_instance_);
}
inline const ::google::protobuf::Int64Value& StructuredAggregationQuery_Aggregation_Count::up_to() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredAggregationQuery.Aggregation.Count.up_to)
  return _internal_up_to();
}
inline void StructuredAggregationQuery_Aggregation_Count::unsafe_arena_set_allocated_up_to(::google::protobuf::Int64Value* value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.up_to_);
  }
  _impl_.up_to_ = reinterpret_cast<::google::protobuf::Int64Value*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000001u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000001u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.firestore.v1.StructuredAggregationQuery.Aggregation.Count.up_to)
}
inline ::google::protobuf::Int64Value* StructuredAggregationQuery_Aggregation_Count::release_up_to() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::google::protobuf::Int64Value* released = _impl_.up_to_;
  _impl_.up_to_ = 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::Int64Value* StructuredAggregationQuery_Aggregation_Count::unsafe_arena_release_up_to() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredAggregationQuery.Aggregation.Count.up_to)

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::google::protobuf::Int64Value* temp = _impl_.up_to_;
  _impl_.up_to_ = nullptr;
  return temp;
}
inline ::google::protobuf::Int64Value* StructuredAggregationQuery_Aggregation_Count::_internal_mutable_up_to() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_._has_bits_[0] |= 0x00000001u;
  if (_impl_.up_to_ == nullptr) {
    auto* p = CreateMaybeMessage<::google::protobuf::Int64Value>(GetArena());
    _impl_.up_to_ = reinterpret_cast<::google::protobuf::Int64Value*>(p);
  }
  return _impl_.up_to_;
}
inline ::google::protobuf::Int64Value* StructuredAggregationQuery_Aggregation_Count::mutable_up_to() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::protobuf::Int64Value* _msg = _internal_mutable_up_to();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredAggregationQuery.Aggregation.Count.up_to)
  return _msg;
}
inline void StructuredAggregationQuery_Aggregation_Count::set_allocated_up_to(::google::protobuf::Int64Value* 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_.up_to_);
  }

  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_.up_to_ = reinterpret_cast<::google::protobuf::Int64Value*>(value);
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredAggregationQuery.Aggregation.Count.up_to)
}

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

// StructuredAggregationQuery_Aggregation_Sum

// .google.firestore.v1.StructuredQuery.FieldReference field = 1;
inline bool StructuredAggregationQuery_Aggregation_Sum::has_field() const {
  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.field_ != nullptr);
  return value;
}
inline void StructuredAggregationQuery_Aggregation_Sum::clear_field() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (_impl_.field_ != nullptr) _impl_.field_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const ::google::firestore::v1::StructuredQuery_FieldReference& StructuredAggregationQuery_Aggregation_Sum::_internal_field() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  const ::google::firestore::v1::StructuredQuery_FieldReference* p = _impl_.field_;
  return p != nullptr ? *p : reinterpret_cast<const ::google::firestore::v1::StructuredQuery_FieldReference&>(::google::firestore::v1::_StructuredQuery_FieldReference_default_instance_);
}
inline const ::google::firestore::v1::StructuredQuery_FieldReference& StructuredAggregationQuery_Aggregation_Sum::field() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum.field)
  return _internal_field();
}
inline void StructuredAggregationQuery_Aggregation_Sum::unsafe_arena_set_allocated_field(::google::firestore::v1::StructuredQuery_FieldReference* value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.field_);
  }
  _impl_.field_ = reinterpret_cast<::google::firestore::v1::StructuredQuery_FieldReference*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000001u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000001u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum.field)
}
inline ::google::firestore::v1::StructuredQuery_FieldReference* StructuredAggregationQuery_Aggregation_Sum::release_field() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::google::firestore::v1::StructuredQuery_FieldReference* released = _impl_.field_;
  _impl_.field_ = 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::firestore::v1::StructuredQuery_FieldReference* StructuredAggregationQuery_Aggregation_Sum::unsafe_arena_release_field() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum.field)

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::google::firestore::v1::StructuredQuery_FieldReference* temp = _impl_.field_;
  _impl_.field_ = nullptr;
  return temp;
}
inline ::google::firestore::v1::StructuredQuery_FieldReference* StructuredAggregationQuery_Aggregation_Sum::_internal_mutable_field() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_._has_bits_[0] |= 0x00000001u;
  if (_impl_.field_ == nullptr) {
    auto* p = CreateMaybeMessage<::google::firestore::v1::StructuredQuery_FieldReference>(GetArena());
    _impl_.field_ = reinterpret_cast<::google::firestore::v1::StructuredQuery_FieldReference*>(p);
  }
  return _impl_.field_;
}
inline ::google::firestore::v1::StructuredQuery_FieldReference* StructuredAggregationQuery_Aggregation_Sum::mutable_field() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::firestore::v1::StructuredQuery_FieldReference* _msg = _internal_mutable_field();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum.field)
  return _msg;
}
inline void StructuredAggregationQuery_Aggregation_Sum::set_allocated_field(::google::firestore::v1::StructuredQuery_FieldReference* value) {
  ::google::protobuf::Arena* message_arena = GetArena();
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (message_arena == nullptr) {
    delete reinterpret_cast<::google::firestore::v1::StructuredQuery_FieldReference*>(_impl_.field_);
  }

  if (value != nullptr) {
    ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::firestore::v1::StructuredQuery_FieldReference*>(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_.field_ = reinterpret_cast<::google::firestore::v1::StructuredQuery_FieldReference*>(value);
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum.field)
}

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

// StructuredAggregationQuery_Aggregation_Avg

// .google.firestore.v1.StructuredQuery.FieldReference field = 1;
inline bool StructuredAggregationQuery_Aggregation_Avg::has_field() const {
  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.field_ != nullptr);
  return value;
}
inline void StructuredAggregationQuery_Aggregation_Avg::clear_field() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (_impl_.field_ != nullptr) _impl_.field_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const ::google::firestore::v1::StructuredQuery_FieldReference& StructuredAggregationQuery_Aggregation_Avg::_internal_field() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  const ::google::firestore::v1::StructuredQuery_FieldReference* p = _impl_.field_;
  return p != nullptr ? *p : reinterpret_cast<const ::google::firestore::v1::StructuredQuery_FieldReference&>(::google::firestore::v1::_StructuredQuery_FieldReference_default_instance_);
}
inline const ::google::firestore::v1::StructuredQuery_FieldReference& StructuredAggregationQuery_Aggregation_Avg::field() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg.field)
  return _internal_field();
}
inline void StructuredAggregationQuery_Aggregation_Avg::unsafe_arena_set_allocated_field(::google::firestore::v1::StructuredQuery_FieldReference* value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.field_);
  }
  _impl_.field_ = reinterpret_cast<::google::firestore::v1::StructuredQuery_FieldReference*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000001u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000001u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg.field)
}
inline ::google::firestore::v1::StructuredQuery_FieldReference* StructuredAggregationQuery_Aggregation_Avg::release_field() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::google::firestore::v1::StructuredQuery_FieldReference* released = _impl_.field_;
  _impl_.field_ = 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::firestore::v1::StructuredQuery_FieldReference* StructuredAggregationQuery_Aggregation_Avg::unsafe_arena_release_field() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg.field)

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::google::firestore::v1::StructuredQuery_FieldReference* temp = _impl_.field_;
  _impl_.field_ = nullptr;
  return temp;
}
inline ::google::firestore::v1::StructuredQuery_FieldReference* StructuredAggregationQuery_Aggregation_Avg::_internal_mutable_field() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_._has_bits_[0] |= 0x00000001u;
  if (_impl_.field_ == nullptr) {
    auto* p = CreateMaybeMessage<::google::firestore::v1::StructuredQuery_FieldReference>(GetArena());
    _impl_.field_ = reinterpret_cast<::google::firestore::v1::StructuredQuery_FieldReference*>(p);
  }
  return _impl_.field_;
}
inline ::google::firestore::v1::StructuredQuery_FieldReference* StructuredAggregationQuery_Aggregation_Avg::mutable_field() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::firestore::v1::StructuredQuery_FieldReference* _msg = _internal_mutable_field();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg.field)
  return _msg;
}
inline void StructuredAggregationQuery_Aggregation_Avg::set_allocated_field(::google::firestore::v1::StructuredQuery_FieldReference* value) {
  ::google::protobuf::Arena* message_arena = GetArena();
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (message_arena == nullptr) {
    delete reinterpret_cast<::google::firestore::v1::StructuredQuery_FieldReference*>(_impl_.field_);
  }

  if (value != nullptr) {
    ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::firestore::v1::StructuredQuery_FieldReference*>(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_.field_ = reinterpret_cast<::google::firestore::v1::StructuredQuery_FieldReference*>(value);
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg.field)
}

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

// StructuredAggregationQuery_Aggregation

// .google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1;
inline bool StructuredAggregationQuery_Aggregation::has_count() const {
  return operator_case() == kCount;
}
inline bool StructuredAggregationQuery_Aggregation::_internal_has_count() const {
  return operator_case() == kCount;
}
inline void StructuredAggregationQuery_Aggregation::set_has_count() {
  _impl_._oneof_case_[0] = kCount;
}
inline void StructuredAggregationQuery_Aggregation::clear_count() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (operator_case() == kCount) {
    if (GetArena() == nullptr) {
      delete _impl_.operator_.count_;
    }
    clear_has_operator();
  }
}
inline ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Count* StructuredAggregationQuery_Aggregation::release_count() {
  // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredAggregationQuery.Aggregation.count)
  if (operator_case() == kCount) {
    clear_has_operator();
    auto* temp = _impl_.operator_.count_;
    if (GetArena() != nullptr) {
      temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
    }
    _impl_.operator_.count_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline const ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Count& StructuredAggregationQuery_Aggregation::_internal_count() const {
  return operator_case() == kCount ? *_impl_.operator_.count_ : reinterpret_cast<::google::firestore::v1::StructuredAggregationQuery_Aggregation_Count&>(::google::firestore::v1::_StructuredAggregationQuery_Aggregation_Count_default_instance_);
}
inline const ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Count& StructuredAggregationQuery_Aggregation::count() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredAggregationQuery.Aggregation.count)
  return _internal_count();
}
inline ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Count* StructuredAggregationQuery_Aggregation::unsafe_arena_release_count() {
  // @@protoc_insertion_point(field_unsafe_arena_release:google.firestore.v1.StructuredAggregationQuery.Aggregation.count)
  if (operator_case() == kCount) {
    clear_has_operator();
    auto* temp = _impl_.operator_.count_;
    _impl_.operator_.count_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline void StructuredAggregationQuery_Aggregation::unsafe_arena_set_allocated_count(::google::firestore::v1::StructuredAggregationQuery_Aggregation_Count* 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_operator();
  if (value) {
    set_has_count();
    _impl_.operator_.count_ = value;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.firestore.v1.StructuredAggregationQuery.Aggregation.count)
}
inline ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Count* StructuredAggregationQuery_Aggregation::_internal_mutable_count() {
  if (operator_case() != kCount) {
    clear_operator();
    set_has_count();
    _impl_.operator_.count_ = CreateMaybeMessage<::google::firestore::v1::StructuredAggregationQuery_Aggregation_Count>(GetArena());
  }
  return _impl_.operator_.count_;
}
inline ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Count* StructuredAggregationQuery_Aggregation::mutable_count() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Count* _msg = _internal_mutable_count();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredAggregationQuery.Aggregation.count)
  return _msg;
}

// .google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2;
inline bool StructuredAggregationQuery_Aggregation::has_sum() const {
  return operator_case() == kSum;
}
inline bool StructuredAggregationQuery_Aggregation::_internal_has_sum() const {
  return operator_case() == kSum;
}
inline void StructuredAggregationQuery_Aggregation::set_has_sum() {
  _impl_._oneof_case_[0] = kSum;
}
inline void StructuredAggregationQuery_Aggregation::clear_sum() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (operator_case() == kSum) {
    if (GetArena() == nullptr) {
      delete _impl_.operator_.sum_;
    }
    clear_has_operator();
  }
}
inline ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Sum* StructuredAggregationQuery_Aggregation::release_sum() {
  // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredAggregationQuery.Aggregation.sum)
  if (operator_case() == kSum) {
    clear_has_operator();
    auto* temp = _impl_.operator_.sum_;
    if (GetArena() != nullptr) {
      temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
    }
    _impl_.operator_.sum_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline const ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Sum& StructuredAggregationQuery_Aggregation::_internal_sum() const {
  return operator_case() == kSum ? *_impl_.operator_.sum_ : reinterpret_cast<::google::firestore::v1::StructuredAggregationQuery_Aggregation_Sum&>(::google::firestore::v1::_StructuredAggregationQuery_Aggregation_Sum_default_instance_);
}
inline const ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Sum& StructuredAggregationQuery_Aggregation::sum() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredAggregationQuery.Aggregation.sum)
  return _internal_sum();
}
inline ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Sum* StructuredAggregationQuery_Aggregation::unsafe_arena_release_sum() {
  // @@protoc_insertion_point(field_unsafe_arena_release:google.firestore.v1.StructuredAggregationQuery.Aggregation.sum)
  if (operator_case() == kSum) {
    clear_has_operator();
    auto* temp = _impl_.operator_.sum_;
    _impl_.operator_.sum_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline void StructuredAggregationQuery_Aggregation::unsafe_arena_set_allocated_sum(::google::firestore::v1::StructuredAggregationQuery_Aggregation_Sum* 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_operator();
  if (value) {
    set_has_sum();
    _impl_.operator_.sum_ = value;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.firestore.v1.StructuredAggregationQuery.Aggregation.sum)
}
inline ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Sum* StructuredAggregationQuery_Aggregation::_internal_mutable_sum() {
  if (operator_case() != kSum) {
    clear_operator();
    set_has_sum();
    _impl_.operator_.sum_ = CreateMaybeMessage<::google::firestore::v1::StructuredAggregationQuery_Aggregation_Sum>(GetArena());
  }
  return _impl_.operator_.sum_;
}
inline ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Sum* StructuredAggregationQuery_Aggregation::mutable_sum() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Sum* _msg = _internal_mutable_sum();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredAggregationQuery.Aggregation.sum)
  return _msg;
}

// .google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3;
inline bool StructuredAggregationQuery_Aggregation::has_avg() const {
  return operator_case() == kAvg;
}
inline bool StructuredAggregationQuery_Aggregation::_internal_has_avg() const {
  return operator_case() == kAvg;
}
inline void StructuredAggregationQuery_Aggregation::set_has_avg() {
  _impl_._oneof_case_[0] = kAvg;
}
inline void StructuredAggregationQuery_Aggregation::clear_avg() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (operator_case() == kAvg) {
    if (GetArena() == nullptr) {
      delete _impl_.operator_.avg_;
    }
    clear_has_operator();
  }
}
inline ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Avg* StructuredAggregationQuery_Aggregation::release_avg() {
  // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredAggregationQuery.Aggregation.avg)
  if (operator_case() == kAvg) {
    clear_has_operator();
    auto* temp = _impl_.operator_.avg_;
    if (GetArena() != nullptr) {
      temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
    }
    _impl_.operator_.avg_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline const ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Avg& StructuredAggregationQuery_Aggregation::_internal_avg() const {
  return operator_case() == kAvg ? *_impl_.operator_.avg_ : reinterpret_cast<::google::firestore::v1::StructuredAggregationQuery_Aggregation_Avg&>(::google::firestore::v1::_StructuredAggregationQuery_Aggregation_Avg_default_instance_);
}
inline const ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Avg& StructuredAggregationQuery_Aggregation::avg() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredAggregationQuery.Aggregation.avg)
  return _internal_avg();
}
inline ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Avg* StructuredAggregationQuery_Aggregation::unsafe_arena_release_avg() {
  // @@protoc_insertion_point(field_unsafe_arena_release:google.firestore.v1.StructuredAggregationQuery.Aggregation.avg)
  if (operator_case() == kAvg) {
    clear_has_operator();
    auto* temp = _impl_.operator_.avg_;
    _impl_.operator_.avg_ = nullptr;
    return temp;
  } else {
    return nullptr;
  }
}
inline void StructuredAggregationQuery_Aggregation::unsafe_arena_set_allocated_avg(::google::firestore::v1::StructuredAggregationQuery_Aggregation_Avg* 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_operator();
  if (value) {
    set_has_avg();
    _impl_.operator_.avg_ = value;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.firestore.v1.StructuredAggregationQuery.Aggregation.avg)
}
inline ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Avg* StructuredAggregationQuery_Aggregation::_internal_mutable_avg() {
  if (operator_case() != kAvg) {
    clear_operator();
    set_has_avg();
    _impl_.operator_.avg_ = CreateMaybeMessage<::google::firestore::v1::StructuredAggregationQuery_Aggregation_Avg>(GetArena());
  }
  return _impl_.operator_.avg_;
}
inline ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Avg* StructuredAggregationQuery_Aggregation::mutable_avg() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::firestore::v1::StructuredAggregationQuery_Aggregation_Avg* _msg = _internal_mutable_avg();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredAggregationQuery.Aggregation.avg)
  return _msg;
}

// string alias = 7;
inline void StructuredAggregationQuery_Aggregation::clear_alias() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.alias_.ClearToEmpty();
}
inline const std::string& StructuredAggregationQuery_Aggregation::alias() const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredAggregationQuery.Aggregation.alias)
  return _internal_alias();
}
template <typename Arg_, typename... Args_>
inline PROTOBUF_ALWAYS_INLINE void StructuredAggregationQuery_Aggregation::set_alias(Arg_&& arg,
                                                     Args_... args) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  _impl_.alias_.Set(static_cast<Arg_&&>(arg), args..., GetArena());
  // @@protoc_insertion_point(field_set:google.firestore.v1.StructuredAggregationQuery.Aggregation.alias)
}
inline std::string* StructuredAggregationQuery_Aggregation::mutable_alias() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  std::string* _s = _internal_mutable_alias();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredAggregationQuery.Aggregation.alias)
  return _s;
}
inline const std::string& StructuredAggregationQuery_Aggregation::_internal_alias() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return _impl_.alias_.Get();
}
inline void StructuredAggregationQuery_Aggregation::_internal_set_alias(const std::string& value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  _impl_.alias_.Set(value, GetArena());
}
inline std::string* StructuredAggregationQuery_Aggregation::_internal_mutable_alias() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  return _impl_.alias_.Mutable( GetArena());
}
inline std::string* StructuredAggregationQuery_Aggregation::release_alias() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredAggregationQuery.Aggregation.alias)
  return _impl_.alias_.Release();
}
inline void StructuredAggregationQuery_Aggregation::set_allocated_alias(std::string* value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.alias_.SetAllocated(value, GetArena());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        if (_impl_.alias_.IsDefault()) {
          _impl_.alias_.Set("", GetArena());
        }
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredAggregationQuery.Aggregation.alias)
}

inline bool StructuredAggregationQuery_Aggregation::has_operator() const {
  return operator_case() != OPERATOR_NOT_SET;
}
inline void StructuredAggregationQuery_Aggregation::clear_has_operator() {
  _impl_._oneof_case_[0] = OPERATOR_NOT_SET;
}
inline StructuredAggregationQuery_Aggregation::OperatorCase StructuredAggregationQuery_Aggregation::operator_case() const {
  return StructuredAggregationQuery_Aggregation::OperatorCase(_impl_._oneof_case_[0]);
}
// -------------------------------------------------------------------

// StructuredAggregationQuery

// .google.firestore.v1.StructuredQuery structured_query = 1;
inline bool StructuredAggregationQuery::has_structured_query() const {
  return query_type_case() == kStructuredQuery;
}
inline bool StructuredAggregationQuery::_internal_has_structured_query() const {
  return query_type_case() == kStructuredQuery;
}
inline void StructuredAggregationQuery::set_has_structured_query() {
  _impl_._oneof_case_[0] = kStructuredQuery;
}
inline void StructuredAggregationQuery::clear_structured_query() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  if (query_type_case() == kStructuredQuery) {
    if (GetArena() == nullptr) {
      delete _impl_.query_type_.structured_query_;
    }
    clear_has_query_type();
  }
}
inline ::google::firestore::v1::StructuredQuery* StructuredAggregationQuery::release_structured_query() {
  // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredAggregationQuery.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& StructuredAggregationQuery::_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& StructuredAggregationQuery::structured_query() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredAggregationQuery.structured_query)
  return _internal_structured_query();
}
inline ::google::firestore::v1::StructuredQuery* StructuredAggregationQuery::unsafe_arena_release_structured_query() {
  // @@protoc_insertion_point(field_unsafe_arena_release:google.firestore.v1.StructuredAggregationQuery.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 StructuredAggregationQuery::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:google.firestore.v1.StructuredAggregationQuery.structured_query)
}
inline ::google::firestore::v1::StructuredQuery* StructuredAggregationQuery::_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* StructuredAggregationQuery::mutable_structured_query() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  ::google::firestore::v1::StructuredQuery* _msg = _internal_mutable_structured_query();
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredAggregationQuery.structured_query)
  return _msg;
}

// repeated .google.firestore.v1.StructuredAggregationQuery.Aggregation aggregations = 3;
inline int StructuredAggregationQuery::_internal_aggregations_size() const {
  return _internal_aggregations().size();
}
inline int StructuredAggregationQuery::aggregations_size() const {
  return _internal_aggregations_size();
}
inline void StructuredAggregationQuery::clear_aggregations() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.aggregations_.Clear();
}
inline ::google::firestore::v1::StructuredAggregationQuery_Aggregation* StructuredAggregationQuery::mutable_aggregations(int index)
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredAggregationQuery.aggregations)
  return _internal_mutable_aggregations()->Mutable(index);
}
inline ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredAggregationQuery_Aggregation>* StructuredAggregationQuery::mutable_aggregations()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.StructuredAggregationQuery.aggregations)
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  return _internal_mutable_aggregations();
}
inline const ::google::firestore::v1::StructuredAggregationQuery_Aggregation& StructuredAggregationQuery::aggregations(int index) const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredAggregationQuery.aggregations)
  return _internal_aggregations().Get(index);
}
inline ::google::firestore::v1::StructuredAggregationQuery_Aggregation* StructuredAggregationQuery::add_aggregations() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ::google::firestore::v1::StructuredAggregationQuery_Aggregation* _add = _internal_mutable_aggregations()->Add();
  // @@protoc_insertion_point(field_add:google.firestore.v1.StructuredAggregationQuery.aggregations)
  return _add;
}
inline const ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredAggregationQuery_Aggregation>& StructuredAggregationQuery::aggregations() const
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_list:google.firestore.v1.StructuredAggregationQuery.aggregations)
  return _internal_aggregations();
}
inline const ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredAggregationQuery_Aggregation>&
StructuredAggregationQuery::_internal_aggregations() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return _impl_.aggregations_;
}
inline ::google::protobuf::RepeatedPtrField<::google::firestore::v1::StructuredAggregationQuery_Aggregation>*
StructuredAggregationQuery::_internal_mutable_aggregations() {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return &_impl_.aggregations_;
}

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

// Cursor

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

// bool before = 2;
inline void Cursor::clear_before() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  _impl_.before_ = false;
}
inline bool Cursor::before() const {
  // @@protoc_insertion_point(field_get:google.firestore.v1.Cursor.before)
  return _internal_before();
}
inline void Cursor::set_before(bool value) {
  _internal_set_before(value);
  // @@protoc_insertion_point(field_set:google.firestore.v1.Cursor.before)
}
inline bool Cursor::_internal_before() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return _impl_.before_;
}
inline void Cursor::_internal_set_before(bool value) {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  ;
  _impl_.before_ = value;
}

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

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


namespace google {
namespace protobuf {

template <>
struct is_proto_enum<::google::firestore::v1::StructuredQuery_CompositeFilter_Operator> : std::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor<::google::firestore::v1::StructuredQuery_CompositeFilter_Operator>() {
  return ::google::firestore::v1::StructuredQuery_CompositeFilter_Operator_descriptor();
}
template <>
struct is_proto_enum<::google::firestore::v1::StructuredQuery_FieldFilter_Operator> : std::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor<::google::firestore::v1::StructuredQuery_FieldFilter_Operator>() {
  return ::google::firestore::v1::StructuredQuery_FieldFilter_Operator_descriptor();
}
template <>
struct is_proto_enum<::google::firestore::v1::StructuredQuery_UnaryFilter_Operator> : std::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor<::google::firestore::v1::StructuredQuery_UnaryFilter_Operator>() {
  return ::google::firestore::v1::StructuredQuery_UnaryFilter_Operator_descriptor();
}
template <>
struct is_proto_enum<::google::firestore::v1::StructuredQuery_Direction> : std::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor<::google::firestore::v1::StructuredQuery_Direction>() {
  return ::google::firestore::v1::StructuredQuery_Direction_descriptor();
}

}  // namespace protobuf
}  // namespace google

// @@protoc_insertion_point(global_scope)

#include "google/protobuf/port_undef.inc"

#endif  // GOOGLE_PROTOBUF_INCLUDED_google_2ffirestore_2fv1_2fquery_2eproto_2epb_2eh
