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

#include "keyapis/user/v1/keyapis_user_user_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 user {
namespace v1 {
template <typename>
PROTOBUF_CONSTEXPR DeleteUserSessionsRequest::DeleteUserSessionsRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.id_)*/ 0

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteUserSessionsRequestDefaultTypeInternal _DeleteUserSessionsRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeleteUserSessionsResponse_Error::DeleteUserSessionsResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct DeleteUserSessionsResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DeleteUserSessionsResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeleteUserSessionsResponse_ErrorDefaultTypeInternal() {}
  union {
    DeleteUserSessionsResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteUserSessionsResponse_ErrorDefaultTypeInternal _DeleteUserSessionsResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeleteUserSessionsResponse::DeleteUserSessionsResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct DeleteUserSessionsResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DeleteUserSessionsResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeleteUserSessionsResponseDefaultTypeInternal() {}
  union {
    DeleteUserSessionsResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteUserSessionsResponseDefaultTypeInternal _DeleteUserSessionsResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR User_SavingError_Conflict::User_SavingError_Conflict(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct User_SavingError_ConflictDefaultTypeInternal {
  PROTOBUF_CONSTEXPR User_SavingError_ConflictDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~User_SavingError_ConflictDefaultTypeInternal() {}
  union {
    User_SavingError_Conflict _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 User_SavingError_ConflictDefaultTypeInternal _User_SavingError_Conflict_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR User_SavingError_UserTypeForbidden::User_SavingError_UserTypeForbidden(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct User_SavingError_UserTypeForbiddenDefaultTypeInternal {
  PROTOBUF_CONSTEXPR User_SavingError_UserTypeForbiddenDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~User_SavingError_UserTypeForbiddenDefaultTypeInternal() {}
  union {
    User_SavingError_UserTypeForbidden _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 User_SavingError_UserTypeForbiddenDefaultTypeInternal _User_SavingError_UserTypeForbidden_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR User_SavingError_UserStatusForbidden::User_SavingError_UserStatusForbidden(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct User_SavingError_UserStatusForbiddenDefaultTypeInternal {
  PROTOBUF_CONSTEXPR User_SavingError_UserStatusForbiddenDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~User_SavingError_UserStatusForbiddenDefaultTypeInternal() {}
  union {
    User_SavingError_UserStatusForbidden _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 User_SavingError_UserStatusForbiddenDefaultTypeInternal _User_SavingError_UserStatusForbidden_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR User_SavingError_MrfIdRequiredForUserType::User_SavingError_MrfIdRequiredForUserType(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct User_SavingError_MrfIdRequiredForUserTypeDefaultTypeInternal {
  PROTOBUF_CONSTEXPR User_SavingError_MrfIdRequiredForUserTypeDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~User_SavingError_MrfIdRequiredForUserTypeDefaultTypeInternal() {}
  union {
    User_SavingError_MrfIdRequiredForUserType _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 User_SavingError_MrfIdRequiredForUserTypeDefaultTypeInternal _User_SavingError_MrfIdRequiredForUserType_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR User_SavingError_CreatorMustBeAdmin::User_SavingError_CreatorMustBeAdmin(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct User_SavingError_CreatorMustBeAdminDefaultTypeInternal {
  PROTOBUF_CONSTEXPR User_SavingError_CreatorMustBeAdminDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~User_SavingError_CreatorMustBeAdminDefaultTypeInternal() {}
  union {
    User_SavingError_CreatorMustBeAdmin _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 User_SavingError_CreatorMustBeAdminDefaultTypeInternal _User_SavingError_CreatorMustBeAdmin_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR User_SavingError_RfIdDoesNotMatchMrfId::User_SavingError_RfIdDoesNotMatchMrfId(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct User_SavingError_RfIdDoesNotMatchMrfIdDefaultTypeInternal {
  PROTOBUF_CONSTEXPR User_SavingError_RfIdDoesNotMatchMrfIdDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~User_SavingError_RfIdDoesNotMatchMrfIdDefaultTypeInternal() {}
  union {
    User_SavingError_RfIdDoesNotMatchMrfId _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 User_SavingError_RfIdDoesNotMatchMrfIdDefaultTypeInternal _User_SavingError_RfIdDoesNotMatchMrfId_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR User_SavingError_EmailIsAlreadyTaken::User_SavingError_EmailIsAlreadyTaken(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct User_SavingError_EmailIsAlreadyTakenDefaultTypeInternal {
  PROTOBUF_CONSTEXPR User_SavingError_EmailIsAlreadyTakenDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~User_SavingError_EmailIsAlreadyTakenDefaultTypeInternal() {}
  union {
    User_SavingError_EmailIsAlreadyTaken _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 User_SavingError_EmailIsAlreadyTakenDefaultTypeInternal _User_SavingError_EmailIsAlreadyTaken_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR User_SavingError_EntityNotFound::User_SavingError_EntityNotFound(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.field_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 User_SavingError_EntityNotFoundDefaultTypeInternal _User_SavingError_EntityNotFound_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR User_SavingError::User_SavingError(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct User_SavingErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR User_SavingErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~User_SavingErrorDefaultTypeInternal() {}
  union {
    User_SavingError _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 User_SavingErrorDefaultTypeInternal _User_SavingError_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR User::User(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.login_)*/nullptr
  , /*decltype(_impl_.email_)*/nullptr
  , /*decltype(_impl_.phone_number_)*/nullptr
  , /*decltype(_impl_.company_id_)*/nullptr
  , /*decltype(_impl_.mrf_id_)*/nullptr
  , /*decltype(_impl_.rf_id_)*/nullptr
  , /*decltype(_impl_.created_at_)*/nullptr
  , /*decltype(_impl_.changed_at_)*/nullptr
  , /*decltype(_impl_.activated_at_)*/nullptr
  , /*decltype(_impl_.blocked_at_)*/nullptr
  , /*decltype(_impl_.creator_user_id_)*/nullptr
  , /*decltype(_impl_.owner_user_id_)*/nullptr
  , /*decltype(_impl_.invoice_email_)*/nullptr
  , /*decltype(_impl_.vc_user_id_)*/nullptr
  , /*decltype(_impl_.description_)*/nullptr
  , /*decltype(_impl_.ustore_user_id_)*/nullptr
  , /*decltype(_impl_.env_url_)*/nullptr
  , /*decltype(_impl_.id_)*/ 0

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UserDefaultTypeInternal _User_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR UserCode::UserCode(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.created_at_)*/nullptr
  , /*decltype(_impl_.code_)*/ 0

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

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

  , /*decltype(_impl_.creator_user_type_)*/ 0
} {}
struct UserCodeDefaultTypeInternal {
  PROTOBUF_CONSTEXPR UserCodeDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~UserCodeDefaultTypeInternal() {}
  union {
    UserCode _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UserCodeDefaultTypeInternal _UserCode_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetUserRequest::GetUserRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.id_)*/ 0

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetUserRequestDefaultTypeInternal _GetUserRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetUserResponse_Error::GetUserResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetUserResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetUserResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetUserResponse_ErrorDefaultTypeInternal() {}
  union {
    GetUserResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetUserResponse_ErrorDefaultTypeInternal _GetUserResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetUserResponse::GetUserResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetUserResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetUserResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetUserResponseDefaultTypeInternal() {}
  union {
    GetUserResponse _instance;
  };
};

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetUserListRequestDefaultTypeInternal _GetUserListRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetUserListResponse_Error::GetUserListResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetUserListResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetUserListResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetUserListResponse_ErrorDefaultTypeInternal() {}
  union {
    GetUserListResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetUserListResponse_ErrorDefaultTypeInternal _GetUserListResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetUserListResponse::GetUserListResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetUserListResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetUserListResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetUserListResponseDefaultTypeInternal() {}
  union {
    GetUserListResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetUserListResponseDefaultTypeInternal _GetUserListResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetUserCountRequest::GetUserCountRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.filter_)*/nullptr} {}
struct GetUserCountRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetUserCountRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetUserCountRequestDefaultTypeInternal() {}
  union {
    GetUserCountRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetUserCountRequestDefaultTypeInternal _GetUserCountRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetUserCountResponse_Error::GetUserCountResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetUserCountResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetUserCountResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetUserCountResponse_ErrorDefaultTypeInternal() {}
  union {
    GetUserCountResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetUserCountResponse_ErrorDefaultTypeInternal _GetUserCountResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetUserCountResponse::GetUserCountResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetUserCountResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetUserCountResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetUserCountResponseDefaultTypeInternal() {}
  union {
    GetUserCountResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetUserCountResponseDefaultTypeInternal _GetUserCountResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeleteUserRequest::DeleteUserRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.id_)*/ 0

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteUserRequestDefaultTypeInternal _DeleteUserRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeleteUserResponse_Error::DeleteUserResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct DeleteUserResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DeleteUserResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeleteUserResponse_ErrorDefaultTypeInternal() {}
  union {
    DeleteUserResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteUserResponse_ErrorDefaultTypeInternal _DeleteUserResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeleteUserResponse::DeleteUserResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct DeleteUserResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DeleteUserResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeleteUserResponseDefaultTypeInternal() {}
  union {
    DeleteUserResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteUserResponseDefaultTypeInternal _DeleteUserResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetUserCodeRequest::GetUserCodeRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.id_)*/ 0

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetUserCodeRequestDefaultTypeInternal _GetUserCodeRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetUserCodeResponse_Error_UserCodeNotFound::GetUserCodeResponse_Error_UserCodeNotFound(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct GetUserCodeResponse_Error_UserCodeNotFoundDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetUserCodeResponse_Error_UserCodeNotFoundDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetUserCodeResponse_Error_UserCodeNotFoundDefaultTypeInternal() {}
  union {
    GetUserCodeResponse_Error_UserCodeNotFound _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetUserCodeResponse_Error_UserCodeNotFoundDefaultTypeInternal _GetUserCodeResponse_Error_UserCodeNotFound_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetUserCodeResponse_Error::GetUserCodeResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetUserCodeResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetUserCodeResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetUserCodeResponse_ErrorDefaultTypeInternal() {}
  union {
    GetUserCodeResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetUserCodeResponse_ErrorDefaultTypeInternal _GetUserCodeResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetUserCodeResponse::GetUserCodeResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetUserCodeResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetUserCodeResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetUserCodeResponseDefaultTypeInternal() {}
  union {
    GetUserCodeResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetUserCodeResponseDefaultTypeInternal _GetUserCodeResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostUserCodeCreateRequest::PostUserCodeCreateRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.user_code_)*/nullptr} {}
struct PostUserCodeCreateRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostUserCodeCreateRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostUserCodeCreateRequestDefaultTypeInternal() {}
  union {
    PostUserCodeCreateRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostUserCodeCreateRequestDefaultTypeInternal _PostUserCodeCreateRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostUserCodeCreateResponse_Error::PostUserCodeCreateResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostUserCodeCreateResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostUserCodeCreateResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostUserCodeCreateResponse_ErrorDefaultTypeInternal() {}
  union {
    PostUserCodeCreateResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostUserCodeCreateResponse_ErrorDefaultTypeInternal _PostUserCodeCreateResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostUserCodeCreateResponse::PostUserCodeCreateResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostUserCodeCreateResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostUserCodeCreateResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostUserCodeCreateResponseDefaultTypeInternal() {}
  union {
    PostUserCodeCreateResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostUserCodeCreateResponseDefaultTypeInternal _PostUserCodeCreateResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR UserFilter::UserFilter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.company_ids_)*/ {}
  ,/* _impl_._company_ids_cached_byte_size_ = */ { 0 }

  , /*decltype(_impl_.user_types_)*/ {}
  , /*decltype(_impl_._user_types_cached_byte_size_)*/ { 0 }

  , /*decltype(_impl_.user_status_types_)*/ {}
  , /*decltype(_impl_._user_status_types_cached_byte_size_)*/ { 0 }

  , /*decltype(_impl_.emails_)*/{}
  , /*decltype(_impl_.phone_numbers_)*/{}
  , /*decltype(_impl_.logins_)*/{}
  , /*decltype(_impl_.text_)*/nullptr
  , /*decltype(_impl_.contacts_)*/nullptr} {}
struct UserFilterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR UserFilterDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~UserFilterDefaultTypeInternal() {}
  union {
    UserFilter _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UserFilterDefaultTypeInternal _UserFilter_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR UserPaging::UserPaging(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.order_by_type_)*/ 0

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

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

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UserPagingDefaultTypeInternal _UserPaging_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostUserRequest::PostUserRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.data_)*/nullptr} {}
struct PostUserRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostUserRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostUserRequestDefaultTypeInternal() {}
  union {
    PostUserRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostUserRequestDefaultTypeInternal _PostUserRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostUserResponse_Error::PostUserResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostUserResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostUserResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostUserResponse_ErrorDefaultTypeInternal() {}
  union {
    PostUserResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostUserResponse_ErrorDefaultTypeInternal _PostUserResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostUserResponse::PostUserResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostUserResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostUserResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostUserResponseDefaultTypeInternal() {}
  union {
    PostUserResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostUserResponseDefaultTypeInternal _PostUserResponse_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 user
}  // namespace keyapis
namespace keyapis {
namespace user {
namespace v1 {
bool User_Type_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
    case 6:
    case 7:
    case 8:
    case 9:
    case 10:
    case 11:
    case 12:
    case 13:
    case 14:
    case 15:
    case 16:
      return true;
    default:
      return false;
  }
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string>
    User_Type_strings[17] = {};

static const char User_Type_names[] = {
    "ADMIN"
    "APPLICATION"
    "BACKOFFICE"
    "BTI"
    "DEVICE_ADMIN"
    "EMPLOYEE"
    "EXTERNAL_SELLER"
    "LTP_FIRST"
    "MANAGER"
    "MASTER"
    "MRF"
    "OWNER"
    "ROOT"
    "SELLER"
    "SERVICE"
    "SLAVE"
    "TYPE_UNKNOWN"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry User_Type_entries[] =
    {
        {{&User_Type_names[0], 5}, 5},
        {{&User_Type_names[5], 11}, 14},
        {{&User_Type_names[16], 10}, 8},
        {{&User_Type_names[26], 3}, 11},
        {{&User_Type_names[29], 12}, 16},
        {{&User_Type_names[41], 8}, 2},
        {{&User_Type_names[49], 15}, 13},
        {{&User_Type_names[64], 9}, 12},
        {{&User_Type_names[73], 7}, 15},
        {{&User_Type_names[80], 6}, 3},
        {{&User_Type_names[86], 3}, 7},
        {{&User_Type_names[89], 5}, 1},
        {{&User_Type_names[94], 4}, 10},
        {{&User_Type_names[98], 6}, 6},
        {{&User_Type_names[104], 7}, 9},
        {{&User_Type_names[111], 5}, 4},
        {{&User_Type_names[116], 12}, 0},
};

static const int User_Type_entries_by_number[] = {
    16,  // 0 -> TYPE_UNKNOWN
    11,  // 1 -> OWNER
    5,  // 2 -> EMPLOYEE
    9,  // 3 -> MASTER
    15,  // 4 -> SLAVE
    0,  // 5 -> ADMIN
    13,  // 6 -> SELLER
    10,  // 7 -> MRF
    2,  // 8 -> BACKOFFICE
    14,  // 9 -> SERVICE
    12,  // 10 -> ROOT
    3,  // 11 -> BTI
    7,  // 12 -> LTP_FIRST
    6,  // 13 -> EXTERNAL_SELLER
    1,  // 14 -> APPLICATION
    8,  // 15 -> MANAGER
    4,  // 16 -> DEVICE_ADMIN
};

const std::string& User_Type_Name(User_Type value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          User_Type_entries, User_Type_entries_by_number,
          17, User_Type_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      User_Type_entries, User_Type_entries_by_number, 17,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : User_Type_strings[idx].get();
}

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

constexpr User_Type User::TYPE_UNKNOWN;
constexpr User_Type User::OWNER;
constexpr User_Type User::EMPLOYEE;
constexpr User_Type User::MASTER;
constexpr User_Type User::SLAVE;
constexpr User_Type User::ADMIN;
constexpr User_Type User::SELLER;
constexpr User_Type User::MRF;
constexpr User_Type User::BACKOFFICE;
constexpr User_Type User::SERVICE;
constexpr User_Type User::ROOT;
constexpr User_Type User::BTI;
constexpr User_Type User::LTP_FIRST;
constexpr User_Type User::EXTERNAL_SELLER;
constexpr User_Type User::APPLICATION;
constexpr User_Type User::MANAGER;
constexpr User_Type User::DEVICE_ADMIN;
constexpr User_Type User::Type_MIN;
constexpr User_Type User::Type_MAX;
constexpr int User::Type_ARRAYSIZE;

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

static const char User_StatusType_names[] = {
    "ACTIVE"
    "BLOCKED"
    "DEMO"
    "NEW"
    "STATUS_TYPE_UNKNOWN"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry User_StatusType_entries[] =
    {
        {{&User_StatusType_names[0], 6}, 3},
        {{&User_StatusType_names[6], 7}, 4},
        {{&User_StatusType_names[13], 4}, 2},
        {{&User_StatusType_names[17], 3}, 1},
        {{&User_StatusType_names[20], 19}, 0},
};

static const int User_StatusType_entries_by_number[] = {
    4,  // 0 -> STATUS_TYPE_UNKNOWN
    3,  // 1 -> NEW
    2,  // 2 -> DEMO
    0,  // 3 -> ACTIVE
    1,  // 4 -> BLOCKED
};

const std::string& User_StatusType_Name(User_StatusType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          User_StatusType_entries, User_StatusType_entries_by_number,
          5, User_StatusType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      User_StatusType_entries, User_StatusType_entries_by_number, 5,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : User_StatusType_strings[idx].get();
}

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

constexpr User_StatusType User::STATUS_TYPE_UNKNOWN;
constexpr User_StatusType User::NEW;
constexpr User_StatusType User::DEMO;
constexpr User_StatusType User::ACTIVE;
constexpr User_StatusType User::BLOCKED;
constexpr User_StatusType User::StatusType_MIN;
constexpr User_StatusType User::StatusType_MAX;
constexpr int User::StatusType_ARRAYSIZE;

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

static const char UserPaging_OrderByType_names[] = {
    "CHANGED_AT"
    "CREATED_AT"
    "DESCRIPTION"
    "EMAIL"
    "ID"
    "ORDER_BY_TYPE_UNKNOWN"
    "RANK"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry UserPaging_OrderByType_entries[] =
    {
        {{&UserPaging_OrderByType_names[0], 10}, 3},
        {{&UserPaging_OrderByType_names[10], 10}, 2},
        {{&UserPaging_OrderByType_names[20], 11}, 6},
        {{&UserPaging_OrderByType_names[31], 5}, 4},
        {{&UserPaging_OrderByType_names[36], 2}, 1},
        {{&UserPaging_OrderByType_names[38], 21}, 0},
        {{&UserPaging_OrderByType_names[59], 4}, 5},
};

static const int UserPaging_OrderByType_entries_by_number[] = {
    5,  // 0 -> ORDER_BY_TYPE_UNKNOWN
    4,  // 1 -> ID
    1,  // 2 -> CREATED_AT
    0,  // 3 -> CHANGED_AT
    3,  // 4 -> EMAIL
    6,  // 5 -> RANK
    2,  // 6 -> DESCRIPTION
};

const std::string& UserPaging_OrderByType_Name(UserPaging_OrderByType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          UserPaging_OrderByType_entries, UserPaging_OrderByType_entries_by_number,
          7, UserPaging_OrderByType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      UserPaging_OrderByType_entries, UserPaging_OrderByType_entries_by_number, 7,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : UserPaging_OrderByType_strings[idx].get();
}

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

constexpr UserPaging_OrderByType UserPaging::ORDER_BY_TYPE_UNKNOWN;
constexpr UserPaging_OrderByType UserPaging::ID;
constexpr UserPaging_OrderByType UserPaging::CREATED_AT;
constexpr UserPaging_OrderByType UserPaging::CHANGED_AT;
constexpr UserPaging_OrderByType UserPaging::EMAIL;
constexpr UserPaging_OrderByType UserPaging::RANK;
constexpr UserPaging_OrderByType UserPaging::DESCRIPTION;
constexpr UserPaging_OrderByType UserPaging::OrderByType_MIN;
constexpr UserPaging_OrderByType UserPaging::OrderByType_MAX;
constexpr int UserPaging::OrderByType_ARRAYSIZE;

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

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

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

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

const std::string& UserPaging_DirectionType_Name(UserPaging_DirectionType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          UserPaging_DirectionType_entries, UserPaging_DirectionType_entries_by_number,
          3, UserPaging_DirectionType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      UserPaging_DirectionType_entries, UserPaging_DirectionType_entries_by_number, 3,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : UserPaging_DirectionType_strings[idx].get();
}

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

constexpr UserPaging_DirectionType UserPaging::DIRECTION_TYPE_UNKNOWN;
constexpr UserPaging_DirectionType UserPaging::DESC;
constexpr UserPaging_DirectionType UserPaging::ASC;
constexpr UserPaging_DirectionType UserPaging::DirectionType_MIN;
constexpr UserPaging_DirectionType UserPaging::DirectionType_MAX;
constexpr int UserPaging::DirectionType_ARRAYSIZE;

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

class DeleteUserSessionsRequest::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

std::string DeleteUserSessionsRequest::GetTypeName() const {
  return "keyapis.user.v1.DeleteUserSessionsRequest";
}

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

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

const ::keyapis::user::v1::ValidationError&
DeleteUserSessionsResponse_Error::_Internal::validation(const DeleteUserSessionsResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void DeleteUserSessionsResponse_Error::set_allocated_validation(::keyapis::user::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.user.v1.DeleteUserSessionsResponse.Error.validation)
}
DeleteUserSessionsResponse_Error::DeleteUserSessionsResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.user.v1.DeleteUserSessionsResponse.Error)
}
DeleteUserSessionsResponse_Error::DeleteUserSessionsResponse_Error(const DeleteUserSessionsResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  DeleteUserSessionsResponse_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::user::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.user.v1.DeleteUserSessionsResponse.Error)
}

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

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

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

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

void DeleteUserSessionsResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.user.v1.DeleteUserSessionsResponse.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 DeleteUserSessionsResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.user.v1.DeleteUserSessionsResponse.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* DeleteUserSessionsResponse_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.user.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* DeleteUserSessionsResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.user.v1.DeleteUserSessionsResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.user.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.user.v1.DeleteUserSessionsResponse.Error)
  return target;
}

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

void DeleteUserSessionsResponse_Error::MergeFrom(const DeleteUserSessionsResponse_Error& from) {
  DeleteUserSessionsResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.user.v1.DeleteUserSessionsResponse.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::user::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void DeleteUserSessionsResponse_Error::InternalSwap(DeleteUserSessionsResponse_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 DeleteUserSessionsResponse_Error::GetTypeName() const {
  return "keyapis.user.v1.DeleteUserSessionsResponse.Error";
}

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

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

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

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

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

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

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

void DeleteUserSessionsResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.user.v1.DeleteUserSessionsResponse)
  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 DeleteUserSessionsResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.user.v1.DeleteUserSessionsResponse)
  ::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* DeleteUserSessionsResponse::_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.user.v1.DeleteUserSessionsResponse.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* DeleteUserSessionsResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.user.v1.DeleteUserSessionsResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.user.v1.DeleteUserSessionsResponse.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.user.v1.DeleteUserSessionsResponse)
  return target;
}

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

void DeleteUserSessionsResponse::MergeFrom(const DeleteUserSessionsResponse& from) {
  DeleteUserSessionsResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.user.v1.DeleteUserSessionsResponse)
  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::user::v1::DeleteUserSessionsResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

class User_SavingError_Conflict::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

std::string User_SavingError_Conflict::GetTypeName() const {
  return "keyapis.user.v1.User.SavingError.Conflict";
}

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

class User_SavingError_UserTypeForbidden::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

std::string User_SavingError_UserTypeForbidden::GetTypeName() const {
  return "keyapis.user.v1.User.SavingError.UserTypeForbidden";
}

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

class User_SavingError_UserStatusForbidden::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

std::string User_SavingError_UserStatusForbidden::GetTypeName() const {
  return "keyapis.user.v1.User.SavingError.UserStatusForbidden";
}

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

class User_SavingError_MrfIdRequiredForUserType::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

std::string User_SavingError_MrfIdRequiredForUserType::GetTypeName() const {
  return "keyapis.user.v1.User.SavingError.MrfIdRequiredForUserType";
}

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

class User_SavingError_CreatorMustBeAdmin::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

std::string User_SavingError_CreatorMustBeAdmin::GetTypeName() const {
  return "keyapis.user.v1.User.SavingError.CreatorMustBeAdmin";
}

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

class User_SavingError_RfIdDoesNotMatchMrfId::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

std::string User_SavingError_RfIdDoesNotMatchMrfId::GetTypeName() const {
  return "keyapis.user.v1.User.SavingError.RfIdDoesNotMatchMrfId";
}

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

class User_SavingError_EmailIsAlreadyTaken::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

std::string User_SavingError_EmailIsAlreadyTaken::GetTypeName() const {
  return "keyapis.user.v1.User.SavingError.EmailIsAlreadyTaken";
}

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

class User_SavingError_EntityNotFound::_Internal {
 public:
};

User_SavingError_EntityNotFound::User_SavingError_EntityNotFound(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.user.v1.User.SavingError.EntityNotFound)
}
User_SavingError_EntityNotFound::User_SavingError_EntityNotFound(const User_SavingError_EntityNotFound& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  User_SavingError_EntityNotFound* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.field_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.field_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.field_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_field().empty()) {
    _this->_impl_.field_.Set(from._internal_field(), _this->GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.user.v1.User.SavingError.EntityNotFound)
}

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

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

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

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

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

void User_SavingError_EntityNotFound::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.user.v1.User.SavingError.EntityNotFound)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

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

const char* User_SavingError_EntityNotFound::_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 field = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_field();
          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* User_SavingError_EntityNotFound::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.user.v1.User.SavingError.EntityNotFound)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string field = 1;
  if (!this->_internal_field().empty()) {
    const std::string& _s = this->_internal_field();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.user.v1.User.SavingError.EntityNotFound.field");
    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.user.v1.User.SavingError.EntityNotFound)
  return target;
}

::size_t User_SavingError_EntityNotFound::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.user.v1.User.SavingError.EntityNotFound)
  ::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 field = 1;
  if (!this->_internal_field().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_field());
  }

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

void User_SavingError_EntityNotFound::MergeFrom(const User_SavingError_EntityNotFound& from) {
  User_SavingError_EntityNotFound* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.user.v1.User.SavingError.EntityNotFound)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

void User_SavingError_EntityNotFound::CopyFrom(const User_SavingError_EntityNotFound& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.user.v1.User.SavingError.EntityNotFound)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

std::string User_SavingError_EntityNotFound::GetTypeName() const {
  return "keyapis.user.v1.User.SavingError.EntityNotFound";
}

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

class User_SavingError::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::user::v1::User_SavingError, _impl_._oneof_case_);
  static const ::keyapis::user::v1::User_SavingError_Conflict& conflict(const User_SavingError* msg);
  static const ::keyapis::user::v1::User_SavingError_UserTypeForbidden& user_type_forbidden(const User_SavingError* msg);
  static const ::keyapis::user::v1::User_SavingError_UserStatusForbidden& user_status_forbidden(const User_SavingError* msg);
  static const ::keyapis::user::v1::User_SavingError_MrfIdRequiredForUserType& mrf_id_is_required_for_user_type(const User_SavingError* msg);
  static const ::keyapis::user::v1::User_SavingError_CreatorMustBeAdmin& creator_must_be_admin(const User_SavingError* msg);
  static const ::keyapis::user::v1::User_SavingError_RfIdDoesNotMatchMrfId& rf_id_does_not_match_mrf_id(const User_SavingError* msg);
  static const ::keyapis::user::v1::User_SavingError_EmailIsAlreadyTaken& email_is_already_taken(const User_SavingError* msg);
  static const ::keyapis::user::v1::User_SavingError_EntityNotFound& entity_not_found(const User_SavingError* msg);
};

const ::keyapis::user::v1::User_SavingError_Conflict&
User_SavingError::_Internal::conflict(const User_SavingError* msg) {
  return *msg->_impl_.reason_.conflict_;
}
const ::keyapis::user::v1::User_SavingError_UserTypeForbidden&
User_SavingError::_Internal::user_type_forbidden(const User_SavingError* msg) {
  return *msg->_impl_.reason_.user_type_forbidden_;
}
const ::keyapis::user::v1::User_SavingError_UserStatusForbidden&
User_SavingError::_Internal::user_status_forbidden(const User_SavingError* msg) {
  return *msg->_impl_.reason_.user_status_forbidden_;
}
const ::keyapis::user::v1::User_SavingError_MrfIdRequiredForUserType&
User_SavingError::_Internal::mrf_id_is_required_for_user_type(const User_SavingError* msg) {
  return *msg->_impl_.reason_.mrf_id_is_required_for_user_type_;
}
const ::keyapis::user::v1::User_SavingError_CreatorMustBeAdmin&
User_SavingError::_Internal::creator_must_be_admin(const User_SavingError* msg) {
  return *msg->_impl_.reason_.creator_must_be_admin_;
}
const ::keyapis::user::v1::User_SavingError_RfIdDoesNotMatchMrfId&
User_SavingError::_Internal::rf_id_does_not_match_mrf_id(const User_SavingError* msg) {
  return *msg->_impl_.reason_.rf_id_does_not_match_mrf_id_;
}
const ::keyapis::user::v1::User_SavingError_EmailIsAlreadyTaken&
User_SavingError::_Internal::email_is_already_taken(const User_SavingError* msg) {
  return *msg->_impl_.reason_.email_is_already_taken_;
}
const ::keyapis::user::v1::User_SavingError_EntityNotFound&
User_SavingError::_Internal::entity_not_found(const User_SavingError* msg) {
  return *msg->_impl_.reason_.entity_not_found_;
}
void User_SavingError::set_allocated_conflict(::keyapis::user::v1::User_SavingError_Conflict* conflict) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (conflict) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(conflict);
    if (message_arena != submessage_arena) {
      conflict = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, conflict, submessage_arena);
    }
    set_has_conflict();
    _impl_.reason_.conflict_ = conflict;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.user.v1.User.SavingError.conflict)
}
void User_SavingError::set_allocated_user_type_forbidden(::keyapis::user::v1::User_SavingError_UserTypeForbidden* user_type_forbidden) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (user_type_forbidden) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(user_type_forbidden);
    if (message_arena != submessage_arena) {
      user_type_forbidden = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, user_type_forbidden, submessage_arena);
    }
    set_has_user_type_forbidden();
    _impl_.reason_.user_type_forbidden_ = user_type_forbidden;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.user.v1.User.SavingError.user_type_forbidden)
}
void User_SavingError::set_allocated_user_status_forbidden(::keyapis::user::v1::User_SavingError_UserStatusForbidden* user_status_forbidden) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (user_status_forbidden) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(user_status_forbidden);
    if (message_arena != submessage_arena) {
      user_status_forbidden = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, user_status_forbidden, submessage_arena);
    }
    set_has_user_status_forbidden();
    _impl_.reason_.user_status_forbidden_ = user_status_forbidden;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.user.v1.User.SavingError.user_status_forbidden)
}
void User_SavingError::set_allocated_mrf_id_is_required_for_user_type(::keyapis::user::v1::User_SavingError_MrfIdRequiredForUserType* mrf_id_is_required_for_user_type) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (mrf_id_is_required_for_user_type) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(mrf_id_is_required_for_user_type);
    if (message_arena != submessage_arena) {
      mrf_id_is_required_for_user_type = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, mrf_id_is_required_for_user_type, submessage_arena);
    }
    set_has_mrf_id_is_required_for_user_type();
    _impl_.reason_.mrf_id_is_required_for_user_type_ = mrf_id_is_required_for_user_type;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.user.v1.User.SavingError.mrf_id_is_required_for_user_type)
}
void User_SavingError::set_allocated_creator_must_be_admin(::keyapis::user::v1::User_SavingError_CreatorMustBeAdmin* creator_must_be_admin) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (creator_must_be_admin) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(creator_must_be_admin);
    if (message_arena != submessage_arena) {
      creator_must_be_admin = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, creator_must_be_admin, submessage_arena);
    }
    set_has_creator_must_be_admin();
    _impl_.reason_.creator_must_be_admin_ = creator_must_be_admin;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.user.v1.User.SavingError.creator_must_be_admin)
}
void User_SavingError::set_allocated_rf_id_does_not_match_mrf_id(::keyapis::user::v1::User_SavingError_RfIdDoesNotMatchMrfId* rf_id_does_not_match_mrf_id) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (rf_id_does_not_match_mrf_id) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(rf_id_does_not_match_mrf_id);
    if (message_arena != submessage_arena) {
      rf_id_does_not_match_mrf_id = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, rf_id_does_not_match_mrf_id, submessage_arena);
    }
    set_has_rf_id_does_not_match_mrf_id();
    _impl_.reason_.rf_id_does_not_match_mrf_id_ = rf_id_does_not_match_mrf_id;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.user.v1.User.SavingError.rf_id_does_not_match_mrf_id)
}
void User_SavingError::set_allocated_email_is_already_taken(::keyapis::user::v1::User_SavingError_EmailIsAlreadyTaken* email_is_already_taken) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (email_is_already_taken) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(email_is_already_taken);
    if (message_arena != submessage_arena) {
      email_is_already_taken = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, email_is_already_taken, submessage_arena);
    }
    set_has_email_is_already_taken();
    _impl_.reason_.email_is_already_taken_ = email_is_already_taken;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.user.v1.User.SavingError.email_is_already_taken)
}
void User_SavingError::set_allocated_entity_not_found(::keyapis::user::v1::User_SavingError_EntityNotFound* entity_not_found) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (entity_not_found) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(entity_not_found);
    if (message_arena != submessage_arena) {
      entity_not_found = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, entity_not_found, submessage_arena);
    }
    set_has_entity_not_found();
    _impl_.reason_.entity_not_found_ = entity_not_found;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.user.v1.User.SavingError.entity_not_found)
}
User_SavingError::User_SavingError(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.user.v1.User.SavingError)
}
User_SavingError::User_SavingError(const User_SavingError& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  User_SavingError* 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 kConflict: {
      _this->_internal_mutable_conflict()->::keyapis::user::v1::User_SavingError_Conflict::MergeFrom(
          from._internal_conflict());
      break;
    }
    case kUserTypeForbidden: {
      _this->_internal_mutable_user_type_forbidden()->::keyapis::user::v1::User_SavingError_UserTypeForbidden::MergeFrom(
          from._internal_user_type_forbidden());
      break;
    }
    case kUserStatusForbidden: {
      _this->_internal_mutable_user_status_forbidden()->::keyapis::user::v1::User_SavingError_UserStatusForbidden::MergeFrom(
          from._internal_user_status_forbidden());
      break;
    }
    case kMrfIdIsRequiredForUserType: {
      _this->_internal_mutable_mrf_id_is_required_for_user_type()->::keyapis::user::v1::User_SavingError_MrfIdRequiredForUserType::MergeFrom(
          from._internal_mrf_id_is_required_for_user_type());
      break;
    }
    case kCreatorMustBeAdmin: {
      _this->_internal_mutable_creator_must_be_admin()->::keyapis::user::v1::User_SavingError_CreatorMustBeAdmin::MergeFrom(
          from._internal_creator_must_be_admin());
      break;
    }
    case kRfIdDoesNotMatchMrfId: {
      _this->_internal_mutable_rf_id_does_not_match_mrf_id()->::keyapis::user::v1::User_SavingError_RfIdDoesNotMatchMrfId::MergeFrom(
          from._internal_rf_id_does_not_match_mrf_id());
      break;
    }
    case kEmailIsAlreadyTaken: {
      _this->_internal_mutable_email_is_already_taken()->::keyapis::user::v1::User_SavingError_EmailIsAlreadyTaken::MergeFrom(
          from._internal_email_is_already_taken());
      break;
    }
    case kEntityNotFound: {
      _this->_internal_mutable_entity_not_found()->::keyapis::user::v1::User_SavingError_EntityNotFound::MergeFrom(
          from._internal_entity_not_found());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.user.v1.User.SavingError)
}

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

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

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

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

