// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: keyapis/subscription/v1/keyapis_subscription_plan_v1.proto

#include "keyapis/subscription/v1/keyapis_subscription_plan_v1.pb.h"

#include <algorithm>
#include "google/protobuf/io/coded_stream.h"
#include "google/protobuf/extension_set.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 = ::PROTOBUF_NAMESPACE_ID;
namespace _pbi = ::PROTOBUF_NAMESPACE_ID::internal;
namespace keyapis {
namespace subscription {
namespace v1 {
template <typename>
PROTOBUF_CONSTEXPR Plan_OptionDescription::Plan_OptionDescription(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.title_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_.summary_)*/nullptr
  , /*decltype(_impl_.icon_type_)*/ 0
} {}
struct Plan_OptionDescriptionDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Plan_OptionDescriptionDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Plan_OptionDescriptionDefaultTypeInternal() {}
  union {
    Plan_OptionDescription _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Plan_OptionDescriptionDefaultTypeInternal _Plan_OptionDescription_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Plan::Plan(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.parent_ids_)*/ {}
  ,/* _impl_._parent_ids_cached_byte_size_ = */ { 0 }

  , /*decltype(_impl_.rf_ids_)*/ {}
  ,/* _impl_._rf_ids_cached_byte_size_ = */ { 0 }

  , /*decltype(_impl_.option_descriptions_)*/{}
  , /*decltype(_impl_.privilege_types_)*/ {}
  , /*decltype(_impl_._privilege_types_cached_byte_size_)*/ { 0 }

  , /*decltype(_impl_.title_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_.description_)*/nullptr
  , /*decltype(_impl_.created_at_)*/nullptr
  , /*decltype(_impl_.changed_at_)*/nullptr
  , /*decltype(_impl_.summary_)*/nullptr
  , /*decltype(_impl_.id_)*/ 0

  , /*decltype(_impl_.icon_type_)*/ 0
} {}
struct PlanDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PlanDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PlanDefaultTypeInternal() {}
  union {
    Plan _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PlanDefaultTypeInternal _Plan_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PlanFilter_ValidationError_TextInvalid::PlanFilter_ValidationError_TextInvalid(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct PlanFilter_ValidationError_TextInvalidDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PlanFilter_ValidationError_TextInvalidDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PlanFilter_ValidationError_TextInvalidDefaultTypeInternal() {}
  union {
    PlanFilter_ValidationError_TextInvalid _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PlanFilter_ValidationError_TextInvalidDefaultTypeInternal _PlanFilter_ValidationError_TextInvalid_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PlanFilter_ValidationError::PlanFilter_ValidationError(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PlanFilter_ValidationErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PlanFilter_ValidationErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PlanFilter_ValidationErrorDefaultTypeInternal() {}
  union {
    PlanFilter_ValidationError _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PlanFilter_ValidationErrorDefaultTypeInternal _PlanFilter_ValidationError_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PlanFilter::PlanFilter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.rf_ids_)*/ {}
  ,/* _impl_._rf_ids_cached_byte_size_ = */ { 0 }

  , /*decltype(_impl_.text_)*/nullptr} {}
struct PlanFilterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PlanFilterDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PlanFilterDefaultTypeInternal() {}
  union {
    PlanFilter _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PlanFilterDefaultTypeInternal _PlanFilter_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PlanPaging_ValidationError_LimitInvalid::PlanPaging_ValidationError_LimitInvalid(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct PlanPaging_ValidationError_LimitInvalidDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PlanPaging_ValidationError_LimitInvalidDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PlanPaging_ValidationError_LimitInvalidDefaultTypeInternal() {}
  union {
    PlanPaging_ValidationError_LimitInvalid _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PlanPaging_ValidationError_LimitInvalidDefaultTypeInternal _PlanPaging_ValidationError_LimitInvalid_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PlanPaging_ValidationError_OffsetInvalid::PlanPaging_ValidationError_OffsetInvalid(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct PlanPaging_ValidationError_OffsetInvalidDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PlanPaging_ValidationError_OffsetInvalidDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PlanPaging_ValidationError_OffsetInvalidDefaultTypeInternal() {}
  union {
    PlanPaging_ValidationError_OffsetInvalid _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PlanPaging_ValidationError_OffsetInvalidDefaultTypeInternal _PlanPaging_ValidationError_OffsetInvalid_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PlanPaging_ValidationError::PlanPaging_ValidationError(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PlanPaging_ValidationErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PlanPaging_ValidationErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PlanPaging_ValidationErrorDefaultTypeInternal() {}
  union {
    PlanPaging_ValidationError _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PlanPaging_ValidationErrorDefaultTypeInternal _PlanPaging_ValidationError_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PlanPaging::PlanPaging(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.order_by_type_)*/ 0

  , /*decltype(_impl_.direction_type_)*/ 0

  , /*decltype(_impl_.limit_)*/ 0

  , /*decltype(_impl_.offset_)*/ 0

  , /*decltype(_impl_._cached_size_)*/{}} {}
struct PlanPagingDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PlanPagingDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PlanPagingDefaultTypeInternal() {}
  union {
    PlanPaging _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PlanPagingDefaultTypeInternal _PlanPaging_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetPlanRequest::GetPlanRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.id_)*/ 0

  , /*decltype(_impl_._cached_size_)*/{}} {}
struct GetPlanRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetPlanRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetPlanRequestDefaultTypeInternal() {}
  union {
    GetPlanRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetPlanRequestDefaultTypeInternal _GetPlanRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetPlanResponse::GetPlanResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetPlanResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetPlanResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetPlanResponseDefaultTypeInternal() {}
  union {
    GetPlanResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetPlanResponseDefaultTypeInternal _GetPlanResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetPlanListRequest::GetPlanListRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.filter_)*/nullptr
  , /*decltype(_impl_.pagination_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetPlanListRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetPlanListRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetPlanListRequestDefaultTypeInternal() {}
  union {
    GetPlanListRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetPlanListRequestDefaultTypeInternal _GetPlanListRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetPlanListResponse_Error::GetPlanListResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetPlanListResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetPlanListResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetPlanListResponse_ErrorDefaultTypeInternal() {}
  union {
    GetPlanListResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetPlanListResponse_ErrorDefaultTypeInternal _GetPlanListResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetPlanListResponse::GetPlanListResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetPlanListResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetPlanListResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetPlanListResponseDefaultTypeInternal() {}
  union {
    GetPlanListResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetPlanListResponseDefaultTypeInternal _GetPlanListResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetPlanCountRequest::GetPlanCountRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.filter_)*/nullptr} {}
struct GetPlanCountRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetPlanCountRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetPlanCountRequestDefaultTypeInternal() {}
  union {
    GetPlanCountRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetPlanCountRequestDefaultTypeInternal _GetPlanCountRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetPlanCountResponse_Error::GetPlanCountResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetPlanCountResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetPlanCountResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetPlanCountResponse_ErrorDefaultTypeInternal() {}
  union {
    GetPlanCountResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetPlanCountResponse_ErrorDefaultTypeInternal _GetPlanCountResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetPlanCountResponse::GetPlanCountResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetPlanCountResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetPlanCountResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetPlanCountResponseDefaultTypeInternal() {}
  union {
    GetPlanCountResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetPlanCountResponseDefaultTypeInternal _GetPlanCountResponse_default_instance_;
}  // namespace v1
}  // namespace subscription
}  // namespace keyapis
namespace keyapis {
namespace subscription {
namespace v1 {
bool Plan_IconType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
      return true;
    default:
      return false;
  }
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string>
    Plan_IconType_strings[4] = {};

static const char Plan_IconType_names[] = {
    "FACE_REC"
    "FAST"
    "ICON_TYPE_UNKNOWN"
    "SAFE"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Plan_IconType_entries[] =
    {
        {{&Plan_IconType_names[0], 8}, 2},
        {{&Plan_IconType_names[8], 4}, 1},
        {{&Plan_IconType_names[12], 17}, 0},
        {{&Plan_IconType_names[29], 4}, 3},
};

static const int Plan_IconType_entries_by_number[] = {
    2,  // 0 -> ICON_TYPE_UNKNOWN
    1,  // 1 -> FAST
    0,  // 2 -> FACE_REC
    3,  // 3 -> SAFE
};

const std::string& Plan_IconType_Name(Plan_IconType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          Plan_IconType_entries, Plan_IconType_entries_by_number,
          4, Plan_IconType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      Plan_IconType_entries, Plan_IconType_entries_by_number, 4,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : Plan_IconType_strings[idx].get();
}

bool Plan_IconType_Parse(absl::string_view name, Plan_IconType* value) {
  int int_value;
  bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
      Plan_IconType_entries, 4, name, &int_value);
  if (success) {
    *value = static_cast<Plan_IconType>(int_value);
  }
  return success;
}
#if (__cplusplus < 201703) && \
  (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))

constexpr Plan_IconType Plan::ICON_TYPE_UNKNOWN;
constexpr Plan_IconType Plan::FAST;
constexpr Plan_IconType Plan::FACE_REC;
constexpr Plan_IconType Plan::SAFE;
constexpr Plan_IconType Plan::IconType_MIN;
constexpr Plan_IconType Plan::IconType_MAX;
constexpr int Plan::IconType_ARRAYSIZE;

#endif  // (__cplusplus < 201703) &&
        // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
bool PlanPaging_OrderByType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string>
    PlanPaging_OrderByType_strings[2] = {};

static const char PlanPaging_OrderByType_names[] = {
    "ID"
    "ORDER_BY_TYPE_UNKNOWN"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry PlanPaging_OrderByType_entries[] =
    {
        {{&PlanPaging_OrderByType_names[0], 2}, 1},
        {{&PlanPaging_OrderByType_names[2], 21}, 0},
};

static const int PlanPaging_OrderByType_entries_by_number[] = {
    1,  // 0 -> ORDER_BY_TYPE_UNKNOWN
    0,  // 1 -> ID
};

const std::string& PlanPaging_OrderByType_Name(PlanPaging_OrderByType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          PlanPaging_OrderByType_entries, PlanPaging_OrderByType_entries_by_number,
          2, PlanPaging_OrderByType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      PlanPaging_OrderByType_entries, PlanPaging_OrderByType_entries_by_number, 2,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : PlanPaging_OrderByType_strings[idx].get();
}

bool PlanPaging_OrderByType_Parse(absl::string_view name, PlanPaging_OrderByType* value) {
  int int_value;
  bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
      PlanPaging_OrderByType_entries, 2, name, &int_value);
  if (success) {
    *value = static_cast<PlanPaging_OrderByType>(int_value);
  }
  return success;
}
#if (__cplusplus < 201703) && \
  (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))

constexpr PlanPaging_OrderByType PlanPaging::ORDER_BY_TYPE_UNKNOWN;
constexpr PlanPaging_OrderByType PlanPaging::ID;
constexpr PlanPaging_OrderByType PlanPaging::OrderByType_MIN;
constexpr PlanPaging_OrderByType PlanPaging::OrderByType_MAX;
constexpr int PlanPaging::OrderByType_ARRAYSIZE;

#endif  // (__cplusplus < 201703) &&
        // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
bool PlanPaging_DirectionType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string>
    PlanPaging_DirectionType_strings[3] = {};

static const char PlanPaging_DirectionType_names[] = {
    "ASC"
    "DESC"
    "DIRECTION_TYPE_UNKNOWN"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry PlanPaging_DirectionType_entries[] =
    {
        {{&PlanPaging_DirectionType_names[0], 3}, 2},
        {{&PlanPaging_DirectionType_names[3], 4}, 1},
        {{&PlanPaging_DirectionType_names[7], 22}, 0},
};

static const int PlanPaging_DirectionType_entries_by_number[] = {
    2,  // 0 -> DIRECTION_TYPE_UNKNOWN
    1,  // 1 -> DESC
    0,  // 2 -> ASC
};

const std::string& PlanPaging_DirectionType_Name(PlanPaging_DirectionType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          PlanPaging_DirectionType_entries, PlanPaging_DirectionType_entries_by_number,
          3, PlanPaging_DirectionType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      PlanPaging_DirectionType_entries, PlanPaging_DirectionType_entries_by_number, 3,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : PlanPaging_DirectionType_strings[idx].get();
}

bool PlanPaging_DirectionType_Parse(absl::string_view name, PlanPaging_DirectionType* value) {
  int int_value;
  bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
      PlanPaging_DirectionType_entries, 3, name, &int_value);
  if (success) {
    *value = static_cast<PlanPaging_DirectionType>(int_value);
  }
  return success;
}
#if (__cplusplus < 201703) && \
  (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))

constexpr PlanPaging_DirectionType PlanPaging::DIRECTION_TYPE_UNKNOWN;
constexpr PlanPaging_DirectionType PlanPaging::DESC;
constexpr PlanPaging_DirectionType PlanPaging::ASC;
constexpr PlanPaging_DirectionType PlanPaging::DirectionType_MIN;
constexpr PlanPaging_DirectionType PlanPaging::DirectionType_MAX;
constexpr int PlanPaging::DirectionType_ARRAYSIZE;

#endif  // (__cplusplus < 201703) &&
        // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
// ===================================================================

class Plan_OptionDescription::_Internal {
 public:
  using HasBits = decltype(std::declval<Plan_OptionDescription>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(Plan_OptionDescription, _impl_._has_bits_);
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& summary(const Plan_OptionDescription* msg);
  static void set_has_summary(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

const ::PROTOBUF_NAMESPACE_ID::StringValue&
Plan_OptionDescription::_Internal::summary(const Plan_OptionDescription* msg) {
  return *msg->_impl_.summary_;
}
void Plan_OptionDescription::clear_summary() {
  if (_impl_.summary_ != nullptr) _impl_.summary_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
Plan_OptionDescription::Plan_OptionDescription(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.subscription.v1.Plan.OptionDescription)
}
Plan_OptionDescription::Plan_OptionDescription(const Plan_OptionDescription& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Plan_OptionDescription* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.title_) {}

    , decltype(_impl_.summary_){nullptr}
    , decltype(_impl_.icon_type_) {}
  };

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.title_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.title_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_title().empty()) {
    _this->_impl_.title_.Set(from._internal_title(), _this->GetArenaForAllocation());
  }
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.summary_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.summary_);
  }
  _this->_impl_.icon_type_ = from._impl_.icon_type_;
  // @@protoc_insertion_point(copy_constructor:keyapis.subscription.v1.Plan.OptionDescription)
}

inline void Plan_OptionDescription::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.title_) {}

    , decltype(_impl_.summary_){nullptr}
    , decltype(_impl_.icon_type_) { 0 }

  };
  _impl_.title_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.title_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

Plan_OptionDescription::~Plan_OptionDescription() {
  // @@protoc_insertion_point(destructor:keyapis.subscription.v1.Plan.OptionDescription)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Plan_OptionDescription::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.title_.Destroy();
  if (this != internal_default_instance()) delete _impl_.summary_;
}

void Plan_OptionDescription::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void Plan_OptionDescription::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.subscription.v1.Plan.OptionDescription)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.title_.ClearToEmpty();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    ABSL_DCHECK(_impl_.summary_ != nullptr);
    _impl_.summary_->Clear();
  }
  _impl_.icon_type_ = 0;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* Plan_OptionDescription::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.subscription.v1.Plan.IconType icon_type = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_icon_type(static_cast<::keyapis::subscription::v1::Plan_IconType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // string title = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_title();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue summary = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_summary(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* Plan_OptionDescription::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.subscription.v1.Plan.OptionDescription)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.subscription.v1.Plan.IconType icon_type = 1;
  if (this->_internal_icon_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        1, this->_internal_icon_type(), target);
  }

