// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: hq/dto/Broker.proto

#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "hq/dto/Broker.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>
// @@protoc_insertion_point(includes)

namespace {

const ::google::protobuf::Descriptor* Broker_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  Broker_reflection_ = NULL;

}  // namespace


void protobuf_AssignDesc_hq_2fdto_2fBroker_2eproto() GOOGLE_ATTRIBUTE_COLD;
void protobuf_AssignDesc_hq_2fdto_2fBroker_2eproto() {
  protobuf_AddDesc_hq_2fdto_2fBroker_2eproto();
  const ::google::protobuf::FileDescriptor* file =
    ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
      "hq/dto/Broker.proto");
  GOOGLE_CHECK(file != NULL);
  Broker_descriptor_ = file->message_type(0);
  static const int Broker_offsets_[4] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Broker, level_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Broker, item_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Broker, type_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Broker, name_),
  };
  Broker_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      Broker_descriptor_,
      Broker::internal_default_instance(),
      Broker_offsets_,
      -1,
      -1,
      -1,
      sizeof(Broker),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Broker, _internal_metadata_));
}

namespace {

GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
void protobuf_AssignDescriptorsOnce() {
  ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
                 &protobuf_AssignDesc_hq_2fdto_2fBroker_2eproto);
}

void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD;
void protobuf_RegisterTypes(const ::std::string&) {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      Broker_descriptor_, Broker::internal_default_instance());
}

}  // namespace

void protobuf_ShutdownFile_hq_2fdto_2fBroker_2eproto() {
  Broker_default_instance_.Shutdown();
  delete Broker_reflection_;
}

void protobuf_InitDefaults_hq_2fdto_2fBroker_2eproto_impl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  ::google::protobuf::internal::GetEmptyString();
  Broker_default_instance_.DefaultConstruct();
  Broker_default_instance_.get_mutable()->InitAsDefaultInstance();
}

GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_InitDefaults_hq_2fdto_2fBroker_2eproto_once_);
void protobuf_InitDefaults_hq_2fdto_2fBroker_2eproto() {
  ::google::protobuf::GoogleOnceInit(&protobuf_InitDefaults_hq_2fdto_2fBroker_2eproto_once_,
                 &protobuf_InitDefaults_hq_2fdto_2fBroker_2eproto_impl);
}
void protobuf_AddDesc_hq_2fdto_2fBroker_2eproto_impl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  protobuf_InitDefaults_hq_2fdto_2fBroker_2eproto();
  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
    "\n\023hq/dto/Broker.proto\"A\n\006Broker\022\r\n\005level"
    "\030\001 \001(\005\022\014\n\004item\030\002 \001(\t\022\014\n\004type\030\003 \001(\005\022\014\n\004na"
    "me\030\004 \001(\tBA\n2com.huasheng.quant.open.sdk."
    "protobuf.hq.common.dtoB\013BrokerProtob\006pro"
    "to3", 163);
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
    "hq/dto/Broker.proto", &protobuf_RegisterTypes);
  ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_hq_2fdto_2fBroker_2eproto);
}

GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_hq_2fdto_2fBroker_2eproto_once_);
void protobuf_AddDesc_hq_2fdto_2fBroker_2eproto() {
  ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_hq_2fdto_2fBroker_2eproto_once_,
                 &protobuf_AddDesc_hq_2fdto_2fBroker_2eproto_impl);
}
// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_hq_2fdto_2fBroker_2eproto {
  StaticDescriptorInitializer_hq_2fdto_2fBroker_2eproto() {
    protobuf_AddDesc_hq_2fdto_2fBroker_2eproto();
  }
} static_descriptor_initializer_hq_2fdto_2fBroker_2eproto_;

namespace {

static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD GOOGLE_ATTRIBUTE_NORETURN;
static void MergeFromFail(int line) {
  ::google::protobuf::internal::MergeFromFail(__FILE__, line);
}

}  // namespace


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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Broker::kLevelFieldNumber;
const int Broker::kItemFieldNumber;
const int Broker::kTypeFieldNumber;
const int Broker::kNameFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

Broker::Broker()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_hq_2fdto_2fBroker_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:Broker)
}

void Broker::InitAsDefaultInstance() {
}

Broker::Broker(const Broker& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:Broker)
}

void Broker::SharedCtor() {
  item_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&level_, 0, reinterpret_cast<char*>(&type_) -
    reinterpret_cast<char*>(&level_) + sizeof(type_));
  _cached_size_ = 0;
}

Broker::~Broker() {
  // @@protoc_insertion_point(destructor:Broker)
  SharedDtor();
}

void Broker::SharedDtor() {
  item_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void Broker::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Broker::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return Broker_descriptor_;
}

const Broker& Broker::default_instance() {
  protobuf_InitDefaults_hq_2fdto_2fBroker_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<Broker> Broker_default_instance_;

Broker* Broker::New(::google::protobuf::Arena* arena) const {
  Broker* n = new Broker;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void Broker::Clear() {
// @@protoc_insertion_point(message_clear_start:Broker)
#if defined(__clang__)
#define ZR_HELPER_(f) \
  _Pragma("clang diagnostic push") \
  _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
  __builtin_offsetof(Broker, f) \
  _Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
  &reinterpret_cast<Broker*>(16)->f)
#endif

#define ZR_(first, last) do {\
  ::memset(&(first), 0,\
           ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)

  ZR_(level_, type_);
  item_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());

#undef ZR_HELPER_
#undef ZR_

}

