// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: control/control.proto

#include "control/control.pb.h"

#include <algorithm>

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

PROTOBUF_PRAGMA_INIT_SEG

namespace _pb = ::PROTOBUF_NAMESPACE_ID;
namespace _pbi = _pb::internal;

namespace longbridge {
namespace control {
namespace v1 {
PROTOBUF_CONSTEXPR Close::Close(
    ::_pbi::ConstantInitialized)
  : reason_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
  , code_(0)
{}
struct CloseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR CloseDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~CloseDefaultTypeInternal() {}
  union {
    Close _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CloseDefaultTypeInternal _Close_default_instance_;
PROTOBUF_CONSTEXPR Heartbeat::Heartbeat(
    ::_pbi::ConstantInitialized)
  : timestamp_(int64_t{0})
  , heartbeat_id_(0){}
struct HeartbeatDefaultTypeInternal {
  PROTOBUF_CONSTEXPR HeartbeatDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~HeartbeatDefaultTypeInternal() {}
  union {
    Heartbeat _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HeartbeatDefaultTypeInternal _Heartbeat_default_instance_;
PROTOBUF_CONSTEXPR AuthRequest_MetadataEntry_DoNotUse::AuthRequest_MetadataEntry_DoNotUse(
    ::_pbi::ConstantInitialized){}
struct AuthRequest_MetadataEntry_DoNotUseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR AuthRequest_MetadataEntry_DoNotUseDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~AuthRequest_MetadataEntry_DoNotUseDefaultTypeInternal() {}
  union {
    AuthRequest_MetadataEntry_DoNotUse _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AuthRequest_MetadataEntry_DoNotUseDefaultTypeInternal _AuthRequest_MetadataEntry_DoNotUse_default_instance_;
PROTOBUF_CONSTEXPR AuthRequest::AuthRequest(
    ::_pbi::ConstantInitialized)
  : metadata_(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{})
  , token_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}){}
struct AuthRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR AuthRequestDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~AuthRequestDefaultTypeInternal() {}
  union {
    AuthRequest _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AuthRequestDefaultTypeInternal _AuthRequest_default_instance_;
PROTOBUF_CONSTEXPR AuthResponse::AuthResponse(
    ::_pbi::ConstantInitialized)
  : session_id_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
  , expires_(int64_t{0})
  , limit_(0u)
  , online_(0u){}
struct AuthResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR AuthResponseDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~AuthResponseDefaultTypeInternal() {}
  union {
    AuthResponse _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AuthResponseDefaultTypeInternal _AuthResponse_default_instance_;
PROTOBUF_CONSTEXPR ReconnectRequest_MetadataEntry_DoNotUse::ReconnectRequest_MetadataEntry_DoNotUse(
    ::_pbi::ConstantInitialized){}
struct ReconnectRequest_MetadataEntry_DoNotUseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ReconnectRequest_MetadataEntry_DoNotUseDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ReconnectRequest_MetadataEntry_DoNotUseDefaultTypeInternal() {}
  union {
    ReconnectRequest_MetadataEntry_DoNotUse _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ReconnectRequest_MetadataEntry_DoNotUseDefaultTypeInternal _ReconnectRequest_MetadataEntry_DoNotUse_default_instance_;
PROTOBUF_CONSTEXPR ReconnectRequest::ReconnectRequest(
    ::_pbi::ConstantInitialized)
  : metadata_(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{})
  , session_id_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}){}
struct ReconnectRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ReconnectRequestDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ReconnectRequestDefaultTypeInternal() {}
  union {
    ReconnectRequest _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ReconnectRequestDefaultTypeInternal _ReconnectRequest_default_instance_;
PROTOBUF_CONSTEXPR ReconnectResponse::ReconnectResponse(
    ::_pbi::ConstantInitialized)
  : session_id_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
  , expires_(int64_t{0})
  , limit_(0u)
  , online_(0u){}
struct ReconnectResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ReconnectResponseDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ReconnectResponseDefaultTypeInternal() {}
  union {
    ReconnectResponse _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ReconnectResponseDefaultTypeInternal _ReconnectResponse_default_instance_;
}  // namespace v1
}  // namespace control
}  // namespace longbridge
static ::_pb::Metadata file_level_metadata_control_2fcontrol_2eproto[8];
static const ::_pb::EnumDescriptor* file_level_enum_descriptors_control_2fcontrol_2eproto[2];
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_control_2fcontrol_2eproto = nullptr;

const uint32_t TableStruct_control_2fcontrol_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::Close, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::Close, code_),
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::Close, reason_),
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::Heartbeat, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::Heartbeat, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::Heartbeat, timestamp_),
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::Heartbeat, heartbeat_id_),
  ~0u,
  0,
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::AuthRequest_MetadataEntry_DoNotUse, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::AuthRequest_MetadataEntry_DoNotUse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::AuthRequest_MetadataEntry_DoNotUse, key_),
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::AuthRequest_MetadataEntry_DoNotUse, value_),
  0,
  1,
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::AuthRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::AuthRequest, token_),
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::AuthRequest, metadata_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::AuthResponse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::AuthResponse, session_id_),
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::AuthResponse, expires_),
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::AuthResponse, limit_),
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::AuthResponse, online_),
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::ReconnectRequest_MetadataEntry_DoNotUse, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::ReconnectRequest_MetadataEntry_DoNotUse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::ReconnectRequest_MetadataEntry_DoNotUse, key_),
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::ReconnectRequest_MetadataEntry_DoNotUse, value_),
  0,
  1,
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::ReconnectRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::ReconnectRequest, session_id_),
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::ReconnectRequest, metadata_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::ReconnectResponse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::ReconnectResponse, session_id_),
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::ReconnectResponse, expires_),
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::ReconnectResponse, limit_),
  PROTOBUF_FIELD_OFFSET(::longbridge::control::v1::ReconnectResponse, online_),
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, -1, sizeof(::longbridge::control::v1::Close)},
  { 8, 16, -1, sizeof(::longbridge::control::v1::Heartbeat)},
  { 18, 26, -1, sizeof(::longbridge::control::v1::AuthRequest_MetadataEntry_DoNotUse)},
  { 28, -1, -1, sizeof(::longbridge::control::v1::AuthRequest)},
  { 36, -1, -1, sizeof(::longbridge::control::v1::AuthResponse)},
  { 46, 54, -1, sizeof(::longbridge::control::v1::ReconnectRequest_MetadataEntry_DoNotUse)},
  { 56, -1, -1, sizeof(::longbridge::control::v1::ReconnectRequest)},
  { 64, -1, -1, sizeof(::longbridge::control::v1::ReconnectResponse)},
};