void User_SavingError::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.user.v1.User.SavingError)
  switch (reason_case()) {
    case kConflict: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.conflict_;
      }
      break;
    }
    case kUserTypeForbidden: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.user_type_forbidden_;
      }
      break;
    }
    case kUserStatusForbidden: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.user_status_forbidden_;
      }
      break;
    }
    case kMrfIdIsRequiredForUserType: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.mrf_id_is_required_for_user_type_;
      }
      break;
    }
    case kCreatorMustBeAdmin: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.creator_must_be_admin_;
      }
      break;
    }
    case kRfIdDoesNotMatchMrfId: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.rf_id_does_not_match_mrf_id_;
      }
      break;
    }
    case kEmailIsAlreadyTaken: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.email_is_already_taken_;
      }
      break;
    }
    case kEntityNotFound: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.entity_not_found_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


void User_SavingError::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.user.v1.User.SavingError)
  ::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* User_SavingError::_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.user.v1.User.SavingError.Conflict conflict = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_conflict(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.user.v1.User.SavingError.UserTypeForbidden user_type_forbidden = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_user_type_forbidden(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.user.v1.User.SavingError.UserStatusForbidden user_status_forbidden = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_user_status_forbidden(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.user.v1.User.SavingError.MrfIdRequiredForUserType mrf_id_is_required_for_user_type = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_mrf_id_is_required_for_user_type(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.user.v1.User.SavingError.CreatorMustBeAdmin creator_must_be_admin = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_creator_must_be_admin(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.user.v1.User.SavingError.RfIdDoesNotMatchMrfId rf_id_does_not_match_mrf_id = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_rf_id_does_not_match_mrf_id(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.user.v1.User.SavingError.EmailIsAlreadyTaken email_is_already_taken = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
          ptr = ctx->ParseMessage(_internal_mutable_email_is_already_taken(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.user.v1.User.SavingError.EntityNotFound entity_not_found = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
          ptr = ctx->ParseMessage(_internal_mutable_entity_not_found(), 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* User_SavingError::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.user.v1.User.SavingError)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (reason_case()) {
    case kConflict: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, _Internal::conflict(this),
          _Internal::conflict(this).GetCachedSize(), target, stream);
      break;
    }
    case kUserTypeForbidden: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::user_type_forbidden(this),
          _Internal::user_type_forbidden(this).GetCachedSize(), target, stream);
      break;
    }
    case kUserStatusForbidden: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(3, _Internal::user_status_forbidden(this),
          _Internal::user_status_forbidden(this).GetCachedSize(), target, stream);
      break;
    }
    case kMrfIdIsRequiredForUserType: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(4, _Internal::mrf_id_is_required_for_user_type(this),
          _Internal::mrf_id_is_required_for_user_type(this).GetCachedSize(), target, stream);
      break;
    }
    case kCreatorMustBeAdmin: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(5, _Internal::creator_must_be_admin(this),
          _Internal::creator_must_be_admin(this).GetCachedSize(), target, stream);
      break;
    }
    case kRfIdDoesNotMatchMrfId: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(6, _Internal::rf_id_does_not_match_mrf_id(this),
          _Internal::rf_id_does_not_match_mrf_id(this).GetCachedSize(), target, stream);
      break;
    }
    case kEmailIsAlreadyTaken: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(7, _Internal::email_is_already_taken(this),
          _Internal::email_is_already_taken(this).GetCachedSize(), target, stream);
      break;
    }
    case kEntityNotFound: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(8, _Internal::entity_not_found(this),
          _Internal::entity_not_found(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.user.v1.User.SavingError)
  return target;
}

