// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: client/v3beta/dto/user/event/user_event.proto

#include "client/v3beta/dto/user/event/user_event.pb.h"

#include <algorithm>

#include <herogoogle/protobuf/stubs/common.h>
#include <herogoogle/protobuf/stubs/port.h>
#include <herogoogle/protobuf/stubs/once.h>
#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>
// This is a temporary google only hack
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
#include "third_party/protobuf/version.h"
#endif
// @@protoc_insertion_point(includes)
namespace heroim {
namespace client {
namespace v3beta {
namespace dto {
namespace user {
namespace event {
constexpr UserProfileChangedEvent::UserProfileChangedEvent(
  ::herogoogle::protobuf::internal::ConstantInitialized)
  : productid_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , uid_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , user_(nullptr){}
struct UserProfileChangedEventDefaultTypeInternal {
  constexpr UserProfileChangedEventDefaultTypeInternal()
    : _instance(::herogoogle::protobuf::internal::ConstantInitialized{}) {}
  ~UserProfileChangedEventDefaultTypeInternal() {}
  union {
    UserProfileChangedEvent _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT UserProfileChangedEventDefaultTypeInternal _UserProfileChangedEvent_default_instance_;
constexpr UserStatusChangedEvent::UserStatusChangedEvent(
  ::herogoogle::protobuf::internal::ConstantInitialized)
  : productid_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , uid_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , userkey_(nullptr)
  , status_(nullptr){}
struct UserStatusChangedEventDefaultTypeInternal {
  constexpr UserStatusChangedEventDefaultTypeInternal()
    : _instance(::herogoogle::protobuf::internal::ConstantInitialized{}) {}
  ~UserStatusChangedEventDefaultTypeInternal() {}
  union {
    UserStatusChangedEvent _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT UserStatusChangedEventDefaultTypeInternal _UserStatusChangedEvent_default_instance_;
constexpr UserControlChangedEvent::UserControlChangedEvent(
  ::herogoogle::protobuf::internal::ConstantInitialized)
  : productid_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , uid_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , status_(nullptr){}
struct UserControlChangedEventDefaultTypeInternal {
  constexpr UserControlChangedEventDefaultTypeInternal()
    : _instance(::herogoogle::protobuf::internal::ConstantInitialized{}) {}
  ~UserControlChangedEventDefaultTypeInternal() {}
  union {
    UserControlChangedEvent _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT UserControlChangedEventDefaultTypeInternal _UserControlChangedEvent_default_instance_;
constexpr UserConnectedEvent::UserConnectedEvent(
  ::herogoogle::protobuf::internal::ConstantInitialized)
  : productid_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , user_(nullptr){}
struct UserConnectedEventDefaultTypeInternal {
  constexpr UserConnectedEventDefaultTypeInternal()
    : _instance(::herogoogle::protobuf::internal::ConstantInitialized{}) {}
  ~UserConnectedEventDefaultTypeInternal() {}
  union {
    UserConnectedEvent _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT UserConnectedEventDefaultTypeInternal _UserConnectedEvent_default_instance_;
constexpr UserDisConnectedEvent::UserDisConnectedEvent(
  ::herogoogle::protobuf::internal::ConstantInitialized)
  : productid_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , user_(nullptr){}
struct UserDisConnectedEventDefaultTypeInternal {
  constexpr UserDisConnectedEventDefaultTypeInternal()
    : _instance(::herogoogle::protobuf::internal::ConstantInitialized{}) {}
  ~UserDisConnectedEventDefaultTypeInternal() {}
  union {
    UserDisConnectedEvent _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT UserDisConnectedEventDefaultTypeInternal _UserDisConnectedEvent_default_instance_;
}  // namespace event
}  // namespace user
}  // namespace dto
}  // namespace v3beta
}  // namespace client
}  // namespace heroim
static ::herogoogle::protobuf::Metadata file_level_metadata_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto[5];
static constexpr ::herogoogle::protobuf::EnumDescriptor const** file_level_enum_descriptors_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto = nullptr;
static constexpr ::herogoogle::protobuf::ServiceDescriptor const** file_level_service_descriptors_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto = nullptr;

const ::herogoogle::protobuf::uint32 TableStruct_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::user::event::UserProfileChangedEvent, _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::user::event::UserProfileChangedEvent, productid_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::user::event::UserProfileChangedEvent, uid_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::user::event::UserProfileChangedEvent, user_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::user::event::UserStatusChangedEvent, _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::user::event::UserStatusChangedEvent, productid_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::user::event::UserStatusChangedEvent, uid_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::user::event::UserStatusChangedEvent, userkey_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::user::event::UserStatusChangedEvent, status_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::user::event::UserControlChangedEvent, _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::user::event::UserControlChangedEvent, productid_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::user::event::UserControlChangedEvent, uid_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::user::event::UserControlChangedEvent, status_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::user::event::UserConnectedEvent, _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::user::event::UserConnectedEvent, productid_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::user::event::UserConnectedEvent, user_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::user::event::UserDisConnectedEvent, _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::user::event::UserDisConnectedEvent, productid_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::user::event::UserDisConnectedEvent, user_),
};
static const ::herogoogle::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, -1, sizeof(::heroim::client::v3beta::dto::user::event::UserProfileChangedEvent)},
  { 9, -1, -1, sizeof(::heroim::client::v3beta::dto::user::event::UserStatusChangedEvent)},
  { 19, -1, -1, sizeof(::heroim::client::v3beta::dto::user::event::UserControlChangedEvent)},
  { 28, -1, -1, sizeof(::heroim::client::v3beta::dto::user::event::UserConnectedEvent)},
  { 36, -1, -1, sizeof(::heroim::client::v3beta::dto::user::event::UserDisConnectedEvent)},
};

static ::herogoogle::protobuf::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::herogoogle::protobuf::Message*>(&::heroim::client::v3beta::dto::user::event::_UserProfileChangedEvent_default_instance_),
  reinterpret_cast<const ::herogoogle::protobuf::Message*>(&::heroim::client::v3beta::dto::user::event::_UserStatusChangedEvent_default_instance_),
  reinterpret_cast<const ::herogoogle::protobuf::Message*>(&::heroim::client::v3beta::dto::user::event::_UserControlChangedEvent_default_instance_),
  reinterpret_cast<const ::herogoogle::protobuf::Message*>(&::heroim::client::v3beta::dto::user::event::_UserConnectedEvent_default_instance_),
  reinterpret_cast<const ::herogoogle::protobuf::Message*>(&::heroim::client::v3beta::dto::user::event::_UserDisConnectedEvent_default_instance_),
};
#ifdef _MSC_VER
#  pragma warning(disable : 4125)
#endif  /* _MSC_VER */
const char descriptor_table_protodef_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n-client/v3beta/dto/user/event/user_even"
  "t.proto\022#heroim.client.v3beta.dto.user.e"
  "vent\032-client/v3beta/dto/user/model/user_"
  "model.proto\"x\n\027UserProfileChangedEvent\022\021"
  "\n\tproductId\030\001 \001(\t\022\013\n\003uid\030\002 \001(\t\022=\n\004user\030\003"
  " \001(\0132/.heroim.client.v3beta.dto.user.mod"
  "el.UserSimple\"\270\001\n\026UserStatusChangedEvent"
  "\022\021\n\tproductId\030\001 \001(\t\022\013\n\003uid\030\002 \001(\t\022=\n\007user"
  "Key\030\003 \001(\0132,.heroim.client.v3beta.dto.use"
  "r.model.UserKey\022\?\n\006status\030\004 \001(\0132/.heroim"
  ".client.v3beta.dto.user.model.UserStatus"
  "\"{\n\027UserControlChangedEvent\022\021\n\tproductId"
  "\030\001 \001(\t\022\013\n\003uid\030\002 \001(\t\022@\n\006status\030\003 \001(\01320.he"
  "roim.client.v3beta.dto.user.model.UserCo"
  "ntrol\"f\n\022UserConnectedEvent\022\021\n\tproductId"
  "\030\001 \001(\t\022=\n\004user\030\002 \001(\0132/.heroim.client.v3b"
  "eta.dto.user.model.UserSimple\"i\n\025UserDis"
  "ConnectedEvent\022\021\n\tproductId\030\001 \001(\t\022=\n\004use"
  "r\030\002 \001(\0132/.heroim.client.v3beta.dto.user."
  "model.UserSimpleB\224\001\n\'com.hero.csdk.api.v"
  "3beta.dto.user.eventP\001Z\'heroim/api/clien"
  "t/v3beta/dto/user/event\242\002\005IMSdk\252\0025Im.CSD"
  "K.Unity.chat.entry.Runtime.entry2.v3.use"
  "r.Eventb\006proto3"
  ;
static const ::herogoogle::protobuf::internal::DescriptorTable*const descriptor_table_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto_deps[1] = {
  &::descriptor_table_client_2fv3beta_2fdto_2fuser_2fmodel_2fuser_5fmodel_2eproto,
};
static ::herogoogle::protobuf::internal::once_flag descriptor_table_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto_once;
const ::herogoogle::protobuf::internal::DescriptorTable descriptor_table_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto = {
  false, false, 935, descriptor_table_protodef_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto, "client/v3beta/dto/user/event/user_event.proto", 
  &descriptor_table_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto_once, descriptor_table_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto_deps, 1, 5,
  schemas, file_default_instances, TableStruct_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto::offsets,
  file_level_metadata_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto, file_level_enum_descriptors_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto, file_level_service_descriptors_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::herogoogle::protobuf::internal::DescriptorTable* descriptor_table_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto_getter() {
  return &descriptor_table_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::herogoogle::protobuf::internal::AddDescriptorsRunner dynamic_init_dummy_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto(&descriptor_table_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto);
namespace heroim {
namespace client {
namespace v3beta {
namespace dto {
namespace user {
namespace event {

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

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

const ::heroim::client::v3beta::dto::user::model::UserSimple&
UserProfileChangedEvent::_Internal::user(const UserProfileChangedEvent* msg) {
  return *msg->user_;
}
void UserProfileChangedEvent::clear_user() {
  if (GetArenaForAllocation() == nullptr && user_ != nullptr) {
    delete user_;
  }
  user_ = nullptr;
}
UserProfileChangedEvent::UserProfileChangedEvent(::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.user.event.UserProfileChangedEvent)
}
UserProfileChangedEvent::UserProfileChangedEvent(const UserProfileChangedEvent& from)
  : ::herogoogle::protobuf::Message() {
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
  productid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_productid().empty()) {
    productid_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_productid(), 
      GetArenaForAllocation());
  }
  uid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_uid().empty()) {
    uid_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_uid(), 
      GetArenaForAllocation());
  }
  if (from._internal_has_user()) {
    user_ = new ::heroim::client::v3beta::dto::user::model::UserSimple(*from.user_);
  } else {
    user_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:heroim.client.v3beta.dto.user.event.UserProfileChangedEvent)
}

void UserProfileChangedEvent::SharedCtor() {
productid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
uid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
user_ = nullptr;
}

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

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

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

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

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

const char* UserProfileChangedEvent::_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 productId = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 10)) {
          auto str = _internal_mutable_productid();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, "heroim.client.v3beta.dto.user.event.UserProfileChangedEvent.productId"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string uid = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 18)) {
          auto str = _internal_mutable_uid();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, "heroim.client.v3beta.dto.user.event.UserProfileChangedEvent.uid"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .heroim.client.v3beta.dto.user.model.UserSimple user = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_user(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::herogoogle::protobuf::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

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

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

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

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

size_t UserProfileChangedEvent::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:heroim.client.v3beta.dto.user.event.UserProfileChangedEvent)
  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 productId = 1;
  if (!this->_internal_productid().empty()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::StringSize(
        this->_internal_productid());
  }

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

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

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

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


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

  if (!from._internal_productid().empty()) {
    _internal_set_productid(from._internal_productid());
  }
  if (!from._internal_uid().empty()) {
    _internal_set_uid(from._internal_uid());
  }
  if (from._internal_has_user()) {
    _internal_mutable_user()->::heroim::client::v3beta::dto::user::model::UserSimple::MergeFrom(from._internal_user());
  }
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void UserProfileChangedEvent::InternalSwap(UserProfileChangedEvent* 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(),
      &productid_, lhs_arena,
      &other->productid_, rhs_arena
  );
  ::herogoogle::protobuf::internal::ArenaStringPtr::InternalSwap(
      &::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited(),
      &uid_, lhs_arena,
      &other->uid_, rhs_arena
  );
  swap(user_, other->user_);
}

::herogoogle::protobuf::Metadata UserProfileChangedEvent::GetMetadata() const {
  return ::herogoogle::protobuf::internal::AssignDescriptors(
      &descriptor_table_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto_getter, &descriptor_table_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto_once,
      file_level_metadata_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto[0]);
}

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

class UserStatusChangedEvent::_Internal {
 public:
  static const ::heroim::client::v3beta::dto::user::model::UserKey& userkey(const UserStatusChangedEvent* msg);
  static const ::heroim::client::v3beta::dto::user::model::UserStatus& status(const UserStatusChangedEvent* msg);
};

const ::heroim::client::v3beta::dto::user::model::UserKey&
UserStatusChangedEvent::_Internal::userkey(const UserStatusChangedEvent* msg) {
  return *msg->userkey_;
}
const ::heroim::client::v3beta::dto::user::model::UserStatus&
UserStatusChangedEvent::_Internal::status(const UserStatusChangedEvent* msg) {
  return *msg->status_;
}
void UserStatusChangedEvent::clear_userkey() {
  if (GetArenaForAllocation() == nullptr && userkey_ != nullptr) {
    delete userkey_;
  }
  userkey_ = nullptr;
}
void UserStatusChangedEvent::clear_status() {
  if (GetArenaForAllocation() == nullptr && status_ != nullptr) {
    delete status_;
  }
  status_ = nullptr;
}
UserStatusChangedEvent::UserStatusChangedEvent(::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.user.event.UserStatusChangedEvent)
}
UserStatusChangedEvent::UserStatusChangedEvent(const UserStatusChangedEvent& from)
  : ::herogoogle::protobuf::Message() {
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
  productid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_productid().empty()) {
    productid_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_productid(), 
      GetArenaForAllocation());
  }
  uid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_uid().empty()) {
    uid_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_uid(), 
      GetArenaForAllocation());
  }
  if (from._internal_has_userkey()) {
    userkey_ = new ::heroim::client::v3beta::dto::user::model::UserKey(*from.userkey_);
  } else {
    userkey_ = nullptr;
  }
  if (from._internal_has_status()) {
    status_ = new ::heroim::client::v3beta::dto::user::model::UserStatus(*from.status_);
  } else {
    status_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:heroim.client.v3beta.dto.user.event.UserStatusChangedEvent)
}

