// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: components/commerce/core/proto/discounts.proto
// Protobuf C++ Version: 7.35.1

#include "components/commerce/core/proto/discounts.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 commerce {
class Discount_Description::_Internal {
 public:
  using HasBits = decltype(::std::declval<Discount_Description>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(Discount_Description, _impl_._has_bits_);
};

constexpr Discount_Description::ParseTableT_ Discount_Description::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(Discount_Description, _impl_._has_bits_),
      0, // no _extensions_
      4, 24,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967280,  // skipmap
      offsetof(ParseTableT_, field_entries),
      4,  // 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<::commerce::Discount_Description>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // optional string value_text = 4;
      {::_pbi::TcParser::FastBS1,
       {34, 3, 0,
        PROTOBUF_FIELD_OFFSET(Discount_Description, _impl_.value_text_)}},
      // optional string language_code = 1;
      {::_pbi::TcParser::FastBS1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(Discount_Description, _impl_.language_code_)}},
      // optional string detail = 2;
      {::_pbi::TcParser::FastBS1,
       {18, 1, 0,
        PROTOBUF_FIELD_OFFSET(Discount_Description, _impl_.detail_)}},
      // optional string terms_and_conditions = 3;
      {::_pbi::TcParser::FastBS1,
       {26, 2, 0,
        PROTOBUF_FIELD_OFFSET(Discount_Description, _impl_.terms_and_conditions_)}},
    }}, {{
      65535, 65535
    }}, {{
      // optional string language_code = 1;
      {PROTOBUF_FIELD_OFFSET(Discount_Description, _impl_.language_code_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
      // optional string detail = 2;
      {PROTOBUF_FIELD_OFFSET(Discount_Description, _impl_.detail_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
      // optional string terms_and_conditions = 3;
      {PROTOBUF_FIELD_OFFSET(Discount_Description, _impl_.terms_and_conditions_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
      // optional string value_text = 4;
      {PROTOBUF_FIELD_OFFSET(Discount_Description, _impl_.value_text_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
    }},
    // no aux_entries
    {{
    }},
  };
}


inline constexpr Discount_Description::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        language_code_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        detail_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        terms_and_conditions_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        value_text_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()) {}

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

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

constexpr Discount::ParseTableT_ Discount::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(Discount, _impl_._has_bits_),
      0, // no _extensions_
      7, 56,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967168,  // skipmap
      offsetof(ParseTableT_, field_entries),
      7,  // num_field_entries
      2,  // 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<::commerce::Discount>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
      // optional uint64 id = 1;
      {::_pbi::TcParser::FastV64S1,
       {8, 2, 0,
        PROTOBUF_FIELD_OFFSET(Discount, _impl_.id_)}},
      // optional .commerce.Discount.Type type = 2;
      {::_pbi::TcParser::FastEr0S1,
       {16, 3, 2,
        PROTOBUF_FIELD_OFFSET(Discount, _impl_.type_)}},
      // optional .commerce.Discount.Description description = 3;
      {::_pbi::TcParser::FastMtS1,
       {26, 1, 0,
        PROTOBUF_FIELD_OFFSET(Discount, _impl_.description_)}},
      // optional double expiry_time_sec = 4;
      {::_pbi::TcParser::FastF64S1,
       {33, 5, 0,
        PROTOBUF_FIELD_OFFSET(Discount, _impl_.expiry_time_sec_)}},
      // optional bool is_merchant_wide = 5;
      {::_pbi::TcParser::FastV8S1,
       {40, 4, 0,
        PROTOBUF_FIELD_OFFSET(Discount, _impl_.is_merchant_wide_)}},
      // optional string discount_code = 6;
      {::_pbi::TcParser::FastBS1,
       {50, 0, 0,
        PROTOBUF_FIELD_OFFSET(Discount, _impl_.discount_code_)}},
      // optional fixed64 offer_id = 7;
      {::_pbi::TcParser::FastF64S1,
       {57, 6, 0,
        PROTOBUF_FIELD_OFFSET(Discount, _impl_.offer_id_)}},
    }}, {{
      65535, 65535
    }}, {{
      // optional uint64 id = 1;
      {PROTOBUF_FIELD_OFFSET(Discount, _impl_.id_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)},
      // optional .commerce.Discount.Type type = 2;
      {PROTOBUF_FIELD_OFFSET(Discount, _impl_.type_), _Internal::kHasBitsOffset + 3, 1, (0 | ::_fl::kFcOptional | ::_fl::kEnumRange)},
      // optional .commerce.Discount.Description description = 3;
      {PROTOBUF_FIELD_OFFSET(Discount, _impl_.description_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // optional double expiry_time_sec = 4;
      {PROTOBUF_FIELD_OFFSET(Discount, _impl_.expiry_time_sec_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kDouble)},
      // optional bool is_merchant_wide = 5;
      {PROTOBUF_FIELD_OFFSET(Discount, _impl_.is_merchant_wide_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
      // optional string discount_code = 6;
      {PROTOBUF_FIELD_OFFSET(Discount, _impl_.discount_code_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
      // optional fixed64 offer_id = 7;
      {PROTOBUF_FIELD_OFFSET(Discount, _impl_.offer_id_), _Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcOptional | ::_fl::kFixed64)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::commerce::Discount_Description>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::commerce::Discount_Description_globals_},
        #endif
        {0, 2},
    }},
    {{
    }},
  };
}


inline constexpr Discount::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        discount_code_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        description_{nullptr},
        id_{::uint64_t{0u}},
        type_{static_cast< ::commerce::Discount_Type >(0)},
        is_merchant_wide_{false},
        expiry_time_sec_{0},
        offer_id_{::uint64_t{0u}} {}

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

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

constexpr DiscountCluster::ParseTableT_ DiscountCluster::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(DiscountCluster, _impl_._has_bits_),
      0, // no _extensions_
      2, 8,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967292,  // skipmap
      offsetof(ParseTableT_, field_entries),
      2,  // num_field_entries
      2,  // 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<::commerce::DiscountCluster>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // repeated .commerce.Discount discounts = 2;
      {::_pbi::TcParser::FastMtR1,
       {18, 0, 0,
        PROTOBUF_FIELD_OFFSET(DiscountCluster, _impl_.discounts_)}},
      // optional .commerce.DiscountCluster.ClusterType cluster_type = 1;
      {::_pbi::TcParser::FastEr0S1,
       {8, 1, 2,
        PROTOBUF_FIELD_OFFSET(DiscountCluster, _impl_.cluster_type_)}},
    }}, {{
      65535, 65535
    }}, {{
      // optional .commerce.DiscountCluster.ClusterType cluster_type = 1;
      {PROTOBUF_FIELD_OFFSET(DiscountCluster, _impl_.cluster_type_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcOptional | ::_fl::kEnumRange)},
      // repeated .commerce.Discount discounts = 2;
      {PROTOBUF_FIELD_OFFSET(DiscountCluster, _impl_.discounts_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::commerce::Discount>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::commerce::Discount_globals_},
        #endif
        {0, 2},
    }},
    {{
    }},
  };
}


inline constexpr DiscountCluster::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        discounts_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::commerce::DiscountCluster,
            PROTOBUF_FIELD_OFFSET(::commerce::DiscountCluster, _impl_.discounts_)>()
         }
        ,
        cluster_type_{static_cast< ::commerce::DiscountCluster_ClusterType >(0)} {}

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

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

constexpr DiscountsData::ParseTableT_ DiscountsData::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(DiscountsData, _impl_._has_bits_),
      0, // no _extensions_
      1, 0,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967294,  // skipmap
      offsetof(ParseTableT_, field_entries),
      1,  // 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<::commerce::DiscountsData>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // repeated .commerce.DiscountCluster discount_clusters = 1;
      {::_pbi::TcParser::FastMtR1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(DiscountsData, _impl_.discount_clusters_)}},
    }}, {{
      65535, 65535
    }}, {{
      // repeated .commerce.DiscountCluster discount_clusters = 1;
      {PROTOBUF_FIELD_OFFSET(DiscountsData, _impl_.discount_clusters_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::commerce::DiscountCluster>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::commerce::DiscountCluster_globals_},
        #endif
    }},
    {{
    }},
  };
}


