// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: client/v3beta/dto/message/model/message_model.proto

#include "client/v3beta/dto/message/model/message_model.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 message {
namespace model {
constexpr SessionKey::SessionKey(
  ::herogoogle::protobuf::internal::ConstantInitialized)
  : targetid_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , serverid_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , sessiontype_(0)
{}
struct SessionKeyDefaultTypeInternal {
  constexpr SessionKeyDefaultTypeInternal()
    : _instance(::herogoogle::protobuf::internal::ConstantInitialized{}) {}
  ~SessionKeyDefaultTypeInternal() {}
  union {
    SessionKey _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SessionKeyDefaultTypeInternal _SessionKey_default_instance_;
constexpr UserSessionSort::UserSessionSort(
  ::herogoogle::protobuf::internal::ConstantInitialized)
  : time_(int64_t{0})
  , status_(0)
{}
struct UserSessionSortDefaultTypeInternal {
  constexpr UserSessionSortDefaultTypeInternal()
    : _instance(::herogoogle::protobuf::internal::ConstantInitialized{}) {}
  ~UserSessionSortDefaultTypeInternal() {}
  union {
    UserSessionSort _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT UserSessionSortDefaultTypeInternal _UserSessionSort_default_instance_;
constexpr MessageSession::MessageSession(
  ::herogoogle::protobuf::internal::ConstantInitialized)
  : channelid_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , sessionid_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , title_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , pictureurl_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , subsessiontype_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , sessiontype_(0){}
struct MessageSessionDefaultTypeInternal {
  constexpr MessageSessionDefaultTypeInternal()
    : _instance(::herogoogle::protobuf::internal::ConstantInitialized{}) {}
  ~MessageSessionDefaultTypeInternal() {}
  union {
    MessageSession _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MessageSessionDefaultTypeInternal _MessageSession_default_instance_;
constexpr Message_PayloadEntry_DoNotUse::Message_PayloadEntry_DoNotUse(
  ::herogoogle::protobuf::internal::ConstantInitialized){}
struct Message_PayloadEntry_DoNotUseDefaultTypeInternal {
  constexpr Message_PayloadEntry_DoNotUseDefaultTypeInternal()
    : _instance(::herogoogle::protobuf::internal::ConstantInitialized{}) {}
  ~Message_PayloadEntry_DoNotUseDefaultTypeInternal() {}
  union {
    Message_PayloadEntry_DoNotUse _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT Message_PayloadEntry_DoNotUseDefaultTypeInternal _Message_PayloadEntry_DoNotUse_default_instance_;
constexpr Message_SdkExtraEntry_DoNotUse::Message_SdkExtraEntry_DoNotUse(
  ::herogoogle::protobuf::internal::ConstantInitialized){}
struct Message_SdkExtraEntry_DoNotUseDefaultTypeInternal {
  constexpr Message_SdkExtraEntry_DoNotUseDefaultTypeInternal()
    : _instance(::herogoogle::protobuf::internal::ConstantInitialized{}) {}
  ~Message_SdkExtraEntry_DoNotUseDefaultTypeInternal() {}
  union {
    Message_SdkExtraEntry_DoNotUse _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT Message_SdkExtraEntry_DoNotUseDefaultTypeInternal _Message_SdkExtraEntry_DoNotUse_default_instance_;
constexpr Message::Message(
  ::herogoogle::protobuf::internal::ConstantInitialized)
  : payload_(::herogoogle::protobuf::internal::ConstantInitialized{})
  , sdkextra_(::herogoogle::protobuf::internal::ConstantInitialized{})
  , targetid_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , msgid_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , clientmsgid_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , msgtype_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , content_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , prevmsgid_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , session_(nullptr)
  , fromuser_(nullptr)
  , sessionkey_(nullptr)
  , sessiontype_(0)
  , status_(0)
  , time_(int64_t{0})
  , sequence_(int64_t{0})
  , updatetime_(int64_t{0}){}
struct MessageDefaultTypeInternal {
  constexpr MessageDefaultTypeInternal()
    : _instance(::herogoogle::protobuf::internal::ConstantInitialized{}) {}
  ~MessageDefaultTypeInternal() {}
  union {
    Message _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MessageDefaultTypeInternal _Message_default_instance_;
}  // namespace model
}  // namespace message
}  // namespace dto
}  // namespace v3beta
}  // namespace client
}  // namespace heroim
static ::herogoogle::protobuf::Metadata file_level_metadata_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto[6];
static const ::herogoogle::protobuf::EnumDescriptor* file_level_enum_descriptors_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto[3];
static constexpr ::herogoogle::protobuf::ServiceDescriptor const** file_level_service_descriptors_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto = nullptr;

const ::herogoogle::protobuf::uint32 TableStruct_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::SessionKey, _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::message::model::SessionKey, serverid_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::SessionKey, targetid_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::SessionKey, sessiontype_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::UserSessionSort, _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::message::model::UserSessionSort, status_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::UserSessionSort, time_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::MessageSession, _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::message::model::MessageSession, channelid_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::MessageSession, sessionid_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::MessageSession, title_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::MessageSession, pictureurl_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::MessageSession, sessiontype_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::MessageSession, subsessiontype_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::Message_PayloadEntry_DoNotUse, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::Message_PayloadEntry_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::message::model::Message_PayloadEntry_DoNotUse, key_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::Message_PayloadEntry_DoNotUse, value_),
  0,
  1,
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::Message_SdkExtraEntry_DoNotUse, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::Message_SdkExtraEntry_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::message::model::Message_SdkExtraEntry_DoNotUse, key_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::Message_SdkExtraEntry_DoNotUse, value_),
  0,
  1,
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::Message, _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::message::model::Message, sessiontype_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::Message, targetid_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::Message, session_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::Message, msgid_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::Message, clientmsgid_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::Message, msgtype_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::Message, content_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::Message, time_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::Message, fromuser_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::Message, payload_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::Message, sdkextra_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::Message, status_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::Message, prevmsgid_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::Message, sequence_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::Message, sessionkey_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::message::model::Message, updatetime_),
};
static const ::herogoogle::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, -1, sizeof(::heroim::client::v3beta::dto::message::model::SessionKey)},
  { 9, -1, -1, sizeof(::heroim::client::v3beta::dto::message::model::UserSessionSort)},
  { 17, -1, -1, sizeof(::heroim::client::v3beta::dto::message::model::MessageSession)},
  { 29, 37, -1, sizeof(::heroim::client::v3beta::dto::message::model::Message_PayloadEntry_DoNotUse)},
  { 39, 47, -1, sizeof(::heroim::client::v3beta::dto::message::model::Message_SdkExtraEntry_DoNotUse)},
  { 49, -1, -1, sizeof(::heroim::client::v3beta::dto::message::model::Message)},
};

static ::herogoogle::protobuf::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::herogoogle::protobuf::Message*>(&::heroim::client::v3beta::dto::message::model::_SessionKey_default_instance_),
  reinterpret_cast<const ::herogoogle::protobuf::Message*>(&::heroim::client::v3beta::dto::message::model::_UserSessionSort_default_instance_),
  reinterpret_cast<const ::herogoogle::protobuf::Message*>(&::heroim::client::v3beta::dto::message::model::_MessageSession_default_instance_),
  reinterpret_cast<const ::herogoogle::protobuf::Message*>(&::heroim::client::v3beta::dto::message::model::_Message_PayloadEntry_DoNotUse_default_instance_),
  reinterpret_cast<const ::herogoogle::protobuf::Message*>(&::heroim::client::v3beta::dto::message::model::_Message_SdkExtraEntry_DoNotUse_default_instance_),
  reinterpret_cast<const ::herogoogle::protobuf::Message*>(&::heroim::client::v3beta::dto::message::model::_Message_default_instance_),
};
#ifdef _MSC_VER
#  pragma warning(disable : 4125)
#endif  /* _MSC_VER */
const char descriptor_table_protodef_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n3client/v3beta/dto/message/model/messag"
  "e_model.proto\022&heroim.client.v3beta.dto."
  "message.model\032-client/v3beta/dto/user/mo"
  "del/user_model.proto\"z\n\nSessionKey\022\020\n\010se"
  "rverId\030\002 \001(\t\022\020\n\010targetId\030\001 \001(\t\022H\n\013sessio"
  "nType\030\003 \001(\01623.heroim.client.v3beta.dto.m"
  "essage.model.SessionType\"\222\001\n\017UserSession"
  "Sort\022N\n\006status\030\001 \001(\0162>.heroim.client.v3b"
  "eta.dto.message.model.UserSessionSort.St"
  "atus\022\014\n\004time\030\002 \001(\003\"!\n\006Status\022\013\n\007Disable\020"
  "\000\022\n\n\006Enable\020\001\"\206\001\n\016MessageSession\022\021\n\tchan"
  "nelId\030\001 \001(\t\022\021\n\tsessionId\030\002 \001(\t\022\r\n\005title\030"
  "\003 \001(\t\022\022\n\npictureUrl\030\004 \001(\t\022\023\n\013sessionType"
  "\030\005 \001(\005\022\026\n\016subSessionType\030\006 \001(\t\"\242\005\n\007Messa"
  "ge\022\023\n\013sessionType\030\001 \001(\005\022\020\n\010targetId\030\002 \001("
  "\t\022G\n\007session\030\003 \001(\01326.heroim.client.v3bet"
  "a.dto.message.model.MessageSession\022\r\n\005ms"
  "gId\030\004 \001(\t\022\023\n\013clientMsgId\030\005 \001(\t\022\017\n\007msgTyp"
  "e\030\006 \001(\t\022\017\n\007content\030\007 \001(\t\022\014\n\004time\030\010 \001(\003\022A"
  "\n\010fromUser\030\t \001(\0132/.heroim.client.v3beta."
  "dto.user.model.UserSimple\022M\n\007payload\030\n \003"
  "(\0132<.heroim.client.v3beta.dto.message.mo"
  "del.Message.PayloadEntry\022O\n\010sdkExtra\030\013 \003"
  "(\0132=.heroim.client.v3beta.dto.message.mo"
  "del.Message.SdkExtraEntry\022\016\n\006status\030\014 \001("
  "\005\022\021\n\tprevMsgId\030\r \001(\t\022\020\n\010sequence\030\016 \001(\003\022F"
  "\n\nsessionKey\030\017 \001(\01322.heroim.client.v3bet"
  "a.dto.message.model.SessionKey\022\022\n\nupdate"
  "Time\030\020 \001(\003\032.\n\014PayloadEntry\022\013\n\003key\030\001 \001(\t\022"
  "\r\n\005value\030\002 \001(\t:\0028\001\032/\n\rSdkExtraEntry\022\013\n\003k"
  "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001*7\n\013SessionTy"
  "pe\022\n\n\006Person\020\000\022\t\n\005Group\020\001\022\021\n\rCustomChann"
  "el\020\003*J\n\rMessageStatus\022\n\n\006Normal\020\000\022\023\n\006Fai"
  "led\020\377\377\377\377\377\377\377\377\377\001\022\013\n\007Revoked\020\001\022\013\n\007Deleted\020\002"
  "B\235\001\n*com.hero.csdk.api.v3beta.dto.messag"
  "e.modelP\001Z*heroim/api/client/v3beta/dto/"
  "message/model\242\002\005IMSdk\252\0028Im.CSDK.Unity.ch"
  "at.entry.Runtime.entry2.v3.message.model"
  "b\006proto3"
  ;