void UserStatusChangedEvent::SharedCtor() {
productid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
uid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&userkey_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&status_) -
    reinterpret_cast<char*>(&userkey_)) + sizeof(status_));
}

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

inline void UserStatusChangedEvent::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  productid_.DestroyNoArena(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  uid_.DestroyNoArena(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete userkey_;
  if (this != internal_default_instance()) delete status_;
}

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

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

  productid_.ClearToEmpty();
  uid_.ClearToEmpty();
  if (GetArenaForAllocation() == nullptr && userkey_ != nullptr) {
    delete userkey_;
  }
  userkey_ = nullptr;
  if (GetArenaForAllocation() == nullptr && status_ != nullptr) {
    delete status_;
  }
  status_ = nullptr;
  _internal_metadata_.Clear<::herogoogle::protobuf::UnknownFieldSet>();
}

const char* UserStatusChangedEvent::_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 productId = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 10)) {
          auto str = _internal_mutable_productid();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, "heroim.client.v3beta.dto.user.event.UserStatusChangedEvent.productId"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string uid = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 18)) {
          auto str = _internal_mutable_uid();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, "heroim.client.v3beta.dto.user.event.UserStatusChangedEvent.uid"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .heroim.client.v3beta.dto.user.model.UserKey userKey = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_userkey(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .heroim.client.v3beta.dto.user.model.UserStatus status = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_status(), 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* UserStatusChangedEvent::_InternalSerialize(
    ::herogoogle::protobuf::uint8* target, ::herogoogle::protobuf::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:heroim.client.v3beta.dto.user.event.UserStatusChangedEvent)
  ::herogoogle::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

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

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

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

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

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

size_t UserStatusChangedEvent::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:heroim.client.v3beta.dto.user.event.UserStatusChangedEvent)
  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 productId = 1;
  if (!this->_internal_productid().empty()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::StringSize(
        this->_internal_productid());
  }

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

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

  // .heroim.client.v3beta.dto.user.model.UserStatus status = 4;
  if (this->_internal_has_status()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::MessageSize(
        *status_);
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

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


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

  if (!from._internal_productid().empty()) {
    _internal_set_productid(from._internal_productid());
  }
  if (!from._internal_uid().empty()) {
    _internal_set_uid(from._internal_uid());
  }
  if (from._internal_has_userkey()) {
    _internal_mutable_userkey()->::heroim::client::v3beta::dto::user::model::UserKey::MergeFrom(from._internal_userkey());
  }
  if (from._internal_has_status()) {
    _internal_mutable_status()->::heroim::client::v3beta::dto::user::model::UserStatus::MergeFrom(from._internal_status());
  }
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void UserStatusChangedEvent::InternalSwap(UserStatusChangedEvent* 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(),
      &productid_, lhs_arena,
      &other->productid_, rhs_arena
  );
  ::herogoogle::protobuf::internal::ArenaStringPtr::InternalSwap(
      &::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited(),
      &uid_, lhs_arena,
      &other->uid_, rhs_arena
  );
  ::herogoogle::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(UserStatusChangedEvent, status_)
      + sizeof(UserStatusChangedEvent::status_)
      - PROTOBUF_FIELD_OFFSET(UserStatusChangedEvent, userkey_)>(
          reinterpret_cast<char*>(&userkey_),
          reinterpret_cast<char*>(&other->userkey_));
}

::herogoogle::protobuf::Metadata UserStatusChangedEvent::GetMetadata() const {
  return ::herogoogle::protobuf::internal::AssignDescriptors(
      &descriptor_table_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto_getter, &descriptor_table_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto_once,
      file_level_metadata_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto[1]);
}

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

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

const ::heroim::client::v3beta::dto::user::model::UserControl&
UserControlChangedEvent::_Internal::status(const UserControlChangedEvent* msg) {
  return *msg->status_;
}
void UserControlChangedEvent::clear_status() {
  if (GetArenaForAllocation() == nullptr && status_ != nullptr) {
    delete status_;
  }
  status_ = nullptr;
}
UserControlChangedEvent::UserControlChangedEvent(::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.user.event.UserControlChangedEvent)
}
UserControlChangedEvent::UserControlChangedEvent(const UserControlChangedEvent& from)
  : ::herogoogle::protobuf::Message() {
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
  productid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_productid().empty()) {
    productid_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_productid(), 
      GetArenaForAllocation());
  }
  uid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_uid().empty()) {
    uid_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_uid(), 
      GetArenaForAllocation());
  }
  if (from._internal_has_status()) {
    status_ = new ::heroim::client::v3beta::dto::user::model::UserControl(*from.status_);
  } else {
    status_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:heroim.client.v3beta.dto.user.event.UserControlChangedEvent)
}

