// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: third_party/metrics_proto/ukm/aggregate.proto
// Protobuf C++ Version: 7.35.1

#include "third_party/metrics_proto/ukm/aggregate.pb.h"

#include <algorithm>
#include <type_traits>
#include "google/protobuf/io/coded_stream.h"
#include "google/protobuf/generated_message_tctable_impl.h"
#include "google/protobuf/internal_visibility.h"
#include "google/protobuf/extension_set.h"
#include "google/protobuf/generated_message_util.h"
#include "google/protobuf/wire_format_lite.h"
#include "google/protobuf/io/zero_copy_stream_impl_lite.h"
// @@protoc_insertion_point(includes)

// Must be included last.
#include "google/protobuf/port_def.inc"
PROTOBUF_PRAGMA_INIT_SEG
namespace _pb = ::google::protobuf;
namespace _pbi = ::google::protobuf::internal;
namespace _fl = ::google::protobuf::internal::field_layout;
namespace ukm {
class Aggregate_Metric::_Internal {
 public:
  using HasBits = decltype(::std::declval<Aggregate_Metric>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(Aggregate_Metric, _impl_._has_bits_);
};

constexpr Aggregate_Metric::ParseTableT_ Aggregate_Metric::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(Aggregate_Metric, _impl_._has_bits_),
      0, // no _extensions_
      9, 120,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294966848,  // skipmap
      offsetof(ParseTableT_, field_entries),
      8,  // num_field_entries
      0,  // num_aux_entries
      offsetof(ParseTableT_, field_names),  // no aux_entries
      class_data,
      nullptr,  // post_loop_handler
      ::_pbi::TcParser::GenericFallbackLite,  // fallback
      #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
      ::_pbi::TcParser::GetTable<::ukm::Aggregate_Metric>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
      // fixed64 metric_hash = 1;
      {::_pbi::TcParser::FastF64S1,
       {9, 0, 0,
        PROTOBUF_FIELD_OFFSET(Aggregate_Metric, _impl_.metric_hash_)}},
      // double value_sum = 2;
      {::_pbi::TcParser::FastF64S1,
       {17, 1, 0,
        PROTOBUF_FIELD_OFFSET(Aggregate_Metric, _impl_.value_sum_)}},
      // double value_square_sum = 3;
      {::_pbi::TcParser::FastF64S1,
       {25, 2, 0,
        PROTOBUF_FIELD_OFFSET(Aggregate_Metric, _impl_.value_square_sum_)}},
      // uint64 total_count = 4;
      {::_pbi::TcParser::FastV64S1,
       {32, 3, 0,
        PROTOBUF_FIELD_OFFSET(Aggregate_Metric, _impl_.total_count_)}},
      // uint64 dropped_due_to_limits = 5;
      {::_pbi::TcParser::FastV64S1,
       {40, 4, 0,
        PROTOBUF_FIELD_OFFSET(Aggregate_Metric, _impl_.dropped_due_to_limits_)}},
      // uint64 dropped_due_to_sampling = 6;
      {::_pbi::TcParser::FastV64S1,
       {48, 5, 0,
        PROTOBUF_FIELD_OFFSET(Aggregate_Metric, _impl_.dropped_due_to_sampling_)}},
      {::_pbi::TcParser::MiniParse, {}},
      // uint64 dropped_due_to_filter = 8;
      {::_pbi::TcParser::FastV64S1,
       {64, 6, 0,
        PROTOBUF_FIELD_OFFSET(Aggregate_Metric, _impl_.dropped_due_to_filter_)}},
      // uint64 dropped_due_to_unconfigured = 9;
      {::_pbi::TcParser::FastV64S1,
       {72, 7, 0,
        PROTOBUF_FIELD_OFFSET(Aggregate_Metric, _impl_.dropped_due_to_unconfigured_)}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
    }}, {{
      65535, 65535
    }}, {{
      // fixed64 metric_hash = 1;
      {PROTOBUF_FIELD_OFFSET(Aggregate_Metric, _impl_.metric_hash_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kFixed64)},
      // double value_sum = 2;
      {PROTOBUF_FIELD_OFFSET(Aggregate_Metric, _impl_.value_sum_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kDouble)},
      // double value_square_sum = 3;
      {PROTOBUF_FIELD_OFFSET(Aggregate_Metric, _impl_.value_square_sum_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kDouble)},
      // uint64 total_count = 4;
      {PROTOBUF_FIELD_OFFSET(Aggregate_Metric, _impl_.total_count_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)},
      // uint64 dropped_due_to_limits = 5;
      {PROTOBUF_FIELD_OFFSET(Aggregate_Metric, _impl_.dropped_due_to_limits_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)},
      // uint64 dropped_due_to_sampling = 6;
      {PROTOBUF_FIELD_OFFSET(Aggregate_Metric, _impl_.dropped_due_to_sampling_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)},
      // uint64 dropped_due_to_filter = 8;
      {PROTOBUF_FIELD_OFFSET(Aggregate_Metric, _impl_.dropped_due_to_filter_), _Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)},
      // uint64 dropped_due_to_unconfigured = 9;
      {PROTOBUF_FIELD_OFFSET(Aggregate_Metric, _impl_.dropped_due_to_unconfigured_), _Internal::kHasBitsOffset + 7, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)},
    }},
    // no aux_entries
    {{
    }},
  };
}


