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

#include "keyapis/invoice/v1/keyapis_invoice_paymethod_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 invoice {
namespace v1 {
template <typename>
PROTOBUF_CONSTEXPR PayMethod::PayMethod(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.pay_method_id_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

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

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

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

  , /*decltype(_impl_.register_at_)*/nullptr
  , /*decltype(_impl_.user_id_)*/ 0

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

  , /*decltype(_impl_.is_active_)*/ false

  , /*decltype(_impl_.is_default_)*/ false

  , /*decltype(_impl_.is_auth_)*/ false

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

  , /*decltype(_impl_.status_type_)*/ 0
} {}
struct PayMethodDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PayMethodDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PayMethodDefaultTypeInternal() {}
  union {
    PayMethod _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PayMethodDefaultTypeInternal _PayMethod_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetPayMethodListRequest::GetPayMethodListRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.user_id_)*/ 0

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetPayMethodListRequestDefaultTypeInternal _GetPayMethodListRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetPayMethodListResponse::GetPayMethodListResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.data_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct GetPayMethodListResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetPayMethodListResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetPayMethodListResponseDefaultTypeInternal() {}
  union {
    GetPayMethodListResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetPayMethodListResponseDefaultTypeInternal _GetPayMethodListResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeletePayMethodRequest::DeletePayMethodRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.pay_method_id_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeletePayMethodRequestDefaultTypeInternal _DeletePayMethodRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeletePayMethodResponse::DeletePayMethodResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct DeletePayMethodResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DeletePayMethodResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeletePayMethodResponseDefaultTypeInternal() {}
  union {
    DeletePayMethodResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeletePayMethodResponseDefaultTypeInternal _DeletePayMethodResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostPayMethodDefaultRequest::PostPayMethodDefaultRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.pay_method_id_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostPayMethodDefaultRequestDefaultTypeInternal _PostPayMethodDefaultRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostPayMethodDefaultResponse_Error::PostPayMethodDefaultResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostPayMethodDefaultResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostPayMethodDefaultResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostPayMethodDefaultResponse_ErrorDefaultTypeInternal() {}
  union {
    PostPayMethodDefaultResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostPayMethodDefaultResponse_ErrorDefaultTypeInternal _PostPayMethodDefaultResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostPayMethodDefaultResponse::PostPayMethodDefaultResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostPayMethodDefaultResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostPayMethodDefaultResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostPayMethodDefaultResponseDefaultTypeInternal() {}
  union {
    PostPayMethodDefaultResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostPayMethodDefaultResponseDefaultTypeInternal _PostPayMethodDefaultResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostPayMethodBankcardRequest::PostPayMethodBankcardRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.url_return_ok_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostPayMethodBankcardRequestDefaultTypeInternal _PostPayMethodBankcardRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostPayMethodBankcardResponse_Error::PostPayMethodBankcardResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostPayMethodBankcardResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostPayMethodBankcardResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostPayMethodBankcardResponse_ErrorDefaultTypeInternal() {}
  union {
    PostPayMethodBankcardResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostPayMethodBankcardResponse_ErrorDefaultTypeInternal _PostPayMethodBankcardResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostPayMethodBankcardResponse_RegisterData::PostPayMethodBankcardResponse_RegisterData(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.req_id_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostPayMethodBankcardResponse_RegisterDataDefaultTypeInternal _PostPayMethodBankcardResponse_RegisterData_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostPayMethodBankcardResponse::PostPayMethodBankcardResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostPayMethodBankcardResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostPayMethodBankcardResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostPayMethodBankcardResponseDefaultTypeInternal() {}
  union {
    PostPayMethodBankcardResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostPayMethodBankcardResponseDefaultTypeInternal _PostPayMethodBankcardResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostPayMethodSbpRequest::PostPayMethodSbpRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.url_return_ok_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostPayMethodSbpRequestDefaultTypeInternal _PostPayMethodSbpRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostPayMethodSbpResponse_Error::PostPayMethodSbpResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostPayMethodSbpResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostPayMethodSbpResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostPayMethodSbpResponse_ErrorDefaultTypeInternal() {}
  union {
    PostPayMethodSbpResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostPayMethodSbpResponse_ErrorDefaultTypeInternal _PostPayMethodSbpResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostPayMethodSbpResponse_RegisterData::PostPayMethodSbpResponse_RegisterData(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.req_id_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostPayMethodSbpResponse_RegisterDataDefaultTypeInternal _PostPayMethodSbpResponse_RegisterData_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostPayMethodSbpResponse::PostPayMethodSbpResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostPayMethodSbpResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostPayMethodSbpResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostPayMethodSbpResponseDefaultTypeInternal() {}
  union {
    PostPayMethodSbpResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostPayMethodSbpResponseDefaultTypeInternal _PostPayMethodSbpResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR ValidationError::ValidationError(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.path_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ValidationErrorDefaultTypeInternal _ValidationError_default_instance_;
}  // namespace v1
}  // namespace invoice
}  // namespace keyapis
namespace keyapis {
namespace invoice {
namespace v1 {
bool PayMethod_Type_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>
    PayMethod_Type_strings[4] = {};

static const char PayMethod_Type_names[] = {
    "BANK_CARD"
    "SBER_BIND"
    "SBP"
    "TYPE_UNKNOWN"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry PayMethod_Type_entries[] =
    {
        {{&PayMethod_Type_names[0], 9}, 1},
        {{&PayMethod_Type_names[9], 9}, 3},
        {{&PayMethod_Type_names[18], 3}, 2},
        {{&PayMethod_Type_names[21], 12}, 0},
};

static const int PayMethod_Type_entries_by_number[] = {
    3,  // 0 -> TYPE_UNKNOWN
    0,  // 1 -> BANK_CARD
    2,  // 2 -> SBP
    1,  // 3 -> SBER_BIND
};

const std::string& PayMethod_Type_Name(PayMethod_Type value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          PayMethod_Type_entries, PayMethod_Type_entries_by_number,
          4, PayMethod_Type_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      PayMethod_Type_entries, PayMethod_Type_entries_by_number, 4,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : PayMethod_Type_strings[idx].get();
}

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

constexpr PayMethod_Type PayMethod::TYPE_UNKNOWN;
constexpr PayMethod_Type PayMethod::BANK_CARD;
constexpr PayMethod_Type PayMethod::SBP;
constexpr PayMethod_Type PayMethod::SBER_BIND;
constexpr PayMethod_Type PayMethod::Type_MIN;
constexpr PayMethod_Type PayMethod::Type_MAX;
constexpr int PayMethod::Type_ARRAYSIZE;

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

static const char PayMethod_CardType_names[] = {
    "AMEX"
    "CARD_TYPE_UNKNOWN"
    "DCL"
    "EC_MC"
    "JCB"
    "MIR"
    "VISA"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry PayMethod_CardType_entries[] =
    {
        {{&PayMethod_CardType_names[0], 4}, 5},
        {{&PayMethod_CardType_names[4], 17}, 0},
        {{&PayMethod_CardType_names[21], 3}, 3},
        {{&PayMethod_CardType_names[24], 5}, 2},
        {{&PayMethod_CardType_names[29], 3}, 4},
        {{&PayMethod_CardType_names[32], 3}, 6},
        {{&PayMethod_CardType_names[35], 4}, 1},
};

static const int PayMethod_CardType_entries_by_number[] = {
    1,  // 0 -> CARD_TYPE_UNKNOWN
    6,  // 1 -> VISA
    3,  // 2 -> EC_MC
    2,  // 3 -> DCL
    4,  // 4 -> JCB
    0,  // 5 -> AMEX
    5,  // 6 -> MIR
};

const std::string& PayMethod_CardType_Name(PayMethod_CardType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          PayMethod_CardType_entries, PayMethod_CardType_entries_by_number,
          7, PayMethod_CardType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      PayMethod_CardType_entries, PayMethod_CardType_entries_by_number, 7,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : PayMethod_CardType_strings[idx].get();
}

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

constexpr PayMethod_CardType PayMethod::CARD_TYPE_UNKNOWN;
constexpr PayMethod_CardType PayMethod::VISA;
constexpr PayMethod_CardType PayMethod::EC_MC;
constexpr PayMethod_CardType PayMethod::DCL;
constexpr PayMethod_CardType PayMethod::JCB;
constexpr PayMethod_CardType PayMethod::AMEX;
constexpr PayMethod_CardType PayMethod::MIR;
constexpr PayMethod_CardType PayMethod::CardType_MIN;
constexpr PayMethod_CardType PayMethod::CardType_MAX;
constexpr int PayMethod::CardType_ARRAYSIZE;

#endif  // (__cplusplus < 201703) &&
        // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
bool PayMethod_StatusType_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>
    PayMethod_StatusType_strings[4] = {};

static const char PayMethod_StatusType_names[] = {
    "BLOCKED"
    "EXPIRED"
    "STATUS_TYPE_UNKNOWN"
    "VALID"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry PayMethod_StatusType_entries[] =
    {
        {{&PayMethod_StatusType_names[0], 7}, 3},
        {{&PayMethod_StatusType_names[7], 7}, 2},
        {{&PayMethod_StatusType_names[14], 19}, 0},
        {{&PayMethod_StatusType_names[33], 5}, 1},
};

static const int PayMethod_StatusType_entries_by_number[] = {
    2,  // 0 -> STATUS_TYPE_UNKNOWN
    3,  // 1 -> VALID
    1,  // 2 -> EXPIRED
    0,  // 3 -> BLOCKED
};

const std::string& PayMethod_StatusType_Name(PayMethod_StatusType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          PayMethod_StatusType_entries, PayMethod_StatusType_entries_by_number,
          4, PayMethod_StatusType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      PayMethod_StatusType_entries, PayMethod_StatusType_entries_by_number, 4,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : PayMethod_StatusType_strings[idx].get();
}

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

constexpr PayMethod_StatusType PayMethod::STATUS_TYPE_UNKNOWN;
constexpr PayMethod_StatusType PayMethod::VALID;
constexpr PayMethod_StatusType PayMethod::EXPIRED;
constexpr PayMethod_StatusType PayMethod::BLOCKED;
constexpr PayMethod_StatusType PayMethod::StatusType_MIN;
constexpr PayMethod_StatusType PayMethod::StatusType_MAX;
constexpr int PayMethod::StatusType_ARRAYSIZE;

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

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

const ::PROTOBUF_NAMESPACE_ID::Timestamp&
PayMethod::_Internal::register_at(const PayMethod* msg) {
  return *msg->_impl_.register_at_;
}
void PayMethod::clear_register_at() {
  if (_impl_.register_at_ != nullptr) _impl_.register_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
PayMethod::PayMethod(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.invoice.v1.PayMethod)
}
PayMethod::PayMethod(const PayMethod& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PayMethod* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.pay_method_id_) {}

    , decltype(_impl_.pay_method_contact_) {}

    , decltype(_impl_.pay_method_description_) {}

    , decltype(_impl_.pay_method_alias_) {}

    , decltype(_impl_.masked_num_) {}

    , decltype(_impl_.bank_name_) {}

    , decltype(_impl_.register_at_){nullptr}
    , decltype(_impl_.user_id_) {}

    , decltype(_impl_.type_) {}

    , decltype(_impl_.is_active_) {}

    , decltype(_impl_.is_default_) {}

    , decltype(_impl_.is_auth_) {}

    , decltype(_impl_.card_type_) {}

    , decltype(_impl_.status_type_) {}
  };

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.pay_method_id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.pay_method_id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_pay_method_id().empty()) {
    _this->_impl_.pay_method_id_.Set(from._internal_pay_method_id(), _this->GetArenaForAllocation());
  }
  _impl_.pay_method_contact_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.pay_method_contact_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_pay_method_contact().empty()) {
    _this->_impl_.pay_method_contact_.Set(from._internal_pay_method_contact(), _this->GetArenaForAllocation());
  }
  _impl_.pay_method_description_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.pay_method_description_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_pay_method_description().empty()) {
    _this->_impl_.pay_method_description_.Set(from._internal_pay_method_description(), _this->GetArenaForAllocation());
  }
  _impl_.pay_method_alias_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.pay_method_alias_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_pay_method_alias().empty()) {
    _this->_impl_.pay_method_alias_.Set(from._internal_pay_method_alias(), _this->GetArenaForAllocation());
  }
  _impl_.masked_num_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.masked_num_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_masked_num().empty()) {
    _this->_impl_.masked_num_.Set(from._internal_masked_num(), _this->GetArenaForAllocation());
  }
  _impl_.bank_name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.bank_name_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_bank_name().empty()) {
    _this->_impl_.bank_name_.Set(from._internal_bank_name(), _this->GetArenaForAllocation());
  }
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.register_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.register_at_);
  }
  ::memcpy(&_impl_.user_id_, &from._impl_.user_id_,
    static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.status_type_) -
    reinterpret_cast<char*>(&_impl_.user_id_)) + sizeof(_impl_.status_type_));
  // @@protoc_insertion_point(copy_constructor:keyapis.invoice.v1.PayMethod)
}

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

