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

#include "client/v3beta/dto/socket/packet.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 socket {
constexpr Proto::Proto(
  ::herogoogle::protobuf::internal::ConstantInitialized)
  : productid_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , body_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , ver_(0)
  , op_(0)
  , seq_(0){}
struct ProtoDefaultTypeInternal {
  constexpr ProtoDefaultTypeInternal()
    : _instance(::herogoogle::protobuf::internal::ConstantInitialized{}) {}
  ~ProtoDefaultTypeInternal() {}
  union {
    Proto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ProtoDefaultTypeInternal _Proto_default_instance_;
}  // namespace socket
}  // namespace dto
}  // namespace v3beta
}  // namespace client
}  // namespace heroim
static ::herogoogle::protobuf::Metadata file_level_metadata_client_2fv3beta_2fdto_2fsocket_2fpacket_2eproto[1];
static const ::herogoogle::protobuf::EnumDescriptor* file_level_enum_descriptors_client_2fv3beta_2fdto_2fsocket_2fpacket_2eproto[1];
static constexpr ::herogoogle::protobuf::ServiceDescriptor const** file_level_service_descriptors_client_2fv3beta_2fdto_2fsocket_2fpacket_2eproto = nullptr;

const ::herogoogle::protobuf::uint32 TableStruct_client_2fv3beta_2fdto_2fsocket_2fpacket_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::socket::Proto, _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::socket::Proto, ver_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::socket::Proto, op_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::socket::Proto, seq_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::socket::Proto, productid_),
  PROTOBUF_FIELD_OFFSET(::heroim::client::v3beta::dto::socket::Proto, body_),
};
static const ::herogoogle::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, -1, sizeof(::heroim::client::v3beta::dto::socket::Proto)},
};

static ::herogoogle::protobuf::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::herogoogle::protobuf::Message*>(&::heroim::client::v3beta::dto::socket::_Proto_default_instance_),
};

const char descriptor_table_protodef_client_2fv3beta_2fdto_2fsocket_2fpacket_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n%client/v3beta/dto/socket/packet.proto\022"
  "\037heroim.client.v3beta.dto.socket\"\332\003\n\005Pro"
  "to\022\013\n\003ver\030\001 \001(\005\022\n\n\002op\030\002 \001(\005\022\013\n\003seq\030\003 \001(\005"
  "\022\021\n\tproductId\030\004 \001(\t\022\014\n\004body\030\005 \001(\014\"\211\003\n\tOp"
  "eration\022\017\n\013OpHandshake\020\000\022\024\n\020OpHandshakeR"
  "eply\020\001\022\017\n\013OpHeartbeat\020\002\022\024\n\020OpHeartbeatRe"
  "ply\020\003\022\r\n\tOpSendMsg\020\004\022\022\n\016OpSendMsgReply\020\005"
  "\022\025\n\021OpDisconnectReply\020\006\022\n\n\006OpAuth\020\007\022\017\n\013O"
  "pAuthReply\020\010\022\t\n\005OpRaw\020\t\022\t\n\005OpSub\020\016\022\016\n\nOp"
  "SubReply\020\017\022\013\n\007OpUnsub\020\020\022\020\n\014OpUnsubReply\020"
  "\021\022\016\n\nOpJoinRoom\020\022\022\023\n\017OpJoinRoomReply\020\023\022\016"
  "\n\nOpQuitRoom\020\024\022\023\n\017OpQuitRoomReply\020\025\022\020\n\013O"
  "pSysNotify\020\350\007\022\021\n\014OpSysCommand\020\352\007\022\020\n\013OpMs"
  "gRemind\020\353\007\022\021\n\014OpMsgPackage\020\355\007BT\n#com.her"
  "o.csdk.api.v3beta.dto.socketP\001Z#heroim/a"
  "pi/client/v3beta/dto/socket\242\002\005IMSdkb\006pro"
  "to3"
  ;