static const ::herogoogle::protobuf::internal::DescriptorTable*const descriptor_table_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto_deps[1] = {
  &::descriptor_table_client_2fv3beta_2fdto_2fuser_2fmodel_2fuser_5fmodel_2eproto,
};
static ::herogoogle::protobuf::internal::once_flag descriptor_table_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto_once;
const ::herogoogle::protobuf::internal::DescriptorTable descriptor_table_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto = {
  false, false, 1528, descriptor_table_protodef_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto, "client/v3beta/dto/message/model/message_model.proto", 
  &descriptor_table_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto_once, descriptor_table_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto_deps, 1, 6,
  schemas, file_default_instances, TableStruct_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto::offsets,
  file_level_metadata_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto, file_level_enum_descriptors_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto, file_level_service_descriptors_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::herogoogle::protobuf::internal::DescriptorTable* descriptor_table_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto_getter() {
  return &descriptor_table_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::herogoogle::protobuf::internal::AddDescriptorsRunner dynamic_init_dummy_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto(&descriptor_table_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto);
namespace heroim {
namespace client {
namespace v3beta {
namespace dto {
namespace message {
namespace model {
const ::herogoogle::protobuf::EnumDescriptor* UserSessionSort_Status_descriptor() {
  ::herogoogle::protobuf::internal::AssignDescriptors(&descriptor_table_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto);
  return file_level_enum_descriptors_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto[0];
}
bool UserSessionSort_Status_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
constexpr UserSessionSort_Status UserSessionSort::Disable;
constexpr UserSessionSort_Status UserSessionSort::Enable;
constexpr UserSessionSort_Status UserSessionSort::Status_MIN;
constexpr UserSessionSort_Status UserSessionSort::Status_MAX;
constexpr int UserSessionSort::Status_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
const ::herogoogle::protobuf::EnumDescriptor* SessionType_descriptor() {
  ::herogoogle::protobuf::internal::AssignDescriptors(&descriptor_table_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto);
  return file_level_enum_descriptors_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto[1];
}
bool SessionType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 3:
      return true;
    default:
      return false;
  }
}

const ::herogoogle::protobuf::EnumDescriptor* MessageStatus_descriptor() {
  ::herogoogle::protobuf::internal::AssignDescriptors(&descriptor_table_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto);
  return file_level_enum_descriptors_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto[2];
}
bool MessageStatus_IsValid(int value) {
  switch (value) {
    case -1:
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}


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

class SessionKey::_Internal {
 public:
};

SessionKey::SessionKey(::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.message.model.SessionKey)
}
SessionKey::SessionKey(const SessionKey& from)
  : ::herogoogle::protobuf::Message() {
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
  targetid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_targetid().empty()) {
    targetid_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_targetid(), 
      GetArenaForAllocation());
  }
  serverid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_serverid().empty()) {
    serverid_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_serverid(), 
      GetArenaForAllocation());
  }
  sessiontype_ = from.sessiontype_;
  // @@protoc_insertion_point(copy_constructor:heroim.client.v3beta.dto.message.model.SessionKey)
}

void SessionKey::SharedCtor() {
targetid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
serverid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
sessiontype_ = 0;
}

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

inline void SessionKey::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  targetid_.DestroyNoArena(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  serverid_.DestroyNoArena(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
}

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

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

  targetid_.ClearToEmpty();
  serverid_.ClearToEmpty();
  sessiontype_ = 0;
  _internal_metadata_.Clear<::herogoogle::protobuf::UnknownFieldSet>();
}

const char* SessionKey::_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 targetId = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 10)) {
          auto str = _internal_mutable_targetid();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, "heroim.client.v3beta.dto.message.model.SessionKey.targetId"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string serverId = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 18)) {
          auto str = _internal_mutable_serverid();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, "heroim.client.v3beta.dto.message.model.SessionKey.serverId"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .heroim.client.v3beta.dto.message.model.SessionType sessionType = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 24)) {
          ::herogoogle::protobuf::uint64 val = ::herogoogle::protobuf::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          _internal_set_sessiontype(static_cast<::heroim::client::v3beta::dto::message::model::SessionType>(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<::herogoogle::protobuf::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

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

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

  // .heroim.client.v3beta.dto.message.model.SessionType sessionType = 3;
  if (this->_internal_sessiontype() != 0) {
    target = stream->EnsureSpace(target);
    target = ::herogoogle::protobuf::internal::WireFormatLite::WriteEnumToArray(
      3, this->_internal_sessiontype(), 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.message.model.SessionKey)
  return target;
}

size_t SessionKey::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:heroim.client.v3beta.dto.message.model.SessionKey)
  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 targetId = 1;
  if (!this->_internal_targetid().empty()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::StringSize(
        this->_internal_targetid());
  }

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

  // .heroim.client.v3beta.dto.message.model.SessionType sessionType = 3;
  if (this->_internal_sessiontype() != 0) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::EnumSize(this->_internal_sessiontype());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

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


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

  if (!from._internal_targetid().empty()) {
    _internal_set_targetid(from._internal_targetid());
  }
  if (!from._internal_serverid().empty()) {
    _internal_set_serverid(from._internal_serverid());
  }
  if (from._internal_sessiontype() != 0) {
    _internal_set_sessiontype(from._internal_sessiontype());
  }
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void SessionKey::InternalSwap(SessionKey* 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(),
      &targetid_, lhs_arena,
      &other->targetid_, rhs_arena
  );
  ::herogoogle::protobuf::internal::ArenaStringPtr::InternalSwap(
      &::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited(),
      &serverid_, lhs_arena,
      &other->serverid_, rhs_arena
  );
  swap(sessiontype_, other->sessiontype_);
}

::herogoogle::protobuf::Metadata SessionKey::GetMetadata() const {
  return ::herogoogle::protobuf::internal::AssignDescriptors(
      &descriptor_table_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto_getter, &descriptor_table_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto_once,
      file_level_metadata_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto[0]);
}

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

class UserSessionSort::_Internal {
 public:
};

UserSessionSort::UserSessionSort(::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.message.model.UserSessionSort)
}
UserSessionSort::UserSessionSort(const UserSessionSort& from)
  : ::herogoogle::protobuf::Message() {
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&time_, &from.time_,
    static_cast<size_t>(reinterpret_cast<char*>(&status_) -
    reinterpret_cast<char*>(&time_)) + sizeof(status_));
  // @@protoc_insertion_point(copy_constructor:heroim.client.v3beta.dto.message.model.UserSessionSort)
}