    , decltype(_impl_.pay_method_contact_) {}

    , decltype(_impl_.pay_method_description_) {}

    , decltype(_impl_.pay_method_alias_) {}

    , decltype(_impl_.masked_num_) {}

    , decltype(_impl_.bank_name_) {}

    , decltype(_impl_.register_at_){nullptr}
    , decltype(_impl_.user_id_) { 0 }

    , decltype(_impl_.type_) { 0 }

    , decltype(_impl_.is_active_) { false }

    , decltype(_impl_.is_default_) { false }

    , decltype(_impl_.is_auth_) { false }

    , decltype(_impl_.card_type_) { 0 }

    , decltype(_impl_.status_type_) { 0 }

  };
  _impl_.pay_method_id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.pay_method_id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.pay_method_contact_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.pay_method_contact_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.pay_method_description_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.pay_method_description_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.pay_method_alias_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.pay_method_alias_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.masked_num_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.masked_num_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.bank_name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.bank_name_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void PayMethod::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.pay_method_id_.Destroy();
  _impl_.pay_method_contact_.Destroy();
  _impl_.pay_method_description_.Destroy();
  _impl_.pay_method_alias_.Destroy();
  _impl_.masked_num_.Destroy();
  _impl_.bank_name_.Destroy();
  if (this != internal_default_instance()) delete _impl_.register_at_;
}

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

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