void UserControlChangedEvent::SharedCtor() {
productid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
uid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
status_ = nullptr;
}

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

inline void UserControlChangedEvent::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  productid_.DestroyNoArena(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  uid_.DestroyNoArena(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete status_;
}

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

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

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

const char* UserControlChangedEvent::_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 productId = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 10)) {
          auto str = _internal_mutable_productid();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, "heroim.client.v3beta.dto.user.event.UserControlChangedEvent.productId"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string uid = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 18)) {
          auto str = _internal_mutable_uid();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, "heroim.client.v3beta.dto.user.event.UserControlChangedEvent.uid"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .heroim.client.v3beta.dto.user.model.UserControl status = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_status(), 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* UserControlChangedEvent::_InternalSerialize(
    ::herogoogle::protobuf::uint8* target, ::herogoogle::protobuf::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:heroim.client.v3beta.dto.user.event.UserControlChangedEvent)
  ::herogoogle::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

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

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

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

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

size_t UserControlChangedEvent::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:heroim.client.v3beta.dto.user.event.UserControlChangedEvent)
  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 productId = 1;
  if (!this->_internal_productid().empty()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::StringSize(
        this->_internal_productid());
  }

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

  // .heroim.client.v3beta.dto.user.model.UserControl status = 3;
  if (this->_internal_has_status()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::MessageSize(
        *status_);
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

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


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

  if (!from._internal_productid().empty()) {
    _internal_set_productid(from._internal_productid());
  }
  if (!from._internal_uid().empty()) {
    _internal_set_uid(from._internal_uid());
  }
  if (from._internal_has_status()) {
    _internal_mutable_status()->::heroim::client::v3beta::dto::user::model::UserControl::MergeFrom(from._internal_status());
  }
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void UserControlChangedEvent::InternalSwap(UserControlChangedEvent* 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(),
      &productid_, lhs_arena,
      &other->productid_, rhs_arena
  );
  ::herogoogle::protobuf::internal::ArenaStringPtr::InternalSwap(
      &::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited(),
      &uid_, lhs_arena,
      &other->uid_, rhs_arena
  );
  swap(status_, other->status_);
}

