// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: client/v3beta/dto/auth/auth_dto.proto

#include "client/v3beta/dto/auth/auth_dto.pb.h"

#include <algorithm>

#include <herogoogle/protobuf/io/coded_stream.h>
#include <herogoogle/protobuf/extension_set.h>
#include <herogoogle/protobuf/wire_format_lite.h>
#include <herogoogle/protobuf/descriptor.h>
#include <herogoogle/protobuf/generated_message_reflection.h>
#include <herogoogle/protobuf/reflection_ops.h>
#include <herogoogle/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)


PROTOBUF_PRAGMA_INIT_SEG
namespace heroim {
namespace client {
namespace v3beta {
namespace dto {
namespace auth {
constexpr RoleLoginRequest_ExtraEntry_DoNotUse::RoleLoginRequest_ExtraEntry_DoNotUse(
  ::herogoogle::protobuf::internal::ConstantInitialized){}
struct RoleLoginRequest_ExtraEntry_DoNotUseDefaultTypeInternal {
  constexpr RoleLoginRequest_ExtraEntry_DoNotUseDefaultTypeInternal()
    : _instance(::herogoogle::protobuf::internal::ConstantInitialized{}) {}
  ~RoleLoginRequest_ExtraEntry_DoNotUseDefaultTypeInternal() {}
  union {
    RoleLoginRequest_ExtraEntry_DoNotUse _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT RoleLoginRequest_ExtraEntry_DoNotUseDefaultTypeInternal _RoleLoginRequest_ExtraEntry_DoNotUse_default_instance_;
constexpr RoleLoginRequest::RoleLoginRequest(
  ::herogoogle::protobuf::internal::ConstantInitialized)
  : extra_(::herogoogle::protobuf::internal::ConstantInitialized{})
  , rolename_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , avatarurl_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , base_(nullptr)
  , userkey_(nullptr)
  , gender_(0)
{}
struct RoleLoginRequestDefaultTypeInternal {
  constexpr RoleLoginRequestDefaultTypeInternal()
    : _instance(::herogoogle::protobuf::internal::ConstantInitialized{}) {}
  ~RoleLoginRequestDefaultTypeInternal() {}
  union {
    RoleLoginRequest _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT RoleLoginRequestDefaultTypeInternal _RoleLoginRequest_default_instance_;
constexpr LoginResponse::LoginResponse(
  ::herogoogle::protobuf::internal::ConstantInitialized)
  : token_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , user_(nullptr){}
struct LoginResponseDefaultTypeInternal {
  constexpr LoginResponseDefaultTypeInternal()
    : _instance(::herogoogle::protobuf::internal::ConstantInitialized{}) {}
  ~LoginResponseDefaultTypeInternal() {}
  union {
    LoginResponse _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LoginResponseDefaultTypeInternal _LoginResponse_default_instance_;
constexpr AuthCodeLoginRequest::AuthCodeLoginRequest(
  ::herogoogle::protobuf::internal::ConstantInitialized)
  : authcode_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , base_(nullptr){}
struct AuthCodeLoginRequestDefaultTypeInternal {
  constexpr AuthCodeLoginRequestDefaultTypeInternal()
    : _instance(::herogoogle::protobuf::internal::ConstantInitialized{}) {}
  ~AuthCodeLoginRequestDefaultTypeInternal() {}
  union {
    AuthCodeLoginRequest _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AuthCodeLoginRequestDefaultTypeInternal _AuthCodeLoginRequest_default_instance_;
}  // namespace auth
}  // namespace dto
}  // namespace v3beta
}  // namespace client
}  // namespace heroim
static ::herogoogle::protobuf::Metadata file_level_metadata_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto[4];
static constexpr ::herogoogle::protobuf::EnumDescriptor const** file_level_enum_descriptors_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto = nullptr;
static constexpr ::herogoogle::protobuf::ServiceDescriptor const** file_level_service_descriptors_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto = nullptr;

const ::herogoogle::protobuf::uint32 TableStruct_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::auth::RoleLoginRequest_ExtraEntry_DoNotUse, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::auth::RoleLoginRequest_ExtraEntry_DoNotUse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::auth::RoleLoginRequest_ExtraEntry_DoNotUse, key_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::auth::RoleLoginRequest_ExtraEntry_DoNotUse, value_),
  0,
  1,
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::auth::RoleLoginRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::auth::RoleLoginRequest, base_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::auth::RoleLoginRequest, userkey_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::auth::RoleLoginRequest, rolename_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::auth::RoleLoginRequest, avatarurl_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::auth::RoleLoginRequest, gender_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::auth::RoleLoginRequest, extra_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::auth::LoginResponse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::auth::LoginResponse, token_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::auth::LoginResponse, user_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::auth::AuthCodeLoginRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::auth::AuthCodeLoginRequest, base_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::auth::AuthCodeLoginRequest, authcode_),
};
static const ::herogoogle::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, 8, -1, sizeof(::heroim::client::v3beta::dto::auth::RoleLoginRequest_ExtraEntry_DoNotUse)},
  { 10, -1, -1, sizeof(::heroim::client::v3beta::dto::auth::RoleLoginRequest)},
  { 22, -1, -1, sizeof(::heroim::client::v3beta::dto::auth::LoginResponse)},
  { 30, -1, -1, sizeof(::heroim::client::v3beta::dto::auth::AuthCodeLoginRequest)},
};

static ::herogoogle::protobuf::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::herogoogle::protobuf::Message*>(&::heroim::client::v3beta::dto::auth::_RoleLoginRequest_ExtraEntry_DoNotUse_default_instance_),
  reinterpret_cast<const ::herogoogle::protobuf::Message*>(&::heroim::client::v3beta::dto::auth::_RoleLoginRequest_default_instance_),
  reinterpret_cast<const ::herogoogle::protobuf::Message*>(&::heroim::client::v3beta::dto::auth::_LoginResponse_default_instance_),
  reinterpret_cast<const ::herogoogle::protobuf::Message*>(&::heroim::client::v3beta::dto::auth::_AuthCodeLoginRequest_default_instance_),
};
#ifdef _MSC_VER
#  pragma warning(disable : 4125)
#endif  /* _MSC_VER */
const char descriptor_table_protodef_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n%client/v3beta/dto/auth/auth_dto.proto\022"
  "\035heroim.client.v3beta.dto.auth\032\"client/v"
  "3beta/dto/shared/api.proto\032-client/v3bet"
  "a/dto/user/model/user_model.proto\"\347\002\n\020Ro"
  "leLoginRequest\0229\n\004base\030\001 \001(\0132+.heroim.cl"
  "ient.v3beta.dto.shared.APIRequest\022=\n\007use"
  "rKey\030\002 \001(\0132,.heroim.client.v3beta.dto.us"
  "er.model.UserKey\022\020\n\010roleName\030\003 \001(\t\022\021\n\tav"
  "atarUrl\030\004 \001(\t\022;\n\006gender\030\005 \001(\0162+.heroim.c"
  "lient.v3beta.dto.user.model.Gender\022I\n\005ex"
  "tra\030\006 \003(\0132:.heroim.client.v3beta.dto.aut"
  "h.RoleLoginRequest.ExtraEntry\032,\n\nExtraEn"
  "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"W\n\rL"
  "oginResponse\022\r\n\005token\030\001 \001(\t\0227\n\004user\030\002 \001("
  "\0132).heroim.client.v3beta.dto.user.model."
  "User\"c\n\024AuthCodeLoginRequest\0229\n\004base\030\001 \001"
  "(\0132+.heroim.client.v3beta.dto.shared.API"
  "Request\022\020\n\010authCode\030\002 \001(\tBP\n!com.hero.cs"
  "dk.api.v3beta.dto.authP\001Z!heroim/api/cli"
  "ent/v3beta/dto/auth\242\002\005IMSdkb\006proto3"
  ;
static const ::herogoogle::protobuf::internal::DescriptorTable*const descriptor_table_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto_deps[2] = {
  &::descriptor_table_client_2fv3beta_2fdto_2fshared_2fapi_2eproto,
  &::descriptor_table_client_2fv3beta_2fdto_2fuser_2fmodel_2fuser_5fmodel_2eproto,
};
static ::herogoogle::protobuf::internal::once_flag descriptor_table_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto_once;
const ::herogoogle::protobuf::internal::DescriptorTable descriptor_table_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto = {
  false, false, 795, descriptor_table_protodef_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto, "client/v3beta/dto/auth/auth_dto.proto", 
  &descriptor_table_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto_once, descriptor_table_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto_deps, 2, 4,
  schemas, file_default_instances, TableStruct_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto::offsets,
  file_level_metadata_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto, file_level_enum_descriptors_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto, file_level_service_descriptors_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::herogoogle::protobuf::internal::DescriptorTable* descriptor_table_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto_getter() {
  return &descriptor_table_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::herogoogle::protobuf::internal::AddDescriptorsRunner dynamic_init_dummy_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto(&descriptor_table_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto);
namespace heroim {
namespace client {
namespace v3beta {
namespace dto {
namespace auth {

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

RoleLoginRequest_ExtraEntry_DoNotUse::RoleLoginRequest_ExtraEntry_DoNotUse() {}
RoleLoginRequest_ExtraEntry_DoNotUse::RoleLoginRequest_ExtraEntry_DoNotUse(::herogoogle::protobuf::Arena* arena)
    : SuperType(arena) {}
void RoleLoginRequest_ExtraEntry_DoNotUse::MergeFrom(const RoleLoginRequest_ExtraEntry_DoNotUse& other) {
  MergeFromInternal(other);
}
::herogoogle::protobuf::Metadata RoleLoginRequest_ExtraEntry_DoNotUse::GetMetadata() const {
  return ::herogoogle::protobuf::internal::AssignDescriptors(
      &descriptor_table_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto_getter, &descriptor_table_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto_once,
      file_level_metadata_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto[0]);
}

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

class RoleLoginRequest::_Internal {
 public:
  static const ::heroim::client::v3beta::dto::shared::APIRequest& base(const RoleLoginRequest* msg);
  static const ::heroim::client::v3beta::dto::user::model::UserKey& userkey(const RoleLoginRequest* msg);
};

const ::heroim::client::v3beta::dto::shared::APIRequest&
RoleLoginRequest::_Internal::base(const RoleLoginRequest* msg) {
  return *msg->base_;
}
const ::heroim::client::v3beta::dto::user::model::UserKey&
RoleLoginRequest::_Internal::userkey(const RoleLoginRequest* msg) {
  return *msg->userkey_;
}
void RoleLoginRequest::clear_base() {
  if (GetArenaForAllocation() == nullptr && base_ != nullptr) {
    delete base_;
  }
  base_ = nullptr;
}
void RoleLoginRequest::clear_userkey() {
  if (GetArenaForAllocation() == nullptr && userkey_ != nullptr) {
    delete userkey_;
  }
  userkey_ = nullptr;
}
RoleLoginRequest::RoleLoginRequest(::herogoogle::protobuf::Arena* arena,
                         bool is_message_owned)
  : ::herogoogle::protobuf::Message(arena, is_message_owned),
  extra_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:heroim.client.v3beta.dto.auth.RoleLoginRequest)
}
RoleLoginRequest::RoleLoginRequest(const RoleLoginRequest& from)
  : ::herogoogle::protobuf::Message() {
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
  extra_.MergeFrom(from.extra_);
  rolename_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_rolename().empty()) {
    rolename_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_rolename(), 
      GetArenaForAllocation());
  }
  avatarurl_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_avatarurl().empty()) {
    avatarurl_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_avatarurl(), 
      GetArenaForAllocation());
  }
  if (from._internal_has_base()) {
    base_ = new ::heroim::client::v3beta::dto::shared::APIRequest(*from.base_);
  } else {
    base_ = nullptr;
  }
  if (from._internal_has_userkey()) {
    userkey_ = new ::heroim::client::v3beta::dto::user::model::UserKey(*from.userkey_);
  } else {
    userkey_ = nullptr;
  }
  gender_ = from.gender_;
  // @@protoc_insertion_point(copy_constructor:heroim.client.v3beta.dto.auth.RoleLoginRequest)
}

void RoleLoginRequest::SharedCtor() {
rolename_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
avatarurl_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&base_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&gender_) -
    reinterpret_cast<char*>(&base_)) + sizeof(gender_));
}