  _impl_.pay_method_id_.ClearToEmpty();
  _impl_.pay_method_contact_.ClearToEmpty();
  _impl_.pay_method_description_.ClearToEmpty();
  _impl_.pay_method_alias_.ClearToEmpty();
  _impl_.masked_num_.ClearToEmpty();
  _impl_.bank_name_.ClearToEmpty();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    ABSL_DCHECK(_impl_.register_at_ != nullptr);
    _impl_.register_at_->Clear();
  }
  ::memset(&_impl_.user_id_, 0, static_cast<::size_t>(
      reinterpret_cast<char*>(&_impl_.status_type_) -
      reinterpret_cast<char*>(&_impl_.user_id_)) + sizeof(_impl_.status_type_));
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* PayMethod::_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) {
      // string pay_method_id = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_pay_method_id();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 user_id = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          _impl_.user_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.invoice.v1.PayMethod.Type type = 3 [(.google.api.field_behavior) = REQUIRED];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_type(static_cast<::keyapis::invoice::v1::PayMethod_Type>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // bool is_active = 4 [(.google.api.field_behavior) = REQUIRED];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
          _impl_.is_active_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // bool is_default = 5 [(.google.api.field_behavior) = REQUIRED];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
          _impl_.is_default_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // string pay_method_contact = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
          auto str = _internal_mutable_pay_method_contact();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string pay_method_description = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
          auto str = _internal_mutable_pay_method_description();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string pay_method_alias = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
          auto str = _internal_mutable_pay_method_alias();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.invoice.v1.PayMethod.CardType card_type = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      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_card_type(static_cast<::keyapis::invoice::v1::PayMethod_CardType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // string masked_num = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 82)) {
          auto str = _internal_mutable_masked_num();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string bank_name = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 90)) {
          auto str = _internal_mutable_bank_name();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // bool is_auth = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 96)) {
          _impl_.is_auth_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.invoice.v1.PayMethod.StatusType status_type = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 104)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_status_type(static_cast<::keyapis::invoice::v1::PayMethod_StatusType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp register_at = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 114)) {
          ptr = ctx->ParseMessage(_internal_mutable_register_at(), 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* PayMethod::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.invoice.v1.PayMethod)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

  // .keyapis.invoice.v1.PayMethod.Type type = 3 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        3, this->_internal_type(), target);
  }

  // bool is_active = 4 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_is_active() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        4, this->_internal_is_active(), target);
  }

  // bool is_default = 5 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_is_default() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        5, this->_internal_is_default(), target);
  }

  // string pay_method_contact = 6;
  if (!this->_internal_pay_method_contact().empty()) {
    const std::string& _s = this->_internal_pay_method_contact();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.invoice.v1.PayMethod.pay_method_contact");
    target = stream->WriteStringMaybeAliased(6, _s, target);
  }

  // string pay_method_description = 7;
  if (!this->_internal_pay_method_description().empty()) {
    const std::string& _s = this->_internal_pay_method_description();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.invoice.v1.PayMethod.pay_method_description");
    target = stream->WriteStringMaybeAliased(7, _s, target);
  }

  // string pay_method_alias = 8;
  if (!this->_internal_pay_method_alias().empty()) {
    const std::string& _s = this->_internal_pay_method_alias();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.invoice.v1.PayMethod.pay_method_alias");
    target = stream->WriteStringMaybeAliased(8, _s, target);
  }

  // .keyapis.invoice.v1.PayMethod.CardType card_type = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (this->_internal_card_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        9, this->_internal_card_type(), target);
  }

  // string masked_num = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (!this->_internal_masked_num().empty()) {
    const std::string& _s = this->_internal_masked_num();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.invoice.v1.PayMethod.masked_num");
    target = stream->WriteStringMaybeAliased(10, _s, target);
  }

  // string bank_name = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (!this->_internal_bank_name().empty()) {
    const std::string& _s = this->_internal_bank_name();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.invoice.v1.PayMethod.bank_name");
    target = stream->WriteStringMaybeAliased(11, _s, target);
  }

  // bool is_auth = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (this->_internal_is_auth() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        12, this->_internal_is_auth(), target);
  }

  // .keyapis.invoice.v1.PayMethod.StatusType status_type = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (this->_internal_status_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        13, this->_internal_status_type(), target);
  }

  cached_has_bits = _impl_._has_bits_[0];
  // .google.protobuf.Timestamp register_at = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(14, _Internal::register_at(this),
        _Internal::register_at(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.invoice.v1.PayMethod)
  return target;
}

::size_t PayMethod::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.invoice.v1.PayMethod)
  ::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 pay_method_id = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_pay_method_id().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_pay_method_id());
  }

  // string pay_method_contact = 6;
  if (!this->_internal_pay_method_contact().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_pay_method_contact());
  }

  // string pay_method_description = 7;
  if (!this->_internal_pay_method_description().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_pay_method_description());
  }

  // string pay_method_alias = 8;
  if (!this->_internal_pay_method_alias().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_pay_method_alias());
  }

  // string masked_num = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (!this->_internal_masked_num().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_masked_num());
  }

  // string bank_name = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (!this->_internal_bank_name().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_bank_name());
  }

  // .google.protobuf.Timestamp register_at = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.register_at_);
  }

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

  // .keyapis.invoice.v1.PayMethod.Type type = 3 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_type());
  }

  // bool is_active = 4 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_is_active() != 0) {
    total_size += 2;
  }

  // bool is_default = 5 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_is_default() != 0) {
    total_size += 2;
  }

  // bool is_auth = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (this->_internal_is_auth() != 0) {
    total_size += 2;
  }

  // .keyapis.invoice.v1.PayMethod.CardType card_type = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (this->_internal_card_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_card_type());
  }

  // .keyapis.invoice.v1.PayMethod.StatusType status_type = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (this->_internal_status_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_status_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 PayMethod::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PayMethod*>(
      &from));
}

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

  if (!from._internal_pay_method_id().empty()) {
    _this->_internal_set_pay_method_id(from._internal_pay_method_id());
  }
  if (!from._internal_pay_method_contact().empty()) {
    _this->_internal_set_pay_method_contact(from._internal_pay_method_contact());
  }
  if (!from._internal_pay_method_description().empty()) {
    _this->_internal_set_pay_method_description(from._internal_pay_method_description());
  }
  if (!from._internal_pay_method_alias().empty()) {
    _this->_internal_set_pay_method_alias(from._internal_pay_method_alias());
  }
  if (!from._internal_masked_num().empty()) {
    _this->_internal_set_masked_num(from._internal_masked_num());
  }
  if (!from._internal_bank_name().empty()) {
    _this->_internal_set_bank_name(from._internal_bank_name());
  }
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_internal_mutable_register_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
        from._internal_register_at());
  }
  if (from._internal_user_id() != 0) {
    _this->_internal_set_user_id(from._internal_user_id());
  }
  if (from._internal_type() != 0) {
    _this->_internal_set_type(from._internal_type());
  }
  if (from._internal_is_active() != 0) {
    _this->_internal_set_is_active(from._internal_is_active());
  }
  if (from._internal_is_default() != 0) {
    _this->_internal_set_is_default(from._internal_is_default());
  }
  if (from._internal_is_auth() != 0) {
    _this->_internal_set_is_auth(from._internal_is_auth());
  }
  if (from._internal_card_type() != 0) {
    _this->_internal_set_card_type(from._internal_card_type());
  }
  if (from._internal_status_type() != 0) {
    _this->_internal_set_status_type(from._internal_status_type());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void PayMethod::InternalSwap(PayMethod* 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_.pay_method_id_, lhs_arena,
                                       &other->_impl_.pay_method_id_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.pay_method_contact_, lhs_arena,
                                       &other->_impl_.pay_method_contact_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.pay_method_description_, lhs_arena,
                                       &other->_impl_.pay_method_description_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.pay_method_alias_, lhs_arena,
                                       &other->_impl_.pay_method_alias_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.masked_num_, lhs_arena,
                                       &other->_impl_.masked_num_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.bank_name_, lhs_arena,
                                       &other->_impl_.bank_name_, rhs_arena);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(PayMethod, _impl_.status_type_)
      + sizeof(PayMethod::_impl_.status_type_)
      - PROTOBUF_FIELD_OFFSET(PayMethod, _impl_.register_at_)>(
          reinterpret_cast<char*>(&_impl_.register_at_),
          reinterpret_cast<char*>(&other->_impl_.register_at_));
}

std::string PayMethod::GetTypeName() const {
  return "keyapis.invoice.v1.PayMethod";
}

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

class GetPayMethodListRequest::_Internal {
 public:
};

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

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

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

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

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

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

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

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

const char* GetPayMethodListRequest::_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 user_id = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.user_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* GetPayMethodListRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.invoice.v1.GetPayMethodListRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 user_id = 1;
  if (this->_internal_user_id() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        1, this->_internal_user_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.invoice.v1.GetPayMethodListRequest)
  return target;
}

::size_t GetPayMethodListRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.invoice.v1.GetPayMethodListRequest)
  ::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 user_id = 1;
  if (this->_internal_user_id() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_user_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 GetPayMethodListRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetPayMethodListRequest*>(
      &from));
}

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

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

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

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

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

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

std::string GetPayMethodListRequest::GetTypeName() const {
  return "keyapis.invoice.v1.GetPayMethodListRequest";
}

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

class GetPayMethodListResponse::_Internal {
 public:
};

GetPayMethodListResponse::GetPayMethodListResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.invoice.v1.GetPayMethodListResponse)
}
GetPayMethodListResponse::GetPayMethodListResponse(const GetPayMethodListResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetPayMethodListResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.data_){from._impl_.data_}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.invoice.v1.GetPayMethodListResponse)
}

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

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

inline void GetPayMethodListResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _internal_mutable_data()->~RepeatedPtrField();
}

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

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

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

const char* GetPayMethodListResponse::_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) {
      // repeated .keyapis.invoice.v1.PayMethod data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_data(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(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* GetPayMethodListResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.invoice.v1.GetPayMethodListResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .keyapis.invoice.v1.PayMethod data = 1;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_data_size()); i < n; i++) {
    const auto& repfield = this->_internal_data(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, repfield, repfield.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.invoice.v1.GetPayMethodListResponse)
  return target;
}