inline constexpr Aggregate_Metric::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        metric_hash_{::uint64_t{0u}},
        value_sum_{0},
        value_square_sum_{0},
        total_count_{::uint64_t{0u}},
        dropped_due_to_limits_{::uint64_t{0u}},
        dropped_due_to_sampling_{::uint64_t{0u}},
        dropped_due_to_filter_{::uint64_t{0u}},
        dropped_due_to_unconfigured_{::uint64_t{0u}} {}

template <typename>
constexpr Aggregate_Metric::Aggregate_Metric(::_pbi::ConstantInitialized,
                       const ::_pbi::ClassData* PROTOBUF_NONNULL class_data)
    : ::google::protobuf::MessageLite(
#if defined(PROTOBUF_CUSTOM_VTABLE)
          class_data
#endif  // PROTOBUF_CUSTOM_VTABLE
          ),
      _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
inline void* PROTOBUF_NONNULL Aggregate_Metric::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) Aggregate_Metric(arena);
}
constexpr auto Aggregate_Metric::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(Aggregate_Metric), alignof(Aggregate_Metric));
}
constexpr auto Aggregate_Metric::InternalGenerateClassData_(
    const MessageLite& prototype,
    const ::google::protobuf::internal::TcParseTableBase* tc_table) {
  return ::google::protobuf::internal::ClassDataLite{
      {
          &prototype,
#ifndef PROTOBUF_MESSAGE_GLOBALS
          &_table_.header,
#else
          tc_table,
#endif
          nullptr,  // IsInitialized
          &Aggregate_Metric::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<Aggregate_Metric>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &Aggregate_Metric::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<Aggregate_Metric>(), &Aggregate_Metric::ByteSizeLong,
              &Aggregate_Metric::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(Aggregate_Metric, _impl_._cached_size_),
          true,
      },
      "ukm.Aggregate.Metric",
  };
}
struct Aggregate_MetricGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr Aggregate_MetricGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 Aggregate_Metric_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(Aggregate_Metric::InternalGenerateClassData_(
            _default, &Aggregate_Metric_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<Aggregate_Metric>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~Aggregate_MetricGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) Aggregate_Metric _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<Aggregate_Metric>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(Aggregate_MetricGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST Aggregate_MetricGlobalsTypeInternal Aggregate_Metric_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* Aggregate_Metric_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return Aggregate_Metric_globals_.GetClassData();
#else
  return Aggregate_Metric_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
class Aggregate::_Internal {
 public:
  using HasBits = decltype(::std::declval<Aggregate>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(Aggregate, _impl_._has_bits_);
};

constexpr Aggregate::ParseTableT_ Aggregate::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(Aggregate, _impl_._has_bits_),
      0, // no _extensions_
      9, 120,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294966848,  // skipmap
      offsetof(ParseTableT_, field_entries),
      8,  // num_field_entries
      1,  // num_aux_entries
      offsetof(ParseTableT_, aux_entries),
      class_data,
      nullptr,  // post_loop_handler
      ::_pbi::TcParser::GenericFallbackLite,  // fallback
      #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
      ::_pbi::TcParser::GetTable<::ukm::Aggregate>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
      // int64 source_id = 1;
      {::_pbi::TcParser::FastV64S1,
       {8, 1, 0,
        PROTOBUF_FIELD_OFFSET(Aggregate, _impl_.source_id_)}},
      // fixed64 event_hash = 2;
      {::_pbi::TcParser::FastF64S1,
       {17, 2, 0,
        PROTOBUF_FIELD_OFFSET(Aggregate, _impl_.event_hash_)}},
      // uint64 total_count = 3;
      {::_pbi::TcParser::FastV64S1,
       {24, 3, 0,
        PROTOBUF_FIELD_OFFSET(Aggregate, _impl_.total_count_)}},
      // uint64 dropped_due_to_limits = 4;
      {::_pbi::TcParser::FastV64S1,
       {32, 4, 0,
        PROTOBUF_FIELD_OFFSET(Aggregate, _impl_.dropped_due_to_limits_)}},
      // uint64 dropped_due_to_sampling = 5;
      {::_pbi::TcParser::FastV64S1,
       {40, 5, 0,
        PROTOBUF_FIELD_OFFSET(Aggregate, _impl_.dropped_due_to_sampling_)}},
      // repeated .ukm.Aggregate.Metric metrics = 6;
      {::_pbi::TcParser::FastMtR1,
       {50, 0, 0,
        PROTOBUF_FIELD_OFFSET(Aggregate, _impl_.metrics_)}},
      {::_pbi::TcParser::MiniParse, {}},
      // uint64 dropped_due_to_filter = 8;
      {::_pbi::TcParser::FastV64S1,
       {64, 6, 0,
        PROTOBUF_FIELD_OFFSET(Aggregate, _impl_.dropped_due_to_filter_)}},
      // uint64 dropped_due_to_unconfigured = 9;
      {::_pbi::TcParser::FastV64S1,
       {72, 7, 0,
        PROTOBUF_FIELD_OFFSET(Aggregate, _impl_.dropped_due_to_unconfigured_)}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
    }}, {{
      65535, 65535
    }}, {{
      // int64 source_id = 1;
      {PROTOBUF_FIELD_OFFSET(Aggregate, _impl_.source_id_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
      // fixed64 event_hash = 2;
      {PROTOBUF_FIELD_OFFSET(Aggregate, _impl_.event_hash_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kFixed64)},
      // uint64 total_count = 3;
      {PROTOBUF_FIELD_OFFSET(Aggregate, _impl_.total_count_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)},
      // uint64 dropped_due_to_limits = 4;
      {PROTOBUF_FIELD_OFFSET(Aggregate, _impl_.dropped_due_to_limits_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)},
      // uint64 dropped_due_to_sampling = 5;
      {PROTOBUF_FIELD_OFFSET(Aggregate, _impl_.dropped_due_to_sampling_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)},
      // repeated .ukm.Aggregate.Metric metrics = 6;
      {PROTOBUF_FIELD_OFFSET(Aggregate, _impl_.metrics_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
      // uint64 dropped_due_to_filter = 8;
      {PROTOBUF_FIELD_OFFSET(Aggregate, _impl_.dropped_due_to_filter_), _Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)},
      // uint64 dropped_due_to_unconfigured = 9;
      {PROTOBUF_FIELD_OFFSET(Aggregate, _impl_.dropped_due_to_unconfigured_), _Internal::kHasBitsOffset + 7, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::ukm::Aggregate_Metric>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::ukm::Aggregate_Metric_globals_},
        #endif
    }},
    {{
    }},
  };
}


inline constexpr Aggregate::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        metrics_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::ukm::Aggregate,
            PROTOBUF_FIELD_OFFSET(::ukm::Aggregate, _impl_.metrics_)>()
         }
        ,
        source_id_{::int64_t{0}},
        event_hash_{::uint64_t{0u}},
        total_count_{::uint64_t{0u}},
        dropped_due_to_limits_{::uint64_t{0u}},
        dropped_due_to_sampling_{::uint64_t{0u}},
        dropped_due_to_filter_{::uint64_t{0u}},
        dropped_due_to_unconfigured_{::uint64_t{0u}} {}

template <typename>
constexpr Aggregate::Aggregate(::_pbi::ConstantInitialized,
                       const ::_pbi::ClassData* PROTOBUF_NONNULL class_data)
    : ::google::protobuf::MessageLite(
#if defined(PROTOBUF_CUSTOM_VTABLE)
          class_data
#endif  // PROTOBUF_CUSTOM_VTABLE
          ),
      _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
inline void* PROTOBUF_NONNULL Aggregate::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) Aggregate(arena);
}
constexpr auto Aggregate::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Aggregate), alignof(Aggregate));
}
constexpr auto Aggregate::InternalGenerateClassData_(
    const MessageLite& prototype,
    const ::google::protobuf::internal::TcParseTableBase* tc_table) {
  return ::google::protobuf::internal::ClassDataLite{
      {
          &prototype,
#ifndef PROTOBUF_MESSAGE_GLOBALS
          &_table_.header,
#else
          tc_table,
#endif
          nullptr,  // IsInitialized
          &Aggregate::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<Aggregate>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &Aggregate::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<Aggregate>(), &Aggregate::ByteSizeLong,
              &Aggregate::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(Aggregate, _impl_._cached_size_),
          true,
      },
      "ukm.Aggregate",
  };
}
struct AggregateGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr AggregateGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 Aggregate_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(Aggregate::InternalGenerateClassData_(
            _default, &Aggregate_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<Aggregate>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~AggregateGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) Aggregate _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<Aggregate>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(AggregateGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST AggregateGlobalsTypeInternal Aggregate_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* Aggregate_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return Aggregate_globals_.GetClassData();
#else
  return Aggregate_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
}  // namespace ukm
namespace ukm {
// ===================================================================

Aggregate_Metric::Aggregate_Metric(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, Aggregate_Metric_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:ukm.Aggregate.Metric)
}
Aggregate_Metric::Aggregate_Metric(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Aggregate_Metric& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, Aggregate_Metric_get_class_data()),
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena),
#endif  // PROTOBUF_CUSTOM_VTABLE
      _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}
