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

#include "third_party/metrics_proto/histogram_event.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 metrics {
class HistogramEventProto_Bucket::_Internal {
 public:
  using HasBits = decltype(::std::declval<HistogramEventProto_Bucket>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(HistogramEventProto_Bucket, _impl_._has_bits_);
};

constexpr HistogramEventProto_Bucket::ParseTableT_ HistogramEventProto_Bucket::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(HistogramEventProto_Bucket, _impl_._has_bits_),
      0, // no _extensions_
      4, 24,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967284,  // skipmap
      offsetof(ParseTableT_, field_entries),
      3,  // 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<::metrics::HistogramEventProto_Bucket>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // int64 count = 4 [default = 1];
      {::_pbi::TcParser::FastV64S1,
       {32, 2, 0,
        PROTOBUF_FIELD_OFFSET(HistogramEventProto_Bucket, _impl_.count_)}},
      // int64 min = 1;
      {::_pbi::TcParser::FastV64S1,
       {8, 0, 0,
        PROTOBUF_FIELD_OFFSET(HistogramEventProto_Bucket, _impl_.min_)}},
      // int64 max = 2;
      {::_pbi::TcParser::FastV64S1,
       {16, 1, 0,
        PROTOBUF_FIELD_OFFSET(HistogramEventProto_Bucket, _impl_.max_)}},
      {::_pbi::TcParser::MiniParse, {}},
    }}, {{
      65535, 65535
    }}, {{
      // int64 min = 1;
      {PROTOBUF_FIELD_OFFSET(HistogramEventProto_Bucket, _impl_.min_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
      // int64 max = 2;
      {PROTOBUF_FIELD_OFFSET(HistogramEventProto_Bucket, _impl_.max_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
      // int64 count = 4 [default = 1];
      {PROTOBUF_FIELD_OFFSET(HistogramEventProto_Bucket, _impl_.count_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
    }},
    // no aux_entries
    {{
    }},
  };
}


inline constexpr HistogramEventProto_Bucket::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        min_{::int64_t{0}},
        max_{::int64_t{0}},
        count_{::int64_t{1}} {}

template <typename>
constexpr HistogramEventProto_Bucket::HistogramEventProto_Bucket(::_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 HistogramEventProto_Bucket::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) HistogramEventProto_Bucket(arena);
}
constexpr auto HistogramEventProto_Bucket::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(HistogramEventProto_Bucket), alignof(HistogramEventProto_Bucket));
}
constexpr auto HistogramEventProto_Bucket::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
          &HistogramEventProto_Bucket::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<HistogramEventProto_Bucket>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &HistogramEventProto_Bucket::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<HistogramEventProto_Bucket>(), &HistogramEventProto_Bucket::ByteSizeLong,
              &HistogramEventProto_Bucket::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(HistogramEventProto_Bucket, _impl_._cached_size_),
          true,
      },
      "metrics.HistogramEventProto.Bucket",
  };
}
struct HistogramEventProto_BucketGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr HistogramEventProto_BucketGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 HistogramEventProto_Bucket_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(HistogramEventProto_Bucket::InternalGenerateClassData_(
            _default, &HistogramEventProto_Bucket_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<HistogramEventProto_Bucket>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~HistogramEventProto_BucketGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) HistogramEventProto_Bucket _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<HistogramEventProto_Bucket>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(HistogramEventProto_BucketGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

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

constexpr HistogramEventProto::ParseTableT_ HistogramEventProto::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(HistogramEventProto, _impl_._has_bits_),
      0, // no _extensions_
      3, 24,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967288,  // skipmap
      offsetof(ParseTableT_, field_entries),
      3,  // 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<::metrics::HistogramEventProto>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
      // fixed64 name_hash = 1;
      {::_pbi::TcParser::FastF64S1,
       {9, 1, 0,
        PROTOBUF_FIELD_OFFSET(HistogramEventProto, _impl_.name_hash_)}},
      // int64 sum = 2;
      {::_pbi::TcParser::FastV64S1,
       {16, 2, 0,
        PROTOBUF_FIELD_OFFSET(HistogramEventProto, _impl_.sum_)}},
      // repeated .metrics.HistogramEventProto.Bucket bucket = 3;
      {::_pbi::TcParser::FastMtR1,
       {26, 0, 0,
        PROTOBUF_FIELD_OFFSET(HistogramEventProto, _impl_.bucket_)}},
    }}, {{
      65535, 65535
    }}, {{
      // fixed64 name_hash = 1;
      {PROTOBUF_FIELD_OFFSET(HistogramEventProto, _impl_.name_hash_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kFixed64)},
      // int64 sum = 2;
      {PROTOBUF_FIELD_OFFSET(HistogramEventProto, _impl_.sum_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
      // repeated .metrics.HistogramEventProto.Bucket bucket = 3;
      {PROTOBUF_FIELD_OFFSET(HistogramEventProto, _impl_.bucket_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::metrics::HistogramEventProto_Bucket>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::metrics::HistogramEventProto_Bucket_globals_},
        #endif
    }},
    {{
    }},
  };
}


inline constexpr HistogramEventProto::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        bucket_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::metrics::HistogramEventProto,
            PROTOBUF_FIELD_OFFSET(::metrics::HistogramEventProto, _impl_.bucket_)>()
         }
        ,
        name_hash_{::uint64_t{0u}},
        sum_{::int64_t{0}} {}