RoleLoginRequest::~RoleLoginRequest() {
  // @@protoc_insertion_point(destructor:heroim.client.v3beta.dto.auth.RoleLoginRequest)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::herogoogle::protobuf::UnknownFieldSet>();
}

inline void RoleLoginRequest::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  rolename_.DestroyNoArena(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  avatarurl_.DestroyNoArena(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete base_;
  if (this != internal_default_instance()) delete userkey_;
}

void RoleLoginRequest::ArenaDtor(void* object) {
  RoleLoginRequest* _this = reinterpret_cast< RoleLoginRequest* >(object);
  (void)_this;
  _this->extra_. ~MapField();
}
inline void RoleLoginRequest::RegisterArenaDtor(::herogoogle::protobuf::Arena* arena) {
  if (arena != nullptr) {
    arena->OwnCustomDestructor(this, &RoleLoginRequest::ArenaDtor);
  }
}
void RoleLoginRequest::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void RoleLoginRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:heroim.client.v3beta.dto.auth.RoleLoginRequest)
  ::herogoogle::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  extra_.Clear();
  rolename_.ClearToEmpty();
  avatarurl_.ClearToEmpty();
  if (GetArenaForAllocation() == nullptr && base_ != nullptr) {
    delete base_;
  }
  base_ = nullptr;
  if (GetArenaForAllocation() == nullptr && userkey_ != nullptr) {
    delete userkey_;
  }
  userkey_ = nullptr;
  gender_ = 0;
  _internal_metadata_.Clear<::herogoogle::protobuf::UnknownFieldSet>();
}