  // string title = 2 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_title().empty()) {
    const std::string& _s = this->_internal_title();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.subscription.v1.Plan.OptionDescription.title");
    target = stream->WriteStringMaybeAliased(2, _s, target);
  }

  cached_has_bits = _impl_._has_bits_[0];
  // .google.protobuf.StringValue summary = 3;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(3, _Internal::summary(this),
        _Internal::summary(this).GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.subscription.v1.Plan.OptionDescription)
  return target;
}

::size_t Plan_OptionDescription::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.subscription.v1.Plan.OptionDescription)
  ::size_t total_size = 0;

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

  // string title = 2 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_title().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_title());
  }

  // .google.protobuf.StringValue summary = 3;
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.summary_);
  }

  // .keyapis.subscription.v1.Plan.IconType icon_type = 1;
  if (this->_internal_icon_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_icon_type());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void Plan_OptionDescription::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Plan_OptionDescription*>(
      &from));
}

void Plan_OptionDescription::MergeFrom(const Plan_OptionDescription& from) {
  Plan_OptionDescription* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.subscription.v1.Plan.OptionDescription)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_title().empty()) {
    _this->_internal_set_title(from._internal_title());
  }
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_internal_mutable_summary()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
        from._internal_summary());
  }
  if (from._internal_icon_type() != 0) {
    _this->_internal_set_icon_type(from._internal_icon_type());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void Plan_OptionDescription::CopyFrom(const Plan_OptionDescription& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.subscription.v1.Plan.OptionDescription)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Plan_OptionDescription::IsInitialized() const {
  return true;
}

void Plan_OptionDescription::InternalSwap(Plan_OptionDescription* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.title_, lhs_arena,
                                       &other->_impl_.title_, rhs_arena);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Plan_OptionDescription, _impl_.icon_type_)
      + sizeof(Plan_OptionDescription::_impl_.icon_type_)
      - PROTOBUF_FIELD_OFFSET(Plan_OptionDescription, _impl_.summary_)>(
          reinterpret_cast<char*>(&_impl_.summary_),
          reinterpret_cast<char*>(&other->_impl_.summary_));
}

std::string Plan_OptionDescription::GetTypeName() const {
  return "keyapis.subscription.v1.Plan.OptionDescription";
}

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

