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

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

#ifndef GOOGLE_PROTOBUF_INCLUDED_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto_2epb_2eh
#define GOOGLE_PROTOBUF_INCLUDED_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto_2epb_2eh

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

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

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

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

#define PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2faggregation_5fresult_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_2faggregation_5fresult_2eproto {
  static const ::uint32_t offsets[];
};
extern const ::google::protobuf::internal::DescriptorTable
    descriptor_table_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto;
namespace google {
namespace firestore {
namespace v1 {
class AggregationResult;
struct AggregationResultDefaultTypeInternal;
extern AggregationResultDefaultTypeInternal _AggregationResult_default_instance_;
class AggregationResult_AggregateFieldsEntry_DoNotUse;
struct AggregationResult_AggregateFieldsEntry_DoNotUseDefaultTypeInternal;
extern AggregationResult_AggregateFieldsEntry_DoNotUseDefaultTypeInternal _AggregationResult_AggregateFieldsEntry_DoNotUse_default_instance_;
}  // namespace v1
}  // namespace firestore
namespace protobuf {
}  // namespace protobuf
}  // namespace google

namespace google {
namespace firestore {
namespace v1 {

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


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

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

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

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

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

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

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

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

  private:
  friend class ::google::protobuf::internal::AnyMetadata;
  static ::absl::string_view FullMessageName() {
    return "google.firestore.v1.AggregationResult";
  }
  protected:
  explicit AggregationResult(::google::protobuf::Arena* arena);
  AggregationResult(::google::protobuf::Arena* arena, const AggregationResult& 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 {
    kAggregateFieldsFieldNumber = 2,
  };
  // map<string, .google.firestore.v1.Value> aggregate_fields = 2;
  int aggregate_fields_size() const;
  private:
  int _internal_aggregate_fields_size() const;

  public:
  void clear_aggregate_fields() ;
  const ::google::protobuf::Map<std::string, ::google::firestore::v1::Value>& aggregate_fields() const;
  ::google::protobuf::Map<std::string, ::google::firestore::v1::Value>* mutable_aggregate_fields();

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

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

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

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

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




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


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

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

// AggregationResult

// map<string, .google.firestore.v1.Value> aggregate_fields = 2;
inline int AggregationResult::_internal_aggregate_fields_size() const {
  return _internal_aggregate_fields().size();
}
inline int AggregationResult::aggregate_fields_size() const {
  return _internal_aggregate_fields_size();
}
inline const ::google::protobuf::Map<std::string, ::google::firestore::v1::Value>& AggregationResult::_internal_aggregate_fields() const {
  PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race);
  return _impl_.aggregate_fields_.GetMap();
}
inline const ::google::protobuf::Map<std::string, ::google::firestore::v1::Value>& AggregationResult::aggregate_fields() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_map:google.firestore.v1.AggregationResult.aggregate_fields)
  return _internal_aggregate_fields();
}
inline ::google::protobuf::Map<std::string, ::google::firestore::v1::Value>* AggregationResult::_internal_mutable_aggregate_fields() {
  PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  return _impl_.aggregate_fields_.MutableMap();
}
inline ::google::protobuf::Map<std::string, ::google::firestore::v1::Value>* AggregationResult::mutable_aggregate_fields() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_mutable_map:google.firestore.v1.AggregationResult.aggregate_fields)
  return _internal_mutable_aggregate_fields();
}

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

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


// @@protoc_insertion_point(global_scope)

#include "google/protobuf/port_undef.inc"

#endif  // GOOGLE_PROTOBUF_INCLUDED_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto_2epb_2eh