const char* RoleLoginRequest::_InternalParse(const char* ptr, ::herogoogle::protobuf::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::herogoogle::protobuf::uint32 tag;
    ptr = ::herogoogle::protobuf::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .heroim.client.v3beta.dto.shared.APIRequest base = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_base(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .heroim.client.v3beta.dto.user.model.UserKey userKey = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_userkey(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string roleName = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 26)) {
          auto str = _internal_mutable_rolename();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, "heroim.client.v3beta.dto.auth.RoleLoginRequest.roleName"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string avatarUrl = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 34)) {
          auto str = _internal_mutable_avatarurl();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, "heroim.client.v3beta.dto.auth.RoleLoginRequest.avatarUrl"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .heroim.client.v3beta.dto.user.model.Gender gender = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 40)) {
          ::herogoogle::protobuf::uint64 val = ::herogoogle::protobuf::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          _internal_set_gender(static_cast<::heroim::client::v3beta::dto::user::model::Gender>(val));
        } else
          goto handle_unusual;
        continue;
      // map<string, string> extra = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 50)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(&extra_, ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::herogoogle::protobuf::internal::ExpectTag<50>(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<::herogoogle::protobuf::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::herogoogle::protobuf::uint8* RoleLoginRequest::_InternalSerialize(
    ::herogoogle::protobuf::uint8* target, ::herogoogle::protobuf::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:heroim.client.v3beta.dto.auth.RoleLoginRequest)
  ::herogoogle::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .heroim.client.v3beta.dto.shared.APIRequest base = 1;
  if (this->_internal_has_base()) {
    target = stream->EnsureSpace(target);
    target = ::herogoogle::protobuf::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::base(this), target, stream);
  }

  // .heroim.client.v3beta.dto.user.model.UserKey userKey = 2;
  if (this->_internal_has_userkey()) {
    target = stream->EnsureSpace(target);
    target = ::herogoogle::protobuf::internal::WireFormatLite::
      InternalWriteMessage(
        2, _Internal::userkey(this), target, stream);
  }

  // string roleName = 3;
  if (!this->_internal_rolename().empty()) {
    ::herogoogle::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_rolename().data(), static_cast<int>(this->_internal_rolename().length()),
      ::herogoogle::protobuf::internal::WireFormatLite::SERIALIZE,
      "heroim.client.v3beta.dto.auth.RoleLoginRequest.roleName");
    target = stream->WriteStringMaybeAliased(
        3, this->_internal_rolename(), target);
  }

  // string avatarUrl = 4;
  if (!this->_internal_avatarurl().empty()) {
    ::herogoogle::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_avatarurl().data(), static_cast<int>(this->_internal_avatarurl().length()),
      ::herogoogle::protobuf::internal::WireFormatLite::SERIALIZE,
      "heroim.client.v3beta.dto.auth.RoleLoginRequest.avatarUrl");
    target = stream->WriteStringMaybeAliased(
        4, this->_internal_avatarurl(), target);
  }

  // .heroim.client.v3beta.dto.user.model.Gender gender = 5;
  if (this->_internal_gender() != 0) {
    target = stream->EnsureSpace(target);
    target = ::herogoogle::protobuf::internal::WireFormatLite::WriteEnumToArray(
      5, this->_internal_gender(), target);
  }

  // map<string, string> extra = 6;
  if (!this->_internal_extra().empty()) {
    typedef ::herogoogle::protobuf::Map< std::string, std::string >::const_pointer
        ConstPtr;
    typedef ConstPtr SortItem;
    typedef ::herogoogle::protobuf::internal::CompareByDerefFirst<SortItem> Less;
    struct Utf8Check {
      static void Check(ConstPtr p) {
        (void)p;
        ::herogoogle::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->first.data(), static_cast<int>(p->first.length()),
          ::herogoogle::protobuf::internal::WireFormatLite::SERIALIZE,
          "heroim.client.v3beta.dto.auth.RoleLoginRequest.ExtraEntry.key");
        ::herogoogle::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->second.data(), static_cast<int>(p->second.length()),
          ::herogoogle::protobuf::internal::WireFormatLite::SERIALIZE,
          "heroim.client.v3beta.dto.auth.RoleLoginRequest.ExtraEntry.value");
      }
    };

    if (stream->IsSerializationDeterministic() &&
        this->_internal_extra().size() > 1) {
      ::std::unique_ptr<SortItem[]> items(
          new SortItem[this->_internal_extra().size()]);
      typedef ::herogoogle::protobuf::Map< std::string, std::string >::size_type size_type;
      size_type n = 0;
      for (::herogoogle::protobuf::Map< std::string, std::string >::const_iterator
          it = this->_internal_extra().begin();
          it != this->_internal_extra().end(); ++it, ++n) {
        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
      }
      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
      for (size_type i = 0; i < n; i++) {
        target = RoleLoginRequest_ExtraEntry_DoNotUse::Funcs::InternalSerialize(6, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target, stream);
        Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
      }
    } else {
      for (::herogoogle::protobuf::Map< std::string, std::string >::const_iterator
          it = this->_internal_extra().begin();
          it != this->_internal_extra().end(); ++it) {
        target = RoleLoginRequest_ExtraEntry_DoNotUse::Funcs::InternalSerialize(6, it->first, it->second, target, stream);
        Utf8Check::Check(&(*it));
      }
    }
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::herogoogle::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::herogoogle::protobuf::UnknownFieldSet>(::herogoogle::protobuf::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:heroim.client.v3beta.dto.auth.RoleLoginRequest)
  return target;
}