::size_t User_SavingError::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.user.v1.User.SavingError)
  ::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.user.v1.User.SavingError.Conflict conflict = 1;
    case kConflict: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.conflict_);
      break;
    }
    // .keyapis.user.v1.User.SavingError.UserTypeForbidden user_type_forbidden = 2;
    case kUserTypeForbidden: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.user_type_forbidden_);
      break;
    }
    // .keyapis.user.v1.User.SavingError.UserStatusForbidden user_status_forbidden = 3;
    case kUserStatusForbidden: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.user_status_forbidden_);
      break;
    }
    // .keyapis.user.v1.User.SavingError.MrfIdRequiredForUserType mrf_id_is_required_for_user_type = 4;
    case kMrfIdIsRequiredForUserType: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.mrf_id_is_required_for_user_type_);
      break;
    }
    // .keyapis.user.v1.User.SavingError.CreatorMustBeAdmin creator_must_be_admin = 5;
    case kCreatorMustBeAdmin: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.creator_must_be_admin_);
      break;
    }
    // .keyapis.user.v1.User.SavingError.RfIdDoesNotMatchMrfId rf_id_does_not_match_mrf_id = 6;
    case kRfIdDoesNotMatchMrfId: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.rf_id_does_not_match_mrf_id_);
      break;
    }
    // .keyapis.user.v1.User.SavingError.EmailIsAlreadyTaken email_is_already_taken = 7;
    case kEmailIsAlreadyTaken: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.email_is_already_taken_);
      break;
    }
    // .keyapis.user.v1.User.SavingError.EntityNotFound entity_not_found = 8;
    case kEntityNotFound: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.entity_not_found_);
      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 User_SavingError::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const User_SavingError*>(
      &from));
}

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

  switch (from.reason_case()) {
    case kConflict: {
      _this->_internal_mutable_conflict()->::keyapis::user::v1::User_SavingError_Conflict::MergeFrom(
          from._internal_conflict());
      break;
    }
    case kUserTypeForbidden: {
      _this->_internal_mutable_user_type_forbidden()->::keyapis::user::v1::User_SavingError_UserTypeForbidden::MergeFrom(
          from._internal_user_type_forbidden());
      break;
    }
    case kUserStatusForbidden: {
      _this->_internal_mutable_user_status_forbidden()->::keyapis::user::v1::User_SavingError_UserStatusForbidden::MergeFrom(
          from._internal_user_status_forbidden());
      break;
    }
    case kMrfIdIsRequiredForUserType: {
      _this->_internal_mutable_mrf_id_is_required_for_user_type()->::keyapis::user::v1::User_SavingError_MrfIdRequiredForUserType::MergeFrom(
          from._internal_mrf_id_is_required_for_user_type());
      break;
    }
    case kCreatorMustBeAdmin: {
      _this->_internal_mutable_creator_must_be_admin()->::keyapis::user::v1::User_SavingError_CreatorMustBeAdmin::MergeFrom(
          from._internal_creator_must_be_admin());
      break;
    }
    case kRfIdDoesNotMatchMrfId: {
      _this->_internal_mutable_rf_id_does_not_match_mrf_id()->::keyapis::user::v1::User_SavingError_RfIdDoesNotMatchMrfId::MergeFrom(
          from._internal_rf_id_does_not_match_mrf_id());
      break;
    }
    case kEmailIsAlreadyTaken: {
      _this->_internal_mutable_email_is_already_taken()->::keyapis::user::v1::User_SavingError_EmailIsAlreadyTaken::MergeFrom(
          from._internal_email_is_already_taken());
      break;
    }
    case kEntityNotFound: {
      _this->_internal_mutable_entity_not_found()->::keyapis::user::v1::User_SavingError_EntityNotFound::MergeFrom(
          from._internal_entity_not_found());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

class User::_Internal {
 public:
  using HasBits = decltype(std::declval<User>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(User, _impl_._has_bits_);
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& login(const User* msg);
  static void set_has_login(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& email(const User* msg);
  static void set_has_email(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& phone_number(const User* msg);
  static void set_has_phone_number(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int32Value& company_id(const User* msg);
  static void set_has_company_id(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int32Value& mrf_id(const User* msg);
  static void set_has_mrf_id(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int32Value& rf_id(const User* msg);
  static void set_has_rf_id(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& created_at(const User* msg);
  static void set_has_created_at(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& changed_at(const User* msg);
  static void set_has_changed_at(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& activated_at(const User* msg);
  static void set_has_activated_at(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& blocked_at(const User* msg);
  static void set_has_blocked_at(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int32Value& creator_user_id(const User* msg);
  static void set_has_creator_user_id(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int32Value& owner_user_id(const User* msg);
  static void set_has_owner_user_id(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& invoice_email(const User* msg);
  static void set_has_invoice_email(HasBits* has_bits) {
    (*has_bits)[0] |= 4096u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int32Value& vc_user_id(const User* msg);
  static void set_has_vc_user_id(HasBits* has_bits) {
    (*has_bits)[0] |= 8192u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& description(const User* msg);
  static void set_has_description(HasBits* has_bits) {
    (*has_bits)[0] |= 16384u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int32Value& ustore_user_id(const User* msg);
  static void set_has_ustore_user_id(HasBits* has_bits) {
    (*has_bits)[0] |= 32768u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& env_url(const User* msg);
  static void set_has_env_url(HasBits* has_bits) {
    (*has_bits)[0] |= 65536u;
  }
};

const ::PROTOBUF_NAMESPACE_ID::StringValue&
User::_Internal::login(const User* msg) {
  return *msg->_impl_.login_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
User::_Internal::email(const User* msg) {
  return *msg->_impl_.email_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
User::_Internal::phone_number(const User* msg) {
  return *msg->_impl_.phone_number_;
}
const ::PROTOBUF_NAMESPACE_ID::Int32Value&
User::_Internal::company_id(const User* msg) {
  return *msg->_impl_.company_id_;
}
const ::PROTOBUF_NAMESPACE_ID::Int32Value&
User::_Internal::mrf_id(const User* msg) {
  return *msg->_impl_.mrf_id_;
}
const ::PROTOBUF_NAMESPACE_ID::Int32Value&
User::_Internal::rf_id(const User* msg) {
  return *msg->_impl_.rf_id_;
}
const ::PROTOBUF_NAMESPACE_ID::Timestamp&
User::_Internal::created_at(const User* msg) {
  return *msg->_impl_.created_at_;
}
const ::PROTOBUF_NAMESPACE_ID::Timestamp&
User::_Internal::changed_at(const User* msg) {
  return *msg->_impl_.changed_at_;
}
const ::PROTOBUF_NAMESPACE_ID::Timestamp&
User::_Internal::activated_at(const User* msg) {
  return *msg->_impl_.activated_at_;
}
const ::PROTOBUF_NAMESPACE_ID::Timestamp&
User::_Internal::blocked_at(const User* msg) {
  return *msg->_impl_.blocked_at_;
}
const ::PROTOBUF_NAMESPACE_ID::Int32Value&
User::_Internal::creator_user_id(const User* msg) {
  return *msg->_impl_.creator_user_id_;
}
const ::PROTOBUF_NAMESPACE_ID::Int32Value&
User::_Internal::owner_user_id(const User* msg) {
  return *msg->_impl_.owner_user_id_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
User::_Internal::invoice_email(const User* msg) {
  return *msg->_impl_.invoice_email_;
}
const ::PROTOBUF_NAMESPACE_ID::Int32Value&
User::_Internal::vc_user_id(const User* msg) {
  return *msg->_impl_.vc_user_id_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
User::_Internal::description(const User* msg) {
  return *msg->_impl_.description_;
}
const ::PROTOBUF_NAMESPACE_ID::Int32Value&
User::_Internal::ustore_user_id(const User* msg) {
  return *msg->_impl_.ustore_user_id_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
User::_Internal::env_url(const User* msg) {
  return *msg->_impl_.env_url_;
}
void User::clear_login() {
  if (_impl_.login_ != nullptr) _impl_.login_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
void User::clear_email() {
  if (_impl_.email_ != nullptr) _impl_.email_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
void User::clear_phone_number() {
  if (_impl_.phone_number_ != nullptr) _impl_.phone_number_->Clear();
  _impl_._has_bits_[0] &= ~0x00000004u;
}
void User::clear_company_id() {
  if (_impl_.company_id_ != nullptr) _impl_.company_id_->Clear();
  _impl_._has_bits_[0] &= ~0x00000008u;
}
void User::clear_mrf_id() {
  if (_impl_.mrf_id_ != nullptr) _impl_.mrf_id_->Clear();
  _impl_._has_bits_[0] &= ~0x00000010u;
}
void User::clear_rf_id() {
  if (_impl_.rf_id_ != nullptr) _impl_.rf_id_->Clear();
  _impl_._has_bits_[0] &= ~0x00000020u;
}
void User::clear_created_at() {
  if (_impl_.created_at_ != nullptr) _impl_.created_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000040u;
}
void User::clear_changed_at() {
  if (_impl_.changed_at_ != nullptr) _impl_.changed_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000080u;
}
void User::clear_activated_at() {
  if (_impl_.activated_at_ != nullptr) _impl_.activated_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000100u;
}
void User::clear_blocked_at() {
  if (_impl_.blocked_at_ != nullptr) _impl_.blocked_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000200u;
}
void User::clear_creator_user_id() {
  if (_impl_.creator_user_id_ != nullptr) _impl_.creator_user_id_->Clear();
  _impl_._has_bits_[0] &= ~0x00000400u;
}
void User::clear_owner_user_id() {
  if (_impl_.owner_user_id_ != nullptr) _impl_.owner_user_id_->Clear();
  _impl_._has_bits_[0] &= ~0x00000800u;
}
void User::clear_invoice_email() {
  if (_impl_.invoice_email_ != nullptr) _impl_.invoice_email_->Clear();
  _impl_._has_bits_[0] &= ~0x00001000u;
}
void User::clear_vc_user_id() {
  if (_impl_.vc_user_id_ != nullptr) _impl_.vc_user_id_->Clear();
  _impl_._has_bits_[0] &= ~0x00002000u;
}
void User::clear_description() {
  if (_impl_.description_ != nullptr) _impl_.description_->Clear();
  _impl_._has_bits_[0] &= ~0x00004000u;
}
void User::clear_ustore_user_id() {
  if (_impl_.ustore_user_id_ != nullptr) _impl_.ustore_user_id_->Clear();
  _impl_._has_bits_[0] &= ~0x00008000u;
}
void User::clear_env_url() {
  if (_impl_.env_url_ != nullptr) _impl_.env_url_->Clear();
  _impl_._has_bits_[0] &= ~0x00010000u;
}
User::User(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.user.v1.User)
}
User::User(const User& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  User* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.login_){nullptr}
    , decltype(_impl_.email_){nullptr}
    , decltype(_impl_.phone_number_){nullptr}
    , decltype(_impl_.company_id_){nullptr}
    , decltype(_impl_.mrf_id_){nullptr}
    , decltype(_impl_.rf_id_){nullptr}
    , decltype(_impl_.created_at_){nullptr}
    , decltype(_impl_.changed_at_){nullptr}
    , decltype(_impl_.activated_at_){nullptr}
    , decltype(_impl_.blocked_at_){nullptr}
    , decltype(_impl_.creator_user_id_){nullptr}
    , decltype(_impl_.owner_user_id_){nullptr}
    , decltype(_impl_.invoice_email_){nullptr}
    , decltype(_impl_.vc_user_id_){nullptr}
    , decltype(_impl_.description_){nullptr}
    , decltype(_impl_.ustore_user_id_){nullptr}
    , decltype(_impl_.env_url_){nullptr}
    , decltype(_impl_.id_) {}

    , decltype(_impl_.type_) {}

    , decltype(_impl_.status_type_) {}
  };

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.login_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.login_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000002u) != 0) {
    _this->_impl_.email_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.email_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000004u) != 0) {
    _this->_impl_.phone_number_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.phone_number_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000008u) != 0) {
    _this->_impl_.company_id_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.company_id_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000010u) != 0) {
    _this->_impl_.mrf_id_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.mrf_id_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000020u) != 0) {
    _this->_impl_.rf_id_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.rf_id_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000040u) != 0) {
    _this->_impl_.created_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.created_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000080u) != 0) {
    _this->_impl_.changed_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.changed_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000100u) != 0) {
    _this->_impl_.activated_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.activated_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000200u) != 0) {
    _this->_impl_.blocked_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.blocked_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000400u) != 0) {
    _this->_impl_.creator_user_id_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.creator_user_id_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000800u) != 0) {
    _this->_impl_.owner_user_id_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.owner_user_id_);
  }
  if ((from._impl_._has_bits_[0] & 0x00001000u) != 0) {
    _this->_impl_.invoice_email_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.invoice_email_);
  }
  if ((from._impl_._has_bits_[0] & 0x00002000u) != 0) {
    _this->_impl_.vc_user_id_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.vc_user_id_);
  }
  if ((from._impl_._has_bits_[0] & 0x00004000u) != 0) {
    _this->_impl_.description_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.description_);
  }
  if ((from._impl_._has_bits_[0] & 0x00008000u) != 0) {
    _this->_impl_.ustore_user_id_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.ustore_user_id_);
  }
  if ((from._impl_._has_bits_[0] & 0x00010000u) != 0) {
    _this->_impl_.env_url_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.env_url_);
  }
  ::memcpy(&_impl_.id_, &from._impl_.id_,
    static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.status_type_) -
    reinterpret_cast<char*>(&_impl_.id_)) + sizeof(_impl_.status_type_));
  // @@protoc_insertion_point(copy_constructor:keyapis.user.v1.User)
}

inline void User::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.login_){nullptr}
    , decltype(_impl_.email_){nullptr}
    , decltype(_impl_.phone_number_){nullptr}
    , decltype(_impl_.company_id_){nullptr}
    , decltype(_impl_.mrf_id_){nullptr}
    , decltype(_impl_.rf_id_){nullptr}
    , decltype(_impl_.created_at_){nullptr}
    , decltype(_impl_.changed_at_){nullptr}
    , decltype(_impl_.activated_at_){nullptr}
    , decltype(_impl_.blocked_at_){nullptr}
    , decltype(_impl_.creator_user_id_){nullptr}
    , decltype(_impl_.owner_user_id_){nullptr}
    , decltype(_impl_.invoice_email_){nullptr}
    , decltype(_impl_.vc_user_id_){nullptr}
    , decltype(_impl_.description_){nullptr}
    , decltype(_impl_.ustore_user_id_){nullptr}
    , decltype(_impl_.env_url_){nullptr}
    , decltype(_impl_.id_) { 0 }

    , decltype(_impl_.type_) { 0 }

    , decltype(_impl_.status_type_) { 0 }

  };
}

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