PROTOBUF_NDEBUG_INLINE Aggregate_Metric::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0} {}

inline void Aggregate_Metric::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  ::memset(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, metric_hash_),
           0,
           offsetof(Impl_, dropped_due_to_unconfigured_) -
               offsetof(Impl_, metric_hash_) +
               sizeof(Impl_::dropped_due_to_unconfigured_));
}
Aggregate_Metric::~Aggregate_Metric() {
  // @@protoc_insertion_point(destructor:ukm.Aggregate.Metric)
  SharedDtor(*this);
}
inline void Aggregate_Metric::SharedDtor(MessageLite& self) {
  Aggregate_Metric& this_ = static_cast<Aggregate_Metric&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  this_._impl_.~Impl_();
}

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite Aggregate_Metric_class_data_ =
    Aggregate_Metric::InternalGenerateClassData_(Aggregate_Metric_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
Aggregate_Metric::GetClassData() const {
  return Aggregate_Metric_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
Aggregate_Metric::GetClassData() const {
  return Aggregate_Metric_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const Aggregate_Metric::ParseTableT_
    Aggregate_Metric::_table_ =
        Aggregate_Metric::InternalGenerateParseTable_(Aggregate_Metric_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void Aggregate_Metric::Clear() {
// @@protoc_insertion_point(message_clear_start:ukm.Aggregate.Metric)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) {
    ::memset(&_impl_.metric_hash_, 0, static_cast<::size_t>(
        reinterpret_cast<char*>(&_impl_.dropped_due_to_unconfigured_) -
        reinterpret_cast<char*>(&_impl_.metric_hash_)) + sizeof(_impl_.dropped_due_to_unconfigured_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL Aggregate_Metric::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const Aggregate_Metric& this_ = static_cast<const Aggregate_Metric&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL Aggregate_Metric::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const Aggregate_Metric& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:ukm.Aggregate.Metric)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = this_._impl_._has_bits_[0];
  // fixed64 metric_hash = 1;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFixed64ToArray(
        1, this_._internal_metric_hash(), target);
  }

  // double value_sum = 2;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteDoubleToArray(
        2, this_._internal_value_sum(), target);
  }

  // double value_square_sum = 3;
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteDoubleToArray(
        3, this_._internal_value_square_sum(), target);
  }

  // uint64 total_count = 4;
  if (CheckHasBit(cached_has_bits, 0x00000008U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
        4, this_._internal_total_count(), target);
  }

  // uint64 dropped_due_to_limits = 5;
  if (CheckHasBit(cached_has_bits, 0x00000010U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
        5, this_._internal_dropped_due_to_limits(), target);
  }

  // uint64 dropped_due_to_sampling = 6;
  if (CheckHasBit(cached_has_bits, 0x00000020U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
        6, this_._internal_dropped_due_to_sampling(), target);
  }

  // uint64 dropped_due_to_filter = 8;
  if (CheckHasBit(cached_has_bits, 0x00000040U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
        8, this_._internal_dropped_due_to_filter(), target);
  }

  // uint64 dropped_due_to_unconfigured = 9;
  if (CheckHasBit(cached_has_bits, 0x00000080U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
        9, this_._internal_dropped_due_to_unconfigured(), target);
  }

  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(
        this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
        static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:ukm.Aggregate.Metric)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t Aggregate_Metric::ByteSizeLong(const MessageLite& base) {
  const Aggregate_Metric& this_ = static_cast<const Aggregate_Metric&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t Aggregate_Metric::ByteSizeLong() const {
  const Aggregate_Metric& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:ukm.Aggregate.Metric)
  ::size_t total_size = 0;

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void)cached_has_bits;

  ::_pbi::Prefetch5LinesFrom7Lines(&this_);
  cached_has_bits = this_._impl_._has_bits_[0];
  total_size += ::absl::popcount(0x00000007U & cached_has_bits) * 9;
  if (BatchCheckHasBit(cached_has_bits, 0x000000f8U)) {
    // uint64 total_count = 4;
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
          this_._internal_total_count());
    }
    // uint64 dropped_due_to_limits = 5;
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
          this_._internal_dropped_due_to_limits());
    }
    // uint64 dropped_due_to_sampling = 6;
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
          this_._internal_dropped_due_to_sampling());
    }
    // uint64 dropped_due_to_filter = 8;
    if (CheckHasBit(cached_has_bits, 0x00000040U)) {
      total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
          this_._internal_dropped_due_to_filter());
    }
    // uint64 dropped_due_to_unconfigured = 9;
    if (CheckHasBit(cached_has_bits, 0x00000080U)) {
      total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
          this_._internal_dropped_due_to_unconfigured());
    }
  }
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
  }
  this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
  return total_size;
}