class Plan::_Internal {
 public:
  using HasBits = decltype(std::declval<Plan>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(Plan, _impl_._has_bits_);
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& description(const Plan* msg);
  static void set_has_description(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& created_at(const Plan* msg);
  static void set_has_created_at(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& changed_at(const Plan* msg);
  static void set_has_changed_at(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& summary(const Plan* msg);
  static void set_has_summary(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
};

const ::PROTOBUF_NAMESPACE_ID::StringValue&
Plan::_Internal::description(const Plan* msg) {
  return *msg->_impl_.description_;
}
const ::PROTOBUF_NAMESPACE_ID::Timestamp&
Plan::_Internal::created_at(const Plan* msg) {
  return *msg->_impl_.created_at_;
}
const ::PROTOBUF_NAMESPACE_ID::Timestamp&
Plan::_Internal::changed_at(const Plan* msg) {
  return *msg->_impl_.changed_at_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Plan::_Internal::summary(const Plan* msg) {
  return *msg->_impl_.summary_;
}
void Plan::clear_description() {
  if (_impl_.description_ != nullptr) _impl_.description_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
void Plan::clear_created_at() {
  if (_impl_.created_at_ != nullptr) _impl_.created_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
void Plan::clear_changed_at() {
  if (_impl_.changed_at_ != nullptr) _impl_.changed_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000004u;
}
void Plan::clear_summary() {
  if (_impl_.summary_ != nullptr) _impl_.summary_->Clear();
  _impl_._has_bits_[0] &= ~0x00000008u;
}
Plan::Plan(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.subscription.v1.Plan)
}
Plan::Plan(const Plan& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Plan* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.parent_ids_) { from._impl_.parent_ids_ }
    ,/* _impl_._parent_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.rf_ids_) { from._impl_.rf_ids_ }
    ,/* _impl_._rf_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.option_descriptions_){from._impl_.option_descriptions_}
    , decltype(_impl_.privilege_types_) { from._internal_privilege_types() }
    , /*decltype(_impl_._privilege_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.title_) {}

    , decltype(_impl_.description_){nullptr}
    , decltype(_impl_.created_at_){nullptr}
    , decltype(_impl_.changed_at_){nullptr}
    , decltype(_impl_.summary_){nullptr}
    , decltype(_impl_.id_) {}

    , decltype(_impl_.icon_type_) {}
  };

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.title_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.title_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_title().empty()) {
    _this->_impl_.title_.Set(from._internal_title(), _this->GetArenaForAllocation());
  }
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.description_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.description_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000002u) != 0) {
    _this->_impl_.created_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.created_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000004u) != 0) {
    _this->_impl_.changed_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.changed_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000008u) != 0) {
    _this->_impl_.summary_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.summary_);
  }
  ::memcpy(&_impl_.id_, &from._impl_.id_,
    static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.icon_type_) -
    reinterpret_cast<char*>(&_impl_.id_)) + sizeof(_impl_.icon_type_));
  // @@protoc_insertion_point(copy_constructor:keyapis.subscription.v1.Plan)
}

inline void Plan::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.parent_ids_) { arena }
    ,/* _impl_._parent_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.rf_ids_) { arena }
    ,/* _impl_._rf_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.option_descriptions_){arena}
    , decltype(_impl_.privilege_types_) { arena }
    , /*decltype(_impl_._privilege_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.title_) {}

    , decltype(_impl_.description_){nullptr}
    , decltype(_impl_.created_at_){nullptr}
    , decltype(_impl_.changed_at_){nullptr}
    , decltype(_impl_.summary_){nullptr}
    , decltype(_impl_.id_) { 0 }

    , decltype(_impl_.icon_type_) { 0 }

  };
  _impl_.title_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.title_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

Plan::~Plan() {
  // @@protoc_insertion_point(destructor:keyapis.subscription.v1.Plan)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Plan::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.parent_ids_.~RepeatedField();
  _impl_.rf_ids_.~RepeatedField();
  _internal_mutable_option_descriptions()->~RepeatedPtrField();
  _internal_mutable_privilege_types()->~RepeatedField();
  _impl_.title_.Destroy();
  if (this != internal_default_instance()) delete _impl_.description_;
  if (this != internal_default_instance()) delete _impl_.created_at_;
  if (this != internal_default_instance()) delete _impl_.changed_at_;
  if (this != internal_default_instance()) delete _impl_.summary_;
}

void Plan::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void Plan::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.subscription.v1.Plan)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _internal_mutable_parent_ids()->Clear();
  _internal_mutable_rf_ids()->Clear();
  _internal_mutable_option_descriptions()->Clear();
  _internal_mutable_privilege_types()->Clear();
  _impl_.title_.ClearToEmpty();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      ABSL_DCHECK(_impl_.description_ != nullptr);
      _impl_.description_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(_impl_.created_at_ != nullptr);
      _impl_.created_at_->Clear();
    }
    if (cached_has_bits & 0x00000004u) {
      ABSL_DCHECK(_impl_.changed_at_ != nullptr);
      _impl_.changed_at_->Clear();
    }
    if (cached_has_bits & 0x00000008u) {
      ABSL_DCHECK(_impl_.summary_ != nullptr);
      _impl_.summary_->Clear();
    }
  }
  ::memset(&_impl_.id_, 0, static_cast<::size_t>(
      reinterpret_cast<char*>(&_impl_.icon_type_) -
      reinterpret_cast<char*>(&_impl_.id_)) + sizeof(_impl_.icon_type_));
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* Plan::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // int32 id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // string title = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_title();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue description = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_description(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp created_at = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_created_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp changed_at = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_changed_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated int32 parent_ids = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_parent_ids(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 48) {
          _internal_add_parent_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated int32 rf_ids = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_rf_ids(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 56) {
          _internal_add_rf_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue summary = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
          ptr = ctx->ParseMessage(_internal_mutable_summary(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.subscription.v1.Plan.IconType icon_type = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_icon_type(static_cast<::keyapis::subscription::v1::Plan_IconType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated .keyapis.subscription.v1.Plan.OptionDescription option_descriptions = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 82)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_option_descriptions(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<82>(ptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated .keyapis.subscription.v1.Privilege.Type privilege_types = 11;
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 90)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_privilege_types(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 88) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_add_privilege_types(static_cast<::keyapis::subscription::v1::Privilege_Type>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* Plan::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.subscription.v1.Plan)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (this->_internal_id() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        1, this->_internal_id(), target);
  }

  // string title = 2 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_title().empty()) {
    const std::string& _s = this->_internal_title();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.subscription.v1.Plan.title");
    target = stream->WriteStringMaybeAliased(2, _s, target);
  }

  cached_has_bits = _impl_._has_bits_[0];
  // .google.protobuf.StringValue description = 3;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(3, _Internal::description(this),
        _Internal::description(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.Timestamp created_at = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(4, _Internal::created_at(this),
        _Internal::created_at(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.Timestamp changed_at = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (cached_has_bits & 0x00000004u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(5, _Internal::changed_at(this),
        _Internal::changed_at(this).GetCachedSize(), target, stream);
  }

  // repeated int32 parent_ids = 6;
  {
    int byte_size = _impl_._parent_ids_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(6, _internal_parent_ids(),
                                                 byte_size, target);
    }
  }

  // repeated int32 rf_ids = 7;
  {
    int byte_size = _impl_._rf_ids_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(7, _internal_rf_ids(),
                                                 byte_size, target);
    }
  }

  // .google.protobuf.StringValue summary = 8;
  if (cached_has_bits & 0x00000008u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(8, _Internal::summary(this),
        _Internal::summary(this).GetCachedSize(), target, stream);
  }

  // .keyapis.subscription.v1.Plan.IconType icon_type = 9;
  if (this->_internal_icon_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        9, this->_internal_icon_type(), target);
  }

  // repeated .keyapis.subscription.v1.Plan.OptionDescription option_descriptions = 10;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_option_descriptions_size()); i < n; i++) {
    const auto& repfield = this->_internal_option_descriptions(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(10, repfield, repfield.GetCachedSize(), target, stream);
  }

  // repeated .keyapis.subscription.v1.Privilege.Type privilege_types = 11;
  {
    int byte_size = _impl_._privilege_types_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteEnumPacked(11, _internal_privilege_types(),
                                       byte_size, target);
    }
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.subscription.v1.Plan)
  return target;
}

::size_t Plan::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.subscription.v1.Plan)
  ::size_t total_size = 0;

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

  // repeated int32 parent_ids = 6;
  {
    std::size_t data_size = ::_pbi::WireFormatLite::Int32Size(
        this->_internal_parent_ids())
    ;
    _impl_._parent_ids_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
    std::size_t tag_size = data_size == 0
        ? 0
        : 1 + ::_pbi::WireFormatLite::Int32Size(
                            static_cast<int32_t>(data_size))
    ;
    total_size += tag_size + data_size;
  }

  // repeated int32 rf_ids = 7;
  {
    std::size_t data_size = ::_pbi::WireFormatLite::Int32Size(
        this->_internal_rf_ids())
    ;
    _impl_._rf_ids_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
    std::size_t tag_size = data_size == 0
        ? 0
        : 1 + ::_pbi::WireFormatLite::Int32Size(
                            static_cast<int32_t>(data_size))
    ;
    total_size += tag_size + data_size;
  }

  // repeated .keyapis.subscription.v1.Plan.OptionDescription option_descriptions = 10;
  total_size += 1UL * this->_internal_option_descriptions_size();
  for (const auto& msg : this->_internal_option_descriptions()) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .keyapis.subscription.v1.Privilege.Type privilege_types = 11;
  {
    std::size_t data_size = 0;
    auto count = static_cast<std::size_t>(this->_internal_privilege_types_size());

    for (std::size_t i = 0; i < count; ++i) {
      data_size += ::_pbi::WireFormatLite::EnumSize(
          this->_internal_privilege_types(static_cast<int>(i)));
    }
    total_size += data_size;
    if (data_size > 0) {
      total_size += 1;
      total_size += ::_pbi::WireFormatLite::Int32Size(
          static_cast<int32_t>(data_size));
    }
    _impl_._privilege_types_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
  }

  // string title = 2 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_title().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_title());
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    // .google.protobuf.StringValue description = 3;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.description_);
    }

    // .google.protobuf.Timestamp created_at = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.created_at_);
    }

    // .google.protobuf.Timestamp changed_at = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.changed_at_);
    }

    // .google.protobuf.StringValue summary = 8;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.summary_);
    }

  }
  // int32 id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (this->_internal_id() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_id());
  }

  // .keyapis.subscription.v1.Plan.IconType icon_type = 9;
  if (this->_internal_icon_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_icon_type());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void Plan::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Plan*>(
      &from));
}

void Plan::MergeFrom(const Plan& from) {
  Plan* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.subscription.v1.Plan)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.parent_ids_.MergeFrom(from._impl_.parent_ids_);
  _this->_impl_.rf_ids_.MergeFrom(from._impl_.rf_ids_);
  _this->_internal_mutable_option_descriptions()->MergeFrom(from._internal_option_descriptions());
  _this->_internal_mutable_privilege_types()->MergeFrom(from._internal_privilege_types());
  if (!from._internal_title().empty()) {
    _this->_internal_set_title(from._internal_title());
  }
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_description()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_description());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_created_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_created_at());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_mutable_changed_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_changed_at());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_internal_mutable_summary()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_summary());
    }
  }
  if (from._internal_id() != 0) {
    _this->_internal_set_id(from._internal_id());
  }
  if (from._internal_icon_type() != 0) {
    _this->_internal_set_icon_type(from._internal_icon_type());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void Plan::CopyFrom(const Plan& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.subscription.v1.Plan)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Plan::IsInitialized() const {
  return true;
}

void Plan::InternalSwap(Plan* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.parent_ids_.InternalSwap(&other->_impl_.parent_ids_);
  _impl_.rf_ids_.InternalSwap(&other->_impl_.rf_ids_);
  _internal_mutable_option_descriptions()->InternalSwap(other->_internal_mutable_option_descriptions());
  _internal_mutable_privilege_types()->InternalSwap(
      other->_internal_mutable_privilege_types());
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.title_, lhs_arena,
                                       &other->_impl_.title_, rhs_arena);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Plan, _impl_.icon_type_)
      + sizeof(Plan::_impl_.icon_type_)
      - PROTOBUF_FIELD_OFFSET(Plan, _impl_.description_)>(
          reinterpret_cast<char*>(&_impl_.description_),
          reinterpret_cast<char*>(&other->_impl_.description_));
}

std::string Plan::GetTypeName() const {
  return "keyapis.subscription.v1.Plan";
}

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

class PlanFilter_ValidationError_TextInvalid::_Internal {
 public:
};

PlanFilter_ValidationError_TextInvalid::PlanFilter_ValidationError_TextInvalid(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.subscription.v1.PlanFilter.ValidationError.TextInvalid)
}
PlanFilter_ValidationError_TextInvalid::PlanFilter_ValidationError_TextInvalid(const PlanFilter_ValidationError_TextInvalid& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.subscription.v1.PlanFilter.ValidationError.TextInvalid)
}

inline void PlanFilter_ValidationError_TextInvalid::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      /*decltype(_impl_._cached_size_)*/{}
  };
}

PlanFilter_ValidationError_TextInvalid::~PlanFilter_ValidationError_TextInvalid() {
  // @@protoc_insertion_point(destructor:keyapis.subscription.v1.PlanFilter.ValidationError.TextInvalid)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PlanFilter_ValidationError_TextInvalid::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

void PlanFilter_ValidationError_TextInvalid::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PlanFilter_ValidationError_TextInvalid::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.subscription.v1.PlanFilter.ValidationError.TextInvalid)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _internal_metadata_.Clear<std::string>();
}

const char* PlanFilter_ValidationError_TextInvalid::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* PlanFilter_ValidationError_TextInvalid::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.subscription.v1.PlanFilter.ValidationError.TextInvalid)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.subscription.v1.PlanFilter.ValidationError.TextInvalid)
  return target;
}

::size_t PlanFilter_ValidationError_TextInvalid::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.subscription.v1.PlanFilter.ValidationError.TextInvalid)
  ::size_t total_size = 0;

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

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void PlanFilter_ValidationError_TextInvalid::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PlanFilter_ValidationError_TextInvalid*>(
      &from));
}

void PlanFilter_ValidationError_TextInvalid::MergeFrom(const PlanFilter_ValidationError_TextInvalid& from) {
  PlanFilter_ValidationError_TextInvalid* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.subscription.v1.PlanFilter.ValidationError.TextInvalid)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void PlanFilter_ValidationError_TextInvalid::CopyFrom(const PlanFilter_ValidationError_TextInvalid& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.subscription.v1.PlanFilter.ValidationError.TextInvalid)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PlanFilter_ValidationError_TextInvalid::IsInitialized() const {
  return true;
}

void PlanFilter_ValidationError_TextInvalid::InternalSwap(PlanFilter_ValidationError_TextInvalid* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
}

std::string PlanFilter_ValidationError_TextInvalid::GetTypeName() const {
  return "keyapis.subscription.v1.PlanFilter.ValidationError.TextInvalid";
}

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

class PlanFilter_ValidationError::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::subscription::v1::PlanFilter_ValidationError, _impl_._oneof_case_);
  static const ::keyapis::subscription::v1::PlanFilter_ValidationError_TextInvalid& text(const PlanFilter_ValidationError* msg);
};