size_t RoleLoginRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:heroim.client.v3beta.dto.auth.RoleLoginRequest)
  size_t total_size = 0;

  ::herogoogle::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // map<string, string> extra = 6;
  total_size += 1 *
      ::herogoogle::protobuf::internal::FromIntSize(this->_internal_extra_size());
  for (::herogoogle::protobuf::Map< std::string, std::string >::const_iterator
      it = this->_internal_extra().begin();
      it != this->_internal_extra().end(); ++it) {
    total_size += RoleLoginRequest_ExtraEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
  }

  // string roleName = 3;
  if (!this->_internal_rolename().empty()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::StringSize(
        this->_internal_rolename());
  }

  // string avatarUrl = 4;
  if (!this->_internal_avatarurl().empty()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::StringSize(
        this->_internal_avatarurl());
  }

  // .heroim.client.v3beta.dto.shared.APIRequest base = 1;
  if (this->_internal_has_base()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::MessageSize(
        *base_);
  }

  // .heroim.client.v3beta.dto.user.model.UserKey userKey = 2;
  if (this->_internal_has_userkey()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::MessageSize(
        *userkey_);
  }

  // .heroim.client.v3beta.dto.user.model.Gender gender = 5;
  if (this->_internal_gender() != 0) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::EnumSize(this->_internal_gender());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::herogoogle::protobuf::Message::ClassData RoleLoginRequest::_class_data_ = {
    ::herogoogle::protobuf::Message::CopyWithSizeCheck,
    RoleLoginRequest::MergeImpl
};
const ::herogoogle::protobuf::Message::ClassData*RoleLoginRequest::GetClassData() const { return &_class_data_; }