static const ::_pb::Message* const file_default_instances[] = {
  &::longbridge::control::v1::_Close_default_instance_._instance,
  &::longbridge::control::v1::_Heartbeat_default_instance_._instance,
  &::longbridge::control::v1::_AuthRequest_MetadataEntry_DoNotUse_default_instance_._instance,
  &::longbridge::control::v1::_AuthRequest_default_instance_._instance,
  &::longbridge::control::v1::_AuthResponse_default_instance_._instance,
  &::longbridge::control::v1::_ReconnectRequest_MetadataEntry_DoNotUse_default_instance_._instance,
  &::longbridge::control::v1::_ReconnectRequest_default_instance_._instance,
  &::longbridge::control::v1::_ReconnectResponse_default_instance_._instance,
};

const char descriptor_table_protodef_control_2fcontrol_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n\025control/control.proto\022\025longbridge.cont"
  "rol.v1\"\341\001\n\005Close\0225\n\004code\030\001 \001(\0162!.longbri"
  "dge.control.v1.Close.CodeR\004code\022\026\n\006reaso"
  "n\030\002 \001(\tR\006reason\"\210\001\n\004Code\022\024\n\020HeartbeatTim"
  "eout\020\000\022\017\n\013ServerError\020\001\022\022\n\016ServerShutdow"
  "n\020\002\022\017\n\013UnpackError\020\003\022\r\n\tAuthError\020\004\022\017\n\013S"
  "essExpired\020\005\022\024\n\020ConnectDuplicate\020\006\"b\n\tHe"
  "artbeat\022\034\n\ttimestamp\030\001 \001(\003R\ttimestamp\022&\n"
  "\014heartbeat_id\030\002 \001(\005H\000R\013heartbeatId\210\001\001B\017\n"
  "\r_heartbeat_id\"\256\001\n\013AuthRequest\022\024\n\005token\030"
  "\001 \001(\tR\005token\022L\n\010metadata\030\002 \003(\01320.longbri"
  "dge.control.v1.AuthRequest.MetadataEntry"
  "R\010metadata\032;\n\rMetadataEntry\022\020\n\003key\030\001 \001(\t"
  "R\003key\022\024\n\005value\030\002 \001(\tR\005value:\0028\001\"u\n\014AuthR"
  "esponse\022\035\n\nsession_id\030\001 \001(\tR\tsessionId\022\030"
  "\n\007expires\030\002 \001(\003R\007expires\022\024\n\005limit\030\003 \001(\rR"
  "\005limit\022\026\n\006online\030\004 \001(\rR\006online\"\301\001\n\020Recon"
  "nectRequest\022\035\n\nsession_id\030\001 \001(\tR\tsession"
  "Id\022Q\n\010metadata\030\002 \003(\01325.longbridge.contro"
  "l.v1.ReconnectRequest.MetadataEntryR\010met"
  "adata\032;\n\rMetadataEntry\022\020\n\003key\030\001 \001(\tR\003key"
  "\022\024\n\005value\030\002 \001(\tR\005value:\0028\001\"z\n\021ReconnectR"
  "esponse\022\035\n\nsession_id\030\001 \001(\tR\tsessionId\022\030"
  "\n\007expires\030\002 \001(\003R\007expires\022\024\n\005limit\030\003 \001(\rR"
  "\005limit\022\026\n\006online\030\004 \001(\rR\006online*L\n\007Comman"
  "d\022\r\n\tCMD_CLOSE\020\000\022\021\n\rCMD_HEARTBEAT\020\001\022\014\n\010C"
  "MD_AUTH\020\002\022\021\n\rCMD_RECONNECT\020\003B\341\001\n\031com.lon"
  "gbridge.control.v1B\014ControlProtoP\001Z@gith"
  "ub.com/longbridge/openapi-protobufs/gen/"
  "go/control;controlv1\242\002\003LCX\252\002\025Longbridge."
  "Control.V1\312\002\025Longbridge\\Control\\V1\342\002!Lon"
  "gbridge\\Control\\V1\\GPBMetadata\352\002\027Longbri"
  "dge::Control::V1b\006proto3"
  ;
