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

#include "client/v3beta/dto/relationship/event/relationship_event.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 relationship {
namespace event {
constexpr RSFriendAddApplyEvent::RSFriendAddApplyEvent(
  ::herogoogle::protobuf::internal::ConstantInitialized)
  : productid_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , acttoken_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , fromuser_(nullptr)
  , distuser_(nullptr){}
struct RSFriendAddApplyEventDefaultTypeInternal {
  constexpr RSFriendAddApplyEventDefaultTypeInternal()
    : _instance(::herogoogle::protobuf::internal::ConstantInitialized{}) {}
  ~RSFriendAddApplyEventDefaultTypeInternal() {}
  union {
    RSFriendAddApplyEvent _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT RSFriendAddApplyEventDefaultTypeInternal _RSFriendAddApplyEvent_default_instance_;
constexpr RSFriendAddAgreeEvent::RSFriendAddAgreeEvent(
  ::herogoogle::protobuf::internal::ConstantInitialized)
  : productid_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , fromuser_(nullptr)
  , distuser_(nullptr){}
struct RSFriendAddAgreeEventDefaultTypeInternal {
  constexpr RSFriendAddAgreeEventDefaultTypeInternal()
    : _instance(::herogoogle::protobuf::internal::ConstantInitialized{}) {}
  ~RSFriendAddAgreeEventDefaultTypeInternal() {}
  union {
    RSFriendAddAgreeEvent _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT RSFriendAddAgreeEventDefaultTypeInternal _RSFriendAddAgreeEvent_default_instance_;
constexpr RSFriendAddedEvent::RSFriendAddedEvent(
  ::herogoogle::protobuf::internal::ConstantInitialized)
  : productid_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , fromuser_(nullptr)
  , distuser_(nullptr){}
struct RSFriendAddedEventDefaultTypeInternal {
  constexpr RSFriendAddedEventDefaultTypeInternal()
    : _instance(::herogoogle::protobuf::internal::ConstantInitialized{}) {}
  ~RSFriendAddedEventDefaultTypeInternal() {}
  union {
    RSFriendAddedEvent _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT RSFriendAddedEventDefaultTypeInternal _RSFriendAddedEvent_default_instance_;
constexpr RSFriendDeletedEvent::RSFriendDeletedEvent(
  ::herogoogle::protobuf::internal::ConstantInitialized)
  : productid_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , fromuser_(nullptr)
  , distuser_(nullptr){}
struct RSFriendDeletedEventDefaultTypeInternal {
  constexpr RSFriendDeletedEventDefaultTypeInternal()
    : _instance(::herogoogle::protobuf::internal::ConstantInitialized{}) {}
  ~RSFriendDeletedEventDefaultTypeInternal() {}
  union {
    RSFriendDeletedEvent _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT RSFriendDeletedEventDefaultTypeInternal _RSFriendDeletedEvent_default_instance_;
constexpr RSChangedEvent::RSChangedEvent(
  ::herogoogle::protobuf::internal::ConstantInitialized)
  : productid_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , uid_(&::herogoogle::protobuf::internal::fixed_address_empty_string){}
struct RSChangedEventDefaultTypeInternal {
  constexpr RSChangedEventDefaultTypeInternal()
    : _instance(::herogoogle::protobuf::internal::ConstantInitialized{}) {}
  ~RSChangedEventDefaultTypeInternal() {}
  union {
    RSChangedEvent _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT RSChangedEventDefaultTypeInternal _RSChangedEvent_default_instance_;
}  // namespace event
}  // namespace relationship
}  // namespace dto
}  // namespace v3beta
}  // namespace client
}  // namespace heroim
static ::herogoogle::protobuf::Metadata file_level_metadata_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto[5];
static constexpr ::herogoogle::protobuf::EnumDescriptor const** file_level_enum_descriptors_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto = nullptr;
static constexpr ::herogoogle::protobuf::ServiceDescriptor const** file_level_service_descriptors_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto = nullptr;

const ::herogoogle::protobuf::uint32 TableStruct_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::relationship::event::RSFriendAddApplyEvent, _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::relationship::event::RSFriendAddApplyEvent, productid_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::relationship::event::RSFriendAddApplyEvent, fromuser_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::relationship::event::RSFriendAddApplyEvent, distuser_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::relationship::event::RSFriendAddApplyEvent, acttoken_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::relationship::event::RSFriendAddAgreeEvent, _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::relationship::event::RSFriendAddAgreeEvent, productid_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::relationship::event::RSFriendAddAgreeEvent, fromuser_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::relationship::event::RSFriendAddAgreeEvent, distuser_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::relationship::event::RSFriendAddedEvent, _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::relationship::event::RSFriendAddedEvent, productid_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::relationship::event::RSFriendAddedEvent, fromuser_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::relationship::event::RSFriendAddedEvent, distuser_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::relationship::event::RSFriendDeletedEvent, _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::relationship::event::RSFriendDeletedEvent, productid_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::relationship::event::RSFriendDeletedEvent, fromuser_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::relationship::event::RSFriendDeletedEvent, distuser_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::relationship::event::RSChangedEvent, _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::relationship::event::RSChangedEvent, productid_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::relationship::event::RSChangedEvent, uid_),
};
static const ::herogoogle::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, -1, sizeof(::heroim::client::v3beta::dto::relationship::event::RSFriendAddApplyEvent)},
  { 10, -1, -1, sizeof(::heroim::client::v3beta::dto::relationship::event::RSFriendAddAgreeEvent)},
  { 19, -1, -1, sizeof(::heroim::client::v3beta::dto::relationship::event::RSFriendAddedEvent)},
  { 28, -1, -1, sizeof(::heroim::client::v3beta::dto::relationship::event::RSFriendDeletedEvent)},
  { 37, -1, -1, sizeof(::heroim::client::v3beta::dto::relationship::event::RSChangedEvent)},
};

static ::herogoogle::protobuf::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::herogoogle::protobuf::Message*>(&::heroim::client::v3beta::dto::relationship::event::_RSFriendAddApplyEvent_default_instance_),
  reinterpret_cast<const ::herogoogle::protobuf::Message*>(&::heroim::client::v3beta::dto::relationship::event::_RSFriendAddAgreeEvent_default_instance_),
  reinterpret_cast<const ::herogoogle::protobuf::Message*>(&::heroim::client::v3beta::dto::relationship::event::_RSFriendAddedEvent_default_instance_),
  reinterpret_cast<const ::herogoogle::protobuf::Message*>(&::heroim::client::v3beta::dto::relationship::event::_RSFriendDeletedEvent_default_instance_),
  reinterpret_cast<const ::herogoogle::protobuf::Message*>(&::heroim::client::v3beta::dto::relationship::event::_RSChangedEvent_default_instance_),
};
#ifdef _MSC_VER
#  pragma warning(disable : 4125)
#endif  /* _MSC_VER */
const char descriptor_table_protodef_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n=client/v3beta/dto/relationship/event/r"
  "elationship_event.proto\022+heroim.client.v"
  "3beta.dto.relationship.event\032-client/v3b"
  "eta/dto/user/model/user_model.proto\"\302\001\n\025"
  "RSFriendAddApplyEvent\022\021\n\tproductId\030\001 \001(\t"
  "\022A\n\010fromUser\030\002 \001(\0132/.heroim.client.v3bet"
  "a.dto.user.model.UserSimple\022A\n\010distUser\030"
  "\003 \001(\0132/.heroim.client.v3beta.dto.user.mo"
  "del.UserSimple\022\020\n\010actToken\030\004 \001(\t\"\260\001\n\025RSF"
  "riendAddAgreeEvent\022\021\n\tproductId\030\001 \001(\t\022A\n"
  "\010fromUser\030\002 \001(\0132/.heroim.client.v3beta.d"
  "to.user.model.UserSimple\022A\n\010distUser\030\003 \001"
  "(\0132/.heroim.client.v3beta.dto.user.model"
  ".UserSimple\"\255\001\n\022RSFriendAddedEvent\022\021\n\tpr"
  "oductId\030\001 \001(\t\022A\n\010fromUser\030\002 \001(\0132/.heroim"
  ".client.v3beta.dto.user.model.UserSimple"
  "\022A\n\010distUser\030\003 \001(\0132/.heroim.client.v3bet"
  "a.dto.user.model.UserSimple\"\257\001\n\024RSFriend"
  "DeletedEvent\022\021\n\tproductId\030\001 \001(\t\022A\n\010fromU"
  "ser\030\002 \001(\0132/.heroim.client.v3beta.dto.use"
  "r.model.UserSimple\022A\n\010distUser\030\003 \001(\0132/.h"
  "eroim.client.v3beta.dto.user.model.UserS"
  "imple\"0\n\016RSChangedEvent\022\021\n\tproductId\030\001 \001"
  "(\t\022\013\n\003uid\030\002 \001(\tBl\n/com.hero.csdk.api.v3b"
  "eta.dto.relationship.eventP\001Z/heroim/api"
  "/client/v3beta/dto/relationship/event\242\002\005"
  "IMSdkb\006proto3"
  ;