::herogoogle::protobuf::Metadata UserControlChangedEvent::GetMetadata() const {
  return ::herogoogle::protobuf::internal::AssignDescriptors(
      &descriptor_table_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto_getter, &descriptor_table_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto_once,
      file_level_metadata_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto[2]);
}

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

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

const ::heroim::client::v3beta::dto::user::model::UserSimple&
UserConnectedEvent::_Internal::user(const UserConnectedEvent* msg) {
  return *msg->user_;
}
void UserConnectedEvent::clear_user() {
  if (GetArenaForAllocation() == nullptr && user_ != nullptr) {
    delete user_;
  }
  user_ = nullptr;
}
UserConnectedEvent::UserConnectedEvent(::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.user.event.UserConnectedEvent)
}
UserConnectedEvent::UserConnectedEvent(const UserConnectedEvent& from)
  : ::herogoogle::protobuf::Message() {
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
  productid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_productid().empty()) {
    productid_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_productid(), 
      GetArenaForAllocation());
  }
  if (from._internal_has_user()) {
    user_ = new ::heroim::client::v3beta::dto::user::model::UserSimple(*from.user_);
  } else {
    user_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:heroim.client.v3beta.dto.user.event.UserConnectedEvent)
}

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

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

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

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

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

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

const char* UserConnectedEvent::_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 productId = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 10)) {
          auto str = _internal_mutable_productid();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, "heroim.client.v3beta.dto.user.event.UserConnectedEvent.productId"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .heroim.client.v3beta.dto.user.model.UserSimple user = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_user(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::herogoogle::protobuf::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

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

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

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

size_t UserConnectedEvent::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:heroim.client.v3beta.dto.user.event.UserConnectedEvent)
  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 productId = 1;
  if (!this->_internal_productid().empty()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::StringSize(
        this->_internal_productid());
  }

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

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

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


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

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

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

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

void UserConnectedEvent::InternalSwap(UserConnectedEvent* 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(),
      &productid_, lhs_arena,
      &other->productid_, rhs_arena
  );
  swap(user_, other->user_);
}