static ::_pbi::once_flag descriptor_table_control_2fcontrol_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_control_2fcontrol_2eproto = {
    false, false, 1304, descriptor_table_protodef_control_2fcontrol_2eproto,
    "control/control.proto",
    &descriptor_table_control_2fcontrol_2eproto_once, nullptr, 0, 8,
    schemas, file_default_instances, TableStruct_control_2fcontrol_2eproto::offsets,
    file_level_metadata_control_2fcontrol_2eproto, file_level_enum_descriptors_control_2fcontrol_2eproto,
    file_level_service_descriptors_control_2fcontrol_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_control_2fcontrol_2eproto_getter() {
  return &descriptor_table_control_2fcontrol_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_control_2fcontrol_2eproto(&descriptor_table_control_2fcontrol_2eproto);
namespace longbridge {
namespace control {
namespace v1 {
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Close_Code_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_control_2fcontrol_2eproto);
  return file_level_enum_descriptors_control_2fcontrol_2eproto[0];
}
bool Close_Code_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
    case 6:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr Close_Code Close::HeartbeatTimeout;
constexpr Close_Code Close::ServerError;
constexpr Close_Code Close::ServerShutdown;
constexpr Close_Code Close::UnpackError;
constexpr Close_Code Close::AuthError;
constexpr Close_Code Close::SessExpired;
constexpr Close_Code Close::ConnectDuplicate;
constexpr Close_Code Close::Code_MIN;
constexpr Close_Code Close::Code_MAX;
constexpr int Close::Code_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Command_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_control_2fcontrol_2eproto);
  return file_level_enum_descriptors_control_2fcontrol_2eproto[1];
}
bool Command_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
      return true;
    default:
      return false;
  }
}


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

class Close::_Internal {
 public:
};

Close::Close(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  // @@protoc_insertion_point(arena_constructor:longbridge.control.v1.Close)
}
Close::Close(const Close& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  reason_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    reason_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_reason().empty()) {
    reason_.Set(from._internal_reason(), 
      GetArenaForAllocation());
  }
  code_ = from.code_;
  // @@protoc_insertion_point(copy_constructor:longbridge.control.v1.Close)
}

inline void Close::SharedCtor() {
reason_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  reason_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
code_ = 0;
}

Close::~Close() {
  // @@protoc_insertion_point(destructor:longbridge.control.v1.Close)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Close::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  reason_.Destroy();
}

void Close::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void Close::Clear() {
// @@protoc_insertion_point(message_clear_start:longbridge.control.v1.Close)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  reason_.ClearToEmpty();
  code_ = 0;
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* Close::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .longbridge.control.v1.Close.Code code = 1 [json_name = "code"];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          _internal_set_code(static_cast<::longbridge::control::v1::Close_Code>(val));
        } else
          goto handle_unusual;
        continue;
      // string reason = 2 [json_name = "reason"];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_reason();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, "longbridge.control.v1.Close.reason"));
        } 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<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* Close::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:longbridge.control.v1.Close)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .longbridge.control.v1.Close.Code code = 1 [json_name = "code"];
  if (this->_internal_code() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      1, this->_internal_code(), target);
  }

  // string reason = 2 [json_name = "reason"];
  if (!this->_internal_reason().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_reason().data(), static_cast<int>(this->_internal_reason().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "longbridge.control.v1.Close.reason");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_reason(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:longbridge.control.v1.Close)
  return target;
}

size_t Close::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:longbridge.control.v1.Close)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // string reason = 2 [json_name = "reason"];
  if (!this->_internal_reason().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_reason());
  }

  // .longbridge.control.v1.Close.Code code = 1 [json_name = "code"];
  if (this->_internal_code() != 0) {
    total_size += 1 +
      ::_pbi::WireFormatLite::EnumSize(this->_internal_code());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

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


void Close::MergeFrom(const Close& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:longbridge.control.v1.Close)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_reason().empty()) {
    _internal_set_reason(from._internal_reason());
  }
  if (from._internal_code() != 0) {
    _internal_set_code(from._internal_code());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void Close::CopyFrom(const Close& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:longbridge.control.v1.Close)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void Close::InternalSwap(Close* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &reason_, lhs_arena,
      &other->reason_, rhs_arena
  );
  swap(code_, other->code_);
}