inline constexpr DiscountsData::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        discount_clusters_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::commerce::DiscountsData,
            PROTOBUF_FIELD_OFFSET(::commerce::DiscountsData, _impl_.discount_clusters_)>()
         }
     {}

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST DiscountsDataGlobalsTypeInternal DiscountsData_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* DiscountsData_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return DiscountsData_globals_.GetClassData();
#else
  return DiscountsData_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
}  // namespace commerce
namespace commerce {
PROTOBUF_CONSTINIT const uint32_t DiscountCluster_ClusterType_internal_data_[] = {
    196608u, 0u, };
static const char DiscountCluster_ClusterType_names[] = {
    "OFFER_LEVEL"
    "PAGE_LEVEL"
    "TYPE_UNSPECIFIED"
};

static const ::google::protobuf::internal::EnumEntry DiscountCluster_ClusterType_entries[] = {
    {{&DiscountCluster_ClusterType_names[0], 11}, 1},
    {{&DiscountCluster_ClusterType_names[11], 10}, 2},
    {{&DiscountCluster_ClusterType_names[21], 16}, 0},
};

static const int DiscountCluster_ClusterType_entries_by_number[] = {
    2,  // 0 -> TYPE_UNSPECIFIED
    0,  // 1 -> OFFER_LEVEL
    1,  // 2 -> PAGE_LEVEL
};

bool DiscountCluster_ClusterType_Parse(::absl::string_view name,
                                  DiscountCluster_ClusterType* PROTOBUF_NONNULL value) {
  int int_value;
  bool success = ::google::protobuf::internal::LookUpEnumValue(
      DiscountCluster_ClusterType_entries, 3, name, &int_value);
  if (success) {
    *value = static_cast<DiscountCluster_ClusterType>(int_value);
  }
  return success;
}
static ::google::protobuf::internal::ExplicitlyConstructed<::std::string>
    DiscountCluster_ClusterType_strings[3] = {};

const ::std::string& DiscountCluster_ClusterType_Name(DiscountCluster_ClusterType value) {
  static const bool kDummy = ::google::protobuf::internal::InitializeEnumStrings(
      DiscountCluster_ClusterType_entries, DiscountCluster_ClusterType_entries_by_number, 3,
      DiscountCluster_ClusterType_strings);
  (void)kDummy;

  int idx = ::google::protobuf::internal::LookUpEnumName(DiscountCluster_ClusterType_entries,
                                  DiscountCluster_ClusterType_entries_by_number,
                                  3, value);
  return idx == -1 ? ::google::protobuf::internal::GetEmptyString() : DiscountCluster_ClusterType_strings[idx].get();
}
PROTOBUF_CONSTINIT const uint32_t Discount_Type_internal_data_[] = {
    196608u, 0u, };
static const char Discount_Type_names[] = {
    "CRAWLED_PROMOTION"
    "FREE_LISTING_WITH_CODE"
    "TYPE_UNSPECIFIED"
};

static const ::google::protobuf::internal::EnumEntry Discount_Type_entries[] = {
    {{&Discount_Type_names[0], 17}, 2},
    {{&Discount_Type_names[17], 22}, 1},
    {{&Discount_Type_names[39], 16}, 0},
};

static const int Discount_Type_entries_by_number[] = {
    2,  // 0 -> TYPE_UNSPECIFIED
    1,  // 1 -> FREE_LISTING_WITH_CODE
    0,  // 2 -> CRAWLED_PROMOTION
};

bool Discount_Type_Parse(::absl::string_view name,
                                  Discount_Type* PROTOBUF_NONNULL value) {
  int int_value;
  bool success = ::google::protobuf::internal::LookUpEnumValue(
      Discount_Type_entries, 3, name, &int_value);
  if (success) {
    *value = static_cast<Discount_Type>(int_value);
  }
  return success;
}
static ::google::protobuf::internal::ExplicitlyConstructed<::std::string>
    Discount_Type_strings[3] = {};

const ::std::string& Discount_Type_Name(Discount_Type value) {
  static const bool kDummy = ::google::protobuf::internal::InitializeEnumStrings(
      Discount_Type_entries, Discount_Type_entries_by_number, 3,
      Discount_Type_strings);
  (void)kDummy;

  int idx = ::google::protobuf::internal::LookUpEnumName(Discount_Type_entries,
                                  Discount_Type_entries_by_number,
                                  3, value);
  return idx == -1 ? ::google::protobuf::internal::GetEmptyString() : Discount_Type_strings[idx].get();
}
// ===================================================================

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

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

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  DiscountsData* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);

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