inline void User::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete _impl_.login_;
  if (this != internal_default_instance()) delete _impl_.email_;
  if (this != internal_default_instance()) delete _impl_.phone_number_;
  if (this != internal_default_instance()) delete _impl_.company_id_;
  if (this != internal_default_instance()) delete _impl_.mrf_id_;
  if (this != internal_default_instance()) delete _impl_.rf_id_;
  if (this != internal_default_instance()) delete _impl_.created_at_;
  if (this != internal_default_instance()) delete _impl_.changed_at_;
  if (this != internal_default_instance()) delete _impl_.activated_at_;
  if (this != internal_default_instance()) delete _impl_.blocked_at_;
  if (this != internal_default_instance()) delete _impl_.creator_user_id_;
  if (this != internal_default_instance()) delete _impl_.owner_user_id_;
  if (this != internal_default_instance()) delete _impl_.invoice_email_;
  if (this != internal_default_instance()) delete _impl_.vc_user_id_;
  if (this != internal_default_instance()) delete _impl_.description_;
  if (this != internal_default_instance()) delete _impl_.ustore_user_id_;
  if (this != internal_default_instance()) delete _impl_.env_url_;
}

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

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      ABSL_DCHECK(_impl_.login_ != nullptr);
      _impl_.login_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(_impl_.email_ != nullptr);
      _impl_.email_->Clear();
    }
    if (cached_has_bits & 0x00000004u) {
      ABSL_DCHECK(_impl_.phone_number_ != nullptr);
      _impl_.phone_number_->Clear();
    }
    if (cached_has_bits & 0x00000008u) {
      ABSL_DCHECK(_impl_.company_id_ != nullptr);
      _impl_.company_id_->Clear();
    }
    if (cached_has_bits & 0x00000010u) {
      ABSL_DCHECK(_impl_.mrf_id_ != nullptr);
      _impl_.mrf_id_->Clear();
    }
    if (cached_has_bits & 0x00000020u) {
      ABSL_DCHECK(_impl_.rf_id_ != nullptr);
      _impl_.rf_id_->Clear();
    }
    if (cached_has_bits & 0x00000040u) {
      ABSL_DCHECK(_impl_.created_at_ != nullptr);
      _impl_.created_at_->Clear();
    }
    if (cached_has_bits & 0x00000080u) {
      ABSL_DCHECK(_impl_.changed_at_ != nullptr);
      _impl_.changed_at_->Clear();
    }
  }
  if (cached_has_bits & 0x0000ff00u) {
    if (cached_has_bits & 0x00000100u) {
      ABSL_DCHECK(_impl_.activated_at_ != nullptr);
      _impl_.activated_at_->Clear();
    }
    if (cached_has_bits & 0x00000200u) {
      ABSL_DCHECK(_impl_.blocked_at_ != nullptr);
      _impl_.blocked_at_->Clear();
    }
    if (cached_has_bits & 0x00000400u) {
      ABSL_DCHECK(_impl_.creator_user_id_ != nullptr);
      _impl_.creator_user_id_->Clear();
    }
    if (cached_has_bits & 0x00000800u) {
      ABSL_DCHECK(_impl_.owner_user_id_ != nullptr);
      _impl_.owner_user_id_->Clear();
    }
    if (cached_has_bits & 0x00001000u) {
      ABSL_DCHECK(_impl_.invoice_email_ != nullptr);
      _impl_.invoice_email_->Clear();
    }
    if (cached_has_bits & 0x00002000u) {
      ABSL_DCHECK(_impl_.vc_user_id_ != nullptr);
      _impl_.vc_user_id_->Clear();
    }
    if (cached_has_bits & 0x00004000u) {
      ABSL_DCHECK(_impl_.description_ != nullptr);
      _impl_.description_->Clear();
    }
    if (cached_has_bits & 0x00008000u) {
      ABSL_DCHECK(_impl_.ustore_user_id_ != nullptr);
      _impl_.ustore_user_id_->Clear();
    }
  }
  if (cached_has_bits & 0x00010000u) {
    ABSL_DCHECK(_impl_.env_url_ != nullptr);
    _impl_.env_url_->Clear();
  }
  ::memset(&_impl_.id_, 0, static_cast<::size_t>(
      reinterpret_cast<char*>(&_impl_.status_type_) -
      reinterpret_cast<char*>(&_impl_.id_)) + sizeof(_impl_.status_type_));
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* User::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // int32 id = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.user.v1.User.Type type = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_type(static_cast<::keyapis::user::v1::User_Type>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.user.v1.User.StatusType status_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      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_status_type(static_cast<::keyapis::user::v1::User_StatusType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue login = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_login(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue email = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_email(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue phone_number = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_phone_number(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int32Value company_id = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
          ptr = ctx->ParseMessage(_internal_mutable_company_id(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int32Value mrf_id = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
          ptr = ctx->ParseMessage(_internal_mutable_mrf_id(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int32Value rf_id = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 74)) {
          ptr = ctx->ParseMessage(_internal_mutable_rf_id(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp created_at = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 82)) {
          ptr = ctx->ParseMessage(_internal_mutable_created_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp changed_at = 11;
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 90)) {
          ptr = ctx->ParseMessage(_internal_mutable_changed_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp activated_at = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 98)) {
          ptr = ctx->ParseMessage(_internal_mutable_activated_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp blocked_at = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 106)) {
          ptr = ctx->ParseMessage(_internal_mutable_blocked_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int32Value creator_user_id = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 114)) {
          ptr = ctx->ParseMessage(_internal_mutable_creator_user_id(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int32Value owner_user_id = 15;
      case 15:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 122)) {
          ptr = ctx->ParseMessage(_internal_mutable_owner_user_id(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue invoice_email = 16;
      case 16:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 130)) {
          ptr = ctx->ParseMessage(_internal_mutable_invoice_email(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int32Value vc_user_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 17:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 138)) {
          ptr = ctx->ParseMessage(_internal_mutable_vc_user_id(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue description = 18;
      case 18:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 146)) {
          ptr = ctx->ParseMessage(_internal_mutable_description(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int32Value ustore_user_id = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 19:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 154)) {
          ptr = ctx->ParseMessage(_internal_mutable_ustore_user_id(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue env_url = 20;
      case 20:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 162)) {
          ptr = ctx->ParseMessage(_internal_mutable_env_url(), 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* User::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.user.v1.User)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 id = 1;
  if (this->_internal_id() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        1, this->_internal_id(), target);
  }

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

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

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

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

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

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

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

  // .google.protobuf.Int32Value rf_id = 9;
  if (cached_has_bits & 0x00000020u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(9, _Internal::rf_id(this),
        _Internal::rf_id(this).GetCachedSize(), target, stream);
  }

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

  // .google.protobuf.Timestamp changed_at = 11;
  if (cached_has_bits & 0x00000080u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(11, _Internal::changed_at(this),
        _Internal::changed_at(this).GetCachedSize(), target, stream);
  }

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

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

  // .google.protobuf.Int32Value creator_user_id = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (cached_has_bits & 0x00000400u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(14, _Internal::creator_user_id(this),
        _Internal::creator_user_id(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.Int32Value owner_user_id = 15;
  if (cached_has_bits & 0x00000800u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(15, _Internal::owner_user_id(this),
        _Internal::owner_user_id(this).GetCachedSize(), target, stream);
  }

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

  // .google.protobuf.Int32Value vc_user_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (cached_has_bits & 0x00002000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(17, _Internal::vc_user_id(this),
        _Internal::vc_user_id(this).GetCachedSize(), target, stream);
  }

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

  // .google.protobuf.Int32Value ustore_user_id = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (cached_has_bits & 0x00008000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(19, _Internal::ustore_user_id(this),
        _Internal::ustore_user_id(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue env_url = 20;
  if (cached_has_bits & 0x00010000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(20, _Internal::env_url(this),
        _Internal::env_url(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.user.v1.User)
  return target;
}

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

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

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

    // .google.protobuf.StringValue email = 5;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.email_);
    }

    // .google.protobuf.StringValue phone_number = 6;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.phone_number_);
    }

    // .google.protobuf.Int32Value company_id = 7;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.company_id_);
    }

    // .google.protobuf.Int32Value mrf_id = 8;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.mrf_id_);
    }

    // .google.protobuf.Int32Value rf_id = 9;
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.rf_id_);
    }

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

    // .google.protobuf.Timestamp changed_at = 11;
    if (cached_has_bits & 0x00000080u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.changed_at_);
    }

  }
  if (cached_has_bits & 0x0000ff00u) {
    // .google.protobuf.Timestamp activated_at = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
    if (cached_has_bits & 0x00000100u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.activated_at_);
    }

    // .google.protobuf.Timestamp blocked_at = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
    if (cached_has_bits & 0x00000200u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.blocked_at_);
    }

    // .google.protobuf.Int32Value creator_user_id = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
    if (cached_has_bits & 0x00000400u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.creator_user_id_);
    }

    // .google.protobuf.Int32Value owner_user_id = 15;
    if (cached_has_bits & 0x00000800u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.owner_user_id_);
    }

    // .google.protobuf.StringValue invoice_email = 16;
    if (cached_has_bits & 0x00001000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.invoice_email_);
    }

    // .google.protobuf.Int32Value vc_user_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
    if (cached_has_bits & 0x00002000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.vc_user_id_);
    }

    // .google.protobuf.StringValue description = 18;
    if (cached_has_bits & 0x00004000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.description_);
    }

    // .google.protobuf.Int32Value ustore_user_id = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
    if (cached_has_bits & 0x00008000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.ustore_user_id_);
    }

  }
  // .google.protobuf.StringValue env_url = 20;
  if (cached_has_bits & 0x00010000u) {
    total_size += 2 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.env_url_);
  }

  // int32 id = 1;
  if (this->_internal_id() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_id());
  }

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

  // .keyapis.user.v1.User.StatusType status_type = 3 [(.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 User::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const User*>(
      &from));
}

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

  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_login()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_login());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_email()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_email());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_mutable_phone_number()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_phone_number());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_internal_mutable_company_id()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(
          from._internal_company_id());
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_internal_mutable_mrf_id()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(
          from._internal_mrf_id());
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_internal_mutable_rf_id()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(
          from._internal_rf_id());
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_internal_mutable_created_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_created_at());
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_internal_mutable_changed_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_changed_at());
    }
  }
  if (cached_has_bits & 0x0000ff00u) {
    if (cached_has_bits & 0x00000100u) {
      _this->_internal_mutable_activated_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_activated_at());
    }
    if (cached_has_bits & 0x00000200u) {
      _this->_internal_mutable_blocked_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_blocked_at());
    }
    if (cached_has_bits & 0x00000400u) {
      _this->_internal_mutable_creator_user_id()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(
          from._internal_creator_user_id());
    }
    if (cached_has_bits & 0x00000800u) {
      _this->_internal_mutable_owner_user_id()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(
          from._internal_owner_user_id());
    }
    if (cached_has_bits & 0x00001000u) {
      _this->_internal_mutable_invoice_email()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_invoice_email());
    }
    if (cached_has_bits & 0x00002000u) {
      _this->_internal_mutable_vc_user_id()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(
          from._internal_vc_user_id());
    }
    if (cached_has_bits & 0x00004000u) {
      _this->_internal_mutable_description()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_description());
    }
    if (cached_has_bits & 0x00008000u) {
      _this->_internal_mutable_ustore_user_id()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(
          from._internal_ustore_user_id());
    }
  }
  if (cached_has_bits & 0x00010000u) {
    _this->_internal_mutable_env_url()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
        from._internal_env_url());
  }
  if (from._internal_id() != 0) {
    _this->_internal_set_id(from._internal_id());
  }
  if (from._internal_type() != 0) {
    _this->_internal_set_type(from._internal_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 User::CopyFrom(const User& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.user.v1.User)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void User::InternalSwap(User* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(User, _impl_.status_type_)
      + sizeof(User::_impl_.status_type_)
      - PROTOBUF_FIELD_OFFSET(User, _impl_.login_)>(
          reinterpret_cast<char*>(&_impl_.login_),
          reinterpret_cast<char*>(&other->_impl_.login_));
}

std::string User::GetTypeName() const {
  return "keyapis.user.v1.User";
}

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

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

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

    , decltype(_impl_.user_id_) {}

    , decltype(_impl_.creator_user_id_) {}

    , decltype(_impl_.creator_user_type_) {}
  };

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.created_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.created_at_);
  }
  ::memcpy(&_impl_.code_, &from._impl_.code_,
    static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.creator_user_type_) -
    reinterpret_cast<char*>(&_impl_.code_)) + sizeof(_impl_.creator_user_type_));
  // @@protoc_insertion_point(copy_constructor:keyapis.user.v1.UserCode)
}

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

    , decltype(_impl_.user_id_) { 0 }

    , decltype(_impl_.creator_user_id_) { 0 }

    , decltype(_impl_.creator_user_type_) { 0 }

  };
}

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

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

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

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    ABSL_DCHECK(_impl_.created_at_ != nullptr);
    _impl_.created_at_->Clear();
  }
  ::memset(&_impl_.code_, 0, static_cast<::size_t>(
      reinterpret_cast<char*>(&_impl_.creator_user_type_) -
      reinterpret_cast<char*>(&_impl_.code_)) + sizeof(_impl_.creator_user_type_));
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* UserCode::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // int32 code = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.code_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } 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;
      // .google.protobuf.Timestamp created_at = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_created_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 creator_user_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
          _impl_.creator_user_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.user.v1.User.Type creator_user_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_creator_user_type(static_cast<::keyapis::user::v1::User_Type>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // int32 code = 1;
  if (this->_internal_code() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        1, this->_internal_code(), 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);
  }

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

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

  // .keyapis.user.v1.User.Type creator_user_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (this->_internal_creator_user_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        5, this->_internal_creator_user_type(), 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.user.v1.UserCode)
  return target;
}

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

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

  // .google.protobuf.Timestamp created_at = 3 [(.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_.created_at_);
  }

  // int32 code = 1;
  if (this->_internal_code() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_code());
  }

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

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

  // .keyapis.user.v1.User.Type creator_user_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (this->_internal_creator_user_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_creator_user_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 UserCode::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const UserCode*>(
      &from));
}

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

  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_internal_mutable_created_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
        from._internal_created_at());
  }
  if (from._internal_code() != 0) {
    _this->_internal_set_code(from._internal_code());
  }
  if (from._internal_user_id() != 0) {
    _this->_internal_set_user_id(from._internal_user_id());
  }
  if (from._internal_creator_user_id() != 0) {
    _this->_internal_set_creator_user_id(from._internal_creator_user_id());
  }
  if (from._internal_creator_user_type() != 0) {
    _this->_internal_set_creator_user_type(from._internal_creator_user_type());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void UserCode::InternalSwap(UserCode* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(UserCode, _impl_.creator_user_type_)
      + sizeof(UserCode::_impl_.creator_user_type_)
      - PROTOBUF_FIELD_OFFSET(UserCode, _impl_.created_at_)>(
          reinterpret_cast<char*>(&_impl_.created_at_),
          reinterpret_cast<char*>(&other->_impl_.created_at_));
}

std::string UserCode::GetTypeName() const {
  return "keyapis.user.v1.UserCode";
}

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

class GetUserRequest::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

std::string GetUserRequest::GetTypeName() const {
  return "keyapis.user.v1.GetUserRequest";
}

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

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

const ::keyapis::user::v1::ValidationError&
GetUserResponse_Error::_Internal::validation(const GetUserResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void GetUserResponse_Error::set_allocated_validation(::keyapis::user::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.user.v1.GetUserResponse.Error.validation)
}
GetUserResponse_Error::GetUserResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.user.v1.GetUserResponse.Error)
}
GetUserResponse_Error::GetUserResponse_Error(const GetUserResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetUserResponse_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::user::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.user.v1.GetUserResponse.Error)
}

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

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

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

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

void GetUserResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.user.v1.GetUserResponse.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 GetUserResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.user.v1.GetUserResponse.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* GetUserResponse_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.user.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* GetUserResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.user.v1.GetUserResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.user.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.user.v1.GetUserResponse.Error)
  return target;
}

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

void GetUserResponse_Error::MergeFrom(const GetUserResponse_Error& from) {
  GetUserResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.user.v1.GetUserResponse.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::user::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void GetUserResponse_Error::InternalSwap(GetUserResponse_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 GetUserResponse_Error::GetTypeName() const {
  return "keyapis.user.v1.GetUserResponse.Error";
}

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

class GetUserResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::user::v1::GetUserResponse, _impl_._oneof_case_);
  static const ::keyapis::user::v1::User& data(const GetUserResponse* msg);
  static const ::keyapis::user::v1::GetUserResponse_Error& error(const GetUserResponse* msg);
};

const ::keyapis::user::v1::User&
GetUserResponse::_Internal::data(const GetUserResponse* msg) {
  return *msg->_impl_.type_.data_;
}
const ::keyapis::user::v1::GetUserResponse_Error&
GetUserResponse::_Internal::error(const GetUserResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void GetUserResponse::set_allocated_data(::keyapis::user::v1::User* 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.user.v1.GetUserResponse.data)
}
void GetUserResponse::set_allocated_error(::keyapis::user::v1::GetUserResponse_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.user.v1.GetUserResponse.error)
}
GetUserResponse::GetUserResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.user.v1.GetUserResponse)
}
GetUserResponse::GetUserResponse(const GetUserResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetUserResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

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

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

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

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

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

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


void GetUserResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.user.v1.GetUserResponse)
  ::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* GetUserResponse::_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.user.v1.User data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_data(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.user.v1.GetUserResponse.Error error = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_error(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

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

::size_t GetUserResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.user.v1.GetUserResponse)
  ::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.user.v1.User data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.data_);
      break;
    }
    // .keyapis.user.v1.GetUserResponse.Error error = 2;
    case kError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.error_);
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