const ::keyapis::subscription::v1::PlanFilter_ValidationError_TextInvalid&
PlanFilter_ValidationError::_Internal::text(const PlanFilter_ValidationError* msg) {
  return *msg->_impl_.reason_.text_;
}
void PlanFilter_ValidationError::set_allocated_text(::keyapis::subscription::v1::PlanFilter_ValidationError_TextInvalid* text) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (text) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(text);
    if (message_arena != submessage_arena) {
      text = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, text, submessage_arena);
    }
    set_has_text();
    _impl_.reason_.text_ = text;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.subscription.v1.PlanFilter.ValidationError.text)
}
PlanFilter_ValidationError::PlanFilter_ValidationError(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.subscription.v1.PlanFilter.ValidationError)
}
PlanFilter_ValidationError::PlanFilter_ValidationError(const PlanFilter_ValidationError& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PlanFilter_ValidationError* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_reason();
  switch (from.reason_case()) {
    case kText: {
      _this->_internal_mutable_text()->::keyapis::subscription::v1::PlanFilter_ValidationError_TextInvalid::MergeFrom(
          from._internal_text());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.subscription.v1.PlanFilter.ValidationError)
}

inline void PlanFilter_ValidationError::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_reason();
}

PlanFilter_ValidationError::~PlanFilter_ValidationError() {
  // @@protoc_insertion_point(destructor:keyapis.subscription.v1.PlanFilter.ValidationError)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PlanFilter_ValidationError::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_reason()) {
    clear_reason();
  }
}

void PlanFilter_ValidationError::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PlanFilter_ValidationError::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.subscription.v1.PlanFilter.ValidationError)
  switch (reason_case()) {
    case kText: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.text_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


void PlanFilter_ValidationError::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.subscription.v1.PlanFilter.ValidationError)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  clear_reason();
  _internal_metadata_.Clear<std::string>();
}

const char* PlanFilter_ValidationError::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.subscription.v1.PlanFilter.ValidationError.TextInvalid text = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_text(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* PlanFilter_ValidationError::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.subscription.v1.PlanFilter.ValidationError)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.subscription.v1.PlanFilter.ValidationError.TextInvalid text = 1;
  if (reason_case() == kText) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::text(this),
        _Internal::text(this).GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.subscription.v1.PlanFilter.ValidationError)
  return target;
}

::size_t PlanFilter_ValidationError::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.subscription.v1.PlanFilter.ValidationError)
  ::size_t total_size = 0;

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

  switch (reason_case()) {
    // .keyapis.subscription.v1.PlanFilter.ValidationError.TextInvalid text = 1;
    case kText: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.text_);
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void PlanFilter_ValidationError::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PlanFilter_ValidationError*>(
      &from));
}

void PlanFilter_ValidationError::MergeFrom(const PlanFilter_ValidationError& from) {
  PlanFilter_ValidationError* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.subscription.v1.PlanFilter.ValidationError)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.reason_case()) {
    case kText: {
      _this->_internal_mutable_text()->::keyapis::subscription::v1::PlanFilter_ValidationError_TextInvalid::MergeFrom(
          from._internal_text());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void PlanFilter_ValidationError::CopyFrom(const PlanFilter_ValidationError& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.subscription.v1.PlanFilter.ValidationError)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PlanFilter_ValidationError::IsInitialized() const {
  return true;
}

void PlanFilter_ValidationError::InternalSwap(PlanFilter_ValidationError* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_.reason_, other->_impl_.reason_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

std::string PlanFilter_ValidationError::GetTypeName() const {
  return "keyapis.subscription.v1.PlanFilter.ValidationError";
}

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

class PlanFilter::_Internal {
 public:
  using HasBits = decltype(std::declval<PlanFilter>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(PlanFilter, _impl_._has_bits_);
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& text(const PlanFilter* msg);
  static void set_has_text(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

const ::PROTOBUF_NAMESPACE_ID::StringValue&
PlanFilter::_Internal::text(const PlanFilter* msg) {
  return *msg->_impl_.text_;
}
void PlanFilter::clear_text() {
  if (_impl_.text_ != nullptr) _impl_.text_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
PlanFilter::PlanFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.subscription.v1.PlanFilter)
}
PlanFilter::PlanFilter(const PlanFilter& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PlanFilter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.rf_ids_) { from._impl_.rf_ids_ }
    ,/* _impl_._rf_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.text_){nullptr}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.text_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.text_);
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.subscription.v1.PlanFilter)
}

inline void PlanFilter::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.rf_ids_) { arena }
    ,/* _impl_._rf_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.text_){nullptr}
  };
}

PlanFilter::~PlanFilter() {
  // @@protoc_insertion_point(destructor:keyapis.subscription.v1.PlanFilter)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PlanFilter::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.rf_ids_.~RepeatedField();
  if (this != internal_default_instance()) delete _impl_.text_;
}

void PlanFilter::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PlanFilter::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.subscription.v1.PlanFilter)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _internal_mutable_rf_ids()->Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    ABSL_DCHECK(_impl_.text_ != nullptr);
    _impl_.text_->Clear();
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* PlanFilter::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .google.protobuf.StringValue text = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_text(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated int32 rf_ids = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_rf_ids(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 16) {
          _internal_add_rf_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* PlanFilter::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.subscription.v1.PlanFilter)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // .google.protobuf.StringValue text = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::text(this),
        _Internal::text(this).GetCachedSize(), target, stream);
  }

  // repeated int32 rf_ids = 2;
  {
    int byte_size = _impl_._rf_ids_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(2, _internal_rf_ids(),
                                                 byte_size, target);
    }
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.subscription.v1.PlanFilter)
  return target;
}

::size_t PlanFilter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.subscription.v1.PlanFilter)
  ::size_t total_size = 0;

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

  // repeated int32 rf_ids = 2;
  {
    std::size_t data_size = ::_pbi::WireFormatLite::Int32Size(
        this->_internal_rf_ids())
    ;
    _impl_._rf_ids_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
    std::size_t tag_size = data_size == 0
        ? 0
        : 1 + ::_pbi::WireFormatLite::Int32Size(
                            static_cast<int32_t>(data_size))
    ;
    total_size += tag_size + data_size;
  }

  // .google.protobuf.StringValue text = 1;
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.text_);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void PlanFilter::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PlanFilter*>(
      &from));
}

void PlanFilter::MergeFrom(const PlanFilter& from) {
  PlanFilter* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.subscription.v1.PlanFilter)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.rf_ids_.MergeFrom(from._impl_.rf_ids_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_internal_mutable_text()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
        from._internal_text());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void PlanFilter::CopyFrom(const PlanFilter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.subscription.v1.PlanFilter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PlanFilter::IsInitialized() const {
  return true;
}

void PlanFilter::InternalSwap(PlanFilter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.rf_ids_.InternalSwap(&other->_impl_.rf_ids_);
  swap(_impl_.text_, other->_impl_.text_);
}

std::string PlanFilter::GetTypeName() const {
  return "keyapis.subscription.v1.PlanFilter";
}

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

class PlanPaging_ValidationError_LimitInvalid::_Internal {
 public:
};

PlanPaging_ValidationError_LimitInvalid::PlanPaging_ValidationError_LimitInvalid(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.subscription.v1.PlanPaging.ValidationError.LimitInvalid)
}
PlanPaging_ValidationError_LimitInvalid::PlanPaging_ValidationError_LimitInvalid(const PlanPaging_ValidationError_LimitInvalid& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.subscription.v1.PlanPaging.ValidationError.LimitInvalid)
}

inline void PlanPaging_ValidationError_LimitInvalid::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      /*decltype(_impl_._cached_size_)*/{}
  };
}

PlanPaging_ValidationError_LimitInvalid::~PlanPaging_ValidationError_LimitInvalid() {
  // @@protoc_insertion_point(destructor:keyapis.subscription.v1.PlanPaging.ValidationError.LimitInvalid)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PlanPaging_ValidationError_LimitInvalid::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

void PlanPaging_ValidationError_LimitInvalid::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PlanPaging_ValidationError_LimitInvalid::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.subscription.v1.PlanPaging.ValidationError.LimitInvalid)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _internal_metadata_.Clear<std::string>();
}

const char* PlanPaging_ValidationError_LimitInvalid::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* PlanPaging_ValidationError_LimitInvalid::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.subscription.v1.PlanPaging.ValidationError.LimitInvalid)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.subscription.v1.PlanPaging.ValidationError.LimitInvalid)
  return target;
}

::size_t PlanPaging_ValidationError_LimitInvalid::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.subscription.v1.PlanPaging.ValidationError.LimitInvalid)
  ::size_t total_size = 0;

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

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void PlanPaging_ValidationError_LimitInvalid::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PlanPaging_ValidationError_LimitInvalid*>(
      &from));
}

void PlanPaging_ValidationError_LimitInvalid::MergeFrom(const PlanPaging_ValidationError_LimitInvalid& from) {
  PlanPaging_ValidationError_LimitInvalid* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.subscription.v1.PlanPaging.ValidationError.LimitInvalid)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void PlanPaging_ValidationError_LimitInvalid::CopyFrom(const PlanPaging_ValidationError_LimitInvalid& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.subscription.v1.PlanPaging.ValidationError.LimitInvalid)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PlanPaging_ValidationError_LimitInvalid::IsInitialized() const {
  return true;
}

void PlanPaging_ValidationError_LimitInvalid::InternalSwap(PlanPaging_ValidationError_LimitInvalid* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
}

std::string PlanPaging_ValidationError_LimitInvalid::GetTypeName() const {
  return "keyapis.subscription.v1.PlanPaging.ValidationError.LimitInvalid";
}

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

class PlanPaging_ValidationError_OffsetInvalid::_Internal {
 public:
};

PlanPaging_ValidationError_OffsetInvalid::PlanPaging_ValidationError_OffsetInvalid(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.subscription.v1.PlanPaging.ValidationError.OffsetInvalid)
}
PlanPaging_ValidationError_OffsetInvalid::PlanPaging_ValidationError_OffsetInvalid(const PlanPaging_ValidationError_OffsetInvalid& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.subscription.v1.PlanPaging.ValidationError.OffsetInvalid)
}

inline void PlanPaging_ValidationError_OffsetInvalid::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      /*decltype(_impl_._cached_size_)*/{}
  };
}

PlanPaging_ValidationError_OffsetInvalid::~PlanPaging_ValidationError_OffsetInvalid() {
  // @@protoc_insertion_point(destructor:keyapis.subscription.v1.PlanPaging.ValidationError.OffsetInvalid)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PlanPaging_ValidationError_OffsetInvalid::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

void PlanPaging_ValidationError_OffsetInvalid::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PlanPaging_ValidationError_OffsetInvalid::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.subscription.v1.PlanPaging.ValidationError.OffsetInvalid)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _internal_metadata_.Clear<std::string>();
}

const char* PlanPaging_ValidationError_OffsetInvalid::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* PlanPaging_ValidationError_OffsetInvalid::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.subscription.v1.PlanPaging.ValidationError.OffsetInvalid)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.subscription.v1.PlanPaging.ValidationError.OffsetInvalid)
  return target;
}