void Aggregate_Metric::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<Aggregate_Metric*>(&to_msg);
  auto& from = static_cast<const Aggregate_Metric&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(class_specific_merge_from_start:ukm.Aggregate.Metric)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_impl_.metric_hash_ = from._impl_.metric_hash_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_impl_.value_sum_ = from._impl_.value_sum_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _this->_impl_.value_square_sum_ = from._impl_.value_square_sum_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      _this->_impl_.total_count_ = from._impl_.total_count_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      _this->_impl_.dropped_due_to_limits_ = from._impl_.dropped_due_to_limits_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      _this->_impl_.dropped_due_to_sampling_ = from._impl_.dropped_due_to_sampling_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000040U)) {
      _this->_impl_.dropped_due_to_filter_ = from._impl_.dropped_due_to_filter_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000080U)) {
      _this->_impl_.dropped_due_to_unconfigured_ = from._impl_.dropped_due_to_unconfigured_;
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

void Aggregate_Metric::CopyFrom(const Aggregate_Metric& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:ukm.Aggregate.Metric)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}


void Aggregate_Metric::InternalSwap(Aggregate_Metric* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Aggregate_Metric, _impl_.dropped_due_to_unconfigured_)
      + sizeof(Aggregate_Metric::_impl_.dropped_due_to_unconfigured_)
      - PROTOBUF_FIELD_OFFSET(Aggregate_Metric, _impl_.metric_hash_)>(
          reinterpret_cast<char*>(&_impl_.metric_hash_),
          reinterpret_cast<char*>(&other->_impl_.metric_hash_));
}

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