void RoleLoginRequest::MergeImpl(::herogoogle::protobuf::Message* to,
                      const ::herogoogle::protobuf::Message& from) {
  static_cast<RoleLoginRequest *>(to)->MergeFrom(
      static_cast<const RoleLoginRequest &>(from));
}


void RoleLoginRequest::MergeFrom(const RoleLoginRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:heroim.client.v3beta.dto.auth.RoleLoginRequest)
  GOOGLE_DCHECK_NE(&from, this);
  ::herogoogle::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  extra_.MergeFrom(from.extra_);
  if (!from._internal_rolename().empty()) {
    _internal_set_rolename(from._internal_rolename());
  }
  if (!from._internal_avatarurl().empty()) {
    _internal_set_avatarurl(from._internal_avatarurl());
  }
  if (from._internal_has_base()) {
    _internal_mutable_base()->::heroim::client::v3beta::dto::shared::APIRequest::MergeFrom(from._internal_base());
  }
  if (from._internal_has_userkey()) {
    _internal_mutable_userkey()->::heroim::client::v3beta::dto::user::model::UserKey::MergeFrom(from._internal_userkey());
  }
  if (from._internal_gender() != 0) {
    _internal_set_gender(from._internal_gender());
  }
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

void RoleLoginRequest::CopyFrom(const RoleLoginRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:heroim.client.v3beta.dto.auth.RoleLoginRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void RoleLoginRequest::InternalSwap(RoleLoginRequest* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  extra_.InternalSwap(&other->extra_);
  ::herogoogle::protobuf::internal::ArenaStringPtr::InternalSwap(
      &::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited(),
      &rolename_, lhs_arena,
      &other->rolename_, rhs_arena
  );
  ::herogoogle::protobuf::internal::ArenaStringPtr::InternalSwap(
      &::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited(),
      &avatarurl_, lhs_arena,
      &other->avatarurl_, rhs_arena
  );
  ::herogoogle::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(RoleLoginRequest, gender_)
      + sizeof(RoleLoginRequest::gender_)
      - PROTOBUF_FIELD_OFFSET(RoleLoginRequest, base_)>(
          reinterpret_cast<char*>(&base_),
          reinterpret_cast<char*>(&other->base_));
}

::herogoogle::protobuf::Metadata RoleLoginRequest::GetMetadata() const {
  return ::herogoogle::protobuf::internal::AssignDescriptors(
      &descriptor_table_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto_getter, &descriptor_table_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto_once,
      file_level_metadata_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto[1]);
}

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

class LoginResponse::_Internal {
 public:
  static const ::heroim::client::v3beta::dto::user::model::User& user(const LoginResponse* msg);
};

const ::heroim::client::v3beta::dto::user::model::User&
LoginResponse::_Internal::user(const LoginResponse* msg) {
  return *msg->user_;
}
void LoginResponse::clear_user() {
  if (GetArenaForAllocation() == nullptr && user_ != nullptr) {
    delete user_;
  }
  user_ = nullptr;
}
LoginResponse::LoginResponse(::herogoogle::protobuf::Arena* arena,
                         bool is_message_owned)
  : ::herogoogle::protobuf::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:heroim.client.v3beta.dto.auth.LoginResponse)
}
LoginResponse::LoginResponse(const LoginResponse& from)
  : ::herogoogle::protobuf::Message() {
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
  token_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_token().empty()) {
    token_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_token(), 
      GetArenaForAllocation());
  }
  if (from._internal_has_user()) {
    user_ = new ::heroim::client::v3beta::dto::user::model::User(*from.user_);
  } else {
    user_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:heroim.client.v3beta.dto.auth.LoginResponse)
}