void UserSessionSort::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&time_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&status_) -
    reinterpret_cast<char*>(&time_)) + sizeof(status_));
}

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

inline void UserSessionSort::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

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

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

  ::memset(&time_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&status_) -
      reinterpret_cast<char*>(&time_)) + sizeof(status_));
  _internal_metadata_.Clear<::herogoogle::protobuf::UnknownFieldSet>();
}

const char* UserSessionSort::_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.message.model.UserSessionSort.Status status = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 8)) {
          ::herogoogle::protobuf::uint64 val = ::herogoogle::protobuf::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          _internal_set_status(static_cast<::heroim::client::v3beta::dto::message::model::UserSessionSort_Status>(val));
        } else
          goto handle_unusual;
        continue;
      // int64 time = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 16)) {
          time_ = ::herogoogle::protobuf::internal::ReadVarint64(&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* UserSessionSort::_InternalSerialize(
    ::herogoogle::protobuf::uint8* target, ::herogoogle::protobuf::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:heroim.client.v3beta.dto.message.model.UserSessionSort)
  ::herogoogle::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .heroim.client.v3beta.dto.message.model.UserSessionSort.Status status = 1;
  if (this->_internal_status() != 0) {
    target = stream->EnsureSpace(target);
    target = ::herogoogle::protobuf::internal::WireFormatLite::WriteEnumToArray(
      1, this->_internal_status(), target);
  }

  // int64 time = 2;
  if (this->_internal_time() != 0) {
    target = stream->EnsureSpace(target);
    target = ::herogoogle::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_time(), 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.message.model.UserSessionSort)
  return target;
}