::size_t GetPayMethodListResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.invoice.v1.GetPayMethodListResponse)
  ::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 .keyapis.invoice.v1.PayMethod data = 1;
  total_size += 1UL * this->_internal_data_size();
  for (const auto& msg : this->_internal_data()) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  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 GetPayMethodListResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetPayMethodListResponse*>(
      &from));
}

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

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

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

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

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

std::string GetPayMethodListResponse::GetTypeName() const {
  return "keyapis.invoice.v1.GetPayMethodListResponse";
}

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

class DeletePayMethodRequest::_Internal {
 public:
};

DeletePayMethodRequest::DeletePayMethodRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.invoice.v1.DeletePayMethodRequest)
}
DeletePayMethodRequest::DeletePayMethodRequest(const DeletePayMethodRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  DeletePayMethodRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.pay_method_id_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.pay_method_id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.pay_method_id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_pay_method_id().empty()) {
    _this->_impl_.pay_method_id_.Set(from._internal_pay_method_id(), _this->GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.invoice.v1.DeletePayMethodRequest)
}

inline void DeletePayMethodRequest::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.pay_method_id_) {}

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.pay_method_id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.pay_method_id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void DeletePayMethodRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.pay_method_id_.Destroy();
}

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

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

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

const char* DeletePayMethodRequest::_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) {
      // string pay_method_id = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_pay_method_id();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } 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* DeletePayMethodRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.invoice.v1.DeletePayMethodRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string pay_method_id = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_pay_method_id().empty()) {
    const std::string& _s = this->_internal_pay_method_id();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.invoice.v1.DeletePayMethodRequest.pay_method_id");
    target = stream->WriteStringMaybeAliased(1, _s, 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.invoice.v1.DeletePayMethodRequest)
  return target;
}

::size_t DeletePayMethodRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.invoice.v1.DeletePayMethodRequest)
  ::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 pay_method_id = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_pay_method_id().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_pay_method_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 DeletePayMethodRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const DeletePayMethodRequest*>(
      &from));
}

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

  if (!from._internal_pay_method_id().empty()) {
    _this->_internal_set_pay_method_id(from._internal_pay_method_id());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void DeletePayMethodRequest::InternalSwap(DeletePayMethodRequest* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.pay_method_id_, lhs_arena,
                                       &other->_impl_.pay_method_id_, rhs_arena);
}

std::string DeletePayMethodRequest::GetTypeName() const {
  return "keyapis.invoice.v1.DeletePayMethodRequest";
}

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

class DeletePayMethodResponse::_Internal {
 public:
};

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

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

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

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

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

void DeletePayMethodResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.invoice.v1.DeletePayMethodResponse)
  ::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* DeletePayMethodResponse::_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* DeletePayMethodResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.invoice.v1.DeletePayMethodResponse)
  ::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.invoice.v1.DeletePayMethodResponse)
  return target;
}

::size_t DeletePayMethodResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.invoice.v1.DeletePayMethodResponse)
  ::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 DeletePayMethodResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const DeletePayMethodResponse*>(
      &from));
}

void DeletePayMethodResponse::MergeFrom(const DeletePayMethodResponse& from) {
  DeletePayMethodResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.invoice.v1.DeletePayMethodResponse)
  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 DeletePayMethodResponse::CopyFrom(const DeletePayMethodResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.invoice.v1.DeletePayMethodResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

std::string DeletePayMethodResponse::GetTypeName() const {
  return "keyapis.invoice.v1.DeletePayMethodResponse";
}

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

class PostPayMethodDefaultRequest::_Internal {
 public:
};

PostPayMethodDefaultRequest::PostPayMethodDefaultRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.invoice.v1.PostPayMethodDefaultRequest)
}
PostPayMethodDefaultRequest::PostPayMethodDefaultRequest(const PostPayMethodDefaultRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostPayMethodDefaultRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.pay_method_id_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.pay_method_id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.pay_method_id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_pay_method_id().empty()) {
    _this->_impl_.pay_method_id_.Set(from._internal_pay_method_id(), _this->GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.invoice.v1.PostPayMethodDefaultRequest)
}

inline void PostPayMethodDefaultRequest::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.pay_method_id_) {}

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.pay_method_id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.pay_method_id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void PostPayMethodDefaultRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.pay_method_id_.Destroy();
}

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

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

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

const char* PostPayMethodDefaultRequest::_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) {
      // string pay_method_id = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_pay_method_id();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } 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* PostPayMethodDefaultRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.invoice.v1.PostPayMethodDefaultRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string pay_method_id = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_pay_method_id().empty()) {
    const std::string& _s = this->_internal_pay_method_id();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.invoice.v1.PostPayMethodDefaultRequest.pay_method_id");
    target = stream->WriteStringMaybeAliased(1, _s, 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.invoice.v1.PostPayMethodDefaultRequest)
  return target;
}

::size_t PostPayMethodDefaultRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.invoice.v1.PostPayMethodDefaultRequest)
  ::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 pay_method_id = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_pay_method_id().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_pay_method_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 PostPayMethodDefaultRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostPayMethodDefaultRequest*>(
      &from));
}

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

  if (!from._internal_pay_method_id().empty()) {
    _this->_internal_set_pay_method_id(from._internal_pay_method_id());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void PostPayMethodDefaultRequest::InternalSwap(PostPayMethodDefaultRequest* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.pay_method_id_, lhs_arena,
                                       &other->_impl_.pay_method_id_, rhs_arena);
}

std::string PostPayMethodDefaultRequest::GetTypeName() const {
  return "keyapis.invoice.v1.PostPayMethodDefaultRequest";
}

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

class PostPayMethodDefaultResponse_Error::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::invoice::v1::PostPayMethodDefaultResponse_Error, _impl_._oneof_case_);
  static const ::keyapis::invoice::v1::ValidationError& validation(const PostPayMethodDefaultResponse_Error* msg);
};

const ::keyapis::invoice::v1::ValidationError&
PostPayMethodDefaultResponse_Error::_Internal::validation(const PostPayMethodDefaultResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void PostPayMethodDefaultResponse_Error::set_allocated_validation(::keyapis::invoice::v1::ValidationError* validation) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (validation) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(validation);
    if (message_arena != submessage_arena) {
      validation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, validation, submessage_arena);
    }
    set_has_validation();
    _impl_.reason_.validation_ = validation;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.invoice.v1.PostPayMethodDefaultResponse.Error.validation)
}
PostPayMethodDefaultResponse_Error::PostPayMethodDefaultResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.invoice.v1.PostPayMethodDefaultResponse.Error)
}
PostPayMethodDefaultResponse_Error::PostPayMethodDefaultResponse_Error(const PostPayMethodDefaultResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostPayMethodDefaultResponse_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 kValidation: {
      _this->_internal_mutable_validation()->::keyapis::invoice::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.invoice.v1.PostPayMethodDefaultResponse.Error)
}

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

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

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

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

void PostPayMethodDefaultResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.invoice.v1.PostPayMethodDefaultResponse.Error)
  switch (reason_case()) {
    case kValidation: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.validation_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


void PostPayMethodDefaultResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.invoice.v1.PostPayMethodDefaultResponse.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* PostPayMethodDefaultResponse_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.invoice.v1.ValidationError validation = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_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* PostPayMethodDefaultResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.invoice.v1.PostPayMethodDefaultResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.invoice.v1.ValidationError validation = 1;
  if (reason_case() == kValidation) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::validation(this),
        _Internal::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.invoice.v1.PostPayMethodDefaultResponse.Error)
  return target;
}