void LoginResponse::SharedCtor() {
token_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
user_ = nullptr;
}

LoginResponse::~LoginResponse() {
  // @@protoc_insertion_point(destructor:heroim.client.v3beta.dto.auth.LoginResponse)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::herogoogle::protobuf::UnknownFieldSet>();
}

inline void LoginResponse::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  token_.DestroyNoArena(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete user_;
}

void LoginResponse::ArenaDtor(void* object) {
  LoginResponse* _this = reinterpret_cast< LoginResponse* >(object);
  (void)_this;
}
void LoginResponse::RegisterArenaDtor(::herogoogle::protobuf::Arena*) {
}
void LoginResponse::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void LoginResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:heroim.client.v3beta.dto.auth.LoginResponse)
  ::herogoogle::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  token_.ClearToEmpty();
  if (GetArenaForAllocation() == nullptr && user_ != nullptr) {
    delete user_;
  }
  user_ = nullptr;
  _internal_metadata_.Clear<::herogoogle::protobuf::UnknownFieldSet>();
}

const char* LoginResponse::_InternalParse(const char* ptr, ::herogoogle::protobuf::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::herogoogle::protobuf::uint32 tag;
    ptr = ::herogoogle::protobuf::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string token = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 10)) {
          auto str = _internal_mutable_token();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, "heroim.client.v3beta.dto.auth.LoginResponse.token"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .heroim.client.v3beta.dto.user.model.User user = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_user(), 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<::herogoogle::protobuf::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::herogoogle::protobuf::uint8* LoginResponse::_InternalSerialize(
    ::herogoogle::protobuf::uint8* target, ::herogoogle::protobuf::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:heroim.client.v3beta.dto.auth.LoginResponse)
  ::herogoogle::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string token = 1;
  if (!this->_internal_token().empty()) {
    ::herogoogle::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_token().data(), static_cast<int>(this->_internal_token().length()),
      ::herogoogle::protobuf::internal::WireFormatLite::SERIALIZE,
      "heroim.client.v3beta.dto.auth.LoginResponse.token");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_token(), target);
  }

  // .heroim.client.v3beta.dto.user.model.User user = 2;
  if (this->_internal_has_user()) {
    target = stream->EnsureSpace(target);
    target = ::herogoogle::protobuf::internal::WireFormatLite::
      InternalWriteMessage(
        2, _Internal::user(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::herogoogle::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::herogoogle::protobuf::UnknownFieldSet>(::herogoogle::protobuf::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:heroim.client.v3beta.dto.auth.LoginResponse)
  return target;
}

size_t LoginResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:heroim.client.v3beta.dto.auth.LoginResponse)
  size_t total_size = 0;

  ::herogoogle::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // string token = 1;
  if (!this->_internal_token().empty()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::StringSize(
        this->_internal_token());
  }

  // .heroim.client.v3beta.dto.user.model.User user = 2;
  if (this->_internal_has_user()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::MessageSize(
        *user_);
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::herogoogle::protobuf::Message::ClassData LoginResponse::_class_data_ = {
    ::herogoogle::protobuf::Message::CopyWithSizeCheck,
    LoginResponse::MergeImpl
};
const ::herogoogle::protobuf::Message::ClassData*LoginResponse::GetClassData() const { return &_class_data_; }

void LoginResponse::MergeImpl(::herogoogle::protobuf::Message* to,
                      const ::herogoogle::protobuf::Message& from) {
  static_cast<LoginResponse *>(to)->MergeFrom(
      static_cast<const LoginResponse &>(from));
}


void LoginResponse::MergeFrom(const LoginResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:heroim.client.v3beta.dto.auth.LoginResponse)
  GOOGLE_DCHECK_NE(&from, this);
  ::herogoogle::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_token().empty()) {
    _internal_set_token(from._internal_token());
  }
  if (from._internal_has_user()) {
    _internal_mutable_user()->::heroim::client::v3beta::dto::user::model::User::MergeFrom(from._internal_user());
  }
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

void LoginResponse::CopyFrom(const LoginResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:heroim.client.v3beta.dto.auth.LoginResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void LoginResponse::InternalSwap(LoginResponse* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::herogoogle::protobuf::internal::ArenaStringPtr::InternalSwap(
      &::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited(),
      &token_, lhs_arena,
      &other->token_, rhs_arena
  );
  swap(user_, other->user_);
}

::herogoogle::protobuf::Metadata LoginResponse::GetMetadata() const {
  return ::herogoogle::protobuf::internal::AssignDescriptors(
      &descriptor_table_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto_getter, &descriptor_table_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto_once,
      file_level_metadata_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto[2]);
}

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

class AuthCodeLoginRequest::_Internal {
 public:
  static const ::heroim::client::v3beta::dto::shared::APIRequest& base(const AuthCodeLoginRequest* msg);
};

const ::heroim::client::v3beta::dto::shared::APIRequest&
AuthCodeLoginRequest::_Internal::base(const AuthCodeLoginRequest* msg) {
  return *msg->base_;
}
void AuthCodeLoginRequest::clear_base() {
  if (GetArenaForAllocation() == nullptr && base_ != nullptr) {
    delete base_;
  }
  base_ = nullptr;
}
AuthCodeLoginRequest::AuthCodeLoginRequest(::herogoogle::protobuf::Arena* arena,
                         bool is_message_owned)
  : ::herogoogle::protobuf::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:heroim.client.v3beta.dto.auth.AuthCodeLoginRequest)
}
AuthCodeLoginRequest::AuthCodeLoginRequest(const AuthCodeLoginRequest& from)
  : ::herogoogle::protobuf::Message() {
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
  authcode_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_authcode().empty()) {
    authcode_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_authcode(), 
      GetArenaForAllocation());
  }
  if (from._internal_has_base()) {
    base_ = new ::heroim::client::v3beta::dto::shared::APIRequest(*from.base_);
  } else {
    base_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:heroim.client.v3beta.dto.auth.AuthCodeLoginRequest)
}