static const ::herogoogle::protobuf::internal::DescriptorTable*const descriptor_table_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_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_2frelationship_2fevent_2frelationship_5fevent_2eproto_once;
const ::herogoogle::protobuf::internal::DescriptorTable descriptor_table_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto = {
  false, false, 1053, descriptor_table_protodef_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto, "client/v3beta/dto/relationship/event/relationship_event.proto", 
  &descriptor_table_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto_once, descriptor_table_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto_deps, 1, 5,
  schemas, file_default_instances, TableStruct_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto::offsets,
  file_level_metadata_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto, file_level_enum_descriptors_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto, file_level_service_descriptors_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::herogoogle::protobuf::internal::DescriptorTable* descriptor_table_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto_getter() {
  return &descriptor_table_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto;
}

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

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

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

const ::heroim::client::v3beta::dto::user::model::UserSimple&
RSFriendAddApplyEvent::_Internal::fromuser(const RSFriendAddApplyEvent* msg) {
  return *msg->fromuser_;
}
const ::heroim::client::v3beta::dto::user::model::UserSimple&
RSFriendAddApplyEvent::_Internal::distuser(const RSFriendAddApplyEvent* msg) {
  return *msg->distuser_;
}
void RSFriendAddApplyEvent::clear_fromuser() {
  if (GetArenaForAllocation() == nullptr && fromuser_ != nullptr) {
    delete fromuser_;
  }
  fromuser_ = nullptr;
}
void RSFriendAddApplyEvent::clear_distuser() {
  if (GetArenaForAllocation() == nullptr && distuser_ != nullptr) {
    delete distuser_;
  }
  distuser_ = nullptr;
}
RSFriendAddApplyEvent::RSFriendAddApplyEvent(::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.relationship.event.RSFriendAddApplyEvent)
}
RSFriendAddApplyEvent::RSFriendAddApplyEvent(const RSFriendAddApplyEvent& 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());
  }
  acttoken_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_acttoken().empty()) {
    acttoken_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_acttoken(), 
      GetArenaForAllocation());
  }
  if (from._internal_has_fromuser()) {
    fromuser_ = new ::heroim::client::v3beta::dto::user::model::UserSimple(*from.fromuser_);
  } else {
    fromuser_ = nullptr;
  }
  if (from._internal_has_distuser()) {
    distuser_ = new ::heroim::client::v3beta::dto::user::model::UserSimple(*from.distuser_);
  } else {
    distuser_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:heroim.client.v3beta.dto.relationship.event.RSFriendAddApplyEvent)
}