std::string GetUserListRequest::GetTypeName() const {
  return "keyapis.user.v1.GetUserListRequest";
}

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

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

const ::keyapis::user::v1::ValidationError&
GetUserListResponse_Error::_Internal::validation(const GetUserListResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void GetUserListResponse_Error::set_allocated_validation(::keyapis::user::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.user.v1.GetUserListResponse.Error.validation)
}
GetUserListResponse_Error::GetUserListResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.user.v1.GetUserListResponse.Error)
}
GetUserListResponse_Error::GetUserListResponse_Error(const GetUserListResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetUserListResponse_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::user::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.user.v1.GetUserListResponse.Error)
}

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

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

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

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

void GetUserListResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.user.v1.GetUserListResponse.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 GetUserListResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.user.v1.GetUserListResponse.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* GetUserListResponse_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.user.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* GetUserListResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.user.v1.GetUserListResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.user.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.user.v1.GetUserListResponse.Error)
  return target;
}

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

void GetUserListResponse_Error::MergeFrom(const GetUserListResponse_Error& from) {
  GetUserListResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.user.v1.GetUserListResponse.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::user::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void GetUserListResponse_Error::InternalSwap(GetUserListResponse_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 GetUserListResponse_Error::GetTypeName() const {
  return "keyapis.user.v1.GetUserListResponse.Error";
}

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

class GetUserListResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::user::v1::GetUserListResponse, _impl_._oneof_case_);
  static const ::keyapis::user::v1::User& data(const GetUserListResponse* msg);
  static const ::keyapis::user::v1::GetUserListResponse_Error& error(const GetUserListResponse* msg);
};

const ::keyapis::user::v1::User&
GetUserListResponse::_Internal::data(const GetUserListResponse* msg) {
  return *msg->_impl_.type_.data_;
}
const ::keyapis::user::v1::GetUserListResponse_Error&
GetUserListResponse::_Internal::error(const GetUserListResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void GetUserListResponse::set_allocated_data(::keyapis::user::v1::User* 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.user.v1.GetUserListResponse.data)
}
void GetUserListResponse::set_allocated_error(::keyapis::user::v1::GetUserListResponse_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.user.v1.GetUserListResponse.error)
}
GetUserListResponse::GetUserListResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.user.v1.GetUserListResponse)
}
GetUserListResponse::GetUserListResponse(const GetUserListResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetUserListResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

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

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

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

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

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

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


void GetUserListResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.user.v1.GetUserListResponse)
  ::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* GetUserListResponse::_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.user.v1.User data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_data(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.user.v1.GetUserListResponse.Error error = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_error(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

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

::size_t GetUserListResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.user.v1.GetUserListResponse)
  ::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.user.v1.User data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.data_);
      break;
    }
    // .keyapis.user.v1.GetUserListResponse.Error error = 2;
    case kError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.error_);
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

std::string GetUserCountRequest::GetTypeName() const {
  return "keyapis.user.v1.GetUserCountRequest";
}

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

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

const ::keyapis::user::v1::ValidationError&
GetUserCountResponse_Error::_Internal::validation(const GetUserCountResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void GetUserCountResponse_Error::set_allocated_validation(::keyapis::user::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.user.v1.GetUserCountResponse.Error.validation)
}
GetUserCountResponse_Error::GetUserCountResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.user.v1.GetUserCountResponse.Error)
}
GetUserCountResponse_Error::GetUserCountResponse_Error(const GetUserCountResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetUserCountResponse_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::user::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.user.v1.GetUserCountResponse.Error)
}

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

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

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

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

void GetUserCountResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.user.v1.GetUserCountResponse.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 GetUserCountResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.user.v1.GetUserCountResponse.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* GetUserCountResponse_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.user.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* GetUserCountResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.user.v1.GetUserCountResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.user.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.user.v1.GetUserCountResponse.Error)
  return target;
}

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

void GetUserCountResponse_Error::MergeFrom(const GetUserCountResponse_Error& from) {
  GetUserCountResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.user.v1.GetUserCountResponse.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::user::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void GetUserCountResponse_Error::InternalSwap(GetUserCountResponse_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 GetUserCountResponse_Error::GetTypeName() const {
  return "keyapis.user.v1.GetUserCountResponse.Error";
}

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

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

const ::keyapis::user::v1::GetUserCountResponse_Error&
GetUserCountResponse::_Internal::error(const GetUserCountResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void GetUserCountResponse::set_allocated_error(::keyapis::user::v1::GetUserCountResponse_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.user.v1.GetUserCountResponse.error)
}
GetUserCountResponse::GetUserCountResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.user.v1.GetUserCountResponse)
}
GetUserCountResponse::GetUserCountResponse(const GetUserCountResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetUserCountResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

class DeleteUserRequest::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

std::string DeleteUserRequest::GetTypeName() const {
  return "keyapis.user.v1.DeleteUserRequest";
}

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

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

const ::keyapis::user::v1::ValidationError&
DeleteUserResponse_Error::_Internal::validation(const DeleteUserResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
const ::keyapis::user::v1::User_SavingError&
DeleteUserResponse_Error::_Internal::saving(const DeleteUserResponse_Error* msg) {
  return *msg->_impl_.reason_.saving_;
}
void DeleteUserResponse_Error::set_allocated_validation(::keyapis::user::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.user.v1.DeleteUserResponse.Error.validation)
}
void DeleteUserResponse_Error::set_allocated_saving(::keyapis::user::v1::User_SavingError* saving) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (saving) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(saving);
    if (message_arena != submessage_arena) {
      saving = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, saving, submessage_arena);
    }
    set_has_saving();
    _impl_.reason_.saving_ = saving;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.user.v1.DeleteUserResponse.Error.saving)
}
DeleteUserResponse_Error::DeleteUserResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.user.v1.DeleteUserResponse.Error)
}
DeleteUserResponse_Error::DeleteUserResponse_Error(const DeleteUserResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  DeleteUserResponse_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::user::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case kSaving: {
      _this->_internal_mutable_saving()->::keyapis::user::v1::User_SavingError::MergeFrom(
          from._internal_saving());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.user.v1.DeleteUserResponse.Error)
}

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

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

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

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

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


void DeleteUserResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.user.v1.DeleteUserResponse.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* DeleteUserResponse_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.user.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;
      // .keyapis.user.v1.User.SavingError saving = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_saving(), 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* DeleteUserResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.user.v1.DeleteUserResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (reason_case()) {
    case kValidation: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, _Internal::validation(this),
          _Internal::validation(this).GetCachedSize(), target, stream);
      break;
    }
    case kSaving: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::saving(this),
          _Internal::saving(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.user.v1.DeleteUserResponse.Error)
  return target;
}

::size_t DeleteUserResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.user.v1.DeleteUserResponse.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.user.v1.ValidationError validation = 1;
    case kValidation: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.validation_);
      break;
    }
    // .keyapis.user.v1.User.SavingError saving = 2;
    case kSaving: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.saving_);
      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 DeleteUserResponse_Error::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const DeleteUserResponse_Error*>(
      &from));
}

void DeleteUserResponse_Error::MergeFrom(const DeleteUserResponse_Error& from) {
  DeleteUserResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.user.v1.DeleteUserResponse.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::user::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case kSaving: {
      _this->_internal_mutable_saving()->::keyapis::user::v1::User_SavingError::MergeFrom(
          from._internal_saving());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void DeleteUserResponse_Error::InternalSwap(DeleteUserResponse_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 DeleteUserResponse_Error::GetTypeName() const {
  return "keyapis.user.v1.DeleteUserResponse.Error";
}

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

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

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

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

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

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

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

void DeleteUserResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.user.v1.DeleteUserResponse)
  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 DeleteUserResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.user.v1.DeleteUserResponse)
  ::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* DeleteUserResponse::_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.user.v1.DeleteUserResponse.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* DeleteUserResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.user.v1.DeleteUserResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.user.v1.DeleteUserResponse.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.user.v1.DeleteUserResponse)
  return target;
}

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

void DeleteUserResponse::MergeFrom(const DeleteUserResponse& from) {
  DeleteUserResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.user.v1.DeleteUserResponse)
  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::user::v1::DeleteUserResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

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

class GetUserCodeRequest::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

std::string GetUserCodeRequest::GetTypeName() const {
  return "keyapis.user.v1.GetUserCodeRequest";
}

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

class GetUserCodeResponse_Error_UserCodeNotFound::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

std::string GetUserCodeResponse_Error_UserCodeNotFound::GetTypeName() const {
  return "keyapis.user.v1.GetUserCodeResponse.Error.UserCodeNotFound";
}

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

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