::size_t PlanPaging_ValidationError_OffsetInvalid::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.subscription.v1.PlanPaging.ValidationError.OffsetInvalid)
  ::size_t total_size = 0;

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

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void PlanPaging_ValidationError_OffsetInvalid::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PlanPaging_ValidationError_OffsetInvalid*>(
      &from));
}

void PlanPaging_ValidationError_OffsetInvalid::MergeFrom(const PlanPaging_ValidationError_OffsetInvalid& from) {
  PlanPaging_ValidationError_OffsetInvalid* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.subscription.v1.PlanPaging.ValidationError.OffsetInvalid)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void PlanPaging_ValidationError_OffsetInvalid::CopyFrom(const PlanPaging_ValidationError_OffsetInvalid& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.subscription.v1.PlanPaging.ValidationError.OffsetInvalid)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PlanPaging_ValidationError_OffsetInvalid::IsInitialized() const {
  return true;
}

void PlanPaging_ValidationError_OffsetInvalid::InternalSwap(PlanPaging_ValidationError_OffsetInvalid* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
}

std::string PlanPaging_ValidationError_OffsetInvalid::GetTypeName() const {
  return "keyapis.subscription.v1.PlanPaging.ValidationError.OffsetInvalid";
}

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

class PlanPaging_ValidationError::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::subscription::v1::PlanPaging_ValidationError, _impl_._oneof_case_);
  static const ::keyapis::subscription::v1::PlanPaging_ValidationError_LimitInvalid& limit(const PlanPaging_ValidationError* msg);
  static const ::keyapis::subscription::v1::PlanPaging_ValidationError_OffsetInvalid& offset(const PlanPaging_ValidationError* msg);
};

const ::keyapis::subscription::v1::PlanPaging_ValidationError_LimitInvalid&
PlanPaging_ValidationError::_Internal::limit(const PlanPaging_ValidationError* msg) {
  return *msg->_impl_.reason_.limit_;
}
const ::keyapis::subscription::v1::PlanPaging_ValidationError_OffsetInvalid&
PlanPaging_ValidationError::_Internal::offset(const PlanPaging_ValidationError* msg) {
  return *msg->_impl_.reason_.offset_;
}
void PlanPaging_ValidationError::set_allocated_limit(::keyapis::subscription::v1::PlanPaging_ValidationError_LimitInvalid* limit) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (limit) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(limit);
    if (message_arena != submessage_arena) {
      limit = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, limit, submessage_arena);
    }
    set_has_limit();
    _impl_.reason_.limit_ = limit;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.subscription.v1.PlanPaging.ValidationError.limit)
}
void PlanPaging_ValidationError::set_allocated_offset(::keyapis::subscription::v1::PlanPaging_ValidationError_OffsetInvalid* offset) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (offset) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(offset);
    if (message_arena != submessage_arena) {
      offset = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, offset, submessage_arena);
    }
    set_has_offset();
    _impl_.reason_.offset_ = offset;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.subscription.v1.PlanPaging.ValidationError.offset)
}
PlanPaging_ValidationError::PlanPaging_ValidationError(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.subscription.v1.PlanPaging.ValidationError)
}
PlanPaging_ValidationError::PlanPaging_ValidationError(const PlanPaging_ValidationError& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PlanPaging_ValidationError* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_reason();
  switch (from.reason_case()) {
    case kLimit: {
      _this->_internal_mutable_limit()->::keyapis::subscription::v1::PlanPaging_ValidationError_LimitInvalid::MergeFrom(
          from._internal_limit());
      break;
    }
    case kOffset: {
      _this->_internal_mutable_offset()->::keyapis::subscription::v1::PlanPaging_ValidationError_OffsetInvalid::MergeFrom(
          from._internal_offset());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.subscription.v1.PlanPaging.ValidationError)
}

inline void PlanPaging_ValidationError::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_reason();
}

PlanPaging_ValidationError::~PlanPaging_ValidationError() {
  // @@protoc_insertion_point(destructor:keyapis.subscription.v1.PlanPaging.ValidationError)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PlanPaging_ValidationError::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_reason()) {
    clear_reason();
  }
}

void PlanPaging_ValidationError::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PlanPaging_ValidationError::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.subscription.v1.PlanPaging.ValidationError)
  switch (reason_case()) {
    case kLimit: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.limit_;
      }
      break;
    }
    case kOffset: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.offset_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


void PlanPaging_ValidationError::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.subscription.v1.PlanPaging.ValidationError)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  clear_reason();
  _internal_metadata_.Clear<std::string>();
}

const char* PlanPaging_ValidationError::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.subscription.v1.PlanPaging.ValidationError.LimitInvalid limit = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_limit(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.subscription.v1.PlanPaging.ValidationError.OffsetInvalid offset = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_offset(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* PlanPaging_ValidationError::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.subscription.v1.PlanPaging.ValidationError)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (reason_case()) {
    case kLimit: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, _Internal::limit(this),
          _Internal::limit(this).GetCachedSize(), target, stream);
      break;
    }
    case kOffset: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::offset(this),
          _Internal::offset(this).GetCachedSize(), target, stream);
      break;
    }
    default: ;
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.subscription.v1.PlanPaging.ValidationError)
  return target;
}

::size_t PlanPaging_ValidationError::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.subscription.v1.PlanPaging.ValidationError)
  ::size_t total_size = 0;

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

  switch (reason_case()) {
    // .keyapis.subscription.v1.PlanPaging.ValidationError.LimitInvalid limit = 1;
    case kLimit: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.limit_);
      break;
    }
    // .keyapis.subscription.v1.PlanPaging.ValidationError.OffsetInvalid offset = 2;
    case kOffset: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.offset_);
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void PlanPaging_ValidationError::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PlanPaging_ValidationError*>(
      &from));
}

void PlanPaging_ValidationError::MergeFrom(const PlanPaging_ValidationError& from) {
  PlanPaging_ValidationError* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.subscription.v1.PlanPaging.ValidationError)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.reason_case()) {
    case kLimit: {
      _this->_internal_mutable_limit()->::keyapis::subscription::v1::PlanPaging_ValidationError_LimitInvalid::MergeFrom(
          from._internal_limit());
      break;
    }
    case kOffset: {
      _this->_internal_mutable_offset()->::keyapis::subscription::v1::PlanPaging_ValidationError_OffsetInvalid::MergeFrom(
          from._internal_offset());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void PlanPaging_ValidationError::CopyFrom(const PlanPaging_ValidationError& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.subscription.v1.PlanPaging.ValidationError)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PlanPaging_ValidationError::IsInitialized() const {
  return true;
}

void PlanPaging_ValidationError::InternalSwap(PlanPaging_ValidationError* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_.reason_, other->_impl_.reason_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

std::string PlanPaging_ValidationError::GetTypeName() const {
  return "keyapis.subscription.v1.PlanPaging.ValidationError";
}

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

class PlanPaging::_Internal {
 public:
};

PlanPaging::PlanPaging(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.subscription.v1.PlanPaging)
}
PlanPaging::PlanPaging(const PlanPaging& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.subscription.v1.PlanPaging)
}

inline void PlanPaging::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.order_by_type_) { 0 }

    , decltype(_impl_.direction_type_) { 0 }

    , decltype(_impl_.limit_) { 0 }

    , decltype(_impl_.offset_) { 0 }

    , /*decltype(_impl_._cached_size_)*/{}
  };
}

PlanPaging::~PlanPaging() {
  // @@protoc_insertion_point(destructor:keyapis.subscription.v1.PlanPaging)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PlanPaging::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

void PlanPaging::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PlanPaging::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.subscription.v1.PlanPaging)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  ::memset(&_impl_.order_by_type_, 0, static_cast<::size_t>(
      reinterpret_cast<char*>(&_impl_.offset_) -
      reinterpret_cast<char*>(&_impl_.order_by_type_)) + sizeof(_impl_.offset_));
  _internal_metadata_.Clear<std::string>();
}

const char* PlanPaging::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.subscription.v1.PlanPaging.OrderByType order_by_type = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_order_by_type(static_cast<::keyapis::subscription::v1::PlanPaging_OrderByType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.subscription.v1.PlanPaging.DirectionType direction_type = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_direction_type(static_cast<::keyapis::subscription::v1::PlanPaging_DirectionType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 limit = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
          _impl_.limit_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 offset = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
          _impl_.offset_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* PlanPaging::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.subscription.v1.PlanPaging)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.subscription.v1.PlanPaging.OrderByType order_by_type = 1;
  if (this->_internal_order_by_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        1, this->_internal_order_by_type(), target);
  }

  // .keyapis.subscription.v1.PlanPaging.DirectionType direction_type = 2;
  if (this->_internal_direction_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        2, this->_internal_direction_type(), target);
  }

  // int32 limit = 3;
  if (this->_internal_limit() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        3, this->_internal_limit(), target);
  }

  // int32 offset = 4;
  if (this->_internal_offset() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        4, this->_internal_offset(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.subscription.v1.PlanPaging)
  return target;
}

::size_t PlanPaging::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.subscription.v1.PlanPaging)
  ::size_t total_size = 0;

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

  // .keyapis.subscription.v1.PlanPaging.OrderByType order_by_type = 1;
  if (this->_internal_order_by_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_order_by_type());
  }

  // .keyapis.subscription.v1.PlanPaging.DirectionType direction_type = 2;
  if (this->_internal_direction_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_direction_type());
  }

  // int32 limit = 3;
  if (this->_internal_limit() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_limit());
  }

  // int32 offset = 4;
  if (this->_internal_offset() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_offset());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void PlanPaging::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PlanPaging*>(
      &from));
}

void PlanPaging::MergeFrom(const PlanPaging& from) {
  PlanPaging* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.subscription.v1.PlanPaging)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_order_by_type() != 0) {
    _this->_internal_set_order_by_type(from._internal_order_by_type());
  }
  if (from._internal_direction_type() != 0) {
    _this->_internal_set_direction_type(from._internal_direction_type());
  }
  if (from._internal_limit() != 0) {
    _this->_internal_set_limit(from._internal_limit());
  }
  if (from._internal_offset() != 0) {
    _this->_internal_set_offset(from._internal_offset());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void PlanPaging::CopyFrom(const PlanPaging& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.subscription.v1.PlanPaging)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PlanPaging::IsInitialized() const {
  return true;
}

void PlanPaging::InternalSwap(PlanPaging* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(PlanPaging, _impl_.offset_)
      + sizeof(PlanPaging::_impl_.offset_)
      - PROTOBUF_FIELD_OFFSET(PlanPaging, _impl_.order_by_type_)>(
          reinterpret_cast<char*>(&_impl_.order_by_type_),
          reinterpret_cast<char*>(&other->_impl_.order_by_type_));
}

std::string PlanPaging::GetTypeName() const {
  return "keyapis.subscription.v1.PlanPaging";
}

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

class GetPlanRequest::_Internal {
 public:
};

GetPlanRequest::GetPlanRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.subscription.v1.GetPlanRequest)
}
GetPlanRequest::GetPlanRequest(const GetPlanRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.subscription.v1.GetPlanRequest)
}

inline void GetPlanRequest::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.id_) { 0 }

    , /*decltype(_impl_._cached_size_)*/{}
  };
}