size_t UserSessionSort::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:heroim.client.v3beta.dto.message.model.UserSessionSort)
  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;

  // int64 time = 2;
  if (this->_internal_time() != 0) {
    total_size += ::herogoogle::protobuf::internal::WireFormatLite::Int64SizePlusOne(this->_internal_time());
  }

  // .heroim.client.v3beta.dto.message.model.UserSessionSort.Status status = 1;
  if (this->_internal_status() != 0) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::EnumSize(this->_internal_status());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

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


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

  if (from._internal_time() != 0) {
    _internal_set_time(from._internal_time());
  }
  if (from._internal_status() != 0) {
    _internal_set_status(from._internal_status());
  }
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void UserSessionSort::InternalSwap(UserSessionSort* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::herogoogle::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(UserSessionSort, status_)
      + sizeof(UserSessionSort::status_)
      - PROTOBUF_FIELD_OFFSET(UserSessionSort, time_)>(
          reinterpret_cast<char*>(&time_),
          reinterpret_cast<char*>(&other->time_));
}

::herogoogle::protobuf::Metadata UserSessionSort::GetMetadata() const {
  return ::herogoogle::protobuf::internal::AssignDescriptors(
      &descriptor_table_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto_getter, &descriptor_table_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto_once,
      file_level_metadata_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto[1]);
}

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

class MessageSession::_Internal {
 public:
};

MessageSession::MessageSession(::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.message.model.MessageSession)
}
MessageSession::MessageSession(const MessageSession& from)
  : ::herogoogle::protobuf::Message() {
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
  channelid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_channelid().empty()) {
    channelid_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_channelid(), 
      GetArenaForAllocation());
  }
  sessionid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_sessionid().empty()) {
    sessionid_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_sessionid(), 
      GetArenaForAllocation());
  }
  title_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_title().empty()) {
    title_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_title(), 
      GetArenaForAllocation());
  }
  pictureurl_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_pictureurl().empty()) {
    pictureurl_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_pictureurl(), 
      GetArenaForAllocation());
  }
  subsessiontype_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_subsessiontype().empty()) {
    subsessiontype_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_subsessiontype(), 
      GetArenaForAllocation());
  }
  sessiontype_ = from.sessiontype_;
  // @@protoc_insertion_point(copy_constructor:heroim.client.v3beta.dto.message.model.MessageSession)
}

void MessageSession::SharedCtor() {
channelid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
sessionid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
title_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
pictureurl_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
subsessiontype_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
sessiontype_ = 0;
}

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

inline void MessageSession::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  channelid_.DestroyNoArena(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  sessionid_.DestroyNoArena(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  title_.DestroyNoArena(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  pictureurl_.DestroyNoArena(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  subsessiontype_.DestroyNoArena(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
}

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

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

  channelid_.ClearToEmpty();
  sessionid_.ClearToEmpty();
  title_.ClearToEmpty();
  pictureurl_.ClearToEmpty();
  subsessiontype_.ClearToEmpty();
  sessiontype_ = 0;
  _internal_metadata_.Clear<::herogoogle::protobuf::UnknownFieldSet>();
}

const char* MessageSession::_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 channelId = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 10)) {
          auto str = _internal_mutable_channelid();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, "heroim.client.v3beta.dto.message.model.MessageSession.channelId"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string sessionId = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 18)) {
          auto str = _internal_mutable_sessionid();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, "heroim.client.v3beta.dto.message.model.MessageSession.sessionId"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string title = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 26)) {
          auto str = _internal_mutable_title();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, "heroim.client.v3beta.dto.message.model.MessageSession.title"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string pictureUrl = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 34)) {
          auto str = _internal_mutable_pictureurl();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, "heroim.client.v3beta.dto.message.model.MessageSession.pictureUrl"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // int32 sessionType = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 40)) {
          sessiontype_ = ::herogoogle::protobuf::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string subSessionType = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 50)) {
          auto str = _internal_mutable_subsessiontype();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, "heroim.client.v3beta.dto.message.model.MessageSession.subSessionType"));
          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* MessageSession::_InternalSerialize(
    ::herogoogle::protobuf::uint8* target, ::herogoogle::protobuf::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:heroim.client.v3beta.dto.message.model.MessageSession)
  ::herogoogle::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

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

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

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

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

  // int32 sessionType = 5;
  if (this->_internal_sessiontype() != 0) {
    target = stream->EnsureSpace(target);
    target = ::herogoogle::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->_internal_sessiontype(), target);
  }

  // string subSessionType = 6;
  if (!this->_internal_subsessiontype().empty()) {
    ::herogoogle::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_subsessiontype().data(), static_cast<int>(this->_internal_subsessiontype().length()),
      ::herogoogle::protobuf::internal::WireFormatLite::SERIALIZE,
      "heroim.client.v3beta.dto.message.model.MessageSession.subSessionType");
    target = stream->WriteStringMaybeAliased(
        6, this->_internal_subsessiontype(), 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.message.model.MessageSession)
  return target;
}