::PROTOBUF_NAMESPACE_ID::Metadata Close::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_control_2fcontrol_2eproto_getter, &descriptor_table_control_2fcontrol_2eproto_once,
      file_level_metadata_control_2fcontrol_2eproto[0]);
}

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

class Heartbeat::_Internal {
 public:
  using HasBits = decltype(std::declval<Heartbeat>()._has_bits_);
  static void set_has_heartbeat_id(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

Heartbeat::Heartbeat(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  // @@protoc_insertion_point(arena_constructor:longbridge.control.v1.Heartbeat)
}
Heartbeat::Heartbeat(const Heartbeat& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&timestamp_, &from.timestamp_,
    static_cast<size_t>(reinterpret_cast<char*>(&heartbeat_id_) -
    reinterpret_cast<char*>(&timestamp_)) + sizeof(heartbeat_id_));
  // @@protoc_insertion_point(copy_constructor:longbridge.control.v1.Heartbeat)
}

inline void Heartbeat::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&timestamp_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&heartbeat_id_) -
    reinterpret_cast<char*>(&timestamp_)) + sizeof(heartbeat_id_));
}

Heartbeat::~Heartbeat() {
  // @@protoc_insertion_point(destructor:longbridge.control.v1.Heartbeat)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

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

void Heartbeat::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void Heartbeat::Clear() {
// @@protoc_insertion_point(message_clear_start:longbridge.control.v1.Heartbeat)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  timestamp_ = int64_t{0};
  heartbeat_id_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* Heartbeat::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // int64 timestamp = 1 [json_name = "timestamp"];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 heartbeat_id = 2 [json_name = "heartbeatId"];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_heartbeat_id(&has_bits);
          heartbeat_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&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<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* Heartbeat::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:longbridge.control.v1.Heartbeat)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // int64 timestamp = 1 [json_name = "timestamp"];
  if (this->_internal_timestamp() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_timestamp(), target);
  }

  // optional int32 heartbeat_id = 2 [json_name = "heartbeatId"];
  if (_internal_has_heartbeat_id()) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_heartbeat_id(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:longbridge.control.v1.Heartbeat)
  return target;
}

size_t Heartbeat::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:longbridge.control.v1.Heartbeat)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // int64 timestamp = 1 [json_name = "timestamp"];
  if (this->_internal_timestamp() != 0) {
    total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_timestamp());
  }

  // optional int32 heartbeat_id = 2 [json_name = "heartbeatId"];
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_heartbeat_id());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

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


void Heartbeat::MergeFrom(const Heartbeat& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:longbridge.control.v1.Heartbeat)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_timestamp() != 0) {
    _internal_set_timestamp(from._internal_timestamp());
  }
  if (from._internal_has_heartbeat_id()) {
    _internal_set_heartbeat_id(from._internal_heartbeat_id());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void Heartbeat::CopyFrom(const Heartbeat& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:longbridge.control.v1.Heartbeat)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void Heartbeat::InternalSwap(Heartbeat* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Heartbeat, heartbeat_id_)
      + sizeof(Heartbeat::heartbeat_id_)
      - PROTOBUF_FIELD_OFFSET(Heartbeat, timestamp_)>(
          reinterpret_cast<char*>(&timestamp_),
          reinterpret_cast<char*>(&other->timestamp_));
}

::PROTOBUF_NAMESPACE_ID::Metadata Heartbeat::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_control_2fcontrol_2eproto_getter, &descriptor_table_control_2fcontrol_2eproto_once,
      file_level_metadata_control_2fcontrol_2eproto[1]);
}

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

AuthRequest_MetadataEntry_DoNotUse::AuthRequest_MetadataEntry_DoNotUse() {}
AuthRequest_MetadataEntry_DoNotUse::AuthRequest_MetadataEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
    : SuperType(arena) {}
void AuthRequest_MetadataEntry_DoNotUse::MergeFrom(const AuthRequest_MetadataEntry_DoNotUse& other) {
  MergeFromInternal(other);
}
::PROTOBUF_NAMESPACE_ID::Metadata AuthRequest_MetadataEntry_DoNotUse::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_control_2fcontrol_2eproto_getter, &descriptor_table_control_2fcontrol_2eproto_once,
      file_level_metadata_control_2fcontrol_2eproto[2]);
}

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

class AuthRequest::_Internal {
 public:
};

AuthRequest::AuthRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  metadata_(arena) {
  SharedCtor();
  if (arena != nullptr && !is_message_owned) {
    arena->OwnCustomDestructor(this, &AuthRequest::ArenaDtor);
  }
  // @@protoc_insertion_point(arena_constructor:longbridge.control.v1.AuthRequest)
}
AuthRequest::AuthRequest(const AuthRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  metadata_.MergeFrom(from.metadata_);
  token_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    token_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_token().empty()) {
    token_.Set(from._internal_token(), 
      GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:longbridge.control.v1.AuthRequest)
}