void RSFriendAddApplyEvent::SharedCtor() {
productid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
acttoken_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&fromuser_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&distuser_) -
    reinterpret_cast<char*>(&fromuser_)) + sizeof(distuser_));
}

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

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

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

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

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

const char* RSFriendAddApplyEvent::_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.relationship.event.RSFriendAddApplyEvent.productId"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .heroim.client.v3beta.dto.user.model.UserSimple fromUser = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_fromuser(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .heroim.client.v3beta.dto.user.model.UserSimple distUser = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_distuser(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string actToken = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 34)) {
          auto str = _internal_mutable_acttoken();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, "heroim.client.v3beta.dto.relationship.event.RSFriendAddApplyEvent.actToken"));
          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* RSFriendAddApplyEvent::_InternalSerialize(
    ::herogoogle::protobuf::uint8* target, ::herogoogle::protobuf::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:heroim.client.v3beta.dto.relationship.event.RSFriendAddApplyEvent)
  ::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.relationship.event.RSFriendAddApplyEvent.productId");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_productid(), target);
  }

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

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

  // string actToken = 4;
  if (!this->_internal_acttoken().empty()) {
    ::herogoogle::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_acttoken().data(), static_cast<int>(this->_internal_acttoken().length()),
      ::herogoogle::protobuf::internal::WireFormatLite::SERIALIZE,
      "heroim.client.v3beta.dto.relationship.event.RSFriendAddApplyEvent.actToken");
    target = stream->WriteStringMaybeAliased(
        4, this->_internal_acttoken(), 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.relationship.event.RSFriendAddApplyEvent)
  return target;
}

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

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

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

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

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