::size_t PostPayMethodDefaultResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.invoice.v1.PostPayMethodDefaultResponse.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.invoice.v1.ValidationError validation = 1;
    case kValidation: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.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 PostPayMethodDefaultResponse_Error::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostPayMethodDefaultResponse_Error*>(
      &from));
}

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

  switch (from.reason_case()) {
    case kValidation: {
      _this->_internal_mutable_validation()->::keyapis::invoice::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void PostPayMethodDefaultResponse_Error::InternalSwap(PostPayMethodDefaultResponse_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 PostPayMethodDefaultResponse_Error::GetTypeName() const {
  return "keyapis.invoice.v1.PostPayMethodDefaultResponse.Error";
}

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

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

const ::keyapis::invoice::v1::PostPayMethodDefaultResponse_Error&
PostPayMethodDefaultResponse::_Internal::error(const PostPayMethodDefaultResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void PostPayMethodDefaultResponse::set_allocated_error(::keyapis::invoice::v1::PostPayMethodDefaultResponse_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.invoice.v1.PostPayMethodDefaultResponse.error)
}
PostPayMethodDefaultResponse::PostPayMethodDefaultResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.invoice.v1.PostPayMethodDefaultResponse)
}
PostPayMethodDefaultResponse::PostPayMethodDefaultResponse(const PostPayMethodDefaultResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostPayMethodDefaultResponse* 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 kError: {
      _this->_internal_mutable_error()->::keyapis::invoice::v1::PostPayMethodDefaultResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.invoice.v1.PostPayMethodDefaultResponse)
}

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

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

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

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

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


void PostPayMethodDefaultResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.invoice.v1.PostPayMethodDefaultResponse)
  ::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* PostPayMethodDefaultResponse::_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.invoice.v1.PostPayMethodDefaultResponse.Error error = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          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* PostPayMethodDefaultResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.invoice.v1.PostPayMethodDefaultResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.invoice.v1.PostPayMethodDefaultResponse.Error error = 1;
  if (type_case() == kError) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::error(this),
        _Internal::error(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.invoice.v1.PostPayMethodDefaultResponse)
  return target;
}

::size_t PostPayMethodDefaultResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.invoice.v1.PostPayMethodDefaultResponse)
  ::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.invoice.v1.PostPayMethodDefaultResponse.Error error = 1;
    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 PostPayMethodDefaultResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostPayMethodDefaultResponse*>(
      &from));
}

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

  switch (from.type_case()) {
    case kError: {
      _this->_internal_mutable_error()->::keyapis::invoice::v1::PostPayMethodDefaultResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void PostPayMethodDefaultResponse::InternalSwap(PostPayMethodDefaultResponse* 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 PostPayMethodDefaultResponse::GetTypeName() const {
  return "keyapis.invoice.v1.PostPayMethodDefaultResponse";
}

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

class PostPayMethodBankcardRequest::_Internal {
 public:
};

PostPayMethodBankcardRequest::PostPayMethodBankcardRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.invoice.v1.PostPayMethodBankcardRequest)
}
PostPayMethodBankcardRequest::PostPayMethodBankcardRequest(const PostPayMethodBankcardRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostPayMethodBankcardRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.url_return_ok_) {}

    , decltype(_impl_.url_return_no_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.url_return_ok_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.url_return_ok_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_url_return_ok().empty()) {
    _this->_impl_.url_return_ok_.Set(from._internal_url_return_ok(), _this->GetArenaForAllocation());
  }
  _impl_.url_return_no_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.url_return_no_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_url_return_no().empty()) {
    _this->_impl_.url_return_no_.Set(from._internal_url_return_no(), _this->GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.invoice.v1.PostPayMethodBankcardRequest)
}

inline void PostPayMethodBankcardRequest::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.url_return_ok_) {}

    , decltype(_impl_.url_return_no_) {}

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.url_return_ok_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.url_return_ok_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.url_return_no_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.url_return_no_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void PostPayMethodBankcardRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.url_return_ok_.Destroy();
  _impl_.url_return_no_.Destroy();
}

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

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

  _impl_.url_return_ok_.ClearToEmpty();
  _impl_.url_return_no_.ClearToEmpty();
  _internal_metadata_.Clear<std::string>();
}

const char* PostPayMethodBankcardRequest::_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) {
      // string url_return_ok = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_url_return_ok();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string url_return_no = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_url_return_no();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } 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* PostPayMethodBankcardRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.invoice.v1.PostPayMethodBankcardRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

  // string url_return_no = 2;
  if (!this->_internal_url_return_no().empty()) {
    const std::string& _s = this->_internal_url_return_no();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.invoice.v1.PostPayMethodBankcardRequest.url_return_no");
    target = stream->WriteStringMaybeAliased(2, _s, 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.invoice.v1.PostPayMethodBankcardRequest)
  return target;
}

::size_t PostPayMethodBankcardRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.invoice.v1.PostPayMethodBankcardRequest)
  ::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 url_return_ok = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_url_return_ok().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_url_return_ok());
  }

  // string url_return_no = 2;
  if (!this->_internal_url_return_no().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_url_return_no());
  }

  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 PostPayMethodBankcardRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostPayMethodBankcardRequest*>(
      &from));
}

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

  if (!from._internal_url_return_ok().empty()) {
    _this->_internal_set_url_return_ok(from._internal_url_return_ok());
  }
  if (!from._internal_url_return_no().empty()) {
    _this->_internal_set_url_return_no(from._internal_url_return_no());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void PostPayMethodBankcardRequest::InternalSwap(PostPayMethodBankcardRequest* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.url_return_ok_, lhs_arena,
                                       &other->_impl_.url_return_ok_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.url_return_no_, lhs_arena,
                                       &other->_impl_.url_return_no_, rhs_arena);
}

std::string PostPayMethodBankcardRequest::GetTypeName() const {
  return "keyapis.invoice.v1.PostPayMethodBankcardRequest";
}

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

class PostPayMethodBankcardResponse_Error::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::invoice::v1::PostPayMethodBankcardResponse_Error, _impl_._oneof_case_);
  static const ::keyapis::invoice::v1::ValidationError& validation(const PostPayMethodBankcardResponse_Error* msg);
};

const ::keyapis::invoice::v1::ValidationError&
PostPayMethodBankcardResponse_Error::_Internal::validation(const PostPayMethodBankcardResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void PostPayMethodBankcardResponse_Error::set_allocated_validation(::keyapis::invoice::v1::ValidationError* validation) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (validation) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(validation);
    if (message_arena != submessage_arena) {
      validation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, validation, submessage_arena);
    }
    set_has_validation();
    _impl_.reason_.validation_ = validation;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.invoice.v1.PostPayMethodBankcardResponse.Error.validation)
}
PostPayMethodBankcardResponse_Error::PostPayMethodBankcardResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.invoice.v1.PostPayMethodBankcardResponse.Error)
}
PostPayMethodBankcardResponse_Error::PostPayMethodBankcardResponse_Error(const PostPayMethodBankcardResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostPayMethodBankcardResponse_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 kValidation: {
      _this->_internal_mutable_validation()->::keyapis::invoice::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.invoice.v1.PostPayMethodBankcardResponse.Error)
}

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

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

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

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

void PostPayMethodBankcardResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.invoice.v1.PostPayMethodBankcardResponse.Error)
  switch (reason_case()) {
    case kValidation: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.validation_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


void PostPayMethodBankcardResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.invoice.v1.PostPayMethodBankcardResponse.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* PostPayMethodBankcardResponse_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.invoice.v1.ValidationError validation = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_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* PostPayMethodBankcardResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.invoice.v1.PostPayMethodBankcardResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.invoice.v1.ValidationError validation = 1;
  if (reason_case() == kValidation) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::validation(this),
        _Internal::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.invoice.v1.PostPayMethodBankcardResponse.Error)
  return target;
}

::size_t PostPayMethodBankcardResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.invoice.v1.PostPayMethodBankcardResponse.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.invoice.v1.ValidationError validation = 1;
    case kValidation: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.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 PostPayMethodBankcardResponse_Error::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostPayMethodBankcardResponse_Error*>(
      &from));
}

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

  switch (from.reason_case()) {
    case kValidation: {
      _this->_internal_mutable_validation()->::keyapis::invoice::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void PostPayMethodBankcardResponse_Error::InternalSwap(PostPayMethodBankcardResponse_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 PostPayMethodBankcardResponse_Error::GetTypeName() const {
  return "keyapis.invoice.v1.PostPayMethodBankcardResponse.Error";
}

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

class PostPayMethodBankcardResponse_RegisterData::_Internal {
 public:
};

PostPayMethodBankcardResponse_RegisterData::PostPayMethodBankcardResponse_RegisterData(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.invoice.v1.PostPayMethodBankcardResponse.RegisterData)
}
PostPayMethodBankcardResponse_RegisterData::PostPayMethodBankcardResponse_RegisterData(const PostPayMethodBankcardResponse_RegisterData& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostPayMethodBankcardResponse_RegisterData* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.req_id_) {}

    , decltype(_impl_.url_registration_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.req_id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.req_id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_req_id().empty()) {
    _this->_impl_.req_id_.Set(from._internal_req_id(), _this->GetArenaForAllocation());
  }
  _impl_.url_registration_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.url_registration_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_url_registration().empty()) {
    _this->_impl_.url_registration_.Set(from._internal_url_registration(), _this->GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.invoice.v1.PostPayMethodBankcardResponse.RegisterData)
}

inline void PostPayMethodBankcardResponse_RegisterData::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.req_id_) {}

    , decltype(_impl_.url_registration_) {}

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.req_id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.req_id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.url_registration_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.url_registration_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void PostPayMethodBankcardResponse_RegisterData::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.req_id_.Destroy();
  _impl_.url_registration_.Destroy();
}

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

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

  _impl_.req_id_.ClearToEmpty();
  _impl_.url_registration_.ClearToEmpty();
  _internal_metadata_.Clear<std::string>();
}