Aggregate::Aggregate(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, Aggregate_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:ukm.Aggregate)
}
PROTOBUF_NDEBUG_INLINE Aggregate::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::ukm::Aggregate& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        metrics_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::ukm::Aggregate,
              PROTOBUF_FIELD_OFFSET(::ukm::Aggregate, _impl_.metrics_)>()
          , from.metrics_
        }
     {}

Aggregate::Aggregate(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const Aggregate& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, Aggregate_get_class_data()) {

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  Aggregate* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  ::memcpy(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, source_id_),
           reinterpret_cast<const char*>(&from._impl_) +
               offsetof(Impl_, source_id_),
           offsetof(Impl_, dropped_due_to_unconfigured_) -
               offsetof(Impl_, source_id_) +
               sizeof(Impl_::dropped_due_to_unconfigured_));

  // @@protoc_insertion_point(copy_constructor:ukm.Aggregate)
}
PROTOBUF_NDEBUG_INLINE Aggregate::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        metrics_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::ukm::Aggregate,
            PROTOBUF_FIELD_OFFSET(::ukm::Aggregate, _impl_.metrics_)>()
         }
     {}

inline void Aggregate::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  ::memset(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, source_id_),
           0,
           offsetof(Impl_, dropped_due_to_unconfigured_) -
               offsetof(Impl_, source_id_) +
               sizeof(Impl_::dropped_due_to_unconfigured_));
}
Aggregate::~Aggregate() {
  // @@protoc_insertion_point(destructor:ukm.Aggregate)
  SharedDtor(*this);
}
inline void Aggregate::SharedDtor(MessageLite& self) {
  Aggregate& this_ = static_cast<Aggregate&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  this_._impl_.~Impl_();
}

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite Aggregate_class_data_ =
    Aggregate::InternalGenerateClassData_(Aggregate_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
Aggregate::GetClassData() const {
  return Aggregate_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
Aggregate::GetClassData() const {
  return Aggregate_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const Aggregate::ParseTableT_
    Aggregate::_table_ =
        Aggregate::InternalGenerateParseTable_(Aggregate_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void Aggregate::Clear() {
// @@protoc_insertion_point(message_clear_start:ukm.Aggregate)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    _impl_.metrics_.Clear();
  }
  if (BatchCheckHasBit(cached_has_bits, 0x000000feU)) {
    ::memset(&_impl_.source_id_, 0, static_cast<::size_t>(
        reinterpret_cast<char*>(&_impl_.dropped_due_to_unconfigured_) -
        reinterpret_cast<char*>(&_impl_.source_id_)) + sizeof(_impl_.dropped_due_to_unconfigured_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL Aggregate::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const Aggregate& this_ = static_cast<const Aggregate&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL Aggregate::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const Aggregate& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:ukm.Aggregate)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = this_._impl_._has_bits_[0];
  // int64 source_id = 1;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    target =
        ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<1>(
            stream, this_._internal_source_id(), target);
  }

  // fixed64 event_hash = 2;
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFixed64ToArray(
        2, this_._internal_event_hash(), target);
  }

  // uint64 total_count = 3;
  if (CheckHasBit(cached_has_bits, 0x00000008U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
        3, this_._internal_total_count(), target);
  }

  // uint64 dropped_due_to_limits = 4;
  if (CheckHasBit(cached_has_bits, 0x00000010U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
        4, this_._internal_dropped_due_to_limits(), target);
  }

  // uint64 dropped_due_to_sampling = 5;
  if (CheckHasBit(cached_has_bits, 0x00000020U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
        5, this_._internal_dropped_due_to_sampling(), target);
  }

  // repeated .ukm.Aggregate.Metric metrics = 6;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    for (unsigned i = 0, n = static_cast<unsigned>(
                             this_._internal_metrics_size());
         i < n; i++) {
      const auto& repfield = this_._internal_metrics().Get(i);
      target =
          ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
              6, repfield, repfield.GetCachedSize(),
              target, stream);
    }
  }

  // uint64 dropped_due_to_filter = 8;
  if (CheckHasBit(cached_has_bits, 0x00000040U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
        8, this_._internal_dropped_due_to_filter(), target);
  }

  // uint64 dropped_due_to_unconfigured = 9;
  if (CheckHasBit(cached_has_bits, 0x00000080U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
        9, this_._internal_dropped_due_to_unconfigured(), target);
  }

  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(
        this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
        static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:ukm.Aggregate)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t Aggregate::ByteSizeLong(const MessageLite& base) {
  const Aggregate& this_ = static_cast<const Aggregate&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t Aggregate::ByteSizeLong() const {
  const Aggregate& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:ukm.Aggregate)
  ::size_t total_size = 0;

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void)cached_has_bits;

  ::_pbi::Prefetch5LinesFrom7Lines(&this_);
  cached_has_bits = this_._impl_._has_bits_[0];
  total_size += static_cast<bool>(0x00000004U & cached_has_bits) * 9;
  if (BatchCheckHasBit(cached_has_bits, 0x000000fbU)) {
    // repeated .ukm.Aggregate.Metric metrics = 6;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1UL * this_._internal_metrics_size();
      for (const auto& msg : this_._internal_metrics()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
    // int64 source_id = 1;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
          this_._internal_source_id());
    }
    // uint64 total_count = 3;
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
          this_._internal_total_count());
    }
    // uint64 dropped_due_to_limits = 4;
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
          this_._internal_dropped_due_to_limits());
    }
    // uint64 dropped_due_to_sampling = 5;
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
          this_._internal_dropped_due_to_sampling());
    }
    // uint64 dropped_due_to_filter = 8;
    if (CheckHasBit(cached_has_bits, 0x00000040U)) {
      total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
          this_._internal_dropped_due_to_filter());
    }
    // uint64 dropped_due_to_unconfigured = 9;
    if (CheckHasBit(cached_has_bits, 0x00000080U)) {
      total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
          this_._internal_dropped_due_to_unconfigured());
    }
  }
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
  }
  this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
  return total_size;
}