bool Broker::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:Broker)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 level = 1;
      case 1: {
        if (tag == 8) {

          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &level_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(18)) goto parse_item;
        break;
      }

      // optional string item = 2;
      case 2: {
        if (tag == 18) {
         parse_item:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_item()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->item().data(), this->item().length(),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "Broker.item"));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(24)) goto parse_type;
        break;
      }

      // optional int32 type = 3;
      case 3: {
        if (tag == 24) {
         parse_type:

          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &type_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(34)) goto parse_name;
        break;
      }

      // optional string name = 4;
      case 4: {
        if (tag == 34) {
         parse_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->name().data(), this->name().length(),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "Broker.name"));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:Broker)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:Broker)
  return false;
#undef DO_
}

void Broker::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:Broker)
  // optional int32 level = 1;
  if (this->level() != 0) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->level(), output);
  }

  // optional string item = 2;
  if (this->item().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->item().data(), this->item().length(),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "Broker.item");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->item(), output);
  }

  // optional int32 type = 3;
  if (this->type() != 0) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->type(), output);
  }

  // optional string name = 4;
  if (this->name().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "Broker.name");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      4, this->name(), output);
  }

  // @@protoc_insertion_point(serialize_end:Broker)
}

::google::protobuf::uint8* Broker::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:Broker)
  // optional int32 level = 1;
  if (this->level() != 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->level(), target);
  }

  // optional string item = 2;
  if (this->item().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->item().data(), this->item().length(),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "Broker.item");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->item(), target);
  }

  // optional int32 type = 3;
  if (this->type() != 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->type(), target);
  }

  // optional string name = 4;
  if (this->name().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "Broker.name");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        4, this->name(), target);
  }

  // @@protoc_insertion_point(serialize_to_array_end:Broker)
  return target;
}

size_t Broker::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:Broker)
  size_t total_size = 0;

  // optional int32 level = 1;
  if (this->level() != 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->level());
  }

  // optional string item = 2;
  if (this->item().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->item());
  }

  // optional int32 type = 3;
  if (this->type() != 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->type());
  }

  // optional string name = 4;
  if (this->name().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->name());
  }

  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 Broker::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:Broker)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const Broker* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const Broker>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:Broker)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:Broker)
    UnsafeMergeFrom(*source);
  }
}

void Broker::MergeFrom(const Broker& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:Broker)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void Broker::UnsafeMergeFrom(const Broker& from) {
  GOOGLE_DCHECK(&from != this);
  if (from.level() != 0) {
    set_level(from.level());
  }
  if (from.item().size() > 0) {

    item_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.item_);
  }
  if (from.type() != 0) {
    set_type(from.type());
  }
  if (from.name().size() > 0) {

    name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  }
}

void Broker::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:Broker)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void Broker::CopyFrom(const Broker& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:Broker)
  if (&from == this) return;
  Clear();
  UnsafeMergeFrom(from);
}

bool Broker::IsInitialized() const {

  return true;
}

void Broker::Swap(Broker* other) {
  if (other == this) return;
  InternalSwap(other);
}
void Broker::InternalSwap(Broker* other) {
  std::swap(level_, other->level_);
  item_.Swap(&other->item_);
  std::swap(type_, other->type_);
  name_.Swap(&other->name_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata Broker::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = Broker_descriptor_;
  metadata.reflection = Broker_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Broker

// optional int32 level = 1;
void Broker::clear_level() {
  level_ = 0;
}
::google::protobuf::int32 Broker::level() const {
  // @@protoc_insertion_point(field_get:Broker.level)
  return level_;
}
void Broker::set_level(::google::protobuf::int32 value) {
  
  level_ = value;
  // @@protoc_insertion_point(field_set:Broker.level)
}

// optional string item = 2;
void Broker::clear_item() {
  item_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
const ::std::string& Broker::item() const {
  // @@protoc_insertion_point(field_get:Broker.item)
  return item_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Broker::set_item(const ::std::string& value) {
  
  item_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:Broker.item)
}
void Broker::set_item(const char* value) {
  
  item_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:Broker.item)
}
void Broker::set_item(const char* value, size_t size) {
  
  item_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:Broker.item)
}
::std::string* Broker::mutable_item() {
  
  // @@protoc_insertion_point(field_mutable:Broker.item)
  return item_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* Broker::release_item() {
  // @@protoc_insertion_point(field_release:Broker.item)
  
  return item_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Broker::set_allocated_item(::std::string* item) {
  if (item != NULL) {
    
  } else {
    
  }
  item_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), item);
  // @@protoc_insertion_point(field_set_allocated:Broker.item)
}

// optional int32 type = 3;
void Broker::clear_type() {
  type_ = 0;
}
::google::protobuf::int32 Broker::type() const {
  // @@protoc_insertion_point(field_get:Broker.type)
  return type_;
}
void Broker::set_type(::google::protobuf::int32 value) {
  
  type_ = value;
  // @@protoc_insertion_point(field_set:Broker.type)
}

// optional string name = 4;
void Broker::clear_name() {
  name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
const ::std::string& Broker::name() const {
  // @@protoc_insertion_point(field_get:Broker.name)
  return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Broker::set_name(const ::std::string& value) {
  
  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:Broker.name)
}
void Broker::set_name(const char* value) {
  
  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:Broker.name)
}
void Broker::set_name(const char* value, size_t size) {
  
  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:Broker.name)
}
::std::string* Broker::mutable_name() {
  
  // @@protoc_insertion_point(field_mutable:Broker.name)
  return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* Broker::release_name() {
  // @@protoc_insertion_point(field_release:Broker.name)
  
  return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Broker::set_allocated_name(::std::string* name) {
  if (name != NULL) {
    
  } else {
    
  }
  name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
  // @@protoc_insertion_point(field_set_allocated:Broker.name)
}

inline const Broker* Broker::internal_default_instance() {
  return &Broker_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

// @@protoc_insertion_point(namespace_scope)

// @@protoc_insertion_point(global_scope)