const char* PostPayMethodBankcardResponse_RegisterData::_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) {
      // string req_id = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_req_id();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string url_registration = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_url_registration();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } 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* PostPayMethodBankcardResponse_RegisterData::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.invoice.v1.PostPayMethodBankcardResponse.RegisterData)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string req_id = 1;
  if (!this->_internal_req_id().empty()) {
    const std::string& _s = this->_internal_req_id();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.invoice.v1.PostPayMethodBankcardResponse.RegisterData.req_id");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // string url_registration = 2;
  if (!this->_internal_url_registration().empty()) {
    const std::string& _s = this->_internal_url_registration();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.invoice.v1.PostPayMethodBankcardResponse.RegisterData.url_registration");
    target = stream->WriteStringMaybeAliased(2, _s, 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.invoice.v1.PostPayMethodBankcardResponse.RegisterData)
  return target;
}

::size_t PostPayMethodBankcardResponse_RegisterData::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.invoice.v1.PostPayMethodBankcardResponse.RegisterData)
  ::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 req_id = 1;
  if (!this->_internal_req_id().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_req_id());
  }

  // string url_registration = 2;
  if (!this->_internal_url_registration().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_url_registration());
  }

  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 PostPayMethodBankcardResponse_RegisterData::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostPayMethodBankcardResponse_RegisterData*>(
      &from));
}

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

  if (!from._internal_req_id().empty()) {
    _this->_internal_set_req_id(from._internal_req_id());
  }
  if (!from._internal_url_registration().empty()) {
    _this->_internal_set_url_registration(from._internal_url_registration());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void PostPayMethodBankcardResponse_RegisterData::InternalSwap(PostPayMethodBankcardResponse_RegisterData* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.req_id_, lhs_arena,
                                       &other->_impl_.req_id_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.url_registration_, lhs_arena,
                                       &other->_impl_.url_registration_, rhs_arena);
}

std::string PostPayMethodBankcardResponse_RegisterData::GetTypeName() const {
  return "keyapis.invoice.v1.PostPayMethodBankcardResponse.RegisterData";
}

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

class PostPayMethodBankcardResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::invoice::v1::PostPayMethodBankcardResponse, _impl_._oneof_case_);
  static const ::keyapis::invoice::v1::PostPayMethodBankcardResponse_Error& error(const PostPayMethodBankcardResponse* msg);
  static const ::keyapis::invoice::v1::PostPayMethodBankcardResponse_RegisterData& data(const PostPayMethodBankcardResponse* msg);
};

const ::keyapis::invoice::v1::PostPayMethodBankcardResponse_Error&
PostPayMethodBankcardResponse::_Internal::error(const PostPayMethodBankcardResponse* msg) {
  return *msg->_impl_.type_.error_;
}
const ::keyapis::invoice::v1::PostPayMethodBankcardResponse_RegisterData&
PostPayMethodBankcardResponse::_Internal::data(const PostPayMethodBankcardResponse* msg) {
  return *msg->_impl_.type_.data_;
}
void PostPayMethodBankcardResponse::set_allocated_error(::keyapis::invoice::v1::PostPayMethodBankcardResponse_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.invoice.v1.PostPayMethodBankcardResponse.error)
}
void PostPayMethodBankcardResponse::set_allocated_data(::keyapis::invoice::v1::PostPayMethodBankcardResponse_RegisterData* 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.invoice.v1.PostPayMethodBankcardResponse.data)
}
PostPayMethodBankcardResponse::PostPayMethodBankcardResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.invoice.v1.PostPayMethodBankcardResponse)
}
PostPayMethodBankcardResponse::PostPayMethodBankcardResponse(const PostPayMethodBankcardResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostPayMethodBankcardResponse* 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 kError: {
      _this->_internal_mutable_error()->::keyapis::invoice::v1::PostPayMethodBankcardResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case kData: {
      _this->_internal_mutable_data()->::keyapis::invoice::v1::PostPayMethodBankcardResponse_RegisterData::MergeFrom(
          from._internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.invoice.v1.PostPayMethodBankcardResponse)
}

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

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

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

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

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


void PostPayMethodBankcardResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.invoice.v1.PostPayMethodBankcardResponse)
  ::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* PostPayMethodBankcardResponse::_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.invoice.v1.PostPayMethodBankcardResponse.Error error = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_error(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.invoice.v1.PostPayMethodBankcardResponse.RegisterData data = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          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* PostPayMethodBankcardResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.invoice.v1.PostPayMethodBankcardResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (type_case()) {
    case kError: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, _Internal::error(this),
          _Internal::error(this).GetCachedSize(), target, stream);
      break;
    }
    case kData: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::data(this),
          _Internal::data(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.invoice.v1.PostPayMethodBankcardResponse)
  return target;
}

::size_t PostPayMethodBankcardResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.invoice.v1.PostPayMethodBankcardResponse)
  ::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.invoice.v1.PostPayMethodBankcardResponse.Error error = 1;
    case kError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.error_);
      break;
    }
    // .keyapis.invoice.v1.PostPayMethodBankcardResponse.RegisterData data = 2;
    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 PostPayMethodBankcardResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostPayMethodBankcardResponse*>(
      &from));
}

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

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

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

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

void PostPayMethodBankcardResponse::InternalSwap(PostPayMethodBankcardResponse* 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 PostPayMethodBankcardResponse::GetTypeName() const {
  return "keyapis.invoice.v1.PostPayMethodBankcardResponse";
}

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

class PostPayMethodSbpRequest::_Internal {
 public:
};

PostPayMethodSbpRequest::PostPayMethodSbpRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.invoice.v1.PostPayMethodSbpRequest)
}
PostPayMethodSbpRequest::PostPayMethodSbpRequest(const PostPayMethodSbpRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostPayMethodSbpRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.url_return_ok_) {}

    , decltype(_impl_.url_return_no_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.url_return_ok_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.url_return_ok_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_url_return_ok().empty()) {
    _this->_impl_.url_return_ok_.Set(from._internal_url_return_ok(), _this->GetArenaForAllocation());
  }
  _impl_.url_return_no_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.url_return_no_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_url_return_no().empty()) {
    _this->_impl_.url_return_no_.Set(from._internal_url_return_no(), _this->GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.invoice.v1.PostPayMethodSbpRequest)
}

inline void PostPayMethodSbpRequest::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.url_return_ok_) {}

    , decltype(_impl_.url_return_no_) {}

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.url_return_ok_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.url_return_ok_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.url_return_no_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.url_return_no_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void PostPayMethodSbpRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.url_return_ok_.Destroy();
  _impl_.url_return_no_.Destroy();
}

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

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

  _impl_.url_return_ok_.ClearToEmpty();
  _impl_.url_return_no_.ClearToEmpty();
  _internal_metadata_.Clear<std::string>();
}

const char* PostPayMethodSbpRequest::_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) {
      // string url_return_ok = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_url_return_ok();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string url_return_no = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_url_return_no();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } 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* PostPayMethodSbpRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.invoice.v1.PostPayMethodSbpRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

  // string url_return_no = 2;
  if (!this->_internal_url_return_no().empty()) {
    const std::string& _s = this->_internal_url_return_no();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.invoice.v1.PostPayMethodSbpRequest.url_return_no");
    target = stream->WriteStringMaybeAliased(2, _s, 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.invoice.v1.PostPayMethodSbpRequest)
  return target;
}

::size_t PostPayMethodSbpRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.invoice.v1.PostPayMethodSbpRequest)
  ::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 url_return_ok = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_url_return_ok().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_url_return_ok());
  }

  // string url_return_no = 2;
  if (!this->_internal_url_return_no().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_url_return_no());
  }

  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 PostPayMethodSbpRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostPayMethodSbpRequest*>(
      &from));
}

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

  if (!from._internal_url_return_ok().empty()) {
    _this->_internal_set_url_return_ok(from._internal_url_return_ok());
  }
  if (!from._internal_url_return_no().empty()) {
    _this->_internal_set_url_return_no(from._internal_url_return_no());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void PostPayMethodSbpRequest::InternalSwap(PostPayMethodSbpRequest* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.url_return_ok_, lhs_arena,
                                       &other->_impl_.url_return_ok_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.url_return_no_, lhs_arena,
                                       &other->_impl_.url_return_no_, rhs_arena);
}