size_t MessageSession::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:heroim.client.v3beta.dto.message.model.MessageSession)
  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 channelId = 1;
  if (!this->_internal_channelid().empty()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::StringSize(
        this->_internal_channelid());
  }

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

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

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

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

  // int32 sessionType = 5;
  if (this->_internal_sessiontype() != 0) {
    total_size += ::herogoogle::protobuf::internal::WireFormatLite::Int32SizePlusOne(this->_internal_sessiontype());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

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


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

  if (!from._internal_channelid().empty()) {
    _internal_set_channelid(from._internal_channelid());
  }
  if (!from._internal_sessionid().empty()) {
    _internal_set_sessionid(from._internal_sessionid());
  }
  if (!from._internal_title().empty()) {
    _internal_set_title(from._internal_title());
  }
  if (!from._internal_pictureurl().empty()) {
    _internal_set_pictureurl(from._internal_pictureurl());
  }
  if (!from._internal_subsessiontype().empty()) {
    _internal_set_subsessiontype(from._internal_subsessiontype());
  }
  if (from._internal_sessiontype() != 0) {
    _internal_set_sessiontype(from._internal_sessiontype());
  }
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void MessageSession::InternalSwap(MessageSession* 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(),
      &channelid_, lhs_arena,
      &other->channelid_, rhs_arena
  );
  ::herogoogle::protobuf::internal::ArenaStringPtr::InternalSwap(
      &::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited(),
      &sessionid_, lhs_arena,
      &other->sessionid_, rhs_arena
  );
  ::herogoogle::protobuf::internal::ArenaStringPtr::InternalSwap(
      &::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited(),
      &title_, lhs_arena,
      &other->title_, rhs_arena
  );
  ::herogoogle::protobuf::internal::ArenaStringPtr::InternalSwap(
      &::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited(),
      &pictureurl_, lhs_arena,
      &other->pictureurl_, rhs_arena
  );
  ::herogoogle::protobuf::internal::ArenaStringPtr::InternalSwap(
      &::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited(),
      &subsessiontype_, lhs_arena,
      &other->subsessiontype_, rhs_arena
  );
  swap(sessiontype_, other->sessiontype_);
}

::herogoogle::protobuf::Metadata MessageSession::GetMetadata() const {
  return ::herogoogle::protobuf::internal::AssignDescriptors(
      &descriptor_table_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto_getter, &descriptor_table_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto_once,
      file_level_metadata_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto[2]);
}

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

Message_PayloadEntry_DoNotUse::Message_PayloadEntry_DoNotUse() {}
Message_PayloadEntry_DoNotUse::Message_PayloadEntry_DoNotUse(::herogoogle::protobuf::Arena* arena)
    : SuperType(arena) {}
void Message_PayloadEntry_DoNotUse::MergeFrom(const Message_PayloadEntry_DoNotUse& other) {
  MergeFromInternal(other);
}
::herogoogle::protobuf::Metadata Message_PayloadEntry_DoNotUse::GetMetadata() const {
  return ::herogoogle::protobuf::internal::AssignDescriptors(
      &descriptor_table_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto_getter, &descriptor_table_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto_once,
      file_level_metadata_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto[3]);
}

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

Message_SdkExtraEntry_DoNotUse::Message_SdkExtraEntry_DoNotUse() {}
Message_SdkExtraEntry_DoNotUse::Message_SdkExtraEntry_DoNotUse(::herogoogle::protobuf::Arena* arena)
    : SuperType(arena) {}
void Message_SdkExtraEntry_DoNotUse::MergeFrom(const Message_SdkExtraEntry_DoNotUse& other) {
  MergeFromInternal(other);
}
::herogoogle::protobuf::Metadata Message_SdkExtraEntry_DoNotUse::GetMetadata() const {
  return ::herogoogle::protobuf::internal::AssignDescriptors(
      &descriptor_table_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto_getter, &descriptor_table_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto_once,
      file_level_metadata_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto[4]);
}

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

class Message::_Internal {
 public:
  static const ::heroim::client::v3beta::dto::message::model::MessageSession& session(const Message* msg);
  static const ::heroim::client::v3beta::dto::user::model::UserSimple& fromuser(const Message* msg);
  static const ::heroim::client::v3beta::dto::message::model::SessionKey& sessionkey(const Message* msg);
};

const ::heroim::client::v3beta::dto::message::model::MessageSession&
Message::_Internal::session(const Message* msg) {
  return *msg->session_;
}
const ::heroim::client::v3beta::dto::user::model::UserSimple&
Message::_Internal::fromuser(const Message* msg) {
  return *msg->fromuser_;
}
const ::heroim::client::v3beta::dto::message::model::SessionKey&
Message::_Internal::sessionkey(const Message* msg) {
  return *msg->sessionkey_;
}
void Message::clear_fromuser() {
  if (GetArenaForAllocation() == nullptr && fromuser_ != nullptr) {
    delete fromuser_;
  }
  fromuser_ = nullptr;
}
Message::Message(::herogoogle::protobuf::Arena* arena,
                         bool is_message_owned)
  : ::herogoogle::protobuf::Message(arena, is_message_owned),
  payload_(arena),
  sdkextra_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:heroim.client.v3beta.dto.message.model.Message)
}
Message::Message(const Message& from)
  : ::herogoogle::protobuf::Message() {
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
  payload_.MergeFrom(from.payload_);
  sdkextra_.MergeFrom(from.sdkextra_);
  targetid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_targetid().empty()) {
    targetid_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_targetid(), 
      GetArenaForAllocation());
  }
  msgid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_msgid().empty()) {
    msgid_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_msgid(), 
      GetArenaForAllocation());
  }
  clientmsgid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_clientmsgid().empty()) {
    clientmsgid_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_clientmsgid(), 
      GetArenaForAllocation());
  }
  msgtype_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_msgtype().empty()) {
    msgtype_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_msgtype(), 
      GetArenaForAllocation());
  }
  content_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_content().empty()) {
    content_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_content(), 
      GetArenaForAllocation());
  }
  prevmsgid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_prevmsgid().empty()) {
    prevmsgid_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_prevmsgid(), 
      GetArenaForAllocation());
  }
  if (from._internal_has_session()) {
    session_ = new ::heroim::client::v3beta::dto::message::model::MessageSession(*from.session_);
  } else {
    session_ = nullptr;
  }
  if (from._internal_has_fromuser()) {
    fromuser_ = new ::heroim::client::v3beta::dto::user::model::UserSimple(*from.fromuser_);
  } else {
    fromuser_ = nullptr;
  }
  if (from._internal_has_sessionkey()) {
    sessionkey_ = new ::heroim::client::v3beta::dto::message::model::SessionKey(*from.sessionkey_);
  } else {
    sessionkey_ = nullptr;
  }
  ::memcpy(&sessiontype_, &from.sessiontype_,
    static_cast<size_t>(reinterpret_cast<char*>(&updatetime_) -
    reinterpret_cast<char*>(&sessiontype_)) + sizeof(updatetime_));
  // @@protoc_insertion_point(copy_constructor:heroim.client.v3beta.dto.message.model.Message)
}