inline void DiscountsData::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
}
DiscountsData::~DiscountsData() {
  // @@protoc_insertion_point(destructor:commerce.DiscountsData)
  SharedDtor(*this);
}
inline void DiscountsData::SharedDtor(MessageLite& self) {
  DiscountsData& this_ = static_cast<DiscountsData&>(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 DiscountsData_class_data_ =
    DiscountsData::InternalGenerateClassData_(DiscountsData_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
DiscountsData::GetClassData() const {
  return DiscountsData_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
DiscountsData::GetClassData() const {
  return DiscountsData_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const DiscountsData::ParseTableT_
    DiscountsData::_table_ =
        DiscountsData::InternalGenerateParseTable_(DiscountsData_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void DiscountsData::Clear() {
// @@protoc_insertion_point(message_clear_start:commerce.DiscountsData)
  ::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_.discount_clusters_.Clear();
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

  cached_has_bits = this_._impl_._has_bits_[0];
  // repeated .commerce.DiscountCluster discount_clusters = 1;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    for (unsigned i = 0, n = static_cast<unsigned>(
                             this_._internal_discount_clusters_size());
         i < n; i++) {
      const auto& repfield = this_._internal_discount_clusters().Get(i);
      target =
          ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
              1, 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:commerce.DiscountsData)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t DiscountsData::ByteSizeLong(const MessageLite& base) {
  const DiscountsData& this_ = static_cast<const DiscountsData&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t DiscountsData::ByteSizeLong() const {
  const DiscountsData& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:commerce.DiscountsData)
  ::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_);
   {
    // repeated .commerce.DiscountCluster discount_clusters = 1;
    cached_has_bits = this_._impl_._has_bits_[0];
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1UL * this_._internal_discount_clusters_size();
      for (const auto& msg : this_._internal_discount_clusters()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
  }
  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 DiscountsData::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<DiscountsData*>(&to_msg);
  auto& from = static_cast<const DiscountsData&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:commerce.DiscountsData)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    _this->_internal_mutable_discount_clusters()->InternalMergeFromWithArena(
        ::google::protobuf::MessageLite::internal_visibility(), arena,
        from._internal_discount_clusters());
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void DiscountsData::InternalSwap(DiscountsData* 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_.discount_clusters_.InternalSwap(&other->_impl_.discount_clusters_);
}

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

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

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

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  DiscountCluster* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  _impl_.cluster_type_ = from._impl_.cluster_type_;

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

inline void DiscountCluster::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  _impl_.cluster_type_ = {};
}
DiscountCluster::~DiscountCluster() {
  // @@protoc_insertion_point(destructor:commerce.DiscountCluster)
  SharedDtor(*this);
}
inline void DiscountCluster::SharedDtor(MessageLite& self) {
  DiscountCluster& this_ = static_cast<DiscountCluster&>(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 DiscountCluster_class_data_ =
    DiscountCluster::InternalGenerateClassData_(DiscountCluster_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
DiscountCluster::GetClassData() const {
  return DiscountCluster_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
DiscountCluster::GetClassData() const {
  return DiscountCluster_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const DiscountCluster::ParseTableT_
    DiscountCluster::_table_ =
        DiscountCluster::InternalGenerateParseTable_(DiscountCluster_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void DiscountCluster::Clear() {
// @@protoc_insertion_point(message_clear_start:commerce.DiscountCluster)
  ::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_.discounts_.Clear();
  }
  _impl_.cluster_type_ = 0;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

  cached_has_bits = this_._impl_._has_bits_[0];
  // optional .commerce.DiscountCluster.ClusterType cluster_type = 1;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        1, this_._internal_cluster_type(), target);
  }

  // repeated .commerce.Discount discounts = 2;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    for (unsigned i = 0, n = static_cast<unsigned>(
                             this_._internal_discounts_size());
         i < n; i++) {
      const auto& repfield = this_._internal_discounts().Get(i);
      target =
          ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
              2, 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:commerce.DiscountCluster)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t DiscountCluster::ByteSizeLong(const MessageLite& base) {
  const DiscountCluster& this_ = static_cast<const DiscountCluster&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t DiscountCluster::ByteSizeLong() const {
  const DiscountCluster& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:commerce.DiscountCluster)
  ::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, 0x00000003U)) {
    // repeated .commerce.Discount discounts = 2;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1UL * this_._internal_discounts_size();
      for (const auto& msg : this_._internal_discounts()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
    // optional .commerce.DiscountCluster.ClusterType cluster_type = 1;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += 1 +
                    ::_pbi::WireFormatLite::EnumSize(this_._internal_cluster_type());
    }
  }
  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 DiscountCluster::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<DiscountCluster*>(&to_msg);
  auto& from = static_cast<const DiscountCluster&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:commerce.DiscountCluster)
  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, 0x00000003U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_internal_mutable_discounts()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_discounts());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_impl_.cluster_type_ = from._impl_.cluster_type_;
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void DiscountCluster::InternalSwap(DiscountCluster* 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_.discounts_.InternalSwap(&other->_impl_.discounts_);
  swap(_impl_.cluster_type_, other->_impl_.cluster_type_);
}

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

Discount_Description::Discount_Description(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, Discount_Description_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:commerce.Discount.Description)
}
PROTOBUF_NDEBUG_INLINE Discount_Description::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::commerce::Discount_Description& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        language_code_(arena, from.language_code_),
        detail_(arena, from.detail_),
        terms_and_conditions_(arena, from.terms_and_conditions_),
        value_text_(arena, from.value_text_) {}

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

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  Discount_Description* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);

  // @@protoc_insertion_point(copy_constructor:commerce.Discount.Description)
}
PROTOBUF_NDEBUG_INLINE Discount_Description::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        language_code_(arena),
        detail_(arena),
        terms_and_conditions_(arena),
        value_text_(arena) {}

inline void Discount_Description::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
}
Discount_Description::~Discount_Description() {
  // @@protoc_insertion_point(destructor:commerce.Discount.Description)
  SharedDtor(*this);
}
inline void Discount_Description::SharedDtor(MessageLite& self) {
  Discount_Description& this_ = static_cast<Discount_Description&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  this_._impl_.language_code_.Destroy();
  this_._impl_.detail_.Destroy();
  this_._impl_.terms_and_conditions_.Destroy();
  this_._impl_.value_text_.Destroy();
  this_._impl_.~Impl_();
}

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite Discount_Description_class_data_ =
    Discount_Description::InternalGenerateClassData_(Discount_Description_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
Discount_Description::GetClassData() const {
  return Discount_Description_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
Discount_Description::GetClassData() const {
  return Discount_Description_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const Discount_Description::ParseTableT_
    Discount_Description::_table_ =
        Discount_Description::InternalGenerateParseTable_(Discount_Description_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void Discount_Description::Clear() {
// @@protoc_insertion_point(message_clear_start:commerce.Discount.Description)
  ::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, 0x0000000fU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _impl_.language_code_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _impl_.detail_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _impl_.terms_and_conditions_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      _impl_.value_text_.ClearNonDefaultToEmpty();
    }
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

  cached_has_bits = this_._impl_._has_bits_[0];
  // optional string language_code = 1;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    const ::std::string& _s = this_._internal_language_code();
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // optional string detail = 2;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    const ::std::string& _s = this_._internal_detail();
    target = stream->WriteStringMaybeAliased(2, _s, target);
  }

  // optional string terms_and_conditions = 3;
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    const ::std::string& _s = this_._internal_terms_and_conditions();
    target = stream->WriteStringMaybeAliased(3, _s, target);
  }

  // optional string value_text = 4;
  if (CheckHasBit(cached_has_bits, 0x00000008U)) {
    const ::std::string& _s = this_._internal_value_text();
    target = stream->WriteStringMaybeAliased(4, _s, 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:commerce.Discount.Description)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t Discount_Description::ByteSizeLong(const MessageLite& base) {
  const Discount_Description& this_ = static_cast<const Discount_Description&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t Discount_Description::ByteSizeLong() const {
  const Discount_Description& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:commerce.Discount.Description)
  ::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, 0x0000000fU)) {
    // optional string language_code = 1;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_language_code());
    }
    // optional string detail = 2;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_detail());
    }
    // optional string terms_and_conditions = 3;
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_terms_and_conditions());
    }
    // optional string value_text = 4;
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_value_text());
    }
  }
  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 Discount_Description::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<Discount_Description*>(&to_msg);
  auto& from = static_cast<const Discount_Description&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(class_specific_merge_from_start:commerce.Discount.Description)
  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, 0x0000000fU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_internal_set_language_code(from._internal_language_code());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_internal_set_detail(from._internal_detail());
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _this->_internal_set_terms_and_conditions(from._internal_terms_and_conditions());
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      _this->_internal_set_value_text(from._internal_value_text());
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