void Aggregate::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<Aggregate*>(&to_msg);
  auto& from = static_cast<const Aggregate&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:ukm.Aggregate)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_internal_mutable_metrics()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_metrics());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_impl_.source_id_ = from._impl_.source_id_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _this->_impl_.event_hash_ = from._impl_.event_hash_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      _this->_impl_.total_count_ = from._impl_.total_count_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      _this->_impl_.dropped_due_to_limits_ = from._impl_.dropped_due_to_limits_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      _this->_impl_.dropped_due_to_sampling_ = from._impl_.dropped_due_to_sampling_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000040U)) {
      _this->_impl_.dropped_due_to_filter_ = from._impl_.dropped_due_to_filter_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000080U)) {
      _this->_impl_.dropped_due_to_unconfigured_ = from._impl_.dropped_due_to_unconfigured_;
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

void Aggregate::CopyFrom(const Aggregate& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:ukm.Aggregate)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}


void Aggregate::InternalSwap(Aggregate* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.metrics_.InternalSwap(&other->_impl_.metrics_);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Aggregate, _impl_.dropped_due_to_unconfigured_)
      + sizeof(Aggregate::_impl_.dropped_due_to_unconfigured_)
      - PROTOBUF_FIELD_OFFSET(Aggregate, _impl_.source_id_)>(
          reinterpret_cast<char*>(&_impl_.source_id_),
          reinterpret_cast<char*>(&other->_impl_.source_id_));
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace ukm
namespace google {
namespace protobuf {
}  // namespace protobuf
}  // namespace google
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"