::herogoogle::protobuf::Metadata UserConnectedEvent::GetMetadata() const {
  return ::herogoogle::protobuf::internal::AssignDescriptors(
      &descriptor_table_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto_getter, &descriptor_table_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto_once,
      file_level_metadata_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto[3]);
}

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

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

const ::heroim::client::v3beta::dto::user::model::UserSimple&
UserDisConnectedEvent::_Internal::user(const UserDisConnectedEvent* msg) {
  return *msg->user_;
}
void UserDisConnectedEvent::clear_user() {
  if (GetArenaForAllocation() == nullptr && user_ != nullptr) {
    delete user_;
  }
  user_ = nullptr;
}
UserDisConnectedEvent::UserDisConnectedEvent(::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.user.event.UserDisConnectedEvent)
}
UserDisConnectedEvent::UserDisConnectedEvent(const UserDisConnectedEvent& from)
  : ::herogoogle::protobuf::Message() {
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
  productid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_productid().empty()) {
    productid_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_productid(), 
      GetArenaForAllocation());
  }
  if (from._internal_has_user()) {
    user_ = new ::heroim::client::v3beta::dto::user::model::UserSimple(*from.user_);
  } else {
    user_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:heroim.client.v3beta.dto.user.event.UserDisConnectedEvent)
}

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

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

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

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

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

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