const ::keyapis::user::v1::ValidationError&
GetUserCodeResponse_Error::_Internal::validation(const GetUserCodeResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
const ::keyapis::user::v1::GetUserCodeResponse_Error_UserCodeNotFound&
GetUserCodeResponse_Error::_Internal::user_code_not_found(const GetUserCodeResponse_Error* msg) {
  return *msg->_impl_.reason_.user_code_not_found_;
}
void GetUserCodeResponse_Error::set_allocated_validation(::keyapis::user::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.user.v1.GetUserCodeResponse.Error.validation)
}
void GetUserCodeResponse_Error::set_allocated_user_code_not_found(::keyapis::user::v1::GetUserCodeResponse_Error_UserCodeNotFound* user_code_not_found) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (user_code_not_found) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(user_code_not_found);
    if (message_arena != submessage_arena) {
      user_code_not_found = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, user_code_not_found, submessage_arena);
    }
    set_has_user_code_not_found();
    _impl_.reason_.user_code_not_found_ = user_code_not_found;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.user.v1.GetUserCodeResponse.Error.user_code_not_found)
}
GetUserCodeResponse_Error::GetUserCodeResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.user.v1.GetUserCodeResponse.Error)
}
GetUserCodeResponse_Error::GetUserCodeResponse_Error(const GetUserCodeResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetUserCodeResponse_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::user::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case kUserCodeNotFound: {
      _this->_internal_mutable_user_code_not_found()->::keyapis::user::v1::GetUserCodeResponse_Error_UserCodeNotFound::MergeFrom(
          from._internal_user_code_not_found());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.user.v1.GetUserCodeResponse.Error)
}

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

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

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

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

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


void GetUserCodeResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.user.v1.GetUserCodeResponse.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* GetUserCodeResponse_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.user.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;
      // .keyapis.user.v1.GetUserCodeResponse.Error.UserCodeNotFound user_code_not_found = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_user_code_not_found(), 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* GetUserCodeResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.user.v1.GetUserCodeResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (reason_case()) {
    case kValidation: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, _Internal::validation(this),
          _Internal::validation(this).GetCachedSize(), target, stream);
      break;
    }
    case kUserCodeNotFound: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::user_code_not_found(this),
          _Internal::user_code_not_found(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.user.v1.GetUserCodeResponse.Error)
  return target;
}

::size_t GetUserCodeResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.user.v1.GetUserCodeResponse.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.user.v1.ValidationError validation = 1;
    case kValidation: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.validation_);
      break;
    }
    // .keyapis.user.v1.GetUserCodeResponse.Error.UserCodeNotFound user_code_not_found = 2;
    case kUserCodeNotFound: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.user_code_not_found_);
      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 GetUserCodeResponse_Error::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetUserCodeResponse_Error*>(
      &from));
}

void GetUserCodeResponse_Error::MergeFrom(const GetUserCodeResponse_Error& from) {
  GetUserCodeResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.user.v1.GetUserCodeResponse.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::user::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case kUserCodeNotFound: {
      _this->_internal_mutable_user_code_not_found()->::keyapis::user::v1::GetUserCodeResponse_Error_UserCodeNotFound::MergeFrom(
          from._internal_user_code_not_found());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void GetUserCodeResponse_Error::InternalSwap(GetUserCodeResponse_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 GetUserCodeResponse_Error::GetTypeName() const {
  return "keyapis.user.v1.GetUserCodeResponse.Error";
}

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

class GetUserCodeResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::user::v1::GetUserCodeResponse, _impl_._oneof_case_);
  static const ::keyapis::user::v1::UserCode& data(const GetUserCodeResponse* msg);
  static const ::keyapis::user::v1::GetUserCodeResponse_Error& error(const GetUserCodeResponse* msg);
};

const ::keyapis::user::v1::UserCode&
GetUserCodeResponse::_Internal::data(const GetUserCodeResponse* msg) {
  return *msg->_impl_.type_.data_;
}
const ::keyapis::user::v1::GetUserCodeResponse_Error&
GetUserCodeResponse::_Internal::error(const GetUserCodeResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void GetUserCodeResponse::set_allocated_data(::keyapis::user::v1::UserCode* 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.user.v1.GetUserCodeResponse.data)
}
void GetUserCodeResponse::set_allocated_error(::keyapis::user::v1::GetUserCodeResponse_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.user.v1.GetUserCodeResponse.error)
}
GetUserCodeResponse::GetUserCodeResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.user.v1.GetUserCodeResponse)
}
GetUserCodeResponse::GetUserCodeResponse(const GetUserCodeResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetUserCodeResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

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

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

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

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

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

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


void GetUserCodeResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.user.v1.GetUserCodeResponse)
  ::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* GetUserCodeResponse::_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.user.v1.UserCode data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_data(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.user.v1.GetUserCodeResponse.Error error = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_error(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

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

::size_t GetUserCodeResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.user.v1.GetUserCodeResponse)
  ::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.user.v1.UserCode data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.data_);
      break;
    }
    // .keyapis.user.v1.GetUserCodeResponse.Error error = 2;
    case kError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.error_);
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

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

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

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

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

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

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

const ::keyapis::user::v1::UserCode&
PostUserCodeCreateRequest::_Internal::user_code(const PostUserCodeCreateRequest* msg) {
  return *msg->_impl_.user_code_;
}
PostUserCodeCreateRequest::PostUserCodeCreateRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.user.v1.PostUserCodeCreateRequest)
}
PostUserCodeCreateRequest::PostUserCodeCreateRequest(const PostUserCodeCreateRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostUserCodeCreateRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.user_code_){nullptr}};

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

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

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

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

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

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

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

const char* PostUserCodeCreateRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.user.v1.UserCode user_code = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_user_code(), 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* PostUserCodeCreateRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.user.v1.PostUserCodeCreateRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.user.v1.UserCode user_code = 1 [(.google.api.field_behavior) = REQUIRED];
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::user_code(this),
        _Internal::user_code(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.user.v1.PostUserCodeCreateRequest)
  return target;
}

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

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

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

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

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

  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_internal_mutable_user_code()->::keyapis::user::v1::UserCode::MergeFrom(
        from._internal_user_code());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

std::string PostUserCodeCreateRequest::GetTypeName() const {
  return "keyapis.user.v1.PostUserCodeCreateRequest";
}

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

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

const ::keyapis::user::v1::ValidationError&
PostUserCodeCreateResponse_Error::_Internal::validation(const PostUserCodeCreateResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void PostUserCodeCreateResponse_Error::set_allocated_validation(::keyapis::user::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.user.v1.PostUserCodeCreateResponse.Error.validation)
}
PostUserCodeCreateResponse_Error::PostUserCodeCreateResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.user.v1.PostUserCodeCreateResponse.Error)
}
PostUserCodeCreateResponse_Error::PostUserCodeCreateResponse_Error(const PostUserCodeCreateResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostUserCodeCreateResponse_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::user::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.user.v1.PostUserCodeCreateResponse.Error)
}

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

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

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

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

void PostUserCodeCreateResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.user.v1.PostUserCodeCreateResponse.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 PostUserCodeCreateResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.user.v1.PostUserCodeCreateResponse.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* PostUserCodeCreateResponse_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.user.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* PostUserCodeCreateResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.user.v1.PostUserCodeCreateResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.user.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.user.v1.PostUserCodeCreateResponse.Error)
  return target;
}

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

void PostUserCodeCreateResponse_Error::MergeFrom(const PostUserCodeCreateResponse_Error& from) {
  PostUserCodeCreateResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.user.v1.PostUserCodeCreateResponse.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::user::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void PostUserCodeCreateResponse_Error::InternalSwap(PostUserCodeCreateResponse_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 PostUserCodeCreateResponse_Error::GetTypeName() const {
  return "keyapis.user.v1.PostUserCodeCreateResponse.Error";
}

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

class PostUserCodeCreateResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::user::v1::PostUserCodeCreateResponse, _impl_._oneof_case_);
  static const ::keyapis::user::v1::UserCode& data(const PostUserCodeCreateResponse* msg);
  static const ::keyapis::user::v1::PostUserCodeCreateResponse_Error& error(const PostUserCodeCreateResponse* msg);
};