void Discount_Description::CopyFrom(const Discount_Description& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:commerce.Discount.Description)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}


void Discount_Description::InternalSwap(Discount_Description* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  auto* arena = GetArena();
  ABSL_DCHECK_EQ(arena, other->GetArena());
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.language_code_, &other->_impl_.language_code_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.detail_, &other->_impl_.detail_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.terms_and_conditions_, &other->_impl_.terms_and_conditions_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.value_text_, &other->_impl_.value_text_, arena);
}

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

Discount::Discount(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, Discount_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:commerce.Discount)
}
PROTOBUF_NDEBUG_INLINE Discount::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::commerce::Discount& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        discount_code_(arena, from.discount_code_) {}

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

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  Discount* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  ::uint32_t cached_has_bits = _impl_._has_bits_[0];
  _impl_.description_ = (CheckHasBit(cached_has_bits, 0x00000002U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.description_)
                : nullptr;
  ::memcpy(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, id_),
           reinterpret_cast<const char*>(&from._impl_) +
               offsetof(Impl_, id_),
           offsetof(Impl_, offer_id_) -
               offsetof(Impl_, id_) +
               sizeof(Impl_::offer_id_));

  // @@protoc_insertion_point(copy_constructor:commerce.Discount)
}
PROTOBUF_NDEBUG_INLINE Discount::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        discount_code_(arena) {}

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

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite Discount_class_data_ =
    Discount::InternalGenerateClassData_(Discount_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
Discount::GetClassData() const {
  return Discount_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
Discount::GetClassData() const {
  return Discount_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const Discount::ParseTableT_
    Discount::_table_ =
        Discount::InternalGenerateParseTable_(Discount_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void Discount::Clear() {
// @@protoc_insertion_point(message_clear_start:commerce.Discount)
  ::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, 0x00000003U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _impl_.discount_code_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      ABSL_DCHECK(_impl_.description_ != nullptr);
      _impl_.description_->Clear();
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x0000007cU)) {
    ::memset(&_impl_.id_, 0, static_cast<::size_t>(
        reinterpret_cast<char*>(&_impl_.offer_id_) -
        reinterpret_cast<char*>(&_impl_.id_)) + sizeof(_impl_.offer_id_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

  cached_has_bits = this_._impl_._has_bits_[0];
  // optional uint64 id = 1;
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
        1, this_._internal_id(), target);
  }

  // optional .commerce.Discount.Type type = 2;
  if (CheckHasBit(cached_has_bits, 0x00000008U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        2, this_._internal_type(), target);
  }

  // optional .commerce.Discount.Description description = 3;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        3, *this_._impl_.description_, this_._impl_.description_->GetCachedSize(), target,
        stream);
  }

  // optional double expiry_time_sec = 4;
  if (CheckHasBit(cached_has_bits, 0x00000020U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteDoubleToArray(
        4, this_._internal_expiry_time_sec(), target);
  }

  // optional bool is_merchant_wide = 5;
  if (CheckHasBit(cached_has_bits, 0x00000010U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        5, this_._internal_is_merchant_wide(), target);
  }

  // optional string discount_code = 6;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    const ::std::string& _s = this_._internal_discount_code();
    target = stream->WriteStringMaybeAliased(6, _s, target);
  }

  // optional fixed64 offer_id = 7;
  if (CheckHasBit(cached_has_bits, 0x00000040U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFixed64ToArray(
        7, this_._internal_offer_id(), 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:commerce.Discount)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t Discount::ByteSizeLong(const MessageLite& base) {
  const Discount& this_ = static_cast<const Discount&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t Discount::ByteSizeLong() const {
  const Discount& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:commerce.Discount)
  ::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(0x00000060U & cached_has_bits) * 9;
  total_size += static_cast<bool>(0x00000010U & cached_has_bits) * 2;
  if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) {
    // optional string discount_code = 6;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_discount_code());
    }
    // optional .commerce.Discount.Description description = 3;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.description_);
    }
    // optional uint64 id = 1;
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
          this_._internal_id());
    }
    // optional .commerce.Discount.Type type = 2;
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      total_size += 1 +
                    ::_pbi::WireFormatLite::EnumSize(this_._internal_type());
    }
  }
  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 Discount::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<Discount*>(&to_msg);
  auto& from = static_cast<const Discount&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:commerce.Discount)
  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, 0x0000007fU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_internal_set_discount_code(from._internal_discount_code());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      ABSL_DCHECK(from._impl_.description_ != nullptr);
      if (_this->_impl_.description_ == nullptr) {
        _this->_impl_.description_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.description_);
      } else {
        _this->_impl_.description_->MergeFrom(*from._impl_.description_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _this->_impl_.id_ = from._impl_.id_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      _this->_impl_.type_ = from._impl_.type_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      _this->_impl_.is_merchant_wide_ = from._impl_.is_merchant_wide_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      _this->_impl_.expiry_time_sec_ = from._impl_.expiry_time_sec_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000040U)) {
      _this->_impl_.offer_id_ = from._impl_.offer_id_;
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void Discount::InternalSwap(Discount* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  auto* arena = GetArena();
  ABSL_DCHECK_EQ(arena, other->GetArena());
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.discount_code_, &other->_impl_.discount_code_, arena);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Discount, _impl_.offer_id_)
      + sizeof(Discount::_impl_.offer_id_)
      - PROTOBUF_FIELD_OFFSET(Discount, _impl_.description_)>(
          reinterpret_cast<char*>(&_impl_.description_),
          reinterpret_cast<char*>(&other->_impl_.description_));
}

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