void Message::SharedCtor() {
targetid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
msgid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
clientmsgid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
msgtype_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
content_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
prevmsgid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&session_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&updatetime_) -
    reinterpret_cast<char*>(&session_)) + sizeof(updatetime_));
}

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

inline void Message::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  targetid_.DestroyNoArena(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  msgid_.DestroyNoArena(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  clientmsgid_.DestroyNoArena(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  msgtype_.DestroyNoArena(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  content_.DestroyNoArena(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  prevmsgid_.DestroyNoArena(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete session_;
  if (this != internal_default_instance()) delete fromuser_;
  if (this != internal_default_instance()) delete sessionkey_;
}

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

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

  payload_.Clear();
  sdkextra_.Clear();
  targetid_.ClearToEmpty();
  msgid_.ClearToEmpty();
  clientmsgid_.ClearToEmpty();
  msgtype_.ClearToEmpty();
  content_.ClearToEmpty();
  prevmsgid_.ClearToEmpty();
  if (GetArenaForAllocation() == nullptr && session_ != nullptr) {
    delete session_;
  }
  session_ = nullptr;
  if (GetArenaForAllocation() == nullptr && fromuser_ != nullptr) {
    delete fromuser_;
  }
  fromuser_ = nullptr;
  if (GetArenaForAllocation() == nullptr && sessionkey_ != nullptr) {
    delete sessionkey_;
  }
  sessionkey_ = nullptr;
  ::memset(&sessiontype_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&updatetime_) -
      reinterpret_cast<char*>(&sessiontype_)) + sizeof(updatetime_));
  _internal_metadata_.Clear<::herogoogle::protobuf::UnknownFieldSet>();
}

const char* Message::_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) {
      // int32 sessionType = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 8)) {
          sessiontype_ = ::herogoogle::protobuf::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string targetId = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 18)) {
          auto str = _internal_mutable_targetid();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, "heroim.client.v3beta.dto.message.model.Message.targetId"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .heroim.client.v3beta.dto.message.model.MessageSession session = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_session(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string msgId = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 34)) {
          auto str = _internal_mutable_msgid();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, "heroim.client.v3beta.dto.message.model.Message.msgId"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string clientMsgId = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 42)) {
          auto str = _internal_mutable_clientmsgid();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, "heroim.client.v3beta.dto.message.model.Message.clientMsgId"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string msgType = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 50)) {
          auto str = _internal_mutable_msgtype();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, "heroim.client.v3beta.dto.message.model.Message.msgType"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string content = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 58)) {
          auto str = _internal_mutable_content();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, "heroim.client.v3beta.dto.message.model.Message.content"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // int64 time = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 64)) {
          time_ = ::herogoogle::protobuf::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .heroim.client.v3beta.dto.user.model.UserSimple fromUser = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 74)) {
          ptr = ctx->ParseMessage(_internal_mutable_fromuser(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // map<string, string> payload = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 82)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(&payload_, ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::herogoogle::protobuf::internal::ExpectTag<82>(ptr));
        } else
          goto handle_unusual;
        continue;
      // map<string, string> sdkExtra = 11;
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 90)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(&sdkextra_, ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::herogoogle::protobuf::internal::ExpectTag<90>(ptr));
        } else
          goto handle_unusual;
        continue;
      // int32 status = 12;
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 96)) {
          status_ = ::herogoogle::protobuf::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string prevMsgId = 13;
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 106)) {
          auto str = _internal_mutable_prevmsgid();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, "heroim.client.v3beta.dto.message.model.Message.prevMsgId"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // int64 sequence = 14;
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 112)) {
          sequence_ = ::herogoogle::protobuf::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .heroim.client.v3beta.dto.message.model.SessionKey sessionKey = 15;
      case 15:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 122)) {
          ptr = ctx->ParseMessage(_internal_mutable_sessionkey(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // int64 updateTime = 16;
      case 16:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 128)) {
          updatetime_ = ::herogoogle::protobuf::internal::ReadVarint64(&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* Message::_InternalSerialize(
    ::herogoogle::protobuf::uint8* target, ::herogoogle::protobuf::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:heroim.client.v3beta.dto.message.model.Message)
  ::herogoogle::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 sessionType = 1;
  if (this->_internal_sessiontype() != 0) {
    target = stream->EnsureSpace(target);
    target = ::herogoogle::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_sessiontype(), target);
  }

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

  // .heroim.client.v3beta.dto.message.model.MessageSession session = 3;
  if (this->_internal_has_session()) {
    target = stream->EnsureSpace(target);
    target = ::herogoogle::protobuf::internal::WireFormatLite::
      InternalWriteMessage(
        3, _Internal::session(this), target, stream);
  }

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

  // string clientMsgId = 5;
  if (!this->_internal_clientmsgid().empty()) {
    ::herogoogle::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_clientmsgid().data(), static_cast<int>(this->_internal_clientmsgid().length()),
      ::herogoogle::protobuf::internal::WireFormatLite::SERIALIZE,
      "heroim.client.v3beta.dto.message.model.Message.clientMsgId");
    target = stream->WriteStringMaybeAliased(
        5, this->_internal_clientmsgid(), target);
  }

  // string msgType = 6;
  if (!this->_internal_msgtype().empty()) {
    ::herogoogle::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_msgtype().data(), static_cast<int>(this->_internal_msgtype().length()),
      ::herogoogle::protobuf::internal::WireFormatLite::SERIALIZE,
      "heroim.client.v3beta.dto.message.model.Message.msgType");
    target = stream->WriteStringMaybeAliased(
        6, this->_internal_msgtype(), target);
  }

  // string content = 7;
  if (!this->_internal_content().empty()) {
    ::herogoogle::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_content().data(), static_cast<int>(this->_internal_content().length()),
      ::herogoogle::protobuf::internal::WireFormatLite::SERIALIZE,
      "heroim.client.v3beta.dto.message.model.Message.content");
    target = stream->WriteStringMaybeAliased(
        7, this->_internal_content(), target);
  }

  // int64 time = 8;
  if (this->_internal_time() != 0) {
    target = stream->EnsureSpace(target);
    target = ::herogoogle::protobuf::internal::WireFormatLite::WriteInt64ToArray(8, this->_internal_time(), target);
  }

  // .heroim.client.v3beta.dto.user.model.UserSimple fromUser = 9;
  if (this->_internal_has_fromuser()) {
    target = stream->EnsureSpace(target);
    target = ::herogoogle::protobuf::internal::WireFormatLite::
      InternalWriteMessage(
        9, _Internal::fromuser(this), target, stream);
  }

  // map<string, string> payload = 10;
  if (!this->_internal_payload().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.message.model.Message.PayloadEntry.key");
        ::herogoogle::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->second.data(), static_cast<int>(p->second.length()),
          ::herogoogle::protobuf::internal::WireFormatLite::SERIALIZE,
          "heroim.client.v3beta.dto.message.model.Message.PayloadEntry.value");
      }
    };

    if (stream->IsSerializationDeterministic() &&
        this->_internal_payload().size() > 1) {
      ::std::unique_ptr<SortItem[]> items(
          new SortItem[this->_internal_payload().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_payload().begin();
          it != this->_internal_payload().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 = Message_PayloadEntry_DoNotUse::Funcs::InternalSerialize(10, 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_payload().begin();
          it != this->_internal_payload().end(); ++it) {
        target = Message_PayloadEntry_DoNotUse::Funcs::InternalSerialize(10, it->first, it->second, target, stream);
        Utf8Check::Check(&(*it));
      }
    }
  }

  // map<string, string> sdkExtra = 11;
  if (!this->_internal_sdkextra().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.message.model.Message.SdkExtraEntry.key");
        ::herogoogle::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->second.data(), static_cast<int>(p->second.length()),
          ::herogoogle::protobuf::internal::WireFormatLite::SERIALIZE,
          "heroim.client.v3beta.dto.message.model.Message.SdkExtraEntry.value");
      }
    };

    if (stream->IsSerializationDeterministic() &&
        this->_internal_sdkextra().size() > 1) {
      ::std::unique_ptr<SortItem[]> items(
          new SortItem[this->_internal_sdkextra().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_sdkextra().begin();
          it != this->_internal_sdkextra().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 = Message_SdkExtraEntry_DoNotUse::Funcs::InternalSerialize(11, 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_sdkextra().begin();
          it != this->_internal_sdkextra().end(); ++it) {
        target = Message_SdkExtraEntry_DoNotUse::Funcs::InternalSerialize(11, it->first, it->second, target, stream);
        Utf8Check::Check(&(*it));
      }
    }
  }

  // int32 status = 12;
  if (this->_internal_status() != 0) {
    target = stream->EnsureSpace(target);
    target = ::herogoogle::protobuf::internal::WireFormatLite::WriteInt32ToArray(12, this->_internal_status(), target);
  }

  // string prevMsgId = 13;
  if (!this->_internal_prevmsgid().empty()) {
    ::herogoogle::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_prevmsgid().data(), static_cast<int>(this->_internal_prevmsgid().length()),
      ::herogoogle::protobuf::internal::WireFormatLite::SERIALIZE,
      "heroim.client.v3beta.dto.message.model.Message.prevMsgId");
    target = stream->WriteStringMaybeAliased(
        13, this->_internal_prevmsgid(), target);
  }

  // int64 sequence = 14;
  if (this->_internal_sequence() != 0) {
    target = stream->EnsureSpace(target);
    target = ::herogoogle::protobuf::internal::WireFormatLite::WriteInt64ToArray(14, this->_internal_sequence(), target);
  }

  // .heroim.client.v3beta.dto.message.model.SessionKey sessionKey = 15;
  if (this->_internal_has_sessionkey()) {
    target = stream->EnsureSpace(target);
    target = ::herogoogle::protobuf::internal::WireFormatLite::
      InternalWriteMessage(
        15, _Internal::sessionkey(this), target, stream);
  }

  // int64 updateTime = 16;
  if (this->_internal_updatetime() != 0) {
    target = stream->EnsureSpace(target);
    target = ::herogoogle::protobuf::internal::WireFormatLite::WriteInt64ToArray(16, this->_internal_updatetime(), 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.message.model.Message)
  return target;
}