GetPlanRequest::~GetPlanRequest() {
  // @@protoc_insertion_point(destructor:keyapis.subscription.v1.GetPlanRequest)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void GetPlanRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

void GetPlanRequest::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void GetPlanRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.subscription.v1.GetPlanRequest)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.id_ = 0;
  _internal_metadata_.Clear<std::string>();
}

const char* GetPlanRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // int32 id = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* GetPlanRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.subscription.v1.GetPlanRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 id = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_id() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        1, this->_internal_id(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.subscription.v1.GetPlanRequest)
  return target;
}

::size_t GetPlanRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.subscription.v1.GetPlanRequest)
  ::size_t total_size = 0;

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

  // int32 id = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_id() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_id());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void GetPlanRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetPlanRequest*>(
      &from));
}

void GetPlanRequest::MergeFrom(const GetPlanRequest& from) {
  GetPlanRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.subscription.v1.GetPlanRequest)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_id() != 0) {
    _this->_internal_set_id(from._internal_id());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void GetPlanRequest::CopyFrom(const GetPlanRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.subscription.v1.GetPlanRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GetPlanRequest::IsInitialized() const {
  return true;
}

void GetPlanRequest::InternalSwap(GetPlanRequest* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);

  swap(_impl_.id_, other->_impl_.id_);
}

std::string GetPlanRequest::GetTypeName() const {
  return "keyapis.subscription.v1.GetPlanRequest";
}

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

class GetPlanResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::subscription::v1::GetPlanResponse, _impl_._oneof_case_);
  static const ::keyapis::subscription::v1::Plan& data(const GetPlanResponse* msg);
};

const ::keyapis::subscription::v1::Plan&
GetPlanResponse::_Internal::data(const GetPlanResponse* msg) {
  return *msg->_impl_.type_.data_;
}
void GetPlanResponse::set_allocated_data(::keyapis::subscription::v1::Plan* data) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_type();
  if (data) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(data);
    if (message_arena != submessage_arena) {
      data = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, data, submessage_arena);
    }
    set_has_data();
    _impl_.type_.data_ = data;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.subscription.v1.GetPlanResponse.data)
}
GetPlanResponse::GetPlanResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.subscription.v1.GetPlanResponse)
}
GetPlanResponse::GetPlanResponse(const GetPlanResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetPlanResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_type();
  switch (from.type_case()) {
    case kData: {
      _this->_internal_mutable_data()->::keyapis::subscription::v1::Plan::MergeFrom(
          from._internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.subscription.v1.GetPlanResponse)
}

inline void GetPlanResponse::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_type();
}

GetPlanResponse::~GetPlanResponse() {
  // @@protoc_insertion_point(destructor:keyapis.subscription.v1.GetPlanResponse)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void GetPlanResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_type()) {
    clear_type();
  }
}

void GetPlanResponse::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void GetPlanResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.subscription.v1.GetPlanResponse)
  switch (type_case()) {
    case kData: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.type_.data_;
      }
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = TYPE_NOT_SET;
}


void GetPlanResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.subscription.v1.GetPlanResponse)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  clear_type();
  _internal_metadata_.Clear<std::string>();
}

const char* GetPlanResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.subscription.v1.Plan data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_data(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* GetPlanResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.subscription.v1.GetPlanResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.subscription.v1.Plan data = 1;
  if (type_case() == kData) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::data(this),
        _Internal::data(this).GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.subscription.v1.GetPlanResponse)
  return target;
}

::size_t GetPlanResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.subscription.v1.GetPlanResponse)
  ::size_t total_size = 0;

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

  switch (type_case()) {
    // .keyapis.subscription.v1.Plan data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.data_);
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void GetPlanResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetPlanResponse*>(
      &from));
}

void GetPlanResponse::MergeFrom(const GetPlanResponse& from) {
  GetPlanResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.subscription.v1.GetPlanResponse)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.type_case()) {
    case kData: {
      _this->_internal_mutable_data()->::keyapis::subscription::v1::Plan::MergeFrom(
          from._internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void GetPlanResponse::CopyFrom(const GetPlanResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.subscription.v1.GetPlanResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GetPlanResponse::IsInitialized() const {
  return true;
}

void GetPlanResponse::InternalSwap(GetPlanResponse* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_.type_, other->_impl_.type_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

std::string GetPlanResponse::GetTypeName() const {
  return "keyapis.subscription.v1.GetPlanResponse";
}

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

class GetPlanListRequest::_Internal {
 public:
  using HasBits = decltype(std::declval<GetPlanListRequest>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(GetPlanListRequest, _impl_._has_bits_);
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::subscription::v1::GetPlanListRequest, _impl_._oneof_case_);
  static const ::keyapis::subscription::v1::PlanFilter& filter(const GetPlanListRequest* msg);
  static void set_has_filter(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::keyapis::subscription::v1::PlanPaging& paging(const GetPlanListRequest* msg);
};

const ::keyapis::subscription::v1::PlanFilter&
GetPlanListRequest::_Internal::filter(const GetPlanListRequest* msg) {
  return *msg->_impl_.filter_;
}
const ::keyapis::subscription::v1::PlanPaging&
GetPlanListRequest::_Internal::paging(const GetPlanListRequest* msg) {
  return *msg->_impl_.pagination_.paging_;
}
void GetPlanListRequest::set_allocated_paging(::keyapis::subscription::v1::PlanPaging* paging) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_pagination();
  if (paging) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(paging);
    if (message_arena != submessage_arena) {
      paging = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, paging, submessage_arena);
    }
    set_has_paging();
    _impl_.pagination_.paging_ = paging;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.subscription.v1.GetPlanListRequest.paging)
}
GetPlanListRequest::GetPlanListRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.subscription.v1.GetPlanListRequest)
}
GetPlanListRequest::GetPlanListRequest(const GetPlanListRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetPlanListRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.filter_){nullptr}
    , decltype(_impl_.pagination_){}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.filter_ = new ::keyapis::subscription::v1::PlanFilter(*from._impl_.filter_);
  }
  clear_has_pagination();
  switch (from.pagination_case()) {
    case kPaging: {
      _this->_internal_mutable_paging()->::keyapis::subscription::v1::PlanPaging::MergeFrom(
          from._internal_paging());
      break;
    }
    case PAGINATION_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.subscription.v1.GetPlanListRequest)
}

inline void GetPlanListRequest::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.filter_){nullptr}
    , decltype(_impl_.pagination_){}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_pagination();
}

GetPlanListRequest::~GetPlanListRequest() {
  // @@protoc_insertion_point(destructor:keyapis.subscription.v1.GetPlanListRequest)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void GetPlanListRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete _impl_.filter_;
  if (has_pagination()) {
    clear_pagination();
  }
}

void GetPlanListRequest::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void GetPlanListRequest::clear_pagination() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.subscription.v1.GetPlanListRequest)
  switch (pagination_case()) {
    case kPaging: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.pagination_.paging_;
      }
      break;
    }
    case PAGINATION_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = PAGINATION_NOT_SET;
}


void GetPlanListRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.subscription.v1.GetPlanListRequest)
  ::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 (cached_has_bits & 0x00000001u) {
    ABSL_DCHECK(_impl_.filter_ != nullptr);
    _impl_.filter_->Clear();
  }
  clear_pagination();
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* GetPlanListRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.subscription.v1.PlanFilter filter = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_filter(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.subscription.v1.PlanPaging paging = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_paging(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* GetPlanListRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.subscription.v1.GetPlanListRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.subscription.v1.PlanFilter filter = 1 [(.google.api.field_behavior) = REQUIRED];
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::filter(this),
        _Internal::filter(this).GetCachedSize(), target, stream);
  }

  // .keyapis.subscription.v1.PlanPaging paging = 2;
  if (pagination_case() == kPaging) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::paging(this),
        _Internal::paging(this).GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.subscription.v1.GetPlanListRequest)
  return target;
}

::size_t GetPlanListRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.subscription.v1.GetPlanListRequest)
  ::size_t total_size = 0;

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

  // .keyapis.subscription.v1.PlanFilter filter = 1 [(.google.api.field_behavior) = REQUIRED];
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.filter_);
  }

  switch (pagination_case()) {
    // .keyapis.subscription.v1.PlanPaging paging = 2;
    case kPaging: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.pagination_.paging_);
      break;
    }
    case PAGINATION_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void GetPlanListRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetPlanListRequest*>(
      &from));
}

void GetPlanListRequest::MergeFrom(const GetPlanListRequest& from) {
  GetPlanListRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.subscription.v1.GetPlanListRequest)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_internal_mutable_filter()->::keyapis::subscription::v1::PlanFilter::MergeFrom(
        from._internal_filter());
  }
  switch (from.pagination_case()) {
    case kPaging: {
      _this->_internal_mutable_paging()->::keyapis::subscription::v1::PlanPaging::MergeFrom(
          from._internal_paging());
      break;
    }
    case PAGINATION_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void GetPlanListRequest::CopyFrom(const GetPlanListRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.subscription.v1.GetPlanListRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GetPlanListRequest::IsInitialized() const {
  return true;
}

void GetPlanListRequest::InternalSwap(GetPlanListRequest* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  swap(_impl_.filter_, other->_impl_.filter_);
  swap(_impl_.pagination_, other->_impl_.pagination_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

std::string GetPlanListRequest::GetTypeName() const {
  return "keyapis.subscription.v1.GetPlanListRequest";
}

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

class GetPlanListResponse_Error::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::subscription::v1::GetPlanListResponse_Error, _impl_._oneof_case_);
  static const ::keyapis::subscription::v1::PlanFilter_ValidationError& plan_filter_validation(const GetPlanListResponse_Error* msg);
  static const ::keyapis::subscription::v1::PlanPaging_ValidationError& plan_paging_validation(const GetPlanListResponse_Error* msg);
};

const ::keyapis::subscription::v1::PlanFilter_ValidationError&
GetPlanListResponse_Error::_Internal::plan_filter_validation(const GetPlanListResponse_Error* msg) {
  return *msg->_impl_.reason_.plan_filter_validation_;
}
const ::keyapis::subscription::v1::PlanPaging_ValidationError&
GetPlanListResponse_Error::_Internal::plan_paging_validation(const GetPlanListResponse_Error* msg) {
  return *msg->_impl_.reason_.plan_paging_validation_;
}
void GetPlanListResponse_Error::set_allocated_plan_filter_validation(::keyapis::subscription::v1::PlanFilter_ValidationError* plan_filter_validation) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (plan_filter_validation) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(plan_filter_validation);
    if (message_arena != submessage_arena) {
      plan_filter_validation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, plan_filter_validation, submessage_arena);
    }
    set_has_plan_filter_validation();
    _impl_.reason_.plan_filter_validation_ = plan_filter_validation;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.subscription.v1.GetPlanListResponse.Error.plan_filter_validation)
}
void GetPlanListResponse_Error::set_allocated_plan_paging_validation(::keyapis::subscription::v1::PlanPaging_ValidationError* plan_paging_validation) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (plan_paging_validation) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(plan_paging_validation);
    if (message_arena != submessage_arena) {
      plan_paging_validation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, plan_paging_validation, submessage_arena);
    }
    set_has_plan_paging_validation();
    _impl_.reason_.plan_paging_validation_ = plan_paging_validation;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.subscription.v1.GetPlanListResponse.Error.plan_paging_validation)
}
GetPlanListResponse_Error::GetPlanListResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.subscription.v1.GetPlanListResponse.Error)
}
GetPlanListResponse_Error::GetPlanListResponse_Error(const GetPlanListResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetPlanListResponse_Error* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_reason();
  switch (from.reason_case()) {
    case kPlanFilterValidation: {
      _this->_internal_mutable_plan_filter_validation()->::keyapis::subscription::v1::PlanFilter_ValidationError::MergeFrom(
          from._internal_plan_filter_validation());
      break;
    }
    case kPlanPagingValidation: {
      _this->_internal_mutable_plan_paging_validation()->::keyapis::subscription::v1::PlanPaging_ValidationError::MergeFrom(
          from._internal_plan_paging_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.subscription.v1.GetPlanListResponse.Error)
}

inline void GetPlanListResponse_Error::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_reason();
}

GetPlanListResponse_Error::~GetPlanListResponse_Error() {
  // @@protoc_insertion_point(destructor:keyapis.subscription.v1.GetPlanListResponse.Error)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void GetPlanListResponse_Error::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_reason()) {
    clear_reason();
  }
}