inline void AuthRequest::SharedCtor() {
token_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  token_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

AuthRequest::~AuthRequest() {
  // @@protoc_insertion_point(destructor:longbridge.control.v1.AuthRequest)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    ArenaDtor(this);
    return;
  }
  SharedDtor();
}

inline void AuthRequest::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  metadata_.Destruct();
  token_.Destroy();
}

void AuthRequest::ArenaDtor(void* object) {
  AuthRequest* _this = reinterpret_cast< AuthRequest* >(object);
  _this->metadata_.Destruct();
}
void AuthRequest::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void AuthRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:longbridge.control.v1.AuthRequest)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  metadata_.Clear();
  token_.ClearToEmpty();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* AuthRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string token = 1 [json_name = "token"];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_token();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, "longbridge.control.v1.AuthRequest.token"));
        } else
          goto handle_unusual;
        continue;
      // map<string, string> metadata = 2 [json_name = "metadata"];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(&metadata_, ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(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<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* AuthRequest::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:longbridge.control.v1.AuthRequest)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string token = 1 [json_name = "token"];
  if (!this->_internal_token().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_token().data(), static_cast<int>(this->_internal_token().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "longbridge.control.v1.AuthRequest.token");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_token(), target);
  }

  // map<string, string> metadata = 2 [json_name = "metadata"];
  if (!this->_internal_metadata().empty()) {
    using MapType = ::_pb::Map<std::string, std::string>;
    using WireHelper = AuthRequest_MetadataEntry_DoNotUse::Funcs;
    const auto& map_field = this->_internal_metadata();
    auto check_utf8 = [](const MapType::value_type& entry) {
      (void)entry;
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        entry.first.data(), static_cast<int>(entry.first.length()),
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
        "longbridge.control.v1.AuthRequest.MetadataEntry.key");
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        entry.second.data(), static_cast<int>(entry.second.length()),
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
        "longbridge.control.v1.AuthRequest.MetadataEntry.value");
    };

    if (stream->IsSerializationDeterministic() && map_field.size() > 1) {
      for (const auto& entry : ::_pbi::MapSorterPtr<MapType>(map_field)) {
        target = WireHelper::InternalSerialize(2, entry.first, entry.second, target, stream);
        check_utf8(entry);
      }
    } else {
      for (const auto& entry : map_field) {
        target = WireHelper::InternalSerialize(2, entry.first, entry.second, target, stream);
        check_utf8(entry);
      }
    }
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:longbridge.control.v1.AuthRequest)
  return target;
}

size_t AuthRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:longbridge.control.v1.AuthRequest)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // map<string, string> metadata = 2 [json_name = "metadata"];
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_metadata_size());
  for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
      it = this->_internal_metadata().begin();
      it != this->_internal_metadata().end(); ++it) {
    total_size += AuthRequest_MetadataEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
  }

  // string token = 1 [json_name = "token"];
  if (!this->_internal_token().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_token());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

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


void AuthRequest::MergeFrom(const AuthRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:longbridge.control.v1.AuthRequest)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  metadata_.MergeFrom(from.metadata_);
  if (!from._internal_token().empty()) {
    _internal_set_token(from._internal_token());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void AuthRequest::CopyFrom(const AuthRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:longbridge.control.v1.AuthRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void AuthRequest::InternalSwap(AuthRequest* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  metadata_.InternalSwap(&other->metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &token_, lhs_arena,
      &other->token_, rhs_arena
  );
}

::PROTOBUF_NAMESPACE_ID::Metadata AuthRequest::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_control_2fcontrol_2eproto_getter, &descriptor_table_control_2fcontrol_2eproto_once,
      file_level_metadata_control_2fcontrol_2eproto[3]);
}

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

class AuthResponse::_Internal {
 public:
};

AuthResponse::AuthResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  // @@protoc_insertion_point(arena_constructor:longbridge.control.v1.AuthResponse)
}
AuthResponse::AuthResponse(const AuthResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  session_id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    session_id_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_session_id().empty()) {
    session_id_.Set(from._internal_session_id(), 
      GetArenaForAllocation());
  }
  ::memcpy(&expires_, &from.expires_,
    static_cast<size_t>(reinterpret_cast<char*>(&online_) -
    reinterpret_cast<char*>(&expires_)) + sizeof(online_));
  // @@protoc_insertion_point(copy_constructor:longbridge.control.v1.AuthResponse)
}

inline void AuthResponse::SharedCtor() {
session_id_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  session_id_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&expires_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&online_) -
    reinterpret_cast<char*>(&expires_)) + sizeof(online_));
}

AuthResponse::~AuthResponse() {
  // @@protoc_insertion_point(destructor:longbridge.control.v1.AuthResponse)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void AuthResponse::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  session_id_.Destroy();
}