size_t Message::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:heroim.client.v3beta.dto.message.model.Message)
  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> payload = 10;
  total_size += 1 *
      ::herogoogle::protobuf::internal::FromIntSize(this->_internal_payload_size());
  for (::herogoogle::protobuf::Map< std::string, std::string >::const_iterator
      it = this->_internal_payload().begin();
      it != this->_internal_payload().end(); ++it) {
    total_size += Message_PayloadEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
  }

  // map<string, string> sdkExtra = 11;
  total_size += 1 *
      ::herogoogle::protobuf::internal::FromIntSize(this->_internal_sdkextra_size());
  for (::herogoogle::protobuf::Map< std::string, std::string >::const_iterator
      it = this->_internal_sdkextra().begin();
      it != this->_internal_sdkextra().end(); ++it) {
    total_size += Message_SdkExtraEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
  }

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

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

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

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

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

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

  // .heroim.client.v3beta.dto.message.model.MessageSession session = 3;
  if (this->_internal_has_session()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::MessageSize(
        *session_);
  }

  // .heroim.client.v3beta.dto.user.model.UserSimple fromUser = 9;
  if (this->_internal_has_fromuser()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::MessageSize(
        *fromuser_);
  }

  // .heroim.client.v3beta.dto.message.model.SessionKey sessionKey = 15;
  if (this->_internal_has_sessionkey()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::MessageSize(
        *sessionkey_);
  }

  // int32 sessionType = 1;
  if (this->_internal_sessiontype() != 0) {
    total_size += ::herogoogle::protobuf::internal::WireFormatLite::Int32SizePlusOne(this->_internal_sessiontype());
  }

  // int32 status = 12;
  if (this->_internal_status() != 0) {
    total_size += ::herogoogle::protobuf::internal::WireFormatLite::Int32SizePlusOne(this->_internal_status());
  }

  // int64 time = 8;
  if (this->_internal_time() != 0) {
    total_size += ::herogoogle::protobuf::internal::WireFormatLite::Int64SizePlusOne(this->_internal_time());
  }

  // int64 sequence = 14;
  if (this->_internal_sequence() != 0) {
    total_size += ::herogoogle::protobuf::internal::WireFormatLite::Int64SizePlusOne(this->_internal_sequence());
  }

  // int64 updateTime = 16;
  if (this->_internal_updatetime() != 0) {
    total_size += 2 +
      ::herogoogle::protobuf::internal::WireFormatLite::Int64Size(
        this->_internal_updatetime());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

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


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

  payload_.MergeFrom(from.payload_);
  sdkextra_.MergeFrom(from.sdkextra_);
  if (!from._internal_targetid().empty()) {
    _internal_set_targetid(from._internal_targetid());
  }
  if (!from._internal_msgid().empty()) {
    _internal_set_msgid(from._internal_msgid());
  }
  if (!from._internal_clientmsgid().empty()) {
    _internal_set_clientmsgid(from._internal_clientmsgid());
  }
  if (!from._internal_msgtype().empty()) {
    _internal_set_msgtype(from._internal_msgtype());
  }
  if (!from._internal_content().empty()) {
    _internal_set_content(from._internal_content());
  }
  if (!from._internal_prevmsgid().empty()) {
    _internal_set_prevmsgid(from._internal_prevmsgid());
  }
  if (from._internal_has_session()) {
    _internal_mutable_session()->::heroim::client::v3beta::dto::message::model::MessageSession::MergeFrom(from._internal_session());
  }
  if (from._internal_has_fromuser()) {
    _internal_mutable_fromuser()->::heroim::client::v3beta::dto::user::model::UserSimple::MergeFrom(from._internal_fromuser());
  }
  if (from._internal_has_sessionkey()) {
    _internal_mutable_sessionkey()->::heroim::client::v3beta::dto::message::model::SessionKey::MergeFrom(from._internal_sessionkey());
  }
  if (from._internal_sessiontype() != 0) {
    _internal_set_sessiontype(from._internal_sessiontype());
  }
  if (from._internal_status() != 0) {
    _internal_set_status(from._internal_status());
  }
  if (from._internal_time() != 0) {
    _internal_set_time(from._internal_time());
  }
  if (from._internal_sequence() != 0) {
    _internal_set_sequence(from._internal_sequence());
  }
  if (from._internal_updatetime() != 0) {
    _internal_set_updatetime(from._internal_updatetime());
  }
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void Message::InternalSwap(Message* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  payload_.InternalSwap(&other->payload_);
  sdkextra_.InternalSwap(&other->sdkextra_);
  ::herogoogle::protobuf::internal::ArenaStringPtr::InternalSwap(
      &::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited(),
      &targetid_, lhs_arena,
      &other->targetid_, rhs_arena
  );
  ::herogoogle::protobuf::internal::ArenaStringPtr::InternalSwap(
      &::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited(),
      &msgid_, lhs_arena,
      &other->msgid_, rhs_arena
  );
  ::herogoogle::protobuf::internal::ArenaStringPtr::InternalSwap(
      &::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited(),
      &clientmsgid_, lhs_arena,
      &other->clientmsgid_, rhs_arena
  );
  ::herogoogle::protobuf::internal::ArenaStringPtr::InternalSwap(
      &::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited(),
      &msgtype_, lhs_arena,
      &other->msgtype_, rhs_arena
  );
  ::herogoogle::protobuf::internal::ArenaStringPtr::InternalSwap(
      &::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited(),
      &content_, lhs_arena,
      &other->content_, rhs_arena
  );
  ::herogoogle::protobuf::internal::ArenaStringPtr::InternalSwap(
      &::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited(),
      &prevmsgid_, lhs_arena,
      &other->prevmsgid_, rhs_arena
  );
  ::herogoogle::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Message, updatetime_)
      + sizeof(Message::updatetime_)
      - PROTOBUF_FIELD_OFFSET(Message, session_)>(
          reinterpret_cast<char*>(&session_),
          reinterpret_cast<char*>(&other->session_));
}