void GetPlanListResponse_Error::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void GetPlanListResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.subscription.v1.GetPlanListResponse.Error)
  switch (reason_case()) {
    case kPlanFilterValidation: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.plan_filter_validation_;
      }
      break;
    }
    case kPlanPagingValidation: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.plan_paging_validation_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


void GetPlanListResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.subscription.v1.GetPlanListResponse.Error)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  clear_reason();
  _internal_metadata_.Clear<std::string>();
}

const char* GetPlanListResponse_Error::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.subscription.v1.PlanFilter.ValidationError plan_filter_validation = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_plan_filter_validation(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.subscription.v1.PlanPaging.ValidationError plan_paging_validation = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_plan_paging_validation(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* GetPlanListResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.subscription.v1.GetPlanListResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (reason_case()) {
    case kPlanFilterValidation: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, _Internal::plan_filter_validation(this),
          _Internal::plan_filter_validation(this).GetCachedSize(), target, stream);
      break;
    }
    case kPlanPagingValidation: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::plan_paging_validation(this),
          _Internal::plan_paging_validation(this).GetCachedSize(), target, stream);
      break;
    }
    default: ;
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.subscription.v1.GetPlanListResponse.Error)
  return target;
}

::size_t GetPlanListResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.subscription.v1.GetPlanListResponse.Error)
  ::size_t total_size = 0;

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

  switch (reason_case()) {
    // .keyapis.subscription.v1.PlanFilter.ValidationError plan_filter_validation = 1;
    case kPlanFilterValidation: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.plan_filter_validation_);
      break;
    }
    // .keyapis.subscription.v1.PlanPaging.ValidationError plan_paging_validation = 2;
    case kPlanPagingValidation: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.plan_paging_validation_);
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void GetPlanListResponse_Error::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetPlanListResponse_Error*>(
      &from));
}

void GetPlanListResponse_Error::MergeFrom(const GetPlanListResponse_Error& from) {
  GetPlanListResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.subscription.v1.GetPlanListResponse.Error)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.reason_case()) {
    case kPlanFilterValidation: {
      _this->_internal_mutable_plan_filter_validation()->::keyapis::subscription::v1::PlanFilter_ValidationError::MergeFrom(
          from._internal_plan_filter_validation());
      break;
    }
    case kPlanPagingValidation: {
      _this->_internal_mutable_plan_paging_validation()->::keyapis::subscription::v1::PlanPaging_ValidationError::MergeFrom(
          from._internal_plan_paging_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void GetPlanListResponse_Error::CopyFrom(const GetPlanListResponse_Error& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.subscription.v1.GetPlanListResponse.Error)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GetPlanListResponse_Error::IsInitialized() const {
  return true;
}

void GetPlanListResponse_Error::InternalSwap(GetPlanListResponse_Error* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_.reason_, other->_impl_.reason_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

std::string GetPlanListResponse_Error::GetTypeName() const {
  return "keyapis.subscription.v1.GetPlanListResponse.Error";
}

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

class GetPlanListResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::subscription::v1::GetPlanListResponse, _impl_._oneof_case_);
  static const ::keyapis::subscription::v1::Plan& data(const GetPlanListResponse* msg);
  static const ::keyapis::subscription::v1::GetPlanListResponse_Error& error(const GetPlanListResponse* msg);
};

const ::keyapis::subscription::v1::Plan&
GetPlanListResponse::_Internal::data(const GetPlanListResponse* msg) {
  return *msg->_impl_.type_.data_;
}
const ::keyapis::subscription::v1::GetPlanListResponse_Error&
GetPlanListResponse::_Internal::error(const GetPlanListResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void GetPlanListResponse::set_allocated_data(::keyapis::subscription::v1::Plan* data) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_type();
  if (data) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(data);
    if (message_arena != submessage_arena) {
      data = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, data, submessage_arena);
    }
    set_has_data();
    _impl_.type_.data_ = data;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.subscription.v1.GetPlanListResponse.data)
}
void GetPlanListResponse::set_allocated_error(::keyapis::subscription::v1::GetPlanListResponse_Error* error) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_type();
  if (error) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(error);
    if (message_arena != submessage_arena) {
      error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, error, submessage_arena);
    }
    set_has_error();
    _impl_.type_.error_ = error;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.subscription.v1.GetPlanListResponse.error)
}
GetPlanListResponse::GetPlanListResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.subscription.v1.GetPlanListResponse)
}
GetPlanListResponse::GetPlanListResponse(const GetPlanListResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetPlanListResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_type();
  switch (from.type_case()) {
    case kData: {
      _this->_internal_mutable_data()->::keyapis::subscription::v1::Plan::MergeFrom(
          from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::subscription::v1::GetPlanListResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.subscription.v1.GetPlanListResponse)
}

inline void GetPlanListResponse::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_type();
}

GetPlanListResponse::~GetPlanListResponse() {
  // @@protoc_insertion_point(destructor:keyapis.subscription.v1.GetPlanListResponse)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void GetPlanListResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_type()) {
    clear_type();
  }
}

void GetPlanListResponse::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void GetPlanListResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.subscription.v1.GetPlanListResponse)
  switch (type_case()) {
    case kData: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.type_.data_;
      }
      break;
    }
    case kError: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.type_.error_;
      }
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = TYPE_NOT_SET;
}


void GetPlanListResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.subscription.v1.GetPlanListResponse)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  clear_type();
  _internal_metadata_.Clear<std::string>();
}

const char* GetPlanListResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.subscription.v1.Plan data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_data(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.subscription.v1.GetPlanListResponse.Error error = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_error(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* GetPlanListResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.subscription.v1.GetPlanListResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (type_case()) {
    case kData: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, _Internal::data(this),
          _Internal::data(this).GetCachedSize(), target, stream);
      break;
    }
    case kError: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::error(this),
          _Internal::error(this).GetCachedSize(), target, stream);
      break;
    }
    default: ;
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.subscription.v1.GetPlanListResponse)
  return target;
}

::size_t GetPlanListResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.subscription.v1.GetPlanListResponse)
  ::size_t total_size = 0;

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

  switch (type_case()) {
    // .keyapis.subscription.v1.Plan data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.data_);
      break;
    }
    // .keyapis.subscription.v1.GetPlanListResponse.Error error = 2;
    case kError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.error_);
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void GetPlanListResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetPlanListResponse*>(
      &from));
}

void GetPlanListResponse::MergeFrom(const GetPlanListResponse& from) {
  GetPlanListResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.subscription.v1.GetPlanListResponse)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.type_case()) {
    case kData: {
      _this->_internal_mutable_data()->::keyapis::subscription::v1::Plan::MergeFrom(
          from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::subscription::v1::GetPlanListResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void GetPlanListResponse::CopyFrom(const GetPlanListResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.subscription.v1.GetPlanListResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GetPlanListResponse::IsInitialized() const {
  return true;
}

void GetPlanListResponse::InternalSwap(GetPlanListResponse* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_.type_, other->_impl_.type_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

std::string GetPlanListResponse::GetTypeName() const {
  return "keyapis.subscription.v1.GetPlanListResponse";
}

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

class GetPlanCountRequest::_Internal {
 public:
  using HasBits = decltype(std::declval<GetPlanCountRequest>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(GetPlanCountRequest, _impl_._has_bits_);
  static const ::keyapis::subscription::v1::PlanFilter& filter(const GetPlanCountRequest* msg);
  static void set_has_filter(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

const ::keyapis::subscription::v1::PlanFilter&
GetPlanCountRequest::_Internal::filter(const GetPlanCountRequest* msg) {
  return *msg->_impl_.filter_;
}
GetPlanCountRequest::GetPlanCountRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.subscription.v1.GetPlanCountRequest)
}
GetPlanCountRequest::GetPlanCountRequest(const GetPlanCountRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetPlanCountRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.filter_){nullptr}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.filter_ = new ::keyapis::subscription::v1::PlanFilter(*from._impl_.filter_);
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.subscription.v1.GetPlanCountRequest)
}

inline void GetPlanCountRequest::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.filter_){nullptr}
  };
}

GetPlanCountRequest::~GetPlanCountRequest() {
  // @@protoc_insertion_point(destructor:keyapis.subscription.v1.GetPlanCountRequest)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void GetPlanCountRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete _impl_.filter_;
}

void GetPlanCountRequest::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void GetPlanCountRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.subscription.v1.GetPlanCountRequest)
  ::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 (cached_has_bits & 0x00000001u) {
    ABSL_DCHECK(_impl_.filter_ != nullptr);
    _impl_.filter_->Clear();
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* GetPlanCountRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.subscription.v1.PlanFilter filter = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_filter(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* GetPlanCountRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.subscription.v1.GetPlanCountRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.subscription.v1.PlanFilter filter = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::filter(this),
        _Internal::filter(this).GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.subscription.v1.GetPlanCountRequest)
  return target;
}

::size_t GetPlanCountRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.subscription.v1.GetPlanCountRequest)
  ::size_t total_size = 0;

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

  // .keyapis.subscription.v1.PlanFilter filter = 1;
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.filter_);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void GetPlanCountRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetPlanCountRequest*>(
      &from));
}

void GetPlanCountRequest::MergeFrom(const GetPlanCountRequest& from) {
  GetPlanCountRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.subscription.v1.GetPlanCountRequest)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_internal_mutable_filter()->::keyapis::subscription::v1::PlanFilter::MergeFrom(
        from._internal_filter());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void GetPlanCountRequest::CopyFrom(const GetPlanCountRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.subscription.v1.GetPlanCountRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GetPlanCountRequest::IsInitialized() const {
  return true;
}

void GetPlanCountRequest::InternalSwap(GetPlanCountRequest* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  swap(_impl_.filter_, other->_impl_.filter_);
}

std::string GetPlanCountRequest::GetTypeName() const {
  return "keyapis.subscription.v1.GetPlanCountRequest";
}

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

class GetPlanCountResponse_Error::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::subscription::v1::GetPlanCountResponse_Error, _impl_._oneof_case_);
  static const ::keyapis::subscription::v1::PlanFilter_ValidationError& plan_filter_validation(const GetPlanCountResponse_Error* msg);
};