void AuthResponse::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void AuthResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:longbridge.control.v1.AuthResponse)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  session_id_.ClearToEmpty();
  ::memset(&expires_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&online_) -
      reinterpret_cast<char*>(&expires_)) + sizeof(online_));
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* AuthResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string session_id = 1 [json_name = "sessionId"];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_session_id();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, "longbridge.control.v1.AuthResponse.session_id"));
        } else
          goto handle_unusual;
        continue;
      // int64 expires = 2 [json_name = "expires"];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          expires_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // uint32 limit = 3 [json_name = "limit"];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          limit_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // uint32 online = 4 [json_name = "online"];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          online_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&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<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* AuthResponse::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:longbridge.control.v1.AuthResponse)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string session_id = 1 [json_name = "sessionId"];
  if (!this->_internal_session_id().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_session_id().data(), static_cast<int>(this->_internal_session_id().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "longbridge.control.v1.AuthResponse.session_id");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_session_id(), target);
  }

  // int64 expires = 2 [json_name = "expires"];
  if (this->_internal_expires() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_expires(), target);
  }

  // uint32 limit = 3 [json_name = "limit"];
  if (this->_internal_limit() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_limit(), target);
  }

  // uint32 online = 4 [json_name = "online"];
  if (this->_internal_online() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_online(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:longbridge.control.v1.AuthResponse)
  return target;
}

size_t AuthResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:longbridge.control.v1.AuthResponse)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // string session_id = 1 [json_name = "sessionId"];
  if (!this->_internal_session_id().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_session_id());
  }

  // int64 expires = 2 [json_name = "expires"];
  if (this->_internal_expires() != 0) {
    total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_expires());
  }

  // uint32 limit = 3 [json_name = "limit"];
  if (this->_internal_limit() != 0) {
    total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_limit());
  }

  // uint32 online = 4 [json_name = "online"];
  if (this->_internal_online() != 0) {
    total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_online());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

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


void AuthResponse::MergeFrom(const AuthResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:longbridge.control.v1.AuthResponse)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_session_id().empty()) {
    _internal_set_session_id(from._internal_session_id());
  }
  if (from._internal_expires() != 0) {
    _internal_set_expires(from._internal_expires());
  }
  if (from._internal_limit() != 0) {
    _internal_set_limit(from._internal_limit());
  }
  if (from._internal_online() != 0) {
    _internal_set_online(from._internal_online());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void AuthResponse::CopyFrom(const AuthResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:longbridge.control.v1.AuthResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void AuthResponse::InternalSwap(AuthResponse* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &session_id_, lhs_arena,
      &other->session_id_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(AuthResponse, online_)
      + sizeof(AuthResponse::online_)
      - PROTOBUF_FIELD_OFFSET(AuthResponse, expires_)>(
          reinterpret_cast<char*>(&expires_),
          reinterpret_cast<char*>(&other->expires_));
}

::PROTOBUF_NAMESPACE_ID::Metadata AuthResponse::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_control_2fcontrol_2eproto_getter, &descriptor_table_control_2fcontrol_2eproto_once,
      file_level_metadata_control_2fcontrol_2eproto[4]);
}

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

ReconnectRequest_MetadataEntry_DoNotUse::ReconnectRequest_MetadataEntry_DoNotUse() {}
ReconnectRequest_MetadataEntry_DoNotUse::ReconnectRequest_MetadataEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
    : SuperType(arena) {}
void ReconnectRequest_MetadataEntry_DoNotUse::MergeFrom(const ReconnectRequest_MetadataEntry_DoNotUse& other) {
  MergeFromInternal(other);
}
::PROTOBUF_NAMESPACE_ID::Metadata ReconnectRequest_MetadataEntry_DoNotUse::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_control_2fcontrol_2eproto_getter, &descriptor_table_control_2fcontrol_2eproto_once,
      file_level_metadata_control_2fcontrol_2eproto[5]);
}

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

class ReconnectRequest::_Internal {
 public:
};

ReconnectRequest::ReconnectRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  metadata_(arena) {
  SharedCtor();
  if (arena != nullptr && !is_message_owned) {
    arena->OwnCustomDestructor(this, &ReconnectRequest::ArenaDtor);
  }
  // @@protoc_insertion_point(arena_constructor:longbridge.control.v1.ReconnectRequest)
}
ReconnectRequest::ReconnectRequest(const ReconnectRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  metadata_.MergeFrom(from.metadata_);
  session_id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    session_id_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_session_id().empty()) {
    session_id_.Set(from._internal_session_id(), 
      GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:longbridge.control.v1.ReconnectRequest)
}

inline void ReconnectRequest::SharedCtor() {
session_id_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  session_id_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

ReconnectRequest::~ReconnectRequest() {
  // @@protoc_insertion_point(destructor:longbridge.control.v1.ReconnectRequest)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    ArenaDtor(this);
    return;
  }
  SharedDtor();
}

inline void ReconnectRequest::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  metadata_.Destruct();
  session_id_.Destroy();
}