::herogoogle::protobuf::Metadata Message::GetMetadata() const {
  return ::herogoogle::protobuf::internal::AssignDescriptors(
      &descriptor_table_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto_getter, &descriptor_table_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto_once,
      file_level_metadata_client_2fv3beta_2fdto_2fmessage_2fmodel_2fmessage_5fmodel_2eproto[5]);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace model
}  // namespace message
}  // namespace dto
}  // namespace v3beta
}  // namespace client
}  // namespace heroim
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::heroim::client::v3beta::dto::message::model::SessionKey* Arena::CreateMaybeMessage< ::heroim::client::v3beta::dto::message::model::SessionKey >(Arena* arena) {
  return Arena::CreateMessageInternal< ::heroim::client::v3beta::dto::message::model::SessionKey >(arena);
}
template<> PROTOBUF_NOINLINE ::heroim::client::v3beta::dto::message::model::UserSessionSort* Arena::CreateMaybeMessage< ::heroim::client::v3beta::dto::message::model::UserSessionSort >(Arena* arena) {
  return Arena::CreateMessageInternal< ::heroim::client::v3beta::dto::message::model::UserSessionSort >(arena);
}
template<> PROTOBUF_NOINLINE ::heroim::client::v3beta::dto::message::model::MessageSession* Arena::CreateMaybeMessage< ::heroim::client::v3beta::dto::message::model::MessageSession >(Arena* arena) {
  return Arena::CreateMessageInternal< ::heroim::client::v3beta::dto::message::model::MessageSession >(arena);
}
template<> PROTOBUF_NOINLINE ::heroim::client::v3beta::dto::message::model::Message_PayloadEntry_DoNotUse* Arena::CreateMaybeMessage< ::heroim::client::v3beta::dto::message::model::Message_PayloadEntry_DoNotUse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::heroim::client::v3beta::dto::message::model::Message_PayloadEntry_DoNotUse >(arena);
}
template<> PROTOBUF_NOINLINE ::heroim::client::v3beta::dto::message::model::Message_SdkExtraEntry_DoNotUse* Arena::CreateMaybeMessage< ::heroim::client::v3beta::dto::message::model::Message_SdkExtraEntry_DoNotUse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::heroim::client::v3beta::dto::message::model::Message_SdkExtraEntry_DoNotUse >(arena);
}
template<> PROTOBUF_NOINLINE ::heroim::client::v3beta::dto::message::model::Message* Arena::CreateMaybeMessage< ::heroim::client::v3beta::dto::message::model::Message >(Arena* arena) {
  return Arena::CreateMessageInternal< ::heroim::client::v3beta::dto::message::model::Message >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)