const char* UserDisConnectedEvent::_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 productId = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 10)) {
          auto str = _internal_mutable_productid();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, "heroim.client.v3beta.dto.user.event.UserDisConnectedEvent.productId"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .heroim.client.v3beta.dto.user.model.UserSimple user = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_user(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::herogoogle::protobuf::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

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

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

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

size_t UserDisConnectedEvent::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:heroim.client.v3beta.dto.user.event.UserDisConnectedEvent)
  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 productId = 1;
  if (!this->_internal_productid().empty()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::StringSize(
        this->_internal_productid());
  }

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

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

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


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

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

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

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

void UserDisConnectedEvent::InternalSwap(UserDisConnectedEvent* 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(),
      &productid_, lhs_arena,
      &other->productid_, rhs_arena
  );
  swap(user_, other->user_);
}

::herogoogle::protobuf::Metadata UserDisConnectedEvent::GetMetadata() const {
  return ::herogoogle::protobuf::internal::AssignDescriptors(
      &descriptor_table_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto_getter, &descriptor_table_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto_once,
      file_level_metadata_client_2fv3beta_2fdto_2fuser_2fevent_2fuser_5fevent_2eproto[4]);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace event
}  // namespace user
}  // namespace dto
}  // namespace v3beta
}  // namespace client
}  // namespace heroim
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::heroim::client::v3beta::dto::user::event::UserProfileChangedEvent* Arena::CreateMaybeMessage< ::heroim::client::v3beta::dto::user::event::UserProfileChangedEvent >(Arena* arena) {
  return Arena::CreateMessageInternal< ::heroim::client::v3beta::dto::user::event::UserProfileChangedEvent >(arena);
}
template<> PROTOBUF_NOINLINE ::heroim::client::v3beta::dto::user::event::UserStatusChangedEvent* Arena::CreateMaybeMessage< ::heroim::client::v3beta::dto::user::event::UserStatusChangedEvent >(Arena* arena) {
  return Arena::CreateMessageInternal< ::heroim::client::v3beta::dto::user::event::UserStatusChangedEvent >(arena);
}
template<> PROTOBUF_NOINLINE ::heroim::client::v3beta::dto::user::event::UserControlChangedEvent* Arena::CreateMaybeMessage< ::heroim::client::v3beta::dto::user::event::UserControlChangedEvent >(Arena* arena) {
  return Arena::CreateMessageInternal< ::heroim::client::v3beta::dto::user::event::UserControlChangedEvent >(arena);
}
template<> PROTOBUF_NOINLINE ::heroim::client::v3beta::dto::user::event::UserConnectedEvent* Arena::CreateMaybeMessage< ::heroim::client::v3beta::dto::user::event::UserConnectedEvent >(Arena* arena) {
  return Arena::CreateMessageInternal< ::heroim::client::v3beta::dto::user::event::UserConnectedEvent >(arena);
}
template<> PROTOBUF_NOINLINE ::heroim::client::v3beta::dto::user::event::UserDisConnectedEvent* Arena::CreateMaybeMessage< ::heroim::client::v3beta::dto::user::event::UserDisConnectedEvent >(Arena* arena) {
  return Arena::CreateMessageInternal< ::heroim::client::v3beta::dto::user::event::UserDisConnectedEvent >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)