const ::keyapis::subscription::v1::PlanFilter_ValidationError&
GetPlanCountResponse_Error::_Internal::plan_filter_validation(const GetPlanCountResponse_Error* msg) {
  return *msg->_impl_.reason_.plan_filter_validation_;
}
void GetPlanCountResponse_Error::set_allocated_plan_filter_validation(::keyapis::subscription::v1::PlanFilter_ValidationError* plan_filter_validation) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (plan_filter_validation) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(plan_filter_validation);
    if (message_arena != submessage_arena) {
      plan_filter_validation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, plan_filter_validation, submessage_arena);
    }
    set_has_plan_filter_validation();
    _impl_.reason_.plan_filter_validation_ = plan_filter_validation;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.subscription.v1.GetPlanCountResponse.Error.plan_filter_validation)
}
GetPlanCountResponse_Error::GetPlanCountResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.subscription.v1.GetPlanCountResponse.Error)
}
GetPlanCountResponse_Error::GetPlanCountResponse_Error(const GetPlanCountResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetPlanCountResponse_Error* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_reason();
  switch (from.reason_case()) {
    case kPlanFilterValidation: {
      _this->_internal_mutable_plan_filter_validation()->::keyapis::subscription::v1::PlanFilter_ValidationError::MergeFrom(
          from._internal_plan_filter_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.subscription.v1.GetPlanCountResponse.Error)
}

inline void GetPlanCountResponse_Error::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_reason();
}

GetPlanCountResponse_Error::~GetPlanCountResponse_Error() {
  // @@protoc_insertion_point(destructor:keyapis.subscription.v1.GetPlanCountResponse.Error)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void GetPlanCountResponse_Error::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_reason()) {
    clear_reason();
  }
}

void GetPlanCountResponse_Error::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void GetPlanCountResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.subscription.v1.GetPlanCountResponse.Error)
  switch (reason_case()) {
    case kPlanFilterValidation: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.plan_filter_validation_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


void GetPlanCountResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.subscription.v1.GetPlanCountResponse.Error)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  clear_reason();
  _internal_metadata_.Clear<std::string>();
}

const char* GetPlanCountResponse_Error::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.subscription.v1.PlanFilter.ValidationError plan_filter_validation = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_plan_filter_validation(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* GetPlanCountResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.subscription.v1.GetPlanCountResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.subscription.v1.PlanFilter.ValidationError plan_filter_validation = 1;
  if (reason_case() == kPlanFilterValidation) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::plan_filter_validation(this),
        _Internal::plan_filter_validation(this).GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.subscription.v1.GetPlanCountResponse.Error)
  return target;
}

::size_t GetPlanCountResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.subscription.v1.GetPlanCountResponse.Error)
  ::size_t total_size = 0;

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

  switch (reason_case()) {
    // .keyapis.subscription.v1.PlanFilter.ValidationError plan_filter_validation = 1;
    case kPlanFilterValidation: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.plan_filter_validation_);
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void GetPlanCountResponse_Error::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetPlanCountResponse_Error*>(
      &from));
}

void GetPlanCountResponse_Error::MergeFrom(const GetPlanCountResponse_Error& from) {
  GetPlanCountResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.subscription.v1.GetPlanCountResponse.Error)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.reason_case()) {
    case kPlanFilterValidation: {
      _this->_internal_mutable_plan_filter_validation()->::keyapis::subscription::v1::PlanFilter_ValidationError::MergeFrom(
          from._internal_plan_filter_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void GetPlanCountResponse_Error::CopyFrom(const GetPlanCountResponse_Error& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.subscription.v1.GetPlanCountResponse.Error)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GetPlanCountResponse_Error::IsInitialized() const {
  return true;
}

void GetPlanCountResponse_Error::InternalSwap(GetPlanCountResponse_Error* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_.reason_, other->_impl_.reason_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

std::string GetPlanCountResponse_Error::GetTypeName() const {
  return "keyapis.subscription.v1.GetPlanCountResponse.Error";
}

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

class GetPlanCountResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::subscription::v1::GetPlanCountResponse, _impl_._oneof_case_);
  static const ::keyapis::subscription::v1::GetPlanCountResponse_Error& error(const GetPlanCountResponse* msg);
};

const ::keyapis::subscription::v1::GetPlanCountResponse_Error&
GetPlanCountResponse::_Internal::error(const GetPlanCountResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void GetPlanCountResponse::set_allocated_error(::keyapis::subscription::v1::GetPlanCountResponse_Error* error) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_type();
  if (error) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(error);
    if (message_arena != submessage_arena) {
      error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, error, submessage_arena);
    }
    set_has_error();
    _impl_.type_.error_ = error;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.subscription.v1.GetPlanCountResponse.error)
}
GetPlanCountResponse::GetPlanCountResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.subscription.v1.GetPlanCountResponse)
}
GetPlanCountResponse::GetPlanCountResponse(const GetPlanCountResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetPlanCountResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_type();
  switch (from.type_case()) {
    case kData: {
      _this->_internal_set_data(from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::subscription::v1::GetPlanCountResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.subscription.v1.GetPlanCountResponse)
}

inline void GetPlanCountResponse::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_type();
}

GetPlanCountResponse::~GetPlanCountResponse() {
  // @@protoc_insertion_point(destructor:keyapis.subscription.v1.GetPlanCountResponse)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void GetPlanCountResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_type()) {
    clear_type();
  }
}

void GetPlanCountResponse::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void GetPlanCountResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.subscription.v1.GetPlanCountResponse)
  switch (type_case()) {
    case kData: {
      // No need to clear
      break;
    }
    case kError: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.type_.error_;
      }
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = TYPE_NOT_SET;
}


void GetPlanCountResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.subscription.v1.GetPlanCountResponse)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  clear_type();
  _internal_metadata_.Clear<std::string>();
}

const char* GetPlanCountResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // int32 data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _internal_set_data(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.subscription.v1.GetPlanCountResponse.Error error = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_error(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* GetPlanCountResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.subscription.v1.GetPlanCountResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (type_case()) {
    case kData: {
      target = stream->EnsureSpace(target);
      target = ::_pbi::WireFormatLite::WriteInt32ToArray(
          1, this->_internal_data(), target);
      break;
    }
    case kError: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::error(this),
          _Internal::error(this).GetCachedSize(), target, stream);
      break;
    }
    default: ;
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.subscription.v1.GetPlanCountResponse)
  return target;
}

::size_t GetPlanCountResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.subscription.v1.GetPlanCountResponse)
  ::size_t total_size = 0;

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

  switch (type_case()) {
    // int32 data = 1;
    case kData: {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
          this->_internal_data());
      break;
    }
    // .keyapis.subscription.v1.GetPlanCountResponse.Error error = 2;
    case kError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.error_);
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void GetPlanCountResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetPlanCountResponse*>(
      &from));
}

void GetPlanCountResponse::MergeFrom(const GetPlanCountResponse& from) {
  GetPlanCountResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.subscription.v1.GetPlanCountResponse)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.type_case()) {
    case kData: {
      _this->_internal_set_data(from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::subscription::v1::GetPlanCountResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void GetPlanCountResponse::CopyFrom(const GetPlanCountResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.subscription.v1.GetPlanCountResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GetPlanCountResponse::IsInitialized() const {
  return true;
}

void GetPlanCountResponse::InternalSwap(GetPlanCountResponse* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_.type_, other->_impl_.type_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

std::string GetPlanCountResponse::GetTypeName() const {
  return "keyapis.subscription.v1.GetPlanCountResponse";
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace v1
}  // namespace subscription
}  // namespace keyapis
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::keyapis::subscription::v1::Plan_OptionDescription*
Arena::CreateMaybeMessage< ::keyapis::subscription::v1::Plan_OptionDescription >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::subscription::v1::Plan_OptionDescription >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::subscription::v1::Plan*
Arena::CreateMaybeMessage< ::keyapis::subscription::v1::Plan >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::subscription::v1::Plan >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::subscription::v1::PlanFilter_ValidationError_TextInvalid*
Arena::CreateMaybeMessage< ::keyapis::subscription::v1::PlanFilter_ValidationError_TextInvalid >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::subscription::v1::PlanFilter_ValidationError_TextInvalid >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::subscription::v1::PlanFilter_ValidationError*
Arena::CreateMaybeMessage< ::keyapis::subscription::v1::PlanFilter_ValidationError >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::subscription::v1::PlanFilter_ValidationError >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::subscription::v1::PlanFilter*
Arena::CreateMaybeMessage< ::keyapis::subscription::v1::PlanFilter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::subscription::v1::PlanFilter >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::subscription::v1::PlanPaging_ValidationError_LimitInvalid*
Arena::CreateMaybeMessage< ::keyapis::subscription::v1::PlanPaging_ValidationError_LimitInvalid >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::subscription::v1::PlanPaging_ValidationError_LimitInvalid >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::subscription::v1::PlanPaging_ValidationError_OffsetInvalid*
Arena::CreateMaybeMessage< ::keyapis::subscription::v1::PlanPaging_ValidationError_OffsetInvalid >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::subscription::v1::PlanPaging_ValidationError_OffsetInvalid >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::subscription::v1::PlanPaging_ValidationError*
Arena::CreateMaybeMessage< ::keyapis::subscription::v1::PlanPaging_ValidationError >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::subscription::v1::PlanPaging_ValidationError >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::subscription::v1::PlanPaging*
Arena::CreateMaybeMessage< ::keyapis::subscription::v1::PlanPaging >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::subscription::v1::PlanPaging >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::subscription::v1::GetPlanRequest*
Arena::CreateMaybeMessage< ::keyapis::subscription::v1::GetPlanRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::subscription::v1::GetPlanRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::subscription::v1::GetPlanResponse*
Arena::CreateMaybeMessage< ::keyapis::subscription::v1::GetPlanResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::subscription::v1::GetPlanResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::subscription::v1::GetPlanListRequest*
Arena::CreateMaybeMessage< ::keyapis::subscription::v1::GetPlanListRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::subscription::v1::GetPlanListRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::subscription::v1::GetPlanListResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::subscription::v1::GetPlanListResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::subscription::v1::GetPlanListResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::subscription::v1::GetPlanListResponse*
Arena::CreateMaybeMessage< ::keyapis::subscription::v1::GetPlanListResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::subscription::v1::GetPlanListResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::subscription::v1::GetPlanCountRequest*
Arena::CreateMaybeMessage< ::keyapis::subscription::v1::GetPlanCountRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::subscription::v1::GetPlanCountRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::subscription::v1::GetPlanCountResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::subscription::v1::GetPlanCountResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::subscription::v1::GetPlanCountResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::subscription::v1::GetPlanCountResponse*
Arena::CreateMaybeMessage< ::keyapis::subscription::v1::GetPlanCountResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::subscription::v1::GetPlanCountResponse >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"