const ::keyapis::user::v1::UserCode&
PostUserCodeCreateResponse::_Internal::data(const PostUserCodeCreateResponse* msg) {
  return *msg->_impl_.type_.data_;
}
const ::keyapis::user::v1::PostUserCodeCreateResponse_Error&
PostUserCodeCreateResponse::_Internal::error(const PostUserCodeCreateResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void PostUserCodeCreateResponse::set_allocated_data(::keyapis::user::v1::UserCode* 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.user.v1.PostUserCodeCreateResponse.data)
}
void PostUserCodeCreateResponse::set_allocated_error(::keyapis::user::v1::PostUserCodeCreateResponse_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.user.v1.PostUserCodeCreateResponse.error)
}
PostUserCodeCreateResponse::PostUserCodeCreateResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.user.v1.PostUserCodeCreateResponse)
}
PostUserCodeCreateResponse::PostUserCodeCreateResponse(const PostUserCodeCreateResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostUserCodeCreateResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

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

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

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

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

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

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


void PostUserCodeCreateResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.user.v1.PostUserCodeCreateResponse)
  ::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* PostUserCodeCreateResponse::_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.user.v1.UserCode data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_data(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.user.v1.PostUserCodeCreateResponse.Error error = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_error(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

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

::size_t PostUserCodeCreateResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.user.v1.PostUserCodeCreateResponse)
  ::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.user.v1.UserCode data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.data_);
      break;
    }
    // .keyapis.user.v1.PostUserCodeCreateResponse.Error error = 2;
    case kError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.error_);
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

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

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

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

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

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

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

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

    , decltype(_impl_.user_types_) { from._internal_user_types() }
    , /*decltype(_impl_._user_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.user_status_types_) { from._internal_user_status_types() }
    , /*decltype(_impl_._user_status_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.emails_){from._impl_.emails_}
    , decltype(_impl_.phone_numbers_){from._impl_.phone_numbers_}
    , decltype(_impl_.logins_){from._impl_.logins_}
    , decltype(_impl_.text_){nullptr}
    , decltype(_impl_.contacts_){nullptr}};

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

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

    , decltype(_impl_.user_types_) { arena }
    , /*decltype(_impl_._user_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.user_status_types_) { arena }
    , /*decltype(_impl_._user_status_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.emails_){arena}
    , decltype(_impl_.phone_numbers_){arena}
    , decltype(_impl_.logins_){arena}
    , decltype(_impl_.text_){nullptr}
    , decltype(_impl_.contacts_){nullptr}
  };
}

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

inline void UserFilter::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.company_ids_.~RepeatedField();
  _internal_mutable_user_types()->~RepeatedField();
  _internal_mutable_user_status_types()->~RepeatedField();
  _internal_mutable_emails()->~RepeatedPtrField();
  _internal_mutable_phone_numbers()->~RepeatedPtrField();
  _internal_mutable_logins()->~RepeatedPtrField();
  if (this != internal_default_instance()) delete _impl_.text_;
  if (this != internal_default_instance()) delete _impl_.contacts_;
}

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

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

  _internal_mutable_company_ids()->Clear();
  _internal_mutable_user_types()->Clear();
  _internal_mutable_user_status_types()->Clear();
  _internal_mutable_emails()->Clear();
  _internal_mutable_phone_numbers()->Clear();
  _internal_mutable_logins()->Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      ABSL_DCHECK(_impl_.text_ != nullptr);
      _impl_.text_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(_impl_.contacts_ != nullptr);
      _impl_.contacts_->Clear();
    }
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* UserFilter::_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) {
      // repeated int32 company_ids = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_company_ids(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 8) {
          _internal_add_company_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated .keyapis.user.v1.User.Type user_types = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_user_types(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 16) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_add_user_types(static_cast<::keyapis::user::v1::User_Type>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated .keyapis.user.v1.User.StatusType user_status_types = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_user_status_types(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 24) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_add_user_status_types(static_cast<::keyapis::user::v1::User_StatusType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated string emails = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_emails();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            CHK_(::_pbi::VerifyUTF8(str, nullptr));
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated string phone_numbers = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_phone_numbers();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            CHK_(::_pbi::VerifyUTF8(str, nullptr));
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated string logins = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_logins();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            CHK_(::_pbi::VerifyUTF8(str, nullptr));
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue text = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
          ptr = ctx->ParseMessage(_internal_mutable_text(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue contacts = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
          ptr = ctx->ParseMessage(_internal_mutable_contacts(), 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* UserFilter::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.user.v1.UserFilter)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated int32 company_ids = 1;
  {
    int byte_size = _impl_._company_ids_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(1, _internal_company_ids(),
                                                 byte_size, target);
    }
  }

  // repeated .keyapis.user.v1.User.Type user_types = 2;
  {
    int byte_size = _impl_._user_types_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteEnumPacked(2, _internal_user_types(),
                                       byte_size, target);
    }
  }

  // repeated .keyapis.user.v1.User.StatusType user_status_types = 3;
  {
    int byte_size = _impl_._user_status_types_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteEnumPacked(3, _internal_user_status_types(),
                                       byte_size, target);
    }
  }

  // repeated string emails = 4;
  for (int i = 0, n = this->_internal_emails_size(); i < n; ++i) {
    const auto& s = this->_internal_emails(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        s.data(), static_cast<int>(s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.user.v1.UserFilter.emails");
    target = stream->WriteString(4, s, target);
  }

  // repeated string phone_numbers = 5;
  for (int i = 0, n = this->_internal_phone_numbers_size(); i < n; ++i) {
    const auto& s = this->_internal_phone_numbers(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        s.data(), static_cast<int>(s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.user.v1.UserFilter.phone_numbers");
    target = stream->WriteString(5, s, target);
  }

  // repeated string logins = 6;
  for (int i = 0, n = this->_internal_logins_size(); i < n; ++i) {
    const auto& s = this->_internal_logins(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        s.data(), static_cast<int>(s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.user.v1.UserFilter.logins");
    target = stream->WriteString(6, s, target);
  }

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

  // .google.protobuf.StringValue contacts = 8;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(8, _Internal::contacts(this),
        _Internal::contacts(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.user.v1.UserFilter)
  return target;
}

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

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

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

  // repeated .keyapis.user.v1.User.Type user_types = 2;
  {
    std::size_t data_size = 0;
    auto count = static_cast<std::size_t>(this->_internal_user_types_size());

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

  // repeated .keyapis.user.v1.User.StatusType user_status_types = 3;
  {
    std::size_t data_size = 0;
    auto count = static_cast<std::size_t>(this->_internal_user_status_types_size());

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

  // repeated string emails = 4;
  total_size += 1 * ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_internal_emails().size());
  for (int i = 0, n = _internal_emails().size(); i < n; ++i) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        _internal_emails().Get(i));
  }

  // repeated string phone_numbers = 5;
  total_size += 1 * ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_internal_phone_numbers().size());
  for (int i = 0, n = _internal_phone_numbers().size(); i < n; ++i) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        _internal_phone_numbers().Get(i));
  }

  // repeated string logins = 6;
  total_size += 1 * ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_internal_logins().size());
  for (int i = 0, n = _internal_logins().size(); i < n; ++i) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        _internal_logins().Get(i));
  }

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

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

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

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

  _this->_impl_.company_ids_.MergeFrom(from._impl_.company_ids_);
  _this->_internal_mutable_user_types()->MergeFrom(from._internal_user_types());
  _this->_internal_mutable_user_status_types()->MergeFrom(from._internal_user_status_types());
  _this->_internal_mutable_emails()->MergeFrom(from._internal_emails());
  _this->_internal_mutable_phone_numbers()->MergeFrom(from._internal_phone_numbers());
  _this->_internal_mutable_logins()->MergeFrom(from._internal_logins());
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_text()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_text());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_contacts()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_contacts());
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void UserFilter::InternalSwap(UserFilter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.company_ids_.InternalSwap(&other->_impl_.company_ids_);
  _internal_mutable_user_types()->InternalSwap(
      other->_internal_mutable_user_types());
  _internal_mutable_user_status_types()->InternalSwap(
      other->_internal_mutable_user_status_types());
  _internal_mutable_emails()->InternalSwap(
      other->_internal_mutable_emails());
  _internal_mutable_phone_numbers()->InternalSwap(
      other->_internal_mutable_phone_numbers());
  _internal_mutable_logins()->InternalSwap(
      other->_internal_mutable_logins());
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(UserFilter, _impl_.contacts_)
      + sizeof(UserFilter::_impl_.contacts_)
      - PROTOBUF_FIELD_OFFSET(UserFilter, _impl_.text_)>(
          reinterpret_cast<char*>(&_impl_.text_),
          reinterpret_cast<char*>(&other->_impl_.text_));
}

std::string UserFilter::GetTypeName() const {
  return "keyapis.user.v1.UserFilter";
}

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

class UserPaging::_Internal {
 public:
};

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

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

    , decltype(_impl_.direction_type_) { 0 }

    , decltype(_impl_.limit_) { 0 }

    , decltype(_impl_.offset_) { 0 }

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

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

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

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

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

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

const char* UserPaging::_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.user.v1.UserPaging.OrderByType order_by_type = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_order_by_type(static_cast<::keyapis::user::v1::UserPaging_OrderByType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.user.v1.UserPaging.DirectionType direction_type = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_direction_type(static_cast<::keyapis::user::v1::UserPaging_DirectionType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 limit = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
          _impl_.limit_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 offset = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
          _impl_.offset_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

std::string UserPaging::GetTypeName() const {
  return "keyapis.user.v1.UserPaging";
}

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

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

const ::keyapis::user::v1::User&
PostUserRequest::_Internal::data(const PostUserRequest* msg) {
  return *msg->_impl_.data_;
}
PostUserRequest::PostUserRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.user.v1.PostUserRequest)
}
PostUserRequest::PostUserRequest(const PostUserRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostUserRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.data_){nullptr}};

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_internal_mutable_data()->::keyapis::user::v1::User::MergeFrom(
        from._internal_data());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

std::string PostUserRequest::GetTypeName() const {
  return "keyapis.user.v1.PostUserRequest";
}

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

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

const ::keyapis::user::v1::ValidationError&
PostUserResponse_Error::_Internal::validation(const PostUserResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
const ::keyapis::user::v1::User_SavingError&
PostUserResponse_Error::_Internal::saving(const PostUserResponse_Error* msg) {
  return *msg->_impl_.reason_.saving_;
}
void PostUserResponse_Error::set_allocated_validation(::keyapis::user::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.user.v1.PostUserResponse.Error.validation)
}
void PostUserResponse_Error::set_allocated_saving(::keyapis::user::v1::User_SavingError* saving) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (saving) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(saving);
    if (message_arena != submessage_arena) {
      saving = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, saving, submessage_arena);
    }
    set_has_saving();
    _impl_.reason_.saving_ = saving;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.user.v1.PostUserResponse.Error.saving)
}
PostUserResponse_Error::PostUserResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.user.v1.PostUserResponse.Error)
}
PostUserResponse_Error::PostUserResponse_Error(const PostUserResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostUserResponse_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::user::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case kSaving: {
      _this->_internal_mutable_saving()->::keyapis::user::v1::User_SavingError::MergeFrom(
          from._internal_saving());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.user.v1.PostUserResponse.Error)
}

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

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

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

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

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


void PostUserResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.user.v1.PostUserResponse.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* PostUserResponse_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.user.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;
      // .keyapis.user.v1.User.SavingError saving = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_saving(), 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* PostUserResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.user.v1.PostUserResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (reason_case()) {
    case kValidation: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, _Internal::validation(this),
          _Internal::validation(this).GetCachedSize(), target, stream);
      break;
    }
    case kSaving: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::saving(this),
          _Internal::saving(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.user.v1.PostUserResponse.Error)
  return target;
}

::size_t PostUserResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.user.v1.PostUserResponse.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.user.v1.ValidationError validation = 1;
    case kValidation: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.validation_);
      break;
    }
    // .keyapis.user.v1.User.SavingError saving = 2;
    case kSaving: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.saving_);
      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 PostUserResponse_Error::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostUserResponse_Error*>(
      &from));
}

void PostUserResponse_Error::MergeFrom(const PostUserResponse_Error& from) {
  PostUserResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.user.v1.PostUserResponse.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::user::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case kSaving: {
      _this->_internal_mutable_saving()->::keyapis::user::v1::User_SavingError::MergeFrom(
          from._internal_saving());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void PostUserResponse_Error::InternalSwap(PostUserResponse_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 PostUserResponse_Error::GetTypeName() const {
  return "keyapis.user.v1.PostUserResponse.Error";
}

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

class PostUserResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::user::v1::PostUserResponse, _impl_._oneof_case_);
  static const ::keyapis::user::v1::User& data(const PostUserResponse* msg);
  static const ::keyapis::user::v1::PostUserResponse_Error& error(const PostUserResponse* msg);
};

const ::keyapis::user::v1::User&
PostUserResponse::_Internal::data(const PostUserResponse* msg) {
  return *msg->_impl_.type_.data_;
}
const ::keyapis::user::v1::PostUserResponse_Error&
PostUserResponse::_Internal::error(const PostUserResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void PostUserResponse::set_allocated_data(::keyapis::user::v1::User* 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.user.v1.PostUserResponse.data)
}
void PostUserResponse::set_allocated_error(::keyapis::user::v1::PostUserResponse_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.user.v1.PostUserResponse.error)
}
PostUserResponse::PostUserResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.user.v1.PostUserResponse)
}
PostUserResponse::PostUserResponse(const PostUserResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostUserResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

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

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

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

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

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

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


void PostUserResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.user.v1.PostUserResponse)
  ::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* PostUserResponse::_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.user.v1.User data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_data(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.user.v1.PostUserResponse.Error error = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_error(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

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

::size_t PostUserResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.user.v1.PostUserResponse)
  ::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.user.v1.User data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.data_);
      break;
    }
    // .keyapis.user.v1.PostUserResponse.Error error = 2;
    case kError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.error_);
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

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

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

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

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

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

class ValidationError::_Internal {
 public:
};

ValidationError::ValidationError(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.user.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.user.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.user.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.user.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.user.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.user.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.user.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.user.v1.ValidationError)
  return target;
}

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

// @@protoc_insertion_point(namespace_scope)
}  // namespace v1
}  // namespace user
}  // namespace keyapis
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::DeleteUserSessionsRequest*
Arena::CreateMaybeMessage< ::keyapis::user::v1::DeleteUserSessionsRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::DeleteUserSessionsRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::DeleteUserSessionsResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::user::v1::DeleteUserSessionsResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::DeleteUserSessionsResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::DeleteUserSessionsResponse*
Arena::CreateMaybeMessage< ::keyapis::user::v1::DeleteUserSessionsResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::DeleteUserSessionsResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::User_SavingError_Conflict*
Arena::CreateMaybeMessage< ::keyapis::user::v1::User_SavingError_Conflict >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::User_SavingError_Conflict >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::User_SavingError_UserTypeForbidden*
Arena::CreateMaybeMessage< ::keyapis::user::v1::User_SavingError_UserTypeForbidden >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::User_SavingError_UserTypeForbidden >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::User_SavingError_UserStatusForbidden*
Arena::CreateMaybeMessage< ::keyapis::user::v1::User_SavingError_UserStatusForbidden >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::User_SavingError_UserStatusForbidden >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::User_SavingError_MrfIdRequiredForUserType*
Arena::CreateMaybeMessage< ::keyapis::user::v1::User_SavingError_MrfIdRequiredForUserType >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::User_SavingError_MrfIdRequiredForUserType >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::User_SavingError_CreatorMustBeAdmin*
Arena::CreateMaybeMessage< ::keyapis::user::v1::User_SavingError_CreatorMustBeAdmin >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::User_SavingError_CreatorMustBeAdmin >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::User_SavingError_RfIdDoesNotMatchMrfId*
Arena::CreateMaybeMessage< ::keyapis::user::v1::User_SavingError_RfIdDoesNotMatchMrfId >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::User_SavingError_RfIdDoesNotMatchMrfId >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::User_SavingError_EmailIsAlreadyTaken*
Arena::CreateMaybeMessage< ::keyapis::user::v1::User_SavingError_EmailIsAlreadyTaken >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::User_SavingError_EmailIsAlreadyTaken >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::User_SavingError_EntityNotFound*
Arena::CreateMaybeMessage< ::keyapis::user::v1::User_SavingError_EntityNotFound >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::User_SavingError_EntityNotFound >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::User_SavingError*
Arena::CreateMaybeMessage< ::keyapis::user::v1::User_SavingError >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::User_SavingError >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::User*
Arena::CreateMaybeMessage< ::keyapis::user::v1::User >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::User >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::UserCode*
Arena::CreateMaybeMessage< ::keyapis::user::v1::UserCode >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::UserCode >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::GetUserRequest*
Arena::CreateMaybeMessage< ::keyapis::user::v1::GetUserRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::GetUserRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::GetUserResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::user::v1::GetUserResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::GetUserResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::GetUserResponse*
Arena::CreateMaybeMessage< ::keyapis::user::v1::GetUserResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::GetUserResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::GetUserListRequest*
Arena::CreateMaybeMessage< ::keyapis::user::v1::GetUserListRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::GetUserListRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::GetUserListResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::user::v1::GetUserListResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::GetUserListResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::GetUserListResponse*
Arena::CreateMaybeMessage< ::keyapis::user::v1::GetUserListResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::GetUserListResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::GetUserCountRequest*
Arena::CreateMaybeMessage< ::keyapis::user::v1::GetUserCountRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::GetUserCountRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::GetUserCountResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::user::v1::GetUserCountResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::GetUserCountResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::GetUserCountResponse*
Arena::CreateMaybeMessage< ::keyapis::user::v1::GetUserCountResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::GetUserCountResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::DeleteUserRequest*
Arena::CreateMaybeMessage< ::keyapis::user::v1::DeleteUserRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::DeleteUserRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::DeleteUserResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::user::v1::DeleteUserResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::DeleteUserResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::DeleteUserResponse*
Arena::CreateMaybeMessage< ::keyapis::user::v1::DeleteUserResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::DeleteUserResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::GetUserCodeRequest*
Arena::CreateMaybeMessage< ::keyapis::user::v1::GetUserCodeRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::GetUserCodeRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::GetUserCodeResponse_Error_UserCodeNotFound*
Arena::CreateMaybeMessage< ::keyapis::user::v1::GetUserCodeResponse_Error_UserCodeNotFound >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::GetUserCodeResponse_Error_UserCodeNotFound >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::GetUserCodeResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::user::v1::GetUserCodeResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::GetUserCodeResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::GetUserCodeResponse*
Arena::CreateMaybeMessage< ::keyapis::user::v1::GetUserCodeResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::GetUserCodeResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::PostUserCodeCreateRequest*
Arena::CreateMaybeMessage< ::keyapis::user::v1::PostUserCodeCreateRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::PostUserCodeCreateRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::PostUserCodeCreateResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::user::v1::PostUserCodeCreateResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::PostUserCodeCreateResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::PostUserCodeCreateResponse*
Arena::CreateMaybeMessage< ::keyapis::user::v1::PostUserCodeCreateResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::PostUserCodeCreateResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::UserFilter*
Arena::CreateMaybeMessage< ::keyapis::user::v1::UserFilter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::UserFilter >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::UserPaging*
Arena::CreateMaybeMessage< ::keyapis::user::v1::UserPaging >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::UserPaging >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::PostUserRequest*
Arena::CreateMaybeMessage< ::keyapis::user::v1::PostUserRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::PostUserRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::PostUserResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::user::v1::PostUserResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::PostUserResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::PostUserResponse*
Arena::CreateMaybeMessage< ::keyapis::user::v1::PostUserResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::PostUserResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::user::v1::ValidationError*
Arena::CreateMaybeMessage< ::keyapis::user::v1::ValidationError >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::user::v1::ValidationError >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"