void RSFriendAddApplyEvent::MergeFrom(const RSFriendAddApplyEvent& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:heroim.client.v3beta.dto.relationship.event.RSFriendAddApplyEvent)
  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_acttoken().empty()) {
    _internal_set_acttoken(from._internal_acttoken());
  }
  if (from._internal_has_fromuser()) {
    _internal_mutable_fromuser()->::heroim::client::v3beta::dto::user::model::UserSimple::MergeFrom(from._internal_fromuser());
  }
  if (from._internal_has_distuser()) {
    _internal_mutable_distuser()->::heroim::client::v3beta::dto::user::model::UserSimple::MergeFrom(from._internal_distuser());
  }
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void RSFriendAddApplyEvent::InternalSwap(RSFriendAddApplyEvent* 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(),
      &acttoken_, lhs_arena,
      &other->acttoken_, rhs_arena
  );
  ::herogoogle::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(RSFriendAddApplyEvent, distuser_)
      + sizeof(RSFriendAddApplyEvent::distuser_)
      - PROTOBUF_FIELD_OFFSET(RSFriendAddApplyEvent, fromuser_)>(
          reinterpret_cast<char*>(&fromuser_),
          reinterpret_cast<char*>(&other->fromuser_));
}

::herogoogle::protobuf::Metadata RSFriendAddApplyEvent::GetMetadata() const {
  return ::herogoogle::protobuf::internal::AssignDescriptors(
      &descriptor_table_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto_getter, &descriptor_table_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto_once,
      file_level_metadata_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto[0]);
}

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

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

const ::heroim::client::v3beta::dto::user::model::UserSimple&
RSFriendAddAgreeEvent::_Internal::fromuser(const RSFriendAddAgreeEvent* msg) {
  return *msg->fromuser_;
}
const ::heroim::client::v3beta::dto::user::model::UserSimple&
RSFriendAddAgreeEvent::_Internal::distuser(const RSFriendAddAgreeEvent* msg) {
  return *msg->distuser_;
}
void RSFriendAddAgreeEvent::clear_fromuser() {
  if (GetArenaForAllocation() == nullptr && fromuser_ != nullptr) {
    delete fromuser_;
  }
  fromuser_ = nullptr;
}
void RSFriendAddAgreeEvent::clear_distuser() {
  if (GetArenaForAllocation() == nullptr && distuser_ != nullptr) {
    delete distuser_;
  }
  distuser_ = nullptr;
}
RSFriendAddAgreeEvent::RSFriendAddAgreeEvent(::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.relationship.event.RSFriendAddAgreeEvent)
}
RSFriendAddAgreeEvent::RSFriendAddAgreeEvent(const RSFriendAddAgreeEvent& 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_fromuser()) {
    fromuser_ = new ::heroim::client::v3beta::dto::user::model::UserSimple(*from.fromuser_);
  } else {
    fromuser_ = nullptr;
  }
  if (from._internal_has_distuser()) {
    distuser_ = new ::heroim::client::v3beta::dto::user::model::UserSimple(*from.distuser_);
  } else {
    distuser_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:heroim.client.v3beta.dto.relationship.event.RSFriendAddAgreeEvent)
}

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

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

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

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