std::string PostPayMethodSbpRequest::GetTypeName() const {
  return "keyapis.invoice.v1.PostPayMethodSbpRequest";
}

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

class PostPayMethodSbpResponse_Error::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::invoice::v1::PostPayMethodSbpResponse_Error, _impl_._oneof_case_);
  static const ::keyapis::invoice::v1::ValidationError& validation(const PostPayMethodSbpResponse_Error* msg);
};

const ::keyapis::invoice::v1::ValidationError&
PostPayMethodSbpResponse_Error::_Internal::validation(const PostPayMethodSbpResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void PostPayMethodSbpResponse_Error::set_allocated_validation(::keyapis::invoice::v1::ValidationError* validation) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (validation) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(validation);
    if (message_arena != submessage_arena) {
      validation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, validation, submessage_arena);
    }
    set_has_validation();
    _impl_.reason_.validation_ = validation;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.invoice.v1.PostPayMethodSbpResponse.Error.validation)
}
PostPayMethodSbpResponse_Error::PostPayMethodSbpResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.invoice.v1.PostPayMethodSbpResponse.Error)
}
PostPayMethodSbpResponse_Error::PostPayMethodSbpResponse_Error(const PostPayMethodSbpResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostPayMethodSbpResponse_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 kValidation: {
      _this->_internal_mutable_validation()->::keyapis::invoice::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.invoice.v1.PostPayMethodSbpResponse.Error)
}

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

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

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

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

void PostPayMethodSbpResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.invoice.v1.PostPayMethodSbpResponse.Error)
  switch (reason_case()) {
    case kValidation: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.validation_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


void PostPayMethodSbpResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.invoice.v1.PostPayMethodSbpResponse.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* PostPayMethodSbpResponse_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.invoice.v1.ValidationError validation = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_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* PostPayMethodSbpResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.invoice.v1.PostPayMethodSbpResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.invoice.v1.ValidationError validation = 1;
  if (reason_case() == kValidation) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::validation(this),
        _Internal::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.invoice.v1.PostPayMethodSbpResponse.Error)
  return target;
}

::size_t PostPayMethodSbpResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.invoice.v1.PostPayMethodSbpResponse.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.invoice.v1.ValidationError validation = 1;
    case kValidation: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.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 PostPayMethodSbpResponse_Error::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostPayMethodSbpResponse_Error*>(
      &from));
}

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

  switch (from.reason_case()) {
    case kValidation: {
      _this->_internal_mutable_validation()->::keyapis::invoice::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void PostPayMethodSbpResponse_Error::InternalSwap(PostPayMethodSbpResponse_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 PostPayMethodSbpResponse_Error::GetTypeName() const {
  return "keyapis.invoice.v1.PostPayMethodSbpResponse.Error";
}

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

class PostPayMethodSbpResponse_RegisterData::_Internal {
 public:
};

PostPayMethodSbpResponse_RegisterData::PostPayMethodSbpResponse_RegisterData(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.invoice.v1.PostPayMethodSbpResponse.RegisterData)
}
PostPayMethodSbpResponse_RegisterData::PostPayMethodSbpResponse_RegisterData(const PostPayMethodSbpResponse_RegisterData& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostPayMethodSbpResponse_RegisterData* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.req_id_) {}

    , decltype(_impl_.url_registration_) {}

    , decltype(_impl_.sbp_payload_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.req_id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.req_id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_req_id().empty()) {
    _this->_impl_.req_id_.Set(from._internal_req_id(), _this->GetArenaForAllocation());
  }
  _impl_.url_registration_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.url_registration_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_url_registration().empty()) {
    _this->_impl_.url_registration_.Set(from._internal_url_registration(), _this->GetArenaForAllocation());
  }
  _impl_.sbp_payload_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.sbp_payload_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_sbp_payload().empty()) {
    _this->_impl_.sbp_payload_.Set(from._internal_sbp_payload(), _this->GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.invoice.v1.PostPayMethodSbpResponse.RegisterData)
}

inline void PostPayMethodSbpResponse_RegisterData::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.req_id_) {}

    , decltype(_impl_.url_registration_) {}

    , decltype(_impl_.sbp_payload_) {}

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.req_id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.req_id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.url_registration_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.url_registration_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.sbp_payload_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.sbp_payload_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void PostPayMethodSbpResponse_RegisterData::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.req_id_.Destroy();
  _impl_.url_registration_.Destroy();
  _impl_.sbp_payload_.Destroy();
}

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

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

  _impl_.req_id_.ClearToEmpty();
  _impl_.url_registration_.ClearToEmpty();
  _impl_.sbp_payload_.ClearToEmpty();
  _internal_metadata_.Clear<std::string>();
}

const char* PostPayMethodSbpResponse_RegisterData::_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) {
      // string req_id = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_req_id();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string url_registration = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_url_registration();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string sbp_payload = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_sbp_payload();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } 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* PostPayMethodSbpResponse_RegisterData::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.invoice.v1.PostPayMethodSbpResponse.RegisterData)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string req_id = 1;
  if (!this->_internal_req_id().empty()) {
    const std::string& _s = this->_internal_req_id();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.invoice.v1.PostPayMethodSbpResponse.RegisterData.req_id");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // string url_registration = 2;
  if (!this->_internal_url_registration().empty()) {
    const std::string& _s = this->_internal_url_registration();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.invoice.v1.PostPayMethodSbpResponse.RegisterData.url_registration");
    target = stream->WriteStringMaybeAliased(2, _s, target);
  }

  // string sbp_payload = 3;
  if (!this->_internal_sbp_payload().empty()) {
    const std::string& _s = this->_internal_sbp_payload();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.invoice.v1.PostPayMethodSbpResponse.RegisterData.sbp_payload");
    target = stream->WriteStringMaybeAliased(3, _s, 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.invoice.v1.PostPayMethodSbpResponse.RegisterData)
  return target;
}

::size_t PostPayMethodSbpResponse_RegisterData::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.invoice.v1.PostPayMethodSbpResponse.RegisterData)
  ::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 req_id = 1;
  if (!this->_internal_req_id().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_req_id());
  }

  // string url_registration = 2;
  if (!this->_internal_url_registration().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_url_registration());
  }

  // string sbp_payload = 3;
  if (!this->_internal_sbp_payload().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_sbp_payload());
  }

  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 PostPayMethodSbpResponse_RegisterData::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostPayMethodSbpResponse_RegisterData*>(
      &from));
}

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

  if (!from._internal_req_id().empty()) {
    _this->_internal_set_req_id(from._internal_req_id());
  }
  if (!from._internal_url_registration().empty()) {
    _this->_internal_set_url_registration(from._internal_url_registration());
  }
  if (!from._internal_sbp_payload().empty()) {
    _this->_internal_set_sbp_payload(from._internal_sbp_payload());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void PostPayMethodSbpResponse_RegisterData::InternalSwap(PostPayMethodSbpResponse_RegisterData* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.req_id_, lhs_arena,
                                       &other->_impl_.req_id_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.url_registration_, lhs_arena,
                                       &other->_impl_.url_registration_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.sbp_payload_, lhs_arena,
                                       &other->_impl_.sbp_payload_, rhs_arena);
}

std::string PostPayMethodSbpResponse_RegisterData::GetTypeName() const {
  return "keyapis.invoice.v1.PostPayMethodSbpResponse.RegisterData";
}

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

class PostPayMethodSbpResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::invoice::v1::PostPayMethodSbpResponse, _impl_._oneof_case_);
  static const ::keyapis::invoice::v1::PostPayMethodSbpResponse_Error& error(const PostPayMethodSbpResponse* msg);
  static const ::keyapis::invoice::v1::PostPayMethodSbpResponse_RegisterData& data(const PostPayMethodSbpResponse* msg);
};