void ReconnectRequest::ArenaDtor(void* object) {
  ReconnectRequest* _this = reinterpret_cast< ReconnectRequest* >(object);
  _this->metadata_.Destruct();
}
void ReconnectRequest::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void ReconnectRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:longbridge.control.v1.ReconnectRequest)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  metadata_.Clear();
  session_id_.ClearToEmpty();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ReconnectRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string session_id = 1 [json_name = "sessionId"];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_session_id();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, "longbridge.control.v1.ReconnectRequest.session_id"));
        } else
          goto handle_unusual;
        continue;
      // map<string, string> metadata = 2 [json_name = "metadata"];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(&metadata_, ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(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<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* ReconnectRequest::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:longbridge.control.v1.ReconnectRequest)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string session_id = 1 [json_name = "sessionId"];
  if (!this->_internal_session_id().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_session_id().data(), static_cast<int>(this->_internal_session_id().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "longbridge.control.v1.ReconnectRequest.session_id");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_session_id(), target);
  }

  // map<string, string> metadata = 2 [json_name = "metadata"];
  if (!this->_internal_metadata().empty()) {
    using MapType = ::_pb::Map<std::string, std::string>;
    using WireHelper = ReconnectRequest_MetadataEntry_DoNotUse::Funcs;
    const auto& map_field = this->_internal_metadata();
    auto check_utf8 = [](const MapType::value_type& entry) {
      (void)entry;
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        entry.first.data(), static_cast<int>(entry.first.length()),
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
        "longbridge.control.v1.ReconnectRequest.MetadataEntry.key");
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        entry.second.data(), static_cast<int>(entry.second.length()),
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
        "longbridge.control.v1.ReconnectRequest.MetadataEntry.value");
    };

    if (stream->IsSerializationDeterministic() && map_field.size() > 1) {
      for (const auto& entry : ::_pbi::MapSorterPtr<MapType>(map_field)) {
        target = WireHelper::InternalSerialize(2, entry.first, entry.second, target, stream);
        check_utf8(entry);
      }
    } else {
      for (const auto& entry : map_field) {
        target = WireHelper::InternalSerialize(2, entry.first, entry.second, target, stream);
        check_utf8(entry);
      }
    }
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:longbridge.control.v1.ReconnectRequest)
  return target;
}

size_t ReconnectRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:longbridge.control.v1.ReconnectRequest)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // map<string, string> metadata = 2 [json_name = "metadata"];
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_metadata_size());
  for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
      it = this->_internal_metadata().begin();
      it != this->_internal_metadata().end(); ++it) {
    total_size += ReconnectRequest_MetadataEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
  }

  // string session_id = 1 [json_name = "sessionId"];
  if (!this->_internal_session_id().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_session_id());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

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


void ReconnectRequest::MergeFrom(const ReconnectRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:longbridge.control.v1.ReconnectRequest)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  metadata_.MergeFrom(from.metadata_);
  if (!from._internal_session_id().empty()) {
    _internal_set_session_id(from._internal_session_id());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void ReconnectRequest::CopyFrom(const ReconnectRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:longbridge.control.v1.ReconnectRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void ReconnectRequest::InternalSwap(ReconnectRequest* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  metadata_.InternalSwap(&other->metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &session_id_, lhs_arena,
      &other->session_id_, rhs_arena
  );
}

::PROTOBUF_NAMESPACE_ID::Metadata ReconnectRequest::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_control_2fcontrol_2eproto_getter, &descriptor_table_control_2fcontrol_2eproto_once,
      file_level_metadata_control_2fcontrol_2eproto[6]);
}

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

class ReconnectResponse::_Internal {
 public:
};

ReconnectResponse::ReconnectResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  // @@protoc_insertion_point(arena_constructor:longbridge.control.v1.ReconnectResponse)
}
ReconnectResponse::ReconnectResponse(const ReconnectResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  session_id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    session_id_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_session_id().empty()) {
    session_id_.Set(from._internal_session_id(), 
      GetArenaForAllocation());
  }
  ::memcpy(&expires_, &from.expires_,
    static_cast<size_t>(reinterpret_cast<char*>(&online_) -
    reinterpret_cast<char*>(&expires_)) + sizeof(online_));
  // @@protoc_insertion_point(copy_constructor:longbridge.control.v1.ReconnectResponse)
}

inline void ReconnectResponse::SharedCtor() {
session_id_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  session_id_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&expires_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&online_) -
    reinterpret_cast<char*>(&expires_)) + sizeof(online_));
}

ReconnectResponse::~ReconnectResponse() {
  // @@protoc_insertion_point(destructor:longbridge.control.v1.ReconnectResponse)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void ReconnectResponse::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  session_id_.Destroy();
}