void RSFriendAddAgreeEvent::Clear() {
// @@protoc_insertion_point(message_clear_start:heroim.client.v3beta.dto.relationship.event.RSFriendAddAgreeEvent)
  ::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 && fromuser_ != nullptr) {
    delete fromuser_;
  }
  fromuser_ = nullptr;
  if (GetArenaForAllocation() == nullptr && distuser_ != nullptr) {
    delete distuser_;
  }
  distuser_ = nullptr;
  _internal_metadata_.Clear<::herogoogle::protobuf::UnknownFieldSet>();
}

const char* RSFriendAddAgreeEvent::_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.relationship.event.RSFriendAddAgreeEvent.productId"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .heroim.client.v3beta.dto.user.model.UserSimple fromUser = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_fromuser(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .heroim.client.v3beta.dto.user.model.UserSimple distUser = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_distuser(), 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* RSFriendAddAgreeEvent::_InternalSerialize(
    ::herogoogle::protobuf::uint8* target, ::herogoogle::protobuf::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:heroim.client.v3beta.dto.relationship.event.RSFriendAddAgreeEvent)
  ::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.relationship.event.RSFriendAddAgreeEvent.productId");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_productid(), target);
  }

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

  // .heroim.client.v3beta.dto.user.model.UserSimple distUser = 3;
  if (this->_internal_has_distuser()) {
    target = stream->EnsureSpace(target);
    target = ::herogoogle::protobuf::internal::WireFormatLite::
      InternalWriteMessage(
        3, _Internal::distuser(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.relationship.event.RSFriendAddAgreeEvent)
  return target;
}

size_t RSFriendAddAgreeEvent::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:heroim.client.v3beta.dto.relationship.event.RSFriendAddAgreeEvent)
  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 fromUser = 2;
  if (this->_internal_has_fromuser()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::MessageSize(
        *fromuser_);
  }

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

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

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


void RSFriendAddAgreeEvent::MergeFrom(const RSFriendAddAgreeEvent& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:heroim.client.v3beta.dto.relationship.event.RSFriendAddAgreeEvent)
  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_fromuser()) {
    _internal_mutable_fromuser()->::heroim::client::v3beta::dto::user::model::UserSimple::MergeFrom(from._internal_fromuser());
  }
  if (from._internal_has_distuser()) {
    _internal_mutable_distuser()->::heroim::client::v3beta::dto::user::model::UserSimple::MergeFrom(from._internal_distuser());
  }
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void RSFriendAddAgreeEvent::InternalSwap(RSFriendAddAgreeEvent* 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::memswap<
      PROTOBUF_FIELD_OFFSET(RSFriendAddAgreeEvent, distuser_)
      + sizeof(RSFriendAddAgreeEvent::distuser_)
      - PROTOBUF_FIELD_OFFSET(RSFriendAddAgreeEvent, fromuser_)>(
          reinterpret_cast<char*>(&fromuser_),
          reinterpret_cast<char*>(&other->fromuser_));
}

::herogoogle::protobuf::Metadata RSFriendAddAgreeEvent::GetMetadata() const {
  return ::herogoogle::protobuf::internal::AssignDescriptors(
      &descriptor_table_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto_getter, &descriptor_table_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto_once,
      file_level_metadata_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto[1]);
}

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

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

const ::heroim::client::v3beta::dto::user::model::UserSimple&
RSFriendAddedEvent::_Internal::fromuser(const RSFriendAddedEvent* msg) {
  return *msg->fromuser_;
}
const ::heroim::client::v3beta::dto::user::model::UserSimple&
RSFriendAddedEvent::_Internal::distuser(const RSFriendAddedEvent* msg) {
  return *msg->distuser_;
}
void RSFriendAddedEvent::clear_fromuser() {
  if (GetArenaForAllocation() == nullptr && fromuser_ != nullptr) {
    delete fromuser_;
  }
  fromuser_ = nullptr;
}
void RSFriendAddedEvent::clear_distuser() {
  if (GetArenaForAllocation() == nullptr && distuser_ != nullptr) {
    delete distuser_;
  }
  distuser_ = nullptr;
}
RSFriendAddedEvent::RSFriendAddedEvent(::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.relationship.event.RSFriendAddedEvent)
}
RSFriendAddedEvent::RSFriendAddedEvent(const RSFriendAddedEvent& 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_fromuser()) {
    fromuser_ = new ::heroim::client::v3beta::dto::user::model::UserSimple(*from.fromuser_);
  } else {
    fromuser_ = nullptr;
  }
  if (from._internal_has_distuser()) {
    distuser_ = new ::heroim::client::v3beta::dto::user::model::UserSimple(*from.distuser_);
  } else {
    distuser_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:heroim.client.v3beta.dto.relationship.event.RSFriendAddedEvent)
}

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

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

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

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