const ::keyapis::invoice::v1::PostPayMethodSbpResponse_Error&
PostPayMethodSbpResponse::_Internal::error(const PostPayMethodSbpResponse* msg) {
  return *msg->_impl_.type_.error_;
}
const ::keyapis::invoice::v1::PostPayMethodSbpResponse_RegisterData&
PostPayMethodSbpResponse::_Internal::data(const PostPayMethodSbpResponse* msg) {
  return *msg->_impl_.type_.data_;
}
void PostPayMethodSbpResponse::set_allocated_error(::keyapis::invoice::v1::PostPayMethodSbpResponse_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.invoice.v1.PostPayMethodSbpResponse.error)
}
void PostPayMethodSbpResponse::set_allocated_data(::keyapis::invoice::v1::PostPayMethodSbpResponse_RegisterData* 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.invoice.v1.PostPayMethodSbpResponse.data)
}
PostPayMethodSbpResponse::PostPayMethodSbpResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.invoice.v1.PostPayMethodSbpResponse)
}
PostPayMethodSbpResponse::PostPayMethodSbpResponse(const PostPayMethodSbpResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostPayMethodSbpResponse* 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 kError: {
      _this->_internal_mutable_error()->::keyapis::invoice::v1::PostPayMethodSbpResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case kData: {
      _this->_internal_mutable_data()->::keyapis::invoice::v1::PostPayMethodSbpResponse_RegisterData::MergeFrom(
          from._internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.invoice.v1.PostPayMethodSbpResponse)
}

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

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

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

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

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


void PostPayMethodSbpResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.invoice.v1.PostPayMethodSbpResponse)
  ::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* PostPayMethodSbpResponse::_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.invoice.v1.PostPayMethodSbpResponse.Error error = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_error(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.invoice.v1.PostPayMethodSbpResponse.RegisterData data = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          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* PostPayMethodSbpResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.invoice.v1.PostPayMethodSbpResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (type_case()) {
    case kError: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, _Internal::error(this),
          _Internal::error(this).GetCachedSize(), target, stream);
      break;
    }
    case kData: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::data(this),
          _Internal::data(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.invoice.v1.PostPayMethodSbpResponse)
  return target;
}

::size_t PostPayMethodSbpResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.invoice.v1.PostPayMethodSbpResponse)
  ::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.invoice.v1.PostPayMethodSbpResponse.Error error = 1;
    case kError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.error_);
      break;
    }
    // .keyapis.invoice.v1.PostPayMethodSbpResponse.RegisterData data = 2;
    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 PostPayMethodSbpResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostPayMethodSbpResponse*>(
      &from));
}

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

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

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

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

void PostPayMethodSbpResponse::InternalSwap(PostPayMethodSbpResponse* 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 PostPayMethodSbpResponse::GetTypeName() const {
  return "keyapis.invoice.v1.PostPayMethodSbpResponse";
}

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

class ValidationError::_Internal {
 public:
};

ValidationError::ValidationError(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.invoice.v1.ValidationError)
}
ValidationError::ValidationError(const ValidationError& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  ValidationError* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.path_) {}

    , decltype(_impl_.message_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.path_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.path_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_path().empty()) {
    _this->_impl_.path_.Set(from._internal_path(), _this->GetArenaForAllocation());
  }
  _impl_.message_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.message_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_message().empty()) {
    _this->_impl_.message_.Set(from._internal_message(), _this->GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.invoice.v1.ValidationError)
}

inline void ValidationError::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.path_) {}

    , decltype(_impl_.message_) {}

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.path_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.path_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.message_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.message_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void ValidationError::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.path_.Destroy();
  _impl_.message_.Destroy();
}

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

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

  _impl_.path_.ClearToEmpty();
  _impl_.message_.ClearToEmpty();
  _internal_metadata_.Clear<std::string>();
}

const char* 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) {
      // string path = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_path();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string message = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_message();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } 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* ValidationError::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.invoice.v1.ValidationError)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

  // string message = 2 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_message().empty()) {
    const std::string& _s = this->_internal_message();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.invoice.v1.ValidationError.message");
    target = stream->WriteStringMaybeAliased(2, _s, 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.invoice.v1.ValidationError)
  return target;
}

::size_t ValidationError::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.invoice.v1.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;

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

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

  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 ValidationError::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const ValidationError*>(
      &from));
}

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

  if (!from._internal_path().empty()) {
    _this->_internal_set_path(from._internal_path());
  }
  if (!from._internal_message().empty()) {
    _this->_internal_set_message(from._internal_message());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void ValidationError::InternalSwap(ValidationError* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.path_, lhs_arena,
                                       &other->_impl_.path_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.message_, lhs_arena,
                                       &other->_impl_.message_, rhs_arena);
}

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

// @@protoc_insertion_point(namespace_scope)
}  // namespace v1
}  // namespace invoice
}  // namespace keyapis
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::keyapis::invoice::v1::PayMethod*
Arena::CreateMaybeMessage< ::keyapis::invoice::v1::PayMethod >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::invoice::v1::PayMethod >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::invoice::v1::GetPayMethodListRequest*
Arena::CreateMaybeMessage< ::keyapis::invoice::v1::GetPayMethodListRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::invoice::v1::GetPayMethodListRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::invoice::v1::GetPayMethodListResponse*
Arena::CreateMaybeMessage< ::keyapis::invoice::v1::GetPayMethodListResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::invoice::v1::GetPayMethodListResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::invoice::v1::DeletePayMethodRequest*
Arena::CreateMaybeMessage< ::keyapis::invoice::v1::DeletePayMethodRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::invoice::v1::DeletePayMethodRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::invoice::v1::DeletePayMethodResponse*
Arena::CreateMaybeMessage< ::keyapis::invoice::v1::DeletePayMethodResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::invoice::v1::DeletePayMethodResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::invoice::v1::PostPayMethodDefaultRequest*
Arena::CreateMaybeMessage< ::keyapis::invoice::v1::PostPayMethodDefaultRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::invoice::v1::PostPayMethodDefaultRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::invoice::v1::PostPayMethodDefaultResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::invoice::v1::PostPayMethodDefaultResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::invoice::v1::PostPayMethodDefaultResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::invoice::v1::PostPayMethodDefaultResponse*
Arena::CreateMaybeMessage< ::keyapis::invoice::v1::PostPayMethodDefaultResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::invoice::v1::PostPayMethodDefaultResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::invoice::v1::PostPayMethodBankcardRequest*
Arena::CreateMaybeMessage< ::keyapis::invoice::v1::PostPayMethodBankcardRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::invoice::v1::PostPayMethodBankcardRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::invoice::v1::PostPayMethodBankcardResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::invoice::v1::PostPayMethodBankcardResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::invoice::v1::PostPayMethodBankcardResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::invoice::v1::PostPayMethodBankcardResponse_RegisterData*
Arena::CreateMaybeMessage< ::keyapis::invoice::v1::PostPayMethodBankcardResponse_RegisterData >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::invoice::v1::PostPayMethodBankcardResponse_RegisterData >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::invoice::v1::PostPayMethodBankcardResponse*
Arena::CreateMaybeMessage< ::keyapis::invoice::v1::PostPayMethodBankcardResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::invoice::v1::PostPayMethodBankcardResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::invoice::v1::PostPayMethodSbpRequest*
Arena::CreateMaybeMessage< ::keyapis::invoice::v1::PostPayMethodSbpRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::invoice::v1::PostPayMethodSbpRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::invoice::v1::PostPayMethodSbpResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::invoice::v1::PostPayMethodSbpResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::invoice::v1::PostPayMethodSbpResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::invoice::v1::PostPayMethodSbpResponse_RegisterData*
Arena::CreateMaybeMessage< ::keyapis::invoice::v1::PostPayMethodSbpResponse_RegisterData >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::invoice::v1::PostPayMethodSbpResponse_RegisterData >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::invoice::v1::PostPayMethodSbpResponse*
Arena::CreateMaybeMessage< ::keyapis::invoice::v1::PostPayMethodSbpResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::invoice::v1::PostPayMethodSbpResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::invoice::v1::ValidationError*
Arena::CreateMaybeMessage< ::keyapis::invoice::v1::ValidationError >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::invoice::v1::ValidationError >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"