void AuthCodeLoginRequest::SharedCtor() {
authcode_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
base_ = nullptr;
}

AuthCodeLoginRequest::~AuthCodeLoginRequest() {
  // @@protoc_insertion_point(destructor:heroim.client.v3beta.dto.auth.AuthCodeLoginRequest)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::herogoogle::protobuf::UnknownFieldSet>();
}

inline void AuthCodeLoginRequest::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  authcode_.DestroyNoArena(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete base_;
}

void AuthCodeLoginRequest::ArenaDtor(void* object) {
  AuthCodeLoginRequest* _this = reinterpret_cast< AuthCodeLoginRequest* >(object);
  (void)_this;
}
void AuthCodeLoginRequest::RegisterArenaDtor(::herogoogle::protobuf::Arena*) {
}
void AuthCodeLoginRequest::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void AuthCodeLoginRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:heroim.client.v3beta.dto.auth.AuthCodeLoginRequest)
  ::herogoogle::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  authcode_.ClearToEmpty();
  if (GetArenaForAllocation() == nullptr && base_ != nullptr) {
    delete base_;
  }
  base_ = nullptr;
  _internal_metadata_.Clear<::herogoogle::protobuf::UnknownFieldSet>();
}

const char* AuthCodeLoginRequest::_InternalParse(const char* ptr, ::herogoogle::protobuf::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::herogoogle::protobuf::uint32 tag;
    ptr = ::herogoogle::protobuf::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .heroim.client.v3beta.dto.shared.APIRequest base = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_base(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string authCode = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 18)) {
          auto str = _internal_mutable_authcode();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, "heroim.client.v3beta.dto.auth.AuthCodeLoginRequest.authCode"));
          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<::herogoogle::protobuf::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::herogoogle::protobuf::uint8* AuthCodeLoginRequest::_InternalSerialize(
    ::herogoogle::protobuf::uint8* target, ::herogoogle::protobuf::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:heroim.client.v3beta.dto.auth.AuthCodeLoginRequest)
  ::herogoogle::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .heroim.client.v3beta.dto.shared.APIRequest base = 1;
  if (this->_internal_has_base()) {
    target = stream->EnsureSpace(target);
    target = ::herogoogle::protobuf::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::base(this), target, stream);
  }

  // string authCode = 2;
  if (!this->_internal_authcode().empty()) {
    ::herogoogle::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_authcode().data(), static_cast<int>(this->_internal_authcode().length()),
      ::herogoogle::protobuf::internal::WireFormatLite::SERIALIZE,
      "heroim.client.v3beta.dto.auth.AuthCodeLoginRequest.authCode");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_authcode(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::herogoogle::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::herogoogle::protobuf::UnknownFieldSet>(::herogoogle::protobuf::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:heroim.client.v3beta.dto.auth.AuthCodeLoginRequest)
  return target;
}