void RSFriendAddedEvent::Clear() {
// @@protoc_insertion_point(message_clear_start:heroim.client.v3beta.dto.relationship.event.RSFriendAddedEvent)
  ::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 && fromuser_ != nullptr) {
    delete fromuser_;
  }
  fromuser_ = nullptr;
  if (GetArenaForAllocation() == nullptr && distuser_ != nullptr) {
    delete distuser_;
  }
  distuser_ = nullptr;
  _internal_metadata_.Clear<::herogoogle::protobuf::UnknownFieldSet>();
}

const char* RSFriendAddedEvent::_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.relationship.event.RSFriendAddedEvent.productId"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .heroim.client.v3beta.dto.user.model.UserSimple fromUser = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_fromuser(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .heroim.client.v3beta.dto.user.model.UserSimple distUser = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_distuser(), 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* RSFriendAddedEvent::_InternalSerialize(
    ::herogoogle::protobuf::uint8* target, ::herogoogle::protobuf::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:heroim.client.v3beta.dto.relationship.event.RSFriendAddedEvent)
  ::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.relationship.event.RSFriendAddedEvent.productId");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_productid(), target);
  }

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

  // .heroim.client.v3beta.dto.user.model.UserSimple distUser = 3;
  if (this->_internal_has_distuser()) {
    target = stream->EnsureSpace(target);
    target = ::herogoogle::protobuf::internal::WireFormatLite::
      InternalWriteMessage(
        3, _Internal::distuser(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.relationship.event.RSFriendAddedEvent)
  return target;
}

size_t RSFriendAddedEvent::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:heroim.client.v3beta.dto.relationship.event.RSFriendAddedEvent)
  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 fromUser = 2;
  if (this->_internal_has_fromuser()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::MessageSize(
        *fromuser_);
  }

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

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

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


void RSFriendAddedEvent::MergeFrom(const RSFriendAddedEvent& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:heroim.client.v3beta.dto.relationship.event.RSFriendAddedEvent)
  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_fromuser()) {
    _internal_mutable_fromuser()->::heroim::client::v3beta::dto::user::model::UserSimple::MergeFrom(from._internal_fromuser());
  }
  if (from._internal_has_distuser()) {
    _internal_mutable_distuser()->::heroim::client::v3beta::dto::user::model::UserSimple::MergeFrom(from._internal_distuser());
  }
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void RSFriendAddedEvent::InternalSwap(RSFriendAddedEvent* 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::memswap<
      PROTOBUF_FIELD_OFFSET(RSFriendAddedEvent, distuser_)
      + sizeof(RSFriendAddedEvent::distuser_)
      - PROTOBUF_FIELD_OFFSET(RSFriendAddedEvent, fromuser_)>(
          reinterpret_cast<char*>(&fromuser_),
          reinterpret_cast<char*>(&other->fromuser_));
}

::herogoogle::protobuf::Metadata RSFriendAddedEvent::GetMetadata() const {
  return ::herogoogle::protobuf::internal::AssignDescriptors(
      &descriptor_table_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto_getter, &descriptor_table_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto_once,
      file_level_metadata_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto[2]);
}

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

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