template <typename>
constexpr HistogramEventProto::HistogramEventProto(::_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 HistogramEventProto::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) HistogramEventProto(arena);
}
constexpr auto HistogramEventProto::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(HistogramEventProto), alignof(HistogramEventProto));
}
constexpr auto HistogramEventProto::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
          &HistogramEventProto::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<HistogramEventProto>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &HistogramEventProto::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<HistogramEventProto>(), &HistogramEventProto::ByteSizeLong,
              &HistogramEventProto::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(HistogramEventProto, _impl_._cached_size_),
          true,
      },
      "metrics.HistogramEventProto",
  };
}
struct HistogramEventProtoGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr HistogramEventProtoGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 HistogramEventProto_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(HistogramEventProto::InternalGenerateClassData_(
            _default, &HistogramEventProto_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<HistogramEventProto>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~HistogramEventProtoGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) HistogramEventProto _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<HistogramEventProto>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(HistogramEventProtoGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST HistogramEventProtoGlobalsTypeInternal HistogramEventProto_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* HistogramEventProto_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return HistogramEventProto_globals_.GetClassData();
#else
  return HistogramEventProto_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
}  // namespace metrics
namespace metrics {
// ===================================================================

HistogramEventProto_Bucket::HistogramEventProto_Bucket(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, HistogramEventProto_Bucket_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:metrics.HistogramEventProto.Bucket)
}
HistogramEventProto_Bucket::HistogramEventProto_Bucket(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const HistogramEventProto_Bucket& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, HistogramEventProto_Bucket_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 HistogramEventProto_Bucket::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        count_{::int64_t{1}} {}

inline void HistogramEventProto_Bucket::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  ::memset(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, min_),
           0,
           offsetof(Impl_, max_) -
               offsetof(Impl_, min_) +
               sizeof(Impl_::max_));
}
HistogramEventProto_Bucket::~HistogramEventProto_Bucket() {
  // @@protoc_insertion_point(destructor:metrics.HistogramEventProto.Bucket)
  SharedDtor(*this);
}
inline void HistogramEventProto_Bucket::SharedDtor(MessageLite& self) {
  HistogramEventProto_Bucket& this_ = static_cast<HistogramEventProto_Bucket&>(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 HistogramEventProto_Bucket_class_data_ =
    HistogramEventProto_Bucket::InternalGenerateClassData_(HistogramEventProto_Bucket_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
HistogramEventProto_Bucket::GetClassData() const {
  return HistogramEventProto_Bucket_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
HistogramEventProto_Bucket::GetClassData() const {
  return HistogramEventProto_Bucket_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const HistogramEventProto_Bucket::ParseTableT_
    HistogramEventProto_Bucket::_table_ =
        HistogramEventProto_Bucket::InternalGenerateParseTable_(HistogramEventProto_Bucket_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void HistogramEventProto_Bucket::Clear() {
// @@protoc_insertion_point(message_clear_start:metrics.HistogramEventProto.Bucket)
  ::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, 0x00000007U)) {
    ::memset(&_impl_.min_, 0, static_cast<::size_t>(
        reinterpret_cast<char*>(&_impl_.max_) -
        reinterpret_cast<char*>(&_impl_.min_)) + sizeof(_impl_.max_));
    _impl_.count_ = ::int64_t{1};
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

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

  // int64 max = 2;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    target =
        ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<2>(
            stream, this_._internal_max(), target);
  }

  // int64 count = 4 [default = 1];
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    target =
        ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<4>(
            stream, this_._internal_count(), 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:metrics.HistogramEventProto.Bucket)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t HistogramEventProto_Bucket::ByteSizeLong(const MessageLite& base) {
  const HistogramEventProto_Bucket& this_ = static_cast<const HistogramEventProto_Bucket&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t HistogramEventProto_Bucket::ByteSizeLong() const {
  const HistogramEventProto_Bucket& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:metrics.HistogramEventProto.Bucket)
  ::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];
  if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) {
    // int64 min = 1;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
          this_._internal_min());
    }
    // int64 max = 2;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
          this_._internal_max());
    }
    // int64 count = 4 [default = 1];
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
          this_._internal_count());
    }
  }
  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 HistogramEventProto_Bucket::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<HistogramEventProto_Bucket*>(&to_msg);
  auto& from = static_cast<const HistogramEventProto_Bucket&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(class_specific_merge_from_start:metrics.HistogramEventProto.Bucket)
  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, 0x00000007U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_impl_.min_ = from._impl_.min_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_impl_.max_ = from._impl_.max_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _this->_impl_.count_ = from._impl_.count_;
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