size_t AuthCodeLoginRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:heroim.client.v3beta.dto.auth.AuthCodeLoginRequest)
  size_t total_size = 0;

  ::herogoogle::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // string authCode = 2;
  if (!this->_internal_authcode().empty()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::StringSize(
        this->_internal_authcode());
  }

  // .heroim.client.v3beta.dto.shared.APIRequest base = 1;
  if (this->_internal_has_base()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::MessageSize(
        *base_);
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::herogoogle::protobuf::Message::ClassData AuthCodeLoginRequest::_class_data_ = {
    ::herogoogle::protobuf::Message::CopyWithSizeCheck,
    AuthCodeLoginRequest::MergeImpl
};
const ::herogoogle::protobuf::Message::ClassData*AuthCodeLoginRequest::GetClassData() const { return &_class_data_; }

void AuthCodeLoginRequest::MergeImpl(::herogoogle::protobuf::Message* to,
                      const ::herogoogle::protobuf::Message& from) {
  static_cast<AuthCodeLoginRequest *>(to)->MergeFrom(
      static_cast<const AuthCodeLoginRequest &>(from));
}


void AuthCodeLoginRequest::MergeFrom(const AuthCodeLoginRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:heroim.client.v3beta.dto.auth.AuthCodeLoginRequest)
  GOOGLE_DCHECK_NE(&from, this);
  ::herogoogle::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_authcode().empty()) {
    _internal_set_authcode(from._internal_authcode());
  }
  if (from._internal_has_base()) {
    _internal_mutable_base()->::heroim::client::v3beta::dto::shared::APIRequest::MergeFrom(from._internal_base());
  }
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

void AuthCodeLoginRequest::CopyFrom(const AuthCodeLoginRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:heroim.client.v3beta.dto.auth.AuthCodeLoginRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void AuthCodeLoginRequest::InternalSwap(AuthCodeLoginRequest* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::herogoogle::protobuf::internal::ArenaStringPtr::InternalSwap(
      &::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited(),
      &authcode_, lhs_arena,
      &other->authcode_, rhs_arena
  );
  swap(base_, other->base_);
}

::herogoogle::protobuf::Metadata AuthCodeLoginRequest::GetMetadata() const {
  return ::herogoogle::protobuf::internal::AssignDescriptors(
      &descriptor_table_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto_getter, &descriptor_table_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto_once,
      file_level_metadata_client_2fv3beta_2fdto_2fauth_2fauth_5fdto_2eproto[3]);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace auth
}  // namespace dto
}  // namespace v3beta
}  // namespace client
}  // namespace heroim
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::heroim::client::v3beta::dto::auth::RoleLoginRequest_ExtraEntry_DoNotUse* Arena::CreateMaybeMessage< ::heroim::client::v3beta::dto::auth::RoleLoginRequest_ExtraEntry_DoNotUse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::heroim::client::v3beta::dto::auth::RoleLoginRequest_ExtraEntry_DoNotUse >(arena);
}
template<> PROTOBUF_NOINLINE ::heroim::client::v3beta::dto::auth::RoleLoginRequest* Arena::CreateMaybeMessage< ::heroim::client::v3beta::dto::auth::RoleLoginRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::heroim::client::v3beta::dto::auth::RoleLoginRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::heroim::client::v3beta::dto::auth::LoginResponse* Arena::CreateMaybeMessage< ::heroim::client::v3beta::dto::auth::LoginResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::heroim::client::v3beta::dto::auth::LoginResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::heroim::client::v3beta::dto::auth::AuthCodeLoginRequest* Arena::CreateMaybeMessage< ::heroim::client::v3beta::dto::auth::AuthCodeLoginRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::heroim::client::v3beta::dto::auth::AuthCodeLoginRequest >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)