const ::heroim::client::v3beta::dto::user::model::UserSimple&
RSFriendDeletedEvent::_Internal::fromuser(const RSFriendDeletedEvent* msg) {
  return *msg->fromuser_;
}
const ::heroim::client::v3beta::dto::user::model::UserSimple&
RSFriendDeletedEvent::_Internal::distuser(const RSFriendDeletedEvent* msg) {
  return *msg->distuser_;
}
void RSFriendDeletedEvent::clear_fromuser() {
  if (GetArenaForAllocation() == nullptr && fromuser_ != nullptr) {
    delete fromuser_;
  }
  fromuser_ = nullptr;
}
void RSFriendDeletedEvent::clear_distuser() {
  if (GetArenaForAllocation() == nullptr && distuser_ != nullptr) {
    delete distuser_;
  }
  distuser_ = nullptr;
}
RSFriendDeletedEvent::RSFriendDeletedEvent(::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.relationship.event.RSFriendDeletedEvent)
}
RSFriendDeletedEvent::RSFriendDeletedEvent(const RSFriendDeletedEvent& 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_fromuser()) {
    fromuser_ = new ::heroim::client::v3beta::dto::user::model::UserSimple(*from.fromuser_);
  } else {
    fromuser_ = nullptr;
  }
  if (from._internal_has_distuser()) {
    distuser_ = new ::heroim::client::v3beta::dto::user::model::UserSimple(*from.distuser_);
  } else {
    distuser_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:heroim.client.v3beta.dto.relationship.event.RSFriendDeletedEvent)
}

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

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

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

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

void RSFriendDeletedEvent::Clear() {
// @@protoc_insertion_point(message_clear_start:heroim.client.v3beta.dto.relationship.event.RSFriendDeletedEvent)
  ::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 && fromuser_ != nullptr) {
    delete fromuser_;
  }
  fromuser_ = nullptr;
  if (GetArenaForAllocation() == nullptr && distuser_ != nullptr) {
    delete distuser_;
  }
  distuser_ = nullptr;
  _internal_metadata_.Clear<::herogoogle::protobuf::UnknownFieldSet>();
}

const char* RSFriendDeletedEvent::_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.relationship.event.RSFriendDeletedEvent.productId"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .heroim.client.v3beta.dto.user.model.UserSimple fromUser = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_fromuser(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .heroim.client.v3beta.dto.user.model.UserSimple distUser = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_distuser(), 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* RSFriendDeletedEvent::_InternalSerialize(
    ::herogoogle::protobuf::uint8* target, ::herogoogle::protobuf::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:heroim.client.v3beta.dto.relationship.event.RSFriendDeletedEvent)
  ::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.relationship.event.RSFriendDeletedEvent.productId");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_productid(), target);
  }

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

  // .heroim.client.v3beta.dto.user.model.UserSimple distUser = 3;
  if (this->_internal_has_distuser()) {
    target = stream->EnsureSpace(target);
    target = ::herogoogle::protobuf::internal::WireFormatLite::
      InternalWriteMessage(
        3, _Internal::distuser(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.relationship.event.RSFriendDeletedEvent)
  return target;
}

size_t RSFriendDeletedEvent::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:heroim.client.v3beta.dto.relationship.event.RSFriendDeletedEvent)
  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 fromUser = 2;
  if (this->_internal_has_fromuser()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::MessageSize(
        *fromuser_);
  }

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

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

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


void RSFriendDeletedEvent::MergeFrom(const RSFriendDeletedEvent& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:heroim.client.v3beta.dto.relationship.event.RSFriendDeletedEvent)
  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_fromuser()) {
    _internal_mutable_fromuser()->::heroim::client::v3beta::dto::user::model::UserSimple::MergeFrom(from._internal_fromuser());
  }
  if (from._internal_has_distuser()) {
    _internal_mutable_distuser()->::heroim::client::v3beta::dto::user::model::UserSimple::MergeFrom(from._internal_distuser());
  }
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void RSFriendDeletedEvent::InternalSwap(RSFriendDeletedEvent* 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::memswap<
      PROTOBUF_FIELD_OFFSET(RSFriendDeletedEvent, distuser_)
      + sizeof(RSFriendDeletedEvent::distuser_)
      - PROTOBUF_FIELD_OFFSET(RSFriendDeletedEvent, fromuser_)>(
          reinterpret_cast<char*>(&fromuser_),
          reinterpret_cast<char*>(&other->fromuser_));
}

::herogoogle::protobuf::Metadata RSFriendDeletedEvent::GetMetadata() const {
  return ::herogoogle::protobuf::internal::AssignDescriptors(
      &descriptor_table_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto_getter, &descriptor_table_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto_once,
      file_level_metadata_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto[3]);
}

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