void HistogramEventProto_Bucket::CopyFrom(const HistogramEventProto_Bucket& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:metrics.HistogramEventProto.Bucket)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}


void HistogramEventProto_Bucket::InternalSwap(HistogramEventProto_Bucket* 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(HistogramEventProto_Bucket, _impl_.count_)
      + sizeof(HistogramEventProto_Bucket::_impl_.count_)
      - PROTOBUF_FIELD_OFFSET(HistogramEventProto_Bucket, _impl_.min_)>(
          reinterpret_cast<char*>(&_impl_.min_),
          reinterpret_cast<char*>(&other->_impl_.min_));
}

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

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

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

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  HistogramEventProto* 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_, name_hash_),
           reinterpret_cast<const char*>(&from._impl_) +
               offsetof(Impl_, name_hash_),
           offsetof(Impl_, sum_) -
               offsetof(Impl_, name_hash_) +
               sizeof(Impl_::sum_));

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

inline void HistogramEventProto::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  ::memset(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, name_hash_),
           0,
           offsetof(Impl_, sum_) -
               offsetof(Impl_, name_hash_) +
               sizeof(Impl_::sum_));
}
HistogramEventProto::~HistogramEventProto() {
  // @@protoc_insertion_point(destructor:metrics.HistogramEventProto)
  SharedDtor(*this);
}
inline void HistogramEventProto::SharedDtor(MessageLite& self) {
  HistogramEventProto& this_ = static_cast<HistogramEventProto&>(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 HistogramEventProto_class_data_ =
    HistogramEventProto::InternalGenerateClassData_(HistogramEventProto_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
HistogramEventProto::GetClassData() const {
  return HistogramEventProto_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
HistogramEventProto::GetClassData() const {
  return HistogramEventProto_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const HistogramEventProto::ParseTableT_
    HistogramEventProto::_table_ =
        HistogramEventProto::InternalGenerateParseTable_(HistogramEventProto_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void HistogramEventProto::Clear() {
// @@protoc_insertion_point(message_clear_start:metrics.HistogramEventProto)
  ::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_.bucket_.Clear();
  }
  if (BatchCheckHasBit(cached_has_bits, 0x00000006U)) {
    ::memset(&_impl_.name_hash_, 0, static_cast<::size_t>(
        reinterpret_cast<char*>(&_impl_.sum_) -
        reinterpret_cast<char*>(&_impl_.name_hash_)) + sizeof(_impl_.sum_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

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

  // int64 sum = 2;
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    target =
        ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<2>(
            stream, this_._internal_sum(), target);
  }

  // repeated .metrics.HistogramEventProto.Bucket bucket = 3;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    for (unsigned i = 0, n = static_cast<unsigned>(
                             this_._internal_bucket_size());
         i < n; i++) {
      const auto& repfield = this_._internal_bucket().Get(i);
      target =
          ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
              3, repfield, repfield.GetCachedSize(),
              target, stream);
    }
  }

  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:metrics.HistogramEventProto)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t HistogramEventProto::ByteSizeLong(const MessageLite& base) {
  const HistogramEventProto& this_ = static_cast<const HistogramEventProto&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t HistogramEventProto::ByteSizeLong() const {
  const HistogramEventProto& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:metrics.HistogramEventProto)
  ::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>(0x00000002U & cached_has_bits) * 9;
  if (BatchCheckHasBit(cached_has_bits, 0x00000005U)) {
    // repeated .metrics.HistogramEventProto.Bucket bucket = 3;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1UL * this_._internal_bucket_size();
      for (const auto& msg : this_._internal_bucket()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
    // int64 sum = 2;
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
          this_._internal_sum());
    }
  }
  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 HistogramEventProto::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<HistogramEventProto*>(&to_msg);
  auto& from = static_cast<const HistogramEventProto&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:metrics.HistogramEventProto)
  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, 0x00000007U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_internal_mutable_bucket()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_bucket());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_impl_.name_hash_ = from._impl_.name_hash_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _this->_impl_.sum_ = from._impl_.sum_;
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void HistogramEventProto::InternalSwap(HistogramEventProto* 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_.bucket_.InternalSwap(&other->_impl_.bucket_);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(HistogramEventProto, _impl_.sum_)
      + sizeof(HistogramEventProto::_impl_.sum_)
      - PROTOBUF_FIELD_OFFSET(HistogramEventProto, _impl_.name_hash_)>(
          reinterpret_cast<char*>(&_impl_.name_hash_),
          reinterpret_cast<char*>(&other->_impl_.name_hash_));
}

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