static ::herogoogle::protobuf::internal::once_flag descriptor_table_client_2fv3beta_2fdto_2fsocket_2fpacket_2eproto_once;
const ::herogoogle::protobuf::internal::DescriptorTable descriptor_table_client_2fv3beta_2fdto_2fsocket_2fpacket_2eproto = {
  false, false, 643, descriptor_table_protodef_client_2fv3beta_2fdto_2fsocket_2fpacket_2eproto, "client/v3beta/dto/socket/packet.proto", 
  &descriptor_table_client_2fv3beta_2fdto_2fsocket_2fpacket_2eproto_once, nullptr, 0, 1,
  schemas, file_default_instances, TableStruct_client_2fv3beta_2fdto_2fsocket_2fpacket_2eproto::offsets,
  file_level_metadata_client_2fv3beta_2fdto_2fsocket_2fpacket_2eproto, file_level_enum_descriptors_client_2fv3beta_2fdto_2fsocket_2fpacket_2eproto, file_level_service_descriptors_client_2fv3beta_2fdto_2fsocket_2fpacket_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::herogoogle::protobuf::internal::DescriptorTable* descriptor_table_client_2fv3beta_2fdto_2fsocket_2fpacket_2eproto_getter() {
  return &descriptor_table_client_2fv3beta_2fdto_2fsocket_2fpacket_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::herogoogle::protobuf::internal::AddDescriptorsRunner dynamic_init_dummy_client_2fv3beta_2fdto_2fsocket_2fpacket_2eproto(&descriptor_table_client_2fv3beta_2fdto_2fsocket_2fpacket_2eproto);
namespace heroim {
namespace client {
namespace v3beta {
namespace dto {
namespace socket {
const ::herogoogle::protobuf::EnumDescriptor* Proto_Operation_descriptor() {
  ::herogoogle::protobuf::internal::AssignDescriptors(&descriptor_table_client_2fv3beta_2fdto_2fsocket_2fpacket_2eproto);
  return file_level_enum_descriptors_client_2fv3beta_2fdto_2fsocket_2fpacket_2eproto[0];
}
bool Proto_Operation_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
    case 6:
    case 7:
    case 8:
    case 9:
    case 14:
    case 15:
    case 16:
    case 17:
    case 18:
    case 19:
    case 20:
    case 21:
    case 1000:
    case 1002:
    case 1003:
    case 1005:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
constexpr Proto_Operation Proto::OpHandshake;
constexpr Proto_Operation Proto::OpHandshakeReply;
constexpr Proto_Operation Proto::OpHeartbeat;
constexpr Proto_Operation Proto::OpHeartbeatReply;
constexpr Proto_Operation Proto::OpSendMsg;
constexpr Proto_Operation Proto::OpSendMsgReply;
constexpr Proto_Operation Proto::OpDisconnectReply;
constexpr Proto_Operation Proto::OpAuth;
constexpr Proto_Operation Proto::OpAuthReply;
constexpr Proto_Operation Proto::OpRaw;
constexpr Proto_Operation Proto::OpSub;
constexpr Proto_Operation Proto::OpSubReply;
constexpr Proto_Operation Proto::OpUnsub;
constexpr Proto_Operation Proto::OpUnsubReply;
constexpr Proto_Operation Proto::OpJoinRoom;
constexpr Proto_Operation Proto::OpJoinRoomReply;
constexpr Proto_Operation Proto::OpQuitRoom;
constexpr Proto_Operation Proto::OpQuitRoomReply;
constexpr Proto_Operation Proto::OpSysNotify;
constexpr Proto_Operation Proto::OpSysCommand;
constexpr Proto_Operation Proto::OpMsgRemind;
constexpr Proto_Operation Proto::OpMsgPackage;
constexpr Proto_Operation Proto::Operation_MIN;
constexpr Proto_Operation Proto::Operation_MAX;
constexpr int Proto::Operation_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)

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

class Proto::_Internal {
 public:
};

Proto::Proto(::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.socket.Proto)
}
Proto::Proto(const Proto& 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());
  }
  body_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_body().empty()) {
    body_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_body(), 
      GetArenaForAllocation());
  }
  ::memcpy(&ver_, &from.ver_,
    static_cast<size_t>(reinterpret_cast<char*>(&seq_) -
    reinterpret_cast<char*>(&ver_)) + sizeof(seq_));
  // @@protoc_insertion_point(copy_constructor:heroim.client.v3beta.dto.socket.Proto)
}

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

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

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

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

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

  productid_.ClearToEmpty();
  body_.ClearToEmpty();
  ::memset(&ver_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&seq_) -
      reinterpret_cast<char*>(&ver_)) + sizeof(seq_));
  _internal_metadata_.Clear<::herogoogle::protobuf::UnknownFieldSet>();
}