void ReconnectResponse::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void ReconnectResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:longbridge.control.v1.ReconnectResponse)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  session_id_.ClearToEmpty();
  ::memset(&expires_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&online_) -
      reinterpret_cast<char*>(&expires_)) + sizeof(online_));
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ReconnectResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string session_id = 1 [json_name = "sessionId"];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_session_id();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, "longbridge.control.v1.ReconnectResponse.session_id"));
        } else
          goto handle_unusual;
        continue;
      // int64 expires = 2 [json_name = "expires"];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          expires_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // uint32 limit = 3 [json_name = "limit"];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          limit_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // uint32 online = 4 [json_name = "online"];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          online_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&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<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* ReconnectResponse::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:longbridge.control.v1.ReconnectResponse)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string session_id = 1 [json_name = "sessionId"];
  if (!this->_internal_session_id().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_session_id().data(), static_cast<int>(this->_internal_session_id().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "longbridge.control.v1.ReconnectResponse.session_id");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_session_id(), target);
  }

  // int64 expires = 2 [json_name = "expires"];
  if (this->_internal_expires() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_expires(), target);
  }

  // uint32 limit = 3 [json_name = "limit"];
  if (this->_internal_limit() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_limit(), target);
  }

  // uint32 online = 4 [json_name = "online"];
  if (this->_internal_online() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_online(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:longbridge.control.v1.ReconnectResponse)
  return target;
}

size_t ReconnectResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:longbridge.control.v1.ReconnectResponse)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // string session_id = 1 [json_name = "sessionId"];
  if (!this->_internal_session_id().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_session_id());
  }

  // int64 expires = 2 [json_name = "expires"];
  if (this->_internal_expires() != 0) {
    total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_expires());
  }

  // uint32 limit = 3 [json_name = "limit"];
  if (this->_internal_limit() != 0) {
    total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_limit());
  }

  // uint32 online = 4 [json_name = "online"];
  if (this->_internal_online() != 0) {
    total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_online());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

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


void ReconnectResponse::MergeFrom(const ReconnectResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:longbridge.control.v1.ReconnectResponse)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_session_id().empty()) {
    _internal_set_session_id(from._internal_session_id());
  }
  if (from._internal_expires() != 0) {
    _internal_set_expires(from._internal_expires());
  }
  if (from._internal_limit() != 0) {
    _internal_set_limit(from._internal_limit());
  }
  if (from._internal_online() != 0) {
    _internal_set_online(from._internal_online());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void ReconnectResponse::CopyFrom(const ReconnectResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:longbridge.control.v1.ReconnectResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void ReconnectResponse::InternalSwap(ReconnectResponse* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &session_id_, lhs_arena,
      &other->session_id_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(ReconnectResponse, online_)
      + sizeof(ReconnectResponse::online_)
      - PROTOBUF_FIELD_OFFSET(ReconnectResponse, expires_)>(
          reinterpret_cast<char*>(&expires_),
          reinterpret_cast<char*>(&other->expires_));
}

::PROTOBUF_NAMESPACE_ID::Metadata ReconnectResponse::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_control_2fcontrol_2eproto_getter, &descriptor_table_control_2fcontrol_2eproto_once,
      file_level_metadata_control_2fcontrol_2eproto[7]);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace v1
}  // namespace control
}  // namespace longbridge
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::longbridge::control::v1::Close*
Arena::CreateMaybeMessage< ::longbridge::control::v1::Close >(Arena* arena) {
  return Arena::CreateMessageInternal< ::longbridge::control::v1::Close >(arena);
}
template<> PROTOBUF_NOINLINE ::longbridge::control::v1::Heartbeat*
Arena::CreateMaybeMessage< ::longbridge::control::v1::Heartbeat >(Arena* arena) {
  return Arena::CreateMessageInternal< ::longbridge::control::v1::Heartbeat >(arena);
}
template<> PROTOBUF_NOINLINE ::longbridge::control::v1::AuthRequest_MetadataEntry_DoNotUse*
Arena::CreateMaybeMessage< ::longbridge::control::v1::AuthRequest_MetadataEntry_DoNotUse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::longbridge::control::v1::AuthRequest_MetadataEntry_DoNotUse >(arena);
}
template<> PROTOBUF_NOINLINE ::longbridge::control::v1::AuthRequest*
Arena::CreateMaybeMessage< ::longbridge::control::v1::AuthRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::longbridge::control::v1::AuthRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::longbridge::control::v1::AuthResponse*
Arena::CreateMaybeMessage< ::longbridge::control::v1::AuthResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::longbridge::control::v1::AuthResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::longbridge::control::v1::ReconnectRequest_MetadataEntry_DoNotUse*
Arena::CreateMaybeMessage< ::longbridge::control::v1::ReconnectRequest_MetadataEntry_DoNotUse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::longbridge::control::v1::ReconnectRequest_MetadataEntry_DoNotUse >(arena);
}
template<> PROTOBUF_NOINLINE ::longbridge::control::v1::ReconnectRequest*
Arena::CreateMaybeMessage< ::longbridge::control::v1::ReconnectRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::longbridge::control::v1::ReconnectRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::longbridge::control::v1::ReconnectResponse*
Arena::CreateMaybeMessage< ::longbridge::control::v1::ReconnectResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::longbridge::control::v1::ReconnectResponse >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
