Files
QTradeProgram/include/Proto/Trd_GetMarginRatio.pb.cc
2025-08-15 15:57:31 +08:00

2296 lines
80 KiB
C++

// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: Trd_GetMarginRatio.proto
#include "Trd_GetMarginRatio.pb.h"
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/port.h>
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.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>
// This is a temporary google only hack
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
#include "third_party/protobuf/version.h"
#endif
// @@protoc_insertion_point(includes)
namespace Trd_GetMarginRatio {
class MarginRatioInfoDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<MarginRatioInfo>
_instance;
} _MarginRatioInfo_default_instance_;
class C2SDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<C2S>
_instance;
} _C2S_default_instance_;
class S2CDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<S2C>
_instance;
} _S2C_default_instance_;
class RequestDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Request>
_instance;
} _Request_default_instance_;
class ResponseDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Response>
_instance;
} _Response_default_instance_;
} // namespace Trd_GetMarginRatio
namespace protobuf_Trd_5fGetMarginRatio_2eproto {
void InitDefaultsMarginRatioInfoImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
protobuf_Qot_5fCommon_2eproto::InitDefaultsSecurity();
{
void* ptr = &::Trd_GetMarginRatio::_MarginRatioInfo_default_instance_;
new (ptr) ::Trd_GetMarginRatio::MarginRatioInfo();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::Trd_GetMarginRatio::MarginRatioInfo::InitAsDefaultInstance();
}
void InitDefaultsMarginRatioInfo() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsMarginRatioInfoImpl);
}
void InitDefaultsC2SImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
protobuf_Trd_5fCommon_2eproto::InitDefaultsTrdHeader();
protobuf_Qot_5fCommon_2eproto::InitDefaultsSecurity();
{
void* ptr = &::Trd_GetMarginRatio::_C2S_default_instance_;
new (ptr) ::Trd_GetMarginRatio::C2S();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::Trd_GetMarginRatio::C2S::InitAsDefaultInstance();
}
void InitDefaultsC2S() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsC2SImpl);
}
void InitDefaultsS2CImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
protobuf_Trd_5fCommon_2eproto::InitDefaultsTrdHeader();
protobuf_Trd_5fGetMarginRatio_2eproto::InitDefaultsMarginRatioInfo();
{
void* ptr = &::Trd_GetMarginRatio::_S2C_default_instance_;
new (ptr) ::Trd_GetMarginRatio::S2C();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::Trd_GetMarginRatio::S2C::InitAsDefaultInstance();
}
void InitDefaultsS2C() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsS2CImpl);
}
void InitDefaultsRequestImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
protobuf_Trd_5fGetMarginRatio_2eproto::InitDefaultsC2S();
{
void* ptr = &::Trd_GetMarginRatio::_Request_default_instance_;
new (ptr) ::Trd_GetMarginRatio::Request();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::Trd_GetMarginRatio::Request::InitAsDefaultInstance();
}
void InitDefaultsRequest() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsRequestImpl);
}
void InitDefaultsResponseImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
protobuf_Trd_5fGetMarginRatio_2eproto::InitDefaultsS2C();
{
void* ptr = &::Trd_GetMarginRatio::_Response_default_instance_;
new (ptr) ::Trd_GetMarginRatio::Response();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::Trd_GetMarginRatio::Response::InitAsDefaultInstance();
}
void InitDefaultsResponse() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsResponseImpl);
}
::google::protobuf::Metadata file_level_metadata[5];
const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::MarginRatioInfo, _has_bits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::MarginRatioInfo, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::MarginRatioInfo, security_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::MarginRatioInfo, islongpermit_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::MarginRatioInfo, isshortpermit_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::MarginRatioInfo, shortpoolremain_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::MarginRatioInfo, shortfeerate_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::MarginRatioInfo, alertlongratio_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::MarginRatioInfo, alertshortratio_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::MarginRatioInfo, imlongratio_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::MarginRatioInfo, imshortratio_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::MarginRatioInfo, mcmlongratio_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::MarginRatioInfo, mcmshortratio_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::MarginRatioInfo, mmlongratio_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::MarginRatioInfo, mmshortratio_),
0,
11,
12,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::C2S, _has_bits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::C2S, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::C2S, header_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::C2S, securitylist_),
0,
~0u,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::S2C, _has_bits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::S2C, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::S2C, header_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::S2C, marginratioinfolist_),
0,
~0u,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::Request, _has_bits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::Request, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::Request, c2s_),
0,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::Response, _has_bits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::Response, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::Response, rettype_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::Response, retmsg_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::Response, errcode_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_GetMarginRatio::Response, s2c_),
3,
0,
2,
1,
};
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
{ 0, 18, sizeof(::Trd_GetMarginRatio::MarginRatioInfo)},
{ 31, 38, sizeof(::Trd_GetMarginRatio::C2S)},
{ 40, 47, sizeof(::Trd_GetMarginRatio::S2C)},
{ 49, 55, sizeof(::Trd_GetMarginRatio::Request)},
{ 56, 65, sizeof(::Trd_GetMarginRatio::Response)},
};
static ::google::protobuf::Message const * const file_default_instances[] = {
reinterpret_cast<const ::google::protobuf::Message*>(&::Trd_GetMarginRatio::_MarginRatioInfo_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::Trd_GetMarginRatio::_C2S_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::Trd_GetMarginRatio::_S2C_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::Trd_GetMarginRatio::_Request_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::Trd_GetMarginRatio::_Response_default_instance_),
};
void protobuf_AssignDescriptors() {
AddDescriptors();
::google::protobuf::MessageFactory* factory = NULL;
AssignDescriptors(
"Trd_GetMarginRatio.proto", schemas, file_default_instances, TableStruct::offsets, factory,
file_level_metadata, NULL, NULL);
}
void protobuf_AssignDescriptorsOnce() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
}
void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
void protobuf_RegisterTypes(const ::std::string&) {
protobuf_AssignDescriptorsOnce();
::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 5);
}
void AddDescriptorsImpl() {
InitDefaults();
static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
"\n\030Trd_GetMarginRatio.proto\022\022Trd_GetMargi"
"nRatio\032\020Trd_Common.proto\032\020Qot_Common.pro"
"to\"\311\002\n\017MarginRatioInfo\022&\n\010security\030\001 \002(\013"
"2\024.Qot_Common.Security\022\024\n\014isLongPermit\030\002"
" \001(\010\022\025\n\risShortPermit\030\003 \001(\010\022\027\n\017shortPool"
"Remain\030\004 \001(\001\022\024\n\014shortFeeRate\030\005 \001(\001\022\026\n\016al"
"ertLongRatio\030\006 \001(\001\022\027\n\017alertShortRatio\030\007 "
"\001(\001\022\023\n\013imLongRatio\030\010 \001(\001\022\024\n\014imShortRatio"
"\030\t \001(\001\022\024\n\014mcmLongRatio\030\n \001(\001\022\025\n\rmcmShort"
"Ratio\030\013 \001(\001\022\023\n\013mmLongRatio\030\014 \001(\001\022\024\n\014mmSh"
"ortRatio\030\r \001(\001\"X\n\003C2S\022%\n\006header\030\001 \002(\0132\025."
"Trd_Common.TrdHeader\022*\n\014securityList\030\002 \003"
"(\0132\024.Qot_Common.Security\"n\n\003S2C\022%\n\006heade"
"r\030\001 \002(\0132\025.Trd_Common.TrdHeader\022@\n\023margin"
"RatioInfoList\030\002 \003(\0132#.Trd_GetMarginRatio"
".MarginRatioInfo\"/\n\007Request\022$\n\003c2s\030\001 \002(\013"
"2\027.Trd_GetMarginRatio.C2S\"h\n\010Response\022\025\n"
"\007retType\030\001 \002(\005:\004-400\022\016\n\006retMsg\030\002 \001(\t\022\017\n\007"
"errCode\030\003 \001(\005\022$\n\003s2c\030\004 \001(\0132\027.Trd_GetMarg"
"inRatio.S2CBH\n\023com.futu.openapi.pbZ1gith"
"ub.com/futuopen/ftapi4go/pb/trdgetmargin"
"ratio"
};
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
descriptor, 845);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"Trd_GetMarginRatio.proto", &protobuf_RegisterTypes);
::protobuf_Trd_5fCommon_2eproto::AddDescriptors();
::protobuf_Qot_5fCommon_2eproto::AddDescriptors();
}
void AddDescriptors() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
}
// Force AddDescriptors() to be called at dynamic initialization time.
struct StaticDescriptorInitializer {
StaticDescriptorInitializer() {
AddDescriptors();
}
} static_descriptor_initializer;
} // namespace protobuf_Trd_5fGetMarginRatio_2eproto
namespace Trd_GetMarginRatio {
// ===================================================================
void MarginRatioInfo::InitAsDefaultInstance() {
::Trd_GetMarginRatio::_MarginRatioInfo_default_instance_._instance.get_mutable()->security_ = const_cast< ::Qot_Common::Security*>(
::Qot_Common::Security::internal_default_instance());
}
void MarginRatioInfo::clear_security() {
if (security_ != NULL) security_->Clear();
clear_has_security();
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int MarginRatioInfo::kSecurityFieldNumber;
const int MarginRatioInfo::kIsLongPermitFieldNumber;
const int MarginRatioInfo::kIsShortPermitFieldNumber;
const int MarginRatioInfo::kShortPoolRemainFieldNumber;
const int MarginRatioInfo::kShortFeeRateFieldNumber;
const int MarginRatioInfo::kAlertLongRatioFieldNumber;
const int MarginRatioInfo::kAlertShortRatioFieldNumber;
const int MarginRatioInfo::kImLongRatioFieldNumber;
const int MarginRatioInfo::kImShortRatioFieldNumber;
const int MarginRatioInfo::kMcmLongRatioFieldNumber;
const int MarginRatioInfo::kMcmShortRatioFieldNumber;
const int MarginRatioInfo::kMmLongRatioFieldNumber;
const int MarginRatioInfo::kMmShortRatioFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
MarginRatioInfo::MarginRatioInfo()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_Trd_5fGetMarginRatio_2eproto::InitDefaultsMarginRatioInfo();
}
SharedCtor();
// @@protoc_insertion_point(constructor:Trd_GetMarginRatio.MarginRatioInfo)
}
MarginRatioInfo::MarginRatioInfo(const MarginRatioInfo& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
if (from.has_security()) {
security_ = new ::Qot_Common::Security(*from.security_);
} else {
security_ = NULL;
}
::memcpy(&shortpoolremain_, &from.shortpoolremain_,
static_cast<size_t>(reinterpret_cast<char*>(&isshortpermit_) -
reinterpret_cast<char*>(&shortpoolremain_)) + sizeof(isshortpermit_));
// @@protoc_insertion_point(copy_constructor:Trd_GetMarginRatio.MarginRatioInfo)
}
void MarginRatioInfo::SharedCtor() {
_cached_size_ = 0;
::memset(&security_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&isshortpermit_) -
reinterpret_cast<char*>(&security_)) + sizeof(isshortpermit_));
}
MarginRatioInfo::~MarginRatioInfo() {
// @@protoc_insertion_point(destructor:Trd_GetMarginRatio.MarginRatioInfo)
SharedDtor();
}
void MarginRatioInfo::SharedDtor() {
if (this != internal_default_instance()) delete security_;
}
void MarginRatioInfo::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* MarginRatioInfo::descriptor() {
::protobuf_Trd_5fGetMarginRatio_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_Trd_5fGetMarginRatio_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const MarginRatioInfo& MarginRatioInfo::default_instance() {
::protobuf_Trd_5fGetMarginRatio_2eproto::InitDefaultsMarginRatioInfo();
return *internal_default_instance();
}
MarginRatioInfo* MarginRatioInfo::New(::google::protobuf::Arena* arena) const {
MarginRatioInfo* n = new MarginRatioInfo;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void MarginRatioInfo::Clear() {
// @@protoc_insertion_point(message_clear_start:Trd_GetMarginRatio.MarginRatioInfo)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(security_ != NULL);
security_->Clear();
}
if (cached_has_bits & 254u) {
::memset(&shortpoolremain_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&mcmlongratio_) -
reinterpret_cast<char*>(&shortpoolremain_)) + sizeof(mcmlongratio_));
}
if (cached_has_bits & 7936u) {
::memset(&mcmshortratio_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&isshortpermit_) -
reinterpret_cast<char*>(&mcmshortratio_)) + sizeof(isshortpermit_));
}
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool MarginRatioInfo::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:Trd_GetMarginRatio.MarginRatioInfo)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required .Qot_Common.Security security = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, mutable_security()));
} else {
goto handle_unusual;
}
break;
}
// optional bool isLongPermit = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
set_has_islongpermit();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &islongpermit_)));
} else {
goto handle_unusual;
}
break;
}
// optional bool isShortPermit = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
set_has_isshortpermit();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &isshortpermit_)));
} else {
goto handle_unusual;
}
break;
}
// optional double shortPoolRemain = 4;
case 4: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(33u /* 33 & 0xFF */)) {
set_has_shortpoolremain();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &shortpoolremain_)));
} else {
goto handle_unusual;
}
break;
}
// optional double shortFeeRate = 5;
case 5: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(41u /* 41 & 0xFF */)) {
set_has_shortfeerate();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &shortfeerate_)));
} else {
goto handle_unusual;
}
break;
}
// optional double alertLongRatio = 6;
case 6: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(49u /* 49 & 0xFF */)) {
set_has_alertlongratio();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &alertlongratio_)));
} else {
goto handle_unusual;
}
break;
}
// optional double alertShortRatio = 7;
case 7: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(57u /* 57 & 0xFF */)) {
set_has_alertshortratio();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &alertshortratio_)));
} else {
goto handle_unusual;
}
break;
}
// optional double imLongRatio = 8;
case 8: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(65u /* 65 & 0xFF */)) {
set_has_imlongratio();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &imlongratio_)));
} else {
goto handle_unusual;
}
break;
}
// optional double imShortRatio = 9;
case 9: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(73u /* 73 & 0xFF */)) {
set_has_imshortratio();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &imshortratio_)));
} else {
goto handle_unusual;
}
break;
}
// optional double mcmLongRatio = 10;
case 10: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(81u /* 81 & 0xFF */)) {
set_has_mcmlongratio();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &mcmlongratio_)));
} else {
goto handle_unusual;
}
break;
}
// optional double mcmShortRatio = 11;
case 11: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(89u /* 89 & 0xFF */)) {
set_has_mcmshortratio();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &mcmshortratio_)));
} else {
goto handle_unusual;
}
break;
}
// optional double mmLongRatio = 12;
case 12: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(97u /* 97 & 0xFF */)) {
set_has_mmlongratio();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &mmlongratio_)));
} else {
goto handle_unusual;
}
break;
}
// optional double mmShortRatio = 13;
case 13: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(105u /* 105 & 0xFF */)) {
set_has_mmshortratio();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &mmshortratio_)));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:Trd_GetMarginRatio.MarginRatioInfo)
return true;
failure:
// @@protoc_insertion_point(parse_failure:Trd_GetMarginRatio.MarginRatioInfo)
return false;
#undef DO_
}
void MarginRatioInfo::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:Trd_GetMarginRatio.MarginRatioInfo)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// required .Qot_Common.Security security = 1;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, *this->security_, output);
}
// optional bool isLongPermit = 2;
if (cached_has_bits & 0x00000800u) {
::google::protobuf::internal::WireFormatLite::WriteBool(2, this->islongpermit(), output);
}
// optional bool isShortPermit = 3;
if (cached_has_bits & 0x00001000u) {
::google::protobuf::internal::WireFormatLite::WriteBool(3, this->isshortpermit(), output);
}
// optional double shortPoolRemain = 4;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormatLite::WriteDouble(4, this->shortpoolremain(), output);
}
// optional double shortFeeRate = 5;
if (cached_has_bits & 0x00000004u) {
::google::protobuf::internal::WireFormatLite::WriteDouble(5, this->shortfeerate(), output);
}
// optional double alertLongRatio = 6;
if (cached_has_bits & 0x00000008u) {
::google::protobuf::internal::WireFormatLite::WriteDouble(6, this->alertlongratio(), output);
}
// optional double alertShortRatio = 7;
if (cached_has_bits & 0x00000010u) {
::google::protobuf::internal::WireFormatLite::WriteDouble(7, this->alertshortratio(), output);
}
// optional double imLongRatio = 8;
if (cached_has_bits & 0x00000020u) {
::google::protobuf::internal::WireFormatLite::WriteDouble(8, this->imlongratio(), output);
}
// optional double imShortRatio = 9;
if (cached_has_bits & 0x00000040u) {
::google::protobuf::internal::WireFormatLite::WriteDouble(9, this->imshortratio(), output);
}
// optional double mcmLongRatio = 10;
if (cached_has_bits & 0x00000080u) {
::google::protobuf::internal::WireFormatLite::WriteDouble(10, this->mcmlongratio(), output);
}
// optional double mcmShortRatio = 11;
if (cached_has_bits & 0x00000100u) {
::google::protobuf::internal::WireFormatLite::WriteDouble(11, this->mcmshortratio(), output);
}
// optional double mmLongRatio = 12;
if (cached_has_bits & 0x00000200u) {
::google::protobuf::internal::WireFormatLite::WriteDouble(12, this->mmlongratio(), output);
}
// optional double mmShortRatio = 13;
if (cached_has_bits & 0x00000400u) {
::google::protobuf::internal::WireFormatLite::WriteDouble(13, this->mmshortratio(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:Trd_GetMarginRatio.MarginRatioInfo)
}
::google::protobuf::uint8* MarginRatioInfo::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:Trd_GetMarginRatio.MarginRatioInfo)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// required .Qot_Common.Security security = 1;
if (cached_has_bits & 0x00000001u) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
1, *this->security_, deterministic, target);
}
// optional bool isLongPermit = 2;
if (cached_has_bits & 0x00000800u) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->islongpermit(), target);
}
// optional bool isShortPermit = 3;
if (cached_has_bits & 0x00001000u) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->isshortpermit(), target);
}
// optional double shortPoolRemain = 4;
if (cached_has_bits & 0x00000002u) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(4, this->shortpoolremain(), target);
}
// optional double shortFeeRate = 5;
if (cached_has_bits & 0x00000004u) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(5, this->shortfeerate(), target);
}
// optional double alertLongRatio = 6;
if (cached_has_bits & 0x00000008u) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(6, this->alertlongratio(), target);
}
// optional double alertShortRatio = 7;
if (cached_has_bits & 0x00000010u) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(7, this->alertshortratio(), target);
}
// optional double imLongRatio = 8;
if (cached_has_bits & 0x00000020u) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(8, this->imlongratio(), target);
}
// optional double imShortRatio = 9;
if (cached_has_bits & 0x00000040u) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(9, this->imshortratio(), target);
}
// optional double mcmLongRatio = 10;
if (cached_has_bits & 0x00000080u) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(10, this->mcmlongratio(), target);
}
// optional double mcmShortRatio = 11;
if (cached_has_bits & 0x00000100u) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(11, this->mcmshortratio(), target);
}
// optional double mmLongRatio = 12;
if (cached_has_bits & 0x00000200u) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(12, this->mmlongratio(), target);
}
// optional double mmShortRatio = 13;
if (cached_has_bits & 0x00000400u) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(13, this->mmshortratio(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:Trd_GetMarginRatio.MarginRatioInfo)
return target;
}
size_t MarginRatioInfo::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:Trd_GetMarginRatio.MarginRatioInfo)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
// required .Qot_Common.Security security = 1;
if (has_security()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(
*this->security_);
}
if (_has_bits_[0 / 32] & 254u) {
// optional double shortPoolRemain = 4;
if (has_shortpoolremain()) {
total_size += 1 + 8;
}
// optional double shortFeeRate = 5;
if (has_shortfeerate()) {
total_size += 1 + 8;
}
// optional double alertLongRatio = 6;
if (has_alertlongratio()) {
total_size += 1 + 8;
}
// optional double alertShortRatio = 7;
if (has_alertshortratio()) {
total_size += 1 + 8;
}
// optional double imLongRatio = 8;
if (has_imlongratio()) {
total_size += 1 + 8;
}
// optional double imShortRatio = 9;
if (has_imshortratio()) {
total_size += 1 + 8;
}
// optional double mcmLongRatio = 10;
if (has_mcmlongratio()) {
total_size += 1 + 8;
}
}
if (_has_bits_[8 / 32] & 7936u) {
// optional double mcmShortRatio = 11;
if (has_mcmshortratio()) {
total_size += 1 + 8;
}
// optional double mmLongRatio = 12;
if (has_mmlongratio()) {
total_size += 1 + 8;
}
// optional double mmShortRatio = 13;
if (has_mmshortratio()) {
total_size += 1 + 8;
}
// optional bool isLongPermit = 2;
if (has_islongpermit()) {
total_size += 1 + 1;
}
// optional bool isShortPermit = 3;
if (has_isshortpermit()) {
total_size += 1 + 1;
}
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void MarginRatioInfo::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:Trd_GetMarginRatio.MarginRatioInfo)
GOOGLE_DCHECK_NE(&from, this);
const MarginRatioInfo* source =
::google::protobuf::internal::DynamicCastToGenerated<const MarginRatioInfo>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:Trd_GetMarginRatio.MarginRatioInfo)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:Trd_GetMarginRatio.MarginRatioInfo)
MergeFrom(*source);
}
}
void MarginRatioInfo::MergeFrom(const MarginRatioInfo& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:Trd_GetMarginRatio.MarginRatioInfo)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 255u) {
if (cached_has_bits & 0x00000001u) {
mutable_security()->::Qot_Common::Security::MergeFrom(from.security());
}
if (cached_has_bits & 0x00000002u) {
shortpoolremain_ = from.shortpoolremain_;
}
if (cached_has_bits & 0x00000004u) {
shortfeerate_ = from.shortfeerate_;
}
if (cached_has_bits & 0x00000008u) {
alertlongratio_ = from.alertlongratio_;
}
if (cached_has_bits & 0x00000010u) {
alertshortratio_ = from.alertshortratio_;
}
if (cached_has_bits & 0x00000020u) {
imlongratio_ = from.imlongratio_;
}
if (cached_has_bits & 0x00000040u) {
imshortratio_ = from.imshortratio_;
}
if (cached_has_bits & 0x00000080u) {
mcmlongratio_ = from.mcmlongratio_;
}
_has_bits_[0] |= cached_has_bits;
}
if (cached_has_bits & 7936u) {
if (cached_has_bits & 0x00000100u) {
mcmshortratio_ = from.mcmshortratio_;
}
if (cached_has_bits & 0x00000200u) {
mmlongratio_ = from.mmlongratio_;
}
if (cached_has_bits & 0x00000400u) {
mmshortratio_ = from.mmshortratio_;
}
if (cached_has_bits & 0x00000800u) {
islongpermit_ = from.islongpermit_;
}
if (cached_has_bits & 0x00001000u) {
isshortpermit_ = from.isshortpermit_;
}
_has_bits_[0] |= cached_has_bits;
}
}
void MarginRatioInfo::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:Trd_GetMarginRatio.MarginRatioInfo)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void MarginRatioInfo::CopyFrom(const MarginRatioInfo& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:Trd_GetMarginRatio.MarginRatioInfo)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool MarginRatioInfo::IsInitialized() const {
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
if (has_security()) {
if (!this->security_->IsInitialized()) return false;
}
return true;
}
void MarginRatioInfo::Swap(MarginRatioInfo* other) {
if (other == this) return;
InternalSwap(other);
}
void MarginRatioInfo::InternalSwap(MarginRatioInfo* other) {
using std::swap;
swap(security_, other->security_);
swap(shortpoolremain_, other->shortpoolremain_);
swap(shortfeerate_, other->shortfeerate_);
swap(alertlongratio_, other->alertlongratio_);
swap(alertshortratio_, other->alertshortratio_);
swap(imlongratio_, other->imlongratio_);
swap(imshortratio_, other->imshortratio_);
swap(mcmlongratio_, other->mcmlongratio_);
swap(mcmshortratio_, other->mcmshortratio_);
swap(mmlongratio_, other->mmlongratio_);
swap(mmshortratio_, other->mmshortratio_);
swap(islongpermit_, other->islongpermit_);
swap(isshortpermit_, other->isshortpermit_);
swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata MarginRatioInfo::GetMetadata() const {
protobuf_Trd_5fGetMarginRatio_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_Trd_5fGetMarginRatio_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void C2S::InitAsDefaultInstance() {
::Trd_GetMarginRatio::_C2S_default_instance_._instance.get_mutable()->header_ = const_cast< ::Trd_Common::TrdHeader*>(
::Trd_Common::TrdHeader::internal_default_instance());
}
void C2S::clear_header() {
if (header_ != NULL) header_->Clear();
clear_has_header();
}
void C2S::clear_securitylist() {
securitylist_.Clear();
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int C2S::kHeaderFieldNumber;
const int C2S::kSecurityListFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
C2S::C2S()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_Trd_5fGetMarginRatio_2eproto::InitDefaultsC2S();
}
SharedCtor();
// @@protoc_insertion_point(constructor:Trd_GetMarginRatio.C2S)
}
C2S::C2S(const C2S& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0),
securitylist_(from.securitylist_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
if (from.has_header()) {
header_ = new ::Trd_Common::TrdHeader(*from.header_);
} else {
header_ = NULL;
}
// @@protoc_insertion_point(copy_constructor:Trd_GetMarginRatio.C2S)
}
void C2S::SharedCtor() {
_cached_size_ = 0;
header_ = NULL;
}
C2S::~C2S() {
// @@protoc_insertion_point(destructor:Trd_GetMarginRatio.C2S)
SharedDtor();
}
void C2S::SharedDtor() {
if (this != internal_default_instance()) delete header_;
}
void C2S::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* C2S::descriptor() {
::protobuf_Trd_5fGetMarginRatio_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_Trd_5fGetMarginRatio_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const C2S& C2S::default_instance() {
::protobuf_Trd_5fGetMarginRatio_2eproto::InitDefaultsC2S();
return *internal_default_instance();
}
C2S* C2S::New(::google::protobuf::Arena* arena) const {
C2S* n = new C2S;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void C2S::Clear() {
// @@protoc_insertion_point(message_clear_start:Trd_GetMarginRatio.C2S)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
securitylist_.Clear();
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(header_ != NULL);
header_->Clear();
}
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool C2S::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:Trd_GetMarginRatio.C2S)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required .Trd_Common.TrdHeader header = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, mutable_header()));
} else {
goto handle_unusual;
}
break;
}
// repeated .Qot_Common.Security securityList = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_securitylist()));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:Trd_GetMarginRatio.C2S)
return true;
failure:
// @@protoc_insertion_point(parse_failure:Trd_GetMarginRatio.C2S)
return false;
#undef DO_
}
void C2S::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:Trd_GetMarginRatio.C2S)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// required .Trd_Common.TrdHeader header = 1;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, *this->header_, output);
}
// repeated .Qot_Common.Security securityList = 2;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->securitylist_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2, this->securitylist(static_cast<int>(i)), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:Trd_GetMarginRatio.C2S)
}
::google::protobuf::uint8* C2S::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:Trd_GetMarginRatio.C2S)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// required .Trd_Common.TrdHeader header = 1;
if (cached_has_bits & 0x00000001u) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
1, *this->header_, deterministic, target);
}
// repeated .Qot_Common.Security securityList = 2;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->securitylist_size()); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
2, this->securitylist(static_cast<int>(i)), deterministic, target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:Trd_GetMarginRatio.C2S)
return target;
}
size_t C2S::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:Trd_GetMarginRatio.C2S)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
// required .Trd_Common.TrdHeader header = 1;
if (has_header()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(
*this->header_);
}
// repeated .Qot_Common.Security securityList = 2;
{
unsigned int count = static_cast<unsigned int>(this->securitylist_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSize(
this->securitylist(static_cast<int>(i)));
}
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void C2S::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:Trd_GetMarginRatio.C2S)
GOOGLE_DCHECK_NE(&from, this);
const C2S* source =
::google::protobuf::internal::DynamicCastToGenerated<const C2S>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:Trd_GetMarginRatio.C2S)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:Trd_GetMarginRatio.C2S)
MergeFrom(*source);
}
}
void C2S::MergeFrom(const C2S& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:Trd_GetMarginRatio.C2S)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
securitylist_.MergeFrom(from.securitylist_);
if (from.has_header()) {
mutable_header()->::Trd_Common::TrdHeader::MergeFrom(from.header());
}
}
void C2S::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:Trd_GetMarginRatio.C2S)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void C2S::CopyFrom(const C2S& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:Trd_GetMarginRatio.C2S)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool C2S::IsInitialized() const {
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
if (!::google::protobuf::internal::AllAreInitialized(this->securitylist())) return false;
if (has_header()) {
if (!this->header_->IsInitialized()) return false;
}
return true;
}
void C2S::Swap(C2S* other) {
if (other == this) return;
InternalSwap(other);
}
void C2S::InternalSwap(C2S* other) {
using std::swap;
securitylist_.InternalSwap(&other->securitylist_);
swap(header_, other->header_);
swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata C2S::GetMetadata() const {
protobuf_Trd_5fGetMarginRatio_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_Trd_5fGetMarginRatio_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void S2C::InitAsDefaultInstance() {
::Trd_GetMarginRatio::_S2C_default_instance_._instance.get_mutable()->header_ = const_cast< ::Trd_Common::TrdHeader*>(
::Trd_Common::TrdHeader::internal_default_instance());
}
void S2C::clear_header() {
if (header_ != NULL) header_->Clear();
clear_has_header();
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int S2C::kHeaderFieldNumber;
const int S2C::kMarginRatioInfoListFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
S2C::S2C()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_Trd_5fGetMarginRatio_2eproto::InitDefaultsS2C();
}
SharedCtor();
// @@protoc_insertion_point(constructor:Trd_GetMarginRatio.S2C)
}
S2C::S2C(const S2C& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0),
marginratioinfolist_(from.marginratioinfolist_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
if (from.has_header()) {
header_ = new ::Trd_Common::TrdHeader(*from.header_);
} else {
header_ = NULL;
}
// @@protoc_insertion_point(copy_constructor:Trd_GetMarginRatio.S2C)
}
void S2C::SharedCtor() {
_cached_size_ = 0;
header_ = NULL;
}
S2C::~S2C() {
// @@protoc_insertion_point(destructor:Trd_GetMarginRatio.S2C)
SharedDtor();
}
void S2C::SharedDtor() {
if (this != internal_default_instance()) delete header_;
}
void S2C::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* S2C::descriptor() {
::protobuf_Trd_5fGetMarginRatio_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_Trd_5fGetMarginRatio_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const S2C& S2C::default_instance() {
::protobuf_Trd_5fGetMarginRatio_2eproto::InitDefaultsS2C();
return *internal_default_instance();
}
S2C* S2C::New(::google::protobuf::Arena* arena) const {
S2C* n = new S2C;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void S2C::Clear() {
// @@protoc_insertion_point(message_clear_start:Trd_GetMarginRatio.S2C)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
marginratioinfolist_.Clear();
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(header_ != NULL);
header_->Clear();
}
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool S2C::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:Trd_GetMarginRatio.S2C)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required .Trd_Common.TrdHeader header = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, mutable_header()));
} else {
goto handle_unusual;
}
break;
}
// repeated .Trd_GetMarginRatio.MarginRatioInfo marginRatioInfoList = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_marginratioinfolist()));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:Trd_GetMarginRatio.S2C)
return true;
failure:
// @@protoc_insertion_point(parse_failure:Trd_GetMarginRatio.S2C)
return false;
#undef DO_
}
void S2C::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:Trd_GetMarginRatio.S2C)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// required .Trd_Common.TrdHeader header = 1;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, *this->header_, output);
}
// repeated .Trd_GetMarginRatio.MarginRatioInfo marginRatioInfoList = 2;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->marginratioinfolist_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2, this->marginratioinfolist(static_cast<int>(i)), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:Trd_GetMarginRatio.S2C)
}
::google::protobuf::uint8* S2C::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:Trd_GetMarginRatio.S2C)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// required .Trd_Common.TrdHeader header = 1;
if (cached_has_bits & 0x00000001u) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
1, *this->header_, deterministic, target);
}
// repeated .Trd_GetMarginRatio.MarginRatioInfo marginRatioInfoList = 2;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->marginratioinfolist_size()); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
2, this->marginratioinfolist(static_cast<int>(i)), deterministic, target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:Trd_GetMarginRatio.S2C)
return target;
}
size_t S2C::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:Trd_GetMarginRatio.S2C)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
// required .Trd_Common.TrdHeader header = 1;
if (has_header()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(
*this->header_);
}
// repeated .Trd_GetMarginRatio.MarginRatioInfo marginRatioInfoList = 2;
{
unsigned int count = static_cast<unsigned int>(this->marginratioinfolist_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSize(
this->marginratioinfolist(static_cast<int>(i)));
}
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void S2C::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:Trd_GetMarginRatio.S2C)
GOOGLE_DCHECK_NE(&from, this);
const S2C* source =
::google::protobuf::internal::DynamicCastToGenerated<const S2C>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:Trd_GetMarginRatio.S2C)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:Trd_GetMarginRatio.S2C)
MergeFrom(*source);
}
}
void S2C::MergeFrom(const S2C& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:Trd_GetMarginRatio.S2C)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
marginratioinfolist_.MergeFrom(from.marginratioinfolist_);
if (from.has_header()) {
mutable_header()->::Trd_Common::TrdHeader::MergeFrom(from.header());
}
}
void S2C::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:Trd_GetMarginRatio.S2C)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void S2C::CopyFrom(const S2C& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:Trd_GetMarginRatio.S2C)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool S2C::IsInitialized() const {
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
if (!::google::protobuf::internal::AllAreInitialized(this->marginratioinfolist())) return false;
if (has_header()) {
if (!this->header_->IsInitialized()) return false;
}
return true;
}
void S2C::Swap(S2C* other) {
if (other == this) return;
InternalSwap(other);
}
void S2C::InternalSwap(S2C* other) {
using std::swap;
marginratioinfolist_.InternalSwap(&other->marginratioinfolist_);
swap(header_, other->header_);
swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata S2C::GetMetadata() const {
protobuf_Trd_5fGetMarginRatio_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_Trd_5fGetMarginRatio_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void Request::InitAsDefaultInstance() {
::Trd_GetMarginRatio::_Request_default_instance_._instance.get_mutable()->c2s_ = const_cast< ::Trd_GetMarginRatio::C2S*>(
::Trd_GetMarginRatio::C2S::internal_default_instance());
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Request::kC2SFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Request::Request()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_Trd_5fGetMarginRatio_2eproto::InitDefaultsRequest();
}
SharedCtor();
// @@protoc_insertion_point(constructor:Trd_GetMarginRatio.Request)
}
Request::Request(const Request& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
if (from.has_c2s()) {
c2s_ = new ::Trd_GetMarginRatio::C2S(*from.c2s_);
} else {
c2s_ = NULL;
}
// @@protoc_insertion_point(copy_constructor:Trd_GetMarginRatio.Request)
}
void Request::SharedCtor() {
_cached_size_ = 0;
c2s_ = NULL;
}
Request::~Request() {
// @@protoc_insertion_point(destructor:Trd_GetMarginRatio.Request)
SharedDtor();
}
void Request::SharedDtor() {
if (this != internal_default_instance()) delete c2s_;
}
void Request::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Request::descriptor() {
::protobuf_Trd_5fGetMarginRatio_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_Trd_5fGetMarginRatio_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const Request& Request::default_instance() {
::protobuf_Trd_5fGetMarginRatio_2eproto::InitDefaultsRequest();
return *internal_default_instance();
}
Request* Request::New(::google::protobuf::Arena* arena) const {
Request* n = new Request;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Request::Clear() {
// @@protoc_insertion_point(message_clear_start:Trd_GetMarginRatio.Request)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(c2s_ != NULL);
c2s_->Clear();
}
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool Request::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:Trd_GetMarginRatio.Request)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required .Trd_GetMarginRatio.C2S c2s = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, mutable_c2s()));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:Trd_GetMarginRatio.Request)
return true;
failure:
// @@protoc_insertion_point(parse_failure:Trd_GetMarginRatio.Request)
return false;
#undef DO_
}
void Request::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:Trd_GetMarginRatio.Request)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// required .Trd_GetMarginRatio.C2S c2s = 1;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, *this->c2s_, output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:Trd_GetMarginRatio.Request)
}
::google::protobuf::uint8* Request::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:Trd_GetMarginRatio.Request)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// required .Trd_GetMarginRatio.C2S c2s = 1;
if (cached_has_bits & 0x00000001u) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
1, *this->c2s_, deterministic, target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:Trd_GetMarginRatio.Request)
return target;
}
size_t Request::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:Trd_GetMarginRatio.Request)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
// required .Trd_GetMarginRatio.C2S c2s = 1;
if (has_c2s()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(
*this->c2s_);
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Request::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:Trd_GetMarginRatio.Request)
GOOGLE_DCHECK_NE(&from, this);
const Request* source =
::google::protobuf::internal::DynamicCastToGenerated<const Request>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:Trd_GetMarginRatio.Request)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:Trd_GetMarginRatio.Request)
MergeFrom(*source);
}
}
void Request::MergeFrom(const Request& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:Trd_GetMarginRatio.Request)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.has_c2s()) {
mutable_c2s()->::Trd_GetMarginRatio::C2S::MergeFrom(from.c2s());
}
}
void Request::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:Trd_GetMarginRatio.Request)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Request::CopyFrom(const Request& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:Trd_GetMarginRatio.Request)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Request::IsInitialized() const {
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
if (has_c2s()) {
if (!this->c2s_->IsInitialized()) return false;
}
return true;
}
void Request::Swap(Request* other) {
if (other == this) return;
InternalSwap(other);
}
void Request::InternalSwap(Request* other) {
using std::swap;
swap(c2s_, other->c2s_);
swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Request::GetMetadata() const {
protobuf_Trd_5fGetMarginRatio_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_Trd_5fGetMarginRatio_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void Response::InitAsDefaultInstance() {
::Trd_GetMarginRatio::_Response_default_instance_._instance.get_mutable()->s2c_ = const_cast< ::Trd_GetMarginRatio::S2C*>(
::Trd_GetMarginRatio::S2C::internal_default_instance());
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Response::kRetTypeFieldNumber;
const int Response::kRetMsgFieldNumber;
const int Response::kErrCodeFieldNumber;
const int Response::kS2CFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Response::Response()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_Trd_5fGetMarginRatio_2eproto::InitDefaultsResponse();
}
SharedCtor();
// @@protoc_insertion_point(constructor:Trd_GetMarginRatio.Response)
}
Response::Response(const Response& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
retmsg_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_retmsg()) {
retmsg_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.retmsg_);
}
if (from.has_s2c()) {
s2c_ = new ::Trd_GetMarginRatio::S2C(*from.s2c_);
} else {
s2c_ = NULL;
}
::memcpy(&errcode_, &from.errcode_,
static_cast<size_t>(reinterpret_cast<char*>(&rettype_) -
reinterpret_cast<char*>(&errcode_)) + sizeof(rettype_));
// @@protoc_insertion_point(copy_constructor:Trd_GetMarginRatio.Response)
}
void Response::SharedCtor() {
_cached_size_ = 0;
retmsg_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(&s2c_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&errcode_) -
reinterpret_cast<char*>(&s2c_)) + sizeof(errcode_));
rettype_ = -400;
}
Response::~Response() {
// @@protoc_insertion_point(destructor:Trd_GetMarginRatio.Response)
SharedDtor();
}
void Response::SharedDtor() {
retmsg_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (this != internal_default_instance()) delete s2c_;
}
void Response::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Response::descriptor() {
::protobuf_Trd_5fGetMarginRatio_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_Trd_5fGetMarginRatio_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const Response& Response::default_instance() {
::protobuf_Trd_5fGetMarginRatio_2eproto::InitDefaultsResponse();
return *internal_default_instance();
}
Response* Response::New(::google::protobuf::Arena* arena) const {
Response* n = new Response;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Response::Clear() {
// @@protoc_insertion_point(message_clear_start:Trd_GetMarginRatio.Response)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 3u) {
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(!retmsg_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*retmsg_.UnsafeRawStringPointer())->clear();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(s2c_ != NULL);
s2c_->Clear();
}
}
if (cached_has_bits & 12u) {
errcode_ = 0;
rettype_ = -400;
}
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool Response::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:Trd_GetMarginRatio.Response)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required int32 retType = 1 [default = -400];
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
set_has_rettype();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &rettype_)));
} else {
goto handle_unusual;
}
break;
}
// optional string retMsg = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_retmsg()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->retmsg().data(), static_cast<int>(this->retmsg().length()),
::google::protobuf::internal::WireFormat::PARSE,
"Trd_GetMarginRatio.Response.retMsg");
} else {
goto handle_unusual;
}
break;
}
// optional int32 errCode = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
set_has_errcode();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &errcode_)));
} else {
goto handle_unusual;
}
break;
}
// optional .Trd_GetMarginRatio.S2C s2c = 4;
case 4: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, mutable_s2c()));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:Trd_GetMarginRatio.Response)
return true;
failure:
// @@protoc_insertion_point(parse_failure:Trd_GetMarginRatio.Response)
return false;
#undef DO_
}
void Response::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:Trd_GetMarginRatio.Response)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// required int32 retType = 1 [default = -400];
if (cached_has_bits & 0x00000008u) {
::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->rettype(), output);
}
// optional string retMsg = 2;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->retmsg().data(), static_cast<int>(this->retmsg().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"Trd_GetMarginRatio.Response.retMsg");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2, this->retmsg(), output);
}
// optional int32 errCode = 3;
if (cached_has_bits & 0x00000004u) {
::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->errcode(), output);
}
// optional .Trd_GetMarginRatio.S2C s2c = 4;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
4, *this->s2c_, output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:Trd_GetMarginRatio.Response)
}
::google::protobuf::uint8* Response::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:Trd_GetMarginRatio.Response)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// required int32 retType = 1 [default = -400];
if (cached_has_bits & 0x00000008u) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->rettype(), target);
}
// optional string retMsg = 2;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->retmsg().data(), static_cast<int>(this->retmsg().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"Trd_GetMarginRatio.Response.retMsg");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2, this->retmsg(), target);
}
// optional int32 errCode = 3;
if (cached_has_bits & 0x00000004u) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->errcode(), target);
}
// optional .Trd_GetMarginRatio.S2C s2c = 4;
if (cached_has_bits & 0x00000002u) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
4, *this->s2c_, deterministic, target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:Trd_GetMarginRatio.Response)
return target;
}
size_t Response::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:Trd_GetMarginRatio.Response)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
// required int32 retType = 1 [default = -400];
if (has_rettype()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->rettype());
}
if (_has_bits_[0 / 32] & 7u) {
// optional string retMsg = 2;
if (has_retmsg()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->retmsg());
}
// optional .Trd_GetMarginRatio.S2C s2c = 4;
if (has_s2c()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(
*this->s2c_);
}
// optional int32 errCode = 3;
if (has_errcode()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->errcode());
}
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Response::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:Trd_GetMarginRatio.Response)
GOOGLE_DCHECK_NE(&from, this);
const Response* source =
::google::protobuf::internal::DynamicCastToGenerated<const Response>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:Trd_GetMarginRatio.Response)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:Trd_GetMarginRatio.Response)
MergeFrom(*source);
}
}
void Response::MergeFrom(const Response& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:Trd_GetMarginRatio.Response)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 15u) {
if (cached_has_bits & 0x00000001u) {
set_has_retmsg();
retmsg_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.retmsg_);
}
if (cached_has_bits & 0x00000002u) {
mutable_s2c()->::Trd_GetMarginRatio::S2C::MergeFrom(from.s2c());
}
if (cached_has_bits & 0x00000004u) {
errcode_ = from.errcode_;
}
if (cached_has_bits & 0x00000008u) {
rettype_ = from.rettype_;
}
_has_bits_[0] |= cached_has_bits;
}
}
void Response::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:Trd_GetMarginRatio.Response)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Response::CopyFrom(const Response& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:Trd_GetMarginRatio.Response)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Response::IsInitialized() const {
if ((_has_bits_[0] & 0x00000008) != 0x00000008) return false;
if (has_s2c()) {
if (!this->s2c_->IsInitialized()) return false;
}
return true;
}
void Response::Swap(Response* other) {
if (other == this) return;
InternalSwap(other);
}
void Response::InternalSwap(Response* other) {
using std::swap;
retmsg_.Swap(&other->retmsg_);
swap(s2c_, other->s2c_);
swap(errcode_, other->errcode_);
swap(rettype_, other->rettype_);
swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Response::GetMetadata() const {
protobuf_Trd_5fGetMarginRatio_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_Trd_5fGetMarginRatio_2eproto::file_level_metadata[kIndexInFileMessages];
}
// @@protoc_insertion_point(namespace_scope)
} // namespace Trd_GetMarginRatio
// @@protoc_insertion_point(global_scope)