const char* Proto::_InternalParse(const char* ptr, ::herogoogle::protobuf::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::herogoogle::protobuf::uint32 tag;
    ptr = ::herogoogle::protobuf::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // int32 ver = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 8)) {
          ver_ = ::herogoogle::protobuf::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // int32 op = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 16)) {
          op_ = ::herogoogle::protobuf::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // int32 seq = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 24)) {
          seq_ = ::herogoogle::protobuf::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string productId = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 34)) {
          auto str = _internal_mutable_productid();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, "heroim.client.v3beta.dto.socket.Proto.productId"));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // bytes body = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 42)) {
          auto str = _internal_mutable_body();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          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* Proto::_InternalSerialize(
    ::herogoogle::protobuf::uint8* target, ::herogoogle::protobuf::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:heroim.client.v3beta.dto.socket.Proto)
  ::herogoogle::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

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

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

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

  // string productId = 4;
  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.socket.Proto.productId");
    target = stream->WriteStringMaybeAliased(
        4, this->_internal_productid(), target);
  }

  // bytes body = 5;
  if (!this->_internal_body().empty()) {
    target = stream->WriteBytesMaybeAliased(
        5, this->_internal_body(), 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.socket.Proto)
  return target;
}

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

  // bytes body = 5;
  if (!this->_internal_body().empty()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::BytesSize(
        this->_internal_body());
  }

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

  // int32 op = 2;
  if (this->_internal_op() != 0) {
    total_size += ::herogoogle::protobuf::internal::WireFormatLite::Int32SizePlusOne(this->_internal_op());
  }

  // int32 seq = 3;
  if (this->_internal_seq() != 0) {
    total_size += ::herogoogle::protobuf::internal::WireFormatLite::Int32SizePlusOne(this->_internal_seq());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

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


void Proto::MergeFrom(const Proto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:heroim.client.v3beta.dto.socket.Proto)
  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_body().empty()) {
    _internal_set_body(from._internal_body());
  }
  if (from._internal_ver() != 0) {
    _internal_set_ver(from._internal_ver());
  }
  if (from._internal_op() != 0) {
    _internal_set_op(from._internal_op());
  }
  if (from._internal_seq() != 0) {
    _internal_set_seq(from._internal_seq());
  }
  _internal_metadata_.MergeFrom<::herogoogle::protobuf::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void Proto::InternalSwap(Proto* 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(),
      &body_, lhs_arena,
      &other->body_, rhs_arena
  );
  ::herogoogle::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Proto, seq_)
      + sizeof(Proto::seq_)
      - PROTOBUF_FIELD_OFFSET(Proto, ver_)>(
          reinterpret_cast<char*>(&ver_),
          reinterpret_cast<char*>(&other->ver_));
}

::herogoogle::protobuf::Metadata Proto::GetMetadata() const {
  return ::herogoogle::protobuf::internal::AssignDescriptors(
      &descriptor_table_client_2fv3beta_2fdto_2fsocket_2fpacket_2eproto_getter, &descriptor_table_client_2fv3beta_2fdto_2fsocket_2fpacket_2eproto_once,
      file_level_metadata_client_2fv3beta_2fdto_2fsocket_2fpacket_2eproto[0]);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace socket
}  // namespace dto
}  // namespace v3beta
}  // namespace client
}  // namespace heroim
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::heroim::client::v3beta::dto::socket::Proto* Arena::CreateMaybeMessage< ::heroim::client::v3beta::dto::socket::Proto >(Arena* arena) {
  return Arena::CreateMessageInternal< ::heroim::client::v3beta::dto::socket::Proto >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)