class RSChangedEvent::_Internal {
 public:
};

RSChangedEvent::RSChangedEvent(::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.relationship.event.RSChangedEvent)
}
RSChangedEvent::RSChangedEvent(const RSChangedEvent& 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());
  }
  // @@protoc_insertion_point(copy_constructor:heroim.client.v3beta.dto.relationship.event.RSChangedEvent)
}

void RSChangedEvent::SharedCtor() {
productid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
uid_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
}

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

inline void RSChangedEvent::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  productid_.DestroyNoArena(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  uid_.DestroyNoArena(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
}

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

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

  productid_.ClearToEmpty();
  uid_.ClearToEmpty();
  _internal_metadata_.Clear<::herogoogle::protobuf::UnknownFieldSet>();
}

const char* RSChangedEvent::_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.relationship.event.RSChangedEvent.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.relationship.event.RSChangedEvent.uid"));
          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* RSChangedEvent::_InternalSerialize(
    ::herogoogle::protobuf::uint8* target, ::herogoogle::protobuf::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:heroim.client.v3beta.dto.relationship.event.RSChangedEvent)
  ::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.relationship.event.RSChangedEvent.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.relationship.event.RSChangedEvent.uid");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_uid(), 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.relationship.event.RSChangedEvent)
  return target;
}

size_t RSChangedEvent::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:heroim.client.v3beta.dto.relationship.event.RSChangedEvent)
  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());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

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


void RSChangedEvent::MergeFrom(const RSChangedEvent& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:heroim.client.v3beta.dto.relationship.event.RSChangedEvent)
  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());
  }
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void RSChangedEvent::InternalSwap(RSChangedEvent* 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::Metadata RSChangedEvent::GetMetadata() const {
  return ::herogoogle::protobuf::internal::AssignDescriptors(
      &descriptor_table_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto_getter, &descriptor_table_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto_once,
      file_level_metadata_client_2fv3beta_2fdto_2frelationship_2fevent_2frelationship_5fevent_2eproto[4]);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace event
}  // namespace relationship
}  // namespace dto
}  // namespace v3beta
}  // namespace client
}  // namespace heroim
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::heroim::client::v3beta::dto::relationship::event::RSFriendAddApplyEvent* Arena::CreateMaybeMessage< ::heroim::client::v3beta::dto::relationship::event::RSFriendAddApplyEvent >(Arena* arena) {
  return Arena::CreateMessageInternal< ::heroim::client::v3beta::dto::relationship::event::RSFriendAddApplyEvent >(arena);
}
template<> PROTOBUF_NOINLINE ::heroim::client::v3beta::dto::relationship::event::RSFriendAddAgreeEvent* Arena::CreateMaybeMessage< ::heroim::client::v3beta::dto::relationship::event::RSFriendAddAgreeEvent >(Arena* arena) {
  return Arena::CreateMessageInternal< ::heroim::client::v3beta::dto::relationship::event::RSFriendAddAgreeEvent >(arena);
}
template<> PROTOBUF_NOINLINE ::heroim::client::v3beta::dto::relationship::event::RSFriendAddedEvent* Arena::CreateMaybeMessage< ::heroim::client::v3beta::dto::relationship::event::RSFriendAddedEvent >(Arena* arena) {
  return Arena::CreateMessageInternal< ::heroim::client::v3beta::dto::relationship::event::RSFriendAddedEvent >(arena);
}
template<> PROTOBUF_NOINLINE ::heroim::client::v3beta::dto::relationship::event::RSFriendDeletedEvent* Arena::CreateMaybeMessage< ::heroim::client::v3beta::dto::relationship::event::RSFriendDeletedEvent >(Arena* arena) {
  return Arena::CreateMessageInternal< ::heroim::client::v3beta::dto::relationship::event::RSFriendDeletedEvent >(arena);
}
template<> PROTOBUF_NOINLINE ::heroim::client::v3beta::dto::relationship::event::RSChangedEvent* Arena::CreateMaybeMessage< ::heroim::client::v3beta::dto::relationship::event::RSChangedEvent >(Arena* arena) {
  return Arena::CreateMessageInternal< ::heroim::client::v3beta::dto::relationship::event::RSChangedEvent >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)

