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

#include "shardsRouter.pb.h"

#include <algorithm>

#include <google/protobuf/stubs/common.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.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)
#include <google/protobuf/port_def.inc>

extern PROTOBUF_INTERNAL_EXPORT_common_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_MarkedMultiReference_common_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_common_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_MetaData_common_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_shardsRouter_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Router_RulesEntry_DoNotUse_shardsRouter_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_shardsRouter_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ShardsRouter_VariablesEntry_DoNotUse_shardsRouter_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_shardsRouter_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_MarkedRouter_shardsRouter_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_shardsRouter_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Router_shardsRouter_2eproto;
namespace com {
namespace alipay {
namespace dds {
namespace api {
namespace v1 {
class Router_RulesEntry_DoNotUseDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<Router_RulesEntry_DoNotUse> _instance;
} _Router_RulesEntry_DoNotUse_default_instance_;
class RouterDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<Router> _instance;
} _Router_default_instance_;
class MarkedRouterDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<MarkedRouter> _instance;
} _MarkedRouter_default_instance_;
class ShardsRouter_VariablesEntry_DoNotUseDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<ShardsRouter_VariablesEntry_DoNotUse> _instance;
} _ShardsRouter_VariablesEntry_DoNotUse_default_instance_;
class ShardsRouterDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<ShardsRouter> _instance;
} _ShardsRouter_default_instance_;
}  // namespace v1
}  // namespace api
}  // namespace dds
}  // namespace alipay
}  // namespace com
static void InitDefaultsRouter_RulesEntry_DoNotUse_shardsRouter_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::com::alipay::dds::api::v1::_Router_RulesEntry_DoNotUse_default_instance_;
    new (ptr) ::com::alipay::dds::api::v1::Router_RulesEntry_DoNotUse();
  }
  ::com::alipay::dds::api::v1::Router_RulesEntry_DoNotUse::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<0> scc_info_Router_RulesEntry_DoNotUse_shardsRouter_2eproto =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsRouter_RulesEntry_DoNotUse_shardsRouter_2eproto}, {}};

static void InitDefaultsRouter_shardsRouter_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::com::alipay::dds::api::v1::_Router_default_instance_;
    new (ptr) ::com::alipay::dds::api::v1::Router();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::com::alipay::dds::api::v1::Router::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_Router_shardsRouter_2eproto =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsRouter_shardsRouter_2eproto}, {
      &scc_info_Router_RulesEntry_DoNotUse_shardsRouter_2eproto.base,}};

static void InitDefaultsMarkedRouter_shardsRouter_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::com::alipay::dds::api::v1::_MarkedRouter_default_instance_;
    new (ptr) ::com::alipay::dds::api::v1::MarkedRouter();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::com::alipay::dds::api::v1::MarkedRouter::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_MarkedRouter_shardsRouter_2eproto =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMarkedRouter_shardsRouter_2eproto}, {
      &scc_info_Router_shardsRouter_2eproto.base,}};

static void InitDefaultsShardsRouter_VariablesEntry_DoNotUse_shardsRouter_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::com::alipay::dds::api::v1::_ShardsRouter_VariablesEntry_DoNotUse_default_instance_;
    new (ptr) ::com::alipay::dds::api::v1::ShardsRouter_VariablesEntry_DoNotUse();
  }
  ::com::alipay::dds::api::v1::ShardsRouter_VariablesEntry_DoNotUse::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<0> scc_info_ShardsRouter_VariablesEntry_DoNotUse_shardsRouter_2eproto =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsShardsRouter_VariablesEntry_DoNotUse_shardsRouter_2eproto}, {}};

static void InitDefaultsShardsRouter_shardsRouter_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::com::alipay::dds::api::v1::_ShardsRouter_default_instance_;
    new (ptr) ::com::alipay::dds::api::v1::ShardsRouter();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::com::alipay::dds::api::v1::ShardsRouter::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<4> scc_info_ShardsRouter_shardsRouter_2eproto =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 4, InitDefaultsShardsRouter_shardsRouter_2eproto}, {
      &scc_info_MetaData_common_2eproto.base,
      &scc_info_MarkedRouter_shardsRouter_2eproto.base,
      &scc_info_ShardsRouter_VariablesEntry_DoNotUse_shardsRouter_2eproto.base,
      &scc_info_MarkedMultiReference_common_2eproto.base,}};

void InitDefaults_shardsRouter_2eproto() {
  ::google::protobuf::internal::InitSCC(&scc_info_Router_RulesEntry_DoNotUse_shardsRouter_2eproto.base);
  ::google::protobuf::internal::InitSCC(&scc_info_Router_shardsRouter_2eproto.base);
  ::google::protobuf::internal::InitSCC(&scc_info_MarkedRouter_shardsRouter_2eproto.base);
  ::google::protobuf::internal::InitSCC(&scc_info_ShardsRouter_VariablesEntry_DoNotUse_shardsRouter_2eproto.base);
  ::google::protobuf::internal::InitSCC(&scc_info_ShardsRouter_shardsRouter_2eproto.base);
}

::google::protobuf::Metadata file_level_metadata_shardsRouter_2eproto[5];
constexpr ::google::protobuf::EnumDescriptor const** file_level_enum_descriptors_shardsRouter_2eproto = nullptr;
constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_shardsRouter_2eproto = nullptr;

const ::google::protobuf::uint32 TableStruct_shardsRouter_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  PROTOBUF_FIELD_OFFSET(::com::alipay::dds::api::v1::Router_RulesEntry_DoNotUse, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::com::alipay::dds::api::v1::Router_RulesEntry_DoNotUse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::com::alipay::dds::api::v1::Router_RulesEntry_DoNotUse, key_),
  PROTOBUF_FIELD_OFFSET(::com::alipay::dds::api::v1::Router_RulesEntry_DoNotUse, value_),
  0,
  1,
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::com::alipay::dds::api::v1::Router, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::com::alipay::dds::api::v1::Router, rules_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::com::alipay::dds::api::v1::MarkedRouter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::com::alipay::dds::api::v1::MarkedRouter, mark_),
  PROTOBUF_FIELD_OFFSET(::com::alipay::dds::api::v1::MarkedRouter, router_),
  PROTOBUF_FIELD_OFFSET(::com::alipay::dds::api::v1::MarkedRouter, sequence_),
  PROTOBUF_FIELD_OFFSET(::com::alipay::dds::api::v1::ShardsRouter_VariablesEntry_DoNotUse, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::com::alipay::dds::api::v1::ShardsRouter_VariablesEntry_DoNotUse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::com::alipay::dds::api::v1::ShardsRouter_VariablesEntry_DoNotUse, key_),
  PROTOBUF_FIELD_OFFSET(::com::alipay::dds::api::v1::ShardsRouter_VariablesEntry_DoNotUse, value_),
  0,
  1,
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::com::alipay::dds::api::v1::ShardsRouter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::com::alipay::dds::api::v1::ShardsRouter, metadata_),
  PROTOBUF_FIELD_OFFSET(::com::alipay::dds::api::v1::ShardsRouter, routers_),
  PROTOBUF_FIELD_OFFSET(::com::alipay::dds::api::v1::ShardsRouter, variables_),
  PROTOBUF_FIELD_OFFSET(::com::alipay::dds::api::v1::ShardsRouter, extension_),
};
static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, 7, sizeof(::com::alipay::dds::api::v1::Router_RulesEntry_DoNotUse)},
  { 9, -1, sizeof(::com::alipay::dds::api::v1::Router)},
  { 15, -1, sizeof(::com::alipay::dds::api::v1::MarkedRouter)},
  { 23, 30, sizeof(::com::alipay::dds::api::v1::ShardsRouter_VariablesEntry_DoNotUse)},
  { 32, -1, sizeof(::com::alipay::dds::api::v1::ShardsRouter)},
};

static ::google::protobuf::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::google::protobuf::Message*>(&::com::alipay::dds::api::v1::_Router_RulesEntry_DoNotUse_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::com::alipay::dds::api::v1::_Router_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::com::alipay::dds::api::v1::_MarkedRouter_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::com::alipay::dds::api::v1::_ShardsRouter_VariablesEntry_DoNotUse_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::com::alipay::dds::api::v1::_ShardsRouter_default_instance_),
};

::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_shardsRouter_2eproto = {
  {}, AddDescriptors_shardsRouter_2eproto, "shardsRouter.proto", schemas,
  file_default_instances, TableStruct_shardsRouter_2eproto::offsets,
  file_level_metadata_shardsRouter_2eproto, 5, file_level_enum_descriptors_shardsRouter_2eproto, file_level_service_descriptors_shardsRouter_2eproto,
};

const char descriptor_table_protodef_shardsRouter_2eproto[] =
  "\n\022shardsRouter.proto\022\025com.alipay.dds.api"
  ".v1\032\014common.proto\"o\n\006Router\0227\n\005rules\030\001 \003"
  "(\0132(.com.alipay.dds.api.v1.Router.RulesE"
  "ntry\032,\n\nRulesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value"
  "\030\002 \001(\t:\0028\001\"]\n\014MarkedRouter\022\014\n\004mark\030\001 \001(\t"
  "\022-\n\006router\030\002 \001(\0132\035.com.alipay.dds.api.v1"
  ".Router\022\020\n\010sequence\030\003 \001(\010\"\260\002\n\014ShardsRout"
  "er\0221\n\010metadata\030\001 \001(\0132\037.com.alipay.dds.ap"
  "i.v1.MetaData\0224\n\007routers\030\002 \003(\0132#.com.ali"
  "pay.dds.api.v1.MarkedRouter\022E\n\tvariables"
  "\030\003 \003(\01322.com.alipay.dds.api.v1.ShardsRou"
  "ter.VariablesEntry\022>\n\textension\030\004 \003(\0132+."
  "com.alipay.dds.api.v1.MarkedMultiReferen"
  "ce\0320\n\016VariablesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val"
  "ue\030\002 \001(\t:\0028\001B8\n\025com.alipay.dds.api.v1B\021S"
  "hardsRouterProtoP\000Z\ndds/api/v1b\006proto3"
  ;
::google::protobuf::internal::DescriptorTable descriptor_table_shardsRouter_2eproto = {
  false, InitDefaults_shardsRouter_2eproto, 
  descriptor_table_protodef_shardsRouter_2eproto,
  "shardsRouter.proto", &assign_descriptors_table_shardsRouter_2eproto, 638,
};

void AddDescriptors_shardsRouter_2eproto() {
  static constexpr ::google::protobuf::internal::InitFunc deps[1] =
  {
    ::AddDescriptors_common_2eproto,
  };
 ::google::protobuf::internal::AddDescriptors(&descriptor_table_shardsRouter_2eproto, deps, 1);
}

// Force running AddDescriptors() at dynamic initialization time.
static bool dynamic_init_dummy_shardsRouter_2eproto = []() { AddDescriptors_shardsRouter_2eproto(); return true; }();
namespace com {
namespace alipay {
namespace dds {
namespace api {
namespace v1 {

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

Router_RulesEntry_DoNotUse::Router_RulesEntry_DoNotUse() {}
Router_RulesEntry_DoNotUse::Router_RulesEntry_DoNotUse(::google::protobuf::Arena* arena)
    : SuperType(arena) {}
void Router_RulesEntry_DoNotUse::MergeFrom(const Router_RulesEntry_DoNotUse& other) {
  MergeFromInternal(other);
}
::google::protobuf::Metadata Router_RulesEntry_DoNotUse::GetMetadata() const {
  ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_shardsRouter_2eproto);
  return ::file_level_metadata_shardsRouter_2eproto[0];
}
void Router_RulesEntry_DoNotUse::MergeFrom(
    const ::google::protobuf::Message& other) {
  ::google::protobuf::Message::MergeFrom(other);
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool Router_RulesEntry_DoNotUse::_ParseMap(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx) {
  using MF = ::google::protobuf::internal::MapField<
      Router_RulesEntry_DoNotUse, EntryKeyType, EntryValueType,
      kEntryKeyFieldType, kEntryValueFieldType,
      kEntryDefaultEnumValue>;
  auto mf = static_cast<MF*>(object);
  Parser<MF, ::google::protobuf::Map<EntryKeyType, EntryValueType>> parser(mf);
#define DO_(x) if (!(x)) return false
  DO_(parser.ParseMap(begin, end));
  DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
    parser.key().data(), static_cast<int>(parser.key().length()),
    ::google::protobuf::internal::WireFormatLite::PARSE,
    "com.alipay.dds.api.v1.Router.RulesEntry.key"));
  DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
    parser.value().data(), static_cast<int>(parser.value().length()),
    ::google::protobuf::internal::WireFormatLite::PARSE,
    "com.alipay.dds.api.v1.Router.RulesEntry.value"));
#undef DO_
  return true;
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER


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

void Router::InitAsDefaultInstance() {
}
class Router::HasBitSetters {
 public:
};

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Router::kRulesFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

Router::Router()
  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:com.alipay.dds.api.v1.Router)
}
Router::Router(const Router& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  rules_.MergeFrom(from.rules_);
  // @@protoc_insertion_point(copy_constructor:com.alipay.dds.api.v1.Router)
}

void Router::SharedCtor() {
  ::google::protobuf::internal::InitSCC(
      &scc_info_Router_shardsRouter_2eproto.base);
}

Router::~Router() {
  // @@protoc_insertion_point(destructor:com.alipay.dds.api.v1.Router)
  SharedDtor();
}

void Router::SharedDtor() {
}

void Router::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const Router& Router::default_instance() {
  ::google::protobuf::internal::InitSCC(&::scc_info_Router_shardsRouter_2eproto.base);
  return *internal_default_instance();
}


void Router::Clear() {
// @@protoc_insertion_point(message_clear_start:com.alipay.dds.api.v1.Router)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  rules_.Clear();
  _internal_metadata_.Clear();
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* Router::_InternalParse(const char* begin, const char* end, void* object,
                  ::google::protobuf::internal::ParseContext* ctx) {
  auto msg = static_cast<Router*>(object);
  ::google::protobuf::int32 size; (void)size;
  int depth; (void)depth;
  ::google::protobuf::uint32 tag;
  ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
  auto ptr = begin;
  while (ptr < end) {
    ptr = ::google::protobuf::io::Parse32(ptr, &tag);
    GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
    switch (tag >> 3) {
      // map<string, string> rules = 1;
      case 1: {
        if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual;
        do {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          parser_till_end = ::google::protobuf::internal::SlowMapEntryParser;
          auto parse_map = ::com::alipay::dds::api::v1::Router_RulesEntry_DoNotUse::_ParseMap;
          ctx->extra_parse_data().payload.clear();
          ctx->extra_parse_data().parse_map = parse_map;
          object = &msg->rules_;
          if (size > end - ptr) goto len_delim_till_end;
          auto newend = ptr + size;
          GOOGLE_PROTOBUF_PARSER_ASSERT(parse_map(ptr, newend, object, ctx));
          ptr = newend;
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 10 && (ptr += 1));
        break;
      }
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->EndGroup(tag);
          return ptr;
        }
        auto res = UnknownFieldParse(tag, {_InternalParse, msg},
          ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
        ptr = res.first;
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
        if (res.second) return ptr;
      }
    }  // switch
  }  // while
  return ptr;
len_delim_till_end:
  return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
                               {parser_till_end, object}, size);
}
#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool Router::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:com.alipay.dds.api.v1.Router)
  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)) {
      // map<string, string> rules = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
          Router_RulesEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
              Router_RulesEntry_DoNotUse,
              ::std::string, ::std::string,
              ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
              ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
              0 >,
            ::google::protobuf::Map< ::std::string, ::std::string > > parser(&rules_);
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
              input, &parser));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            parser.key().data(), static_cast<int>(parser.key().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "com.alipay.dds.api.v1.Router.RulesEntry.key"));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            parser.value().data(), static_cast<int>(parser.value().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "com.alipay.dds.api.v1.Router.RulesEntry.value"));
        } 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:com.alipay.dds.api.v1.Router)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:com.alipay.dds.api.v1.Router)
  return false;
#undef DO_
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER

void Router::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:com.alipay.dds.api.v1.Router)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // map<string, string> rules = 1;
  if (!this->rules().empty()) {
    typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
        ConstPtr;
    typedef ConstPtr SortItem;
    typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
    struct Utf8Check {
      static void Check(ConstPtr p) {
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->first.data(), static_cast<int>(p->first.length()),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "com.alipay.dds.api.v1.Router.RulesEntry.key");
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->second.data(), static_cast<int>(p->second.length()),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "com.alipay.dds.api.v1.Router.RulesEntry.value");
      }
    };

    if (output->IsSerializationDeterministic() &&
        this->rules().size() > 1) {
      ::std::unique_ptr<SortItem[]> items(
          new SortItem[this->rules().size()]);
      typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
      size_type n = 0;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->rules().begin();
          it != this->rules().end(); ++it, ++n) {
        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
      }
      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
      ::std::unique_ptr<Router_RulesEntry_DoNotUse> entry;
      for (size_type i = 0; i < n; i++) {
        entry.reset(rules_.NewEntryWrapper(items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(1, *entry, output);
        Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
      }
    } else {
      ::std::unique_ptr<Router_RulesEntry_DoNotUse> entry;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->rules().begin();
          it != this->rules().end(); ++it) {
        entry.reset(rules_.NewEntryWrapper(it->first, it->second));
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(1, *entry, output);
        Utf8Check::Check(&(*it));
      }
    }
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:com.alipay.dds.api.v1.Router)
}

::google::protobuf::uint8* Router::InternalSerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:com.alipay.dds.api.v1.Router)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // map<string, string> rules = 1;
  if (!this->rules().empty()) {
    typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
        ConstPtr;
    typedef ConstPtr SortItem;
    typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
    struct Utf8Check {
      static void Check(ConstPtr p) {
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->first.data(), static_cast<int>(p->first.length()),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "com.alipay.dds.api.v1.Router.RulesEntry.key");
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->second.data(), static_cast<int>(p->second.length()),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "com.alipay.dds.api.v1.Router.RulesEntry.value");
      }
    };

    if (false &&
        this->rules().size() > 1) {
      ::std::unique_ptr<SortItem[]> items(
          new SortItem[this->rules().size()]);
      typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
      size_type n = 0;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->rules().begin();
          it != this->rules().end(); ++it, ++n) {
        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
      }
      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
      ::std::unique_ptr<Router_RulesEntry_DoNotUse> entry;
      for (size_type i = 0; i < n; i++) {
        entry.reset(rules_.NewEntryWrapper(items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
        target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessageNoVirtualToArray(1, *entry, target);
        Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
      }
    } else {
      ::std::unique_ptr<Router_RulesEntry_DoNotUse> entry;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->rules().begin();
          it != this->rules().end(); ++it) {
        entry.reset(rules_.NewEntryWrapper(it->first, it->second));
        target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessageNoVirtualToArray(1, *entry, target);
        Utf8Check::Check(&(*it));
      }
    }
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:com.alipay.dds.api.v1.Router)
  return target;
}

size_t Router::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:com.alipay.dds.api.v1.Router)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // map<string, string> rules = 1;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->rules_size());
  {
    ::std::unique_ptr<Router_RulesEntry_DoNotUse> entry;
    for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
        it = this->rules().begin();
        it != this->rules().end(); ++it) {
      entry.reset(rules_.NewEntryWrapper(it->first, it->second));
      total_size += ::google::protobuf::internal::WireFormatLite::
          MessageSizeNoVirtual(*entry);
    }
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void Router::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:com.alipay.dds.api.v1.Router)
  GOOGLE_DCHECK_NE(&from, this);
  const Router* source =
      ::google::protobuf::DynamicCastToGenerated<Router>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:com.alipay.dds.api.v1.Router)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:com.alipay.dds.api.v1.Router)
    MergeFrom(*source);
  }
}

void Router::MergeFrom(const Router& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:com.alipay.dds.api.v1.Router)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  rules_.MergeFrom(from.rules_);
}

void Router::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:com.alipay.dds.api.v1.Router)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void Router::CopyFrom(const Router& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:com.alipay.dds.api.v1.Router)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void Router::Swap(Router* other) {
  if (other == this) return;
  InternalSwap(other);
}
void Router::InternalSwap(Router* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  rules_.Swap(&other->rules_);
}

::google::protobuf::Metadata Router::GetMetadata() const {
  ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_shardsRouter_2eproto);
  return ::file_level_metadata_shardsRouter_2eproto[kIndexInFileMessages];
}


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

void MarkedRouter::InitAsDefaultInstance() {
  ::com::alipay::dds::api::v1::_MarkedRouter_default_instance_._instance.get_mutable()->router_ = const_cast< ::com::alipay::dds::api::v1::Router*>(
      ::com::alipay::dds::api::v1::Router::internal_default_instance());
}
class MarkedRouter::HasBitSetters {
 public:
  static const ::com::alipay::dds::api::v1::Router& router(const MarkedRouter* msg);
};

const ::com::alipay::dds::api::v1::Router&
MarkedRouter::HasBitSetters::router(const MarkedRouter* msg) {
  return *msg->router_;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int MarkedRouter::kMarkFieldNumber;
const int MarkedRouter::kRouterFieldNumber;
const int MarkedRouter::kSequenceFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

MarkedRouter::MarkedRouter()
  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:com.alipay.dds.api.v1.MarkedRouter)
}
MarkedRouter::MarkedRouter(const MarkedRouter& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  mark_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.mark().size() > 0) {
    mark_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.mark_);
  }
  if (from.has_router()) {
    router_ = new ::com::alipay::dds::api::v1::Router(*from.router_);
  } else {
    router_ = nullptr;
  }
  sequence_ = from.sequence_;
  // @@protoc_insertion_point(copy_constructor:com.alipay.dds.api.v1.MarkedRouter)
}

void MarkedRouter::SharedCtor() {
  ::google::protobuf::internal::InitSCC(
      &scc_info_MarkedRouter_shardsRouter_2eproto.base);
  mark_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&router_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&sequence_) -
      reinterpret_cast<char*>(&router_)) + sizeof(sequence_));
}

MarkedRouter::~MarkedRouter() {
  // @@protoc_insertion_point(destructor:com.alipay.dds.api.v1.MarkedRouter)
  SharedDtor();
}

void MarkedRouter::SharedDtor() {
  mark_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete router_;
}

void MarkedRouter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const MarkedRouter& MarkedRouter::default_instance() {
  ::google::protobuf::internal::InitSCC(&::scc_info_MarkedRouter_shardsRouter_2eproto.base);
  return *internal_default_instance();
}


void MarkedRouter::Clear() {
// @@protoc_insertion_point(message_clear_start:com.alipay.dds.api.v1.MarkedRouter)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  mark_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == nullptr && router_ != nullptr) {
    delete router_;
  }
  router_ = nullptr;
  sequence_ = false;
  _internal_metadata_.Clear();
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* MarkedRouter::_InternalParse(const char* begin, const char* end, void* object,
                  ::google::protobuf::internal::ParseContext* ctx) {
  auto msg = static_cast<MarkedRouter*>(object);
  ::google::protobuf::int32 size; (void)size;
  int depth; (void)depth;
  ::google::protobuf::uint32 tag;
  ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
  auto ptr = begin;
  while (ptr < end) {
    ptr = ::google::protobuf::io::Parse32(ptr, &tag);
    GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
    switch (tag >> 3) {
      // string mark = 1;
      case 1: {
        if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("com.alipay.dds.api.v1.MarkedRouter.mark");
        object = msg->mutable_mark();
        if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
          parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
          goto string_till_end;
        }
        GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
        ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
        ptr += size;
        break;
      }
      // .com.alipay.dds.api.v1.Router router = 2;
      case 2: {
        if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        parser_till_end = ::com::alipay::dds::api::v1::Router::_InternalParse;
        object = msg->mutable_router();
        if (size > end - ptr) goto len_delim_till_end;
        ptr += size;
        GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
            {parser_till_end, object}, ptr - size, ptr));
        break;
      }
      // bool sequence = 3;
      case 3: {
        if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual;
        msg->set_sequence(::google::protobuf::internal::ReadVarint(&ptr));
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        break;
      }
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->EndGroup(tag);
          return ptr;
        }
        auto res = UnknownFieldParse(tag, {_InternalParse, msg},
          ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
        ptr = res.first;
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
        if (res.second) return ptr;
      }
    }  // switch
  }  // while
  return ptr;
string_till_end:
  static_cast<::std::string*>(object)->clear();
  static_cast<::std::string*>(object)->reserve(size);
  goto len_delim_till_end;
len_delim_till_end:
  return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
                               {parser_till_end, object}, size);
}
#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool MarkedRouter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:com.alipay.dds.api.v1.MarkedRouter)
  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)) {
      // string mark = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_mark()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->mark().data(), static_cast<int>(this->mark().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "com.alipay.dds.api.v1.MarkedRouter.mark"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .com.alipay.dds.api.v1.Router router = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_router()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // bool sequence = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (24 & 0xFF)) {

          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &sequence_)));
        } 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:com.alipay.dds.api.v1.MarkedRouter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:com.alipay.dds.api.v1.MarkedRouter)
  return false;
#undef DO_
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER

void MarkedRouter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:com.alipay.dds.api.v1.MarkedRouter)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string mark = 1;
  if (this->mark().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->mark().data(), static_cast<int>(this->mark().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "com.alipay.dds.api.v1.MarkedRouter.mark");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->mark(), output);
  }

  // .com.alipay.dds.api.v1.Router router = 2;
  if (this->has_router()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, HasBitSetters::router(this), output);
  }

  // bool sequence = 3;
  if (this->sequence() != 0) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->sequence(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:com.alipay.dds.api.v1.MarkedRouter)
}

::google::protobuf::uint8* MarkedRouter::InternalSerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:com.alipay.dds.api.v1.MarkedRouter)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string mark = 1;
  if (this->mark().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->mark().data(), static_cast<int>(this->mark().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "com.alipay.dds.api.v1.MarkedRouter.mark");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->mark(), target);
  }

  // .com.alipay.dds.api.v1.Router router = 2;
  if (this->has_router()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, HasBitSetters::router(this), target);
  }

  // bool sequence = 3;
  if (this->sequence() != 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->sequence(), 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:com.alipay.dds.api.v1.MarkedRouter)
  return target;
}

size_t MarkedRouter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:com.alipay.dds.api.v1.MarkedRouter)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

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

  // .com.alipay.dds.api.v1.Router router = 2;
  if (this->has_router()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *router_);
  }

  // bool sequence = 3;
  if (this->sequence() != 0) {
    total_size += 1 + 1;
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void MarkedRouter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:com.alipay.dds.api.v1.MarkedRouter)
  GOOGLE_DCHECK_NE(&from, this);
  const MarkedRouter* source =
      ::google::protobuf::DynamicCastToGenerated<MarkedRouter>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:com.alipay.dds.api.v1.MarkedRouter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:com.alipay.dds.api.v1.MarkedRouter)
    MergeFrom(*source);
  }
}

void MarkedRouter::MergeFrom(const MarkedRouter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:com.alipay.dds.api.v1.MarkedRouter)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.mark().size() > 0) {

    mark_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.mark_);
  }
  if (from.has_router()) {
    mutable_router()->::com::alipay::dds::api::v1::Router::MergeFrom(from.router());
  }
  if (from.sequence() != 0) {
    set_sequence(from.sequence());
  }
}

void MarkedRouter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:com.alipay.dds.api.v1.MarkedRouter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void MarkedRouter::CopyFrom(const MarkedRouter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:com.alipay.dds.api.v1.MarkedRouter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void MarkedRouter::Swap(MarkedRouter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void MarkedRouter::InternalSwap(MarkedRouter* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  mark_.Swap(&other->mark_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(router_, other->router_);
  swap(sequence_, other->sequence_);
}

::google::protobuf::Metadata MarkedRouter::GetMetadata() const {
  ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_shardsRouter_2eproto);
  return ::file_level_metadata_shardsRouter_2eproto[kIndexInFileMessages];
}


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

ShardsRouter_VariablesEntry_DoNotUse::ShardsRouter_VariablesEntry_DoNotUse() {}
ShardsRouter_VariablesEntry_DoNotUse::ShardsRouter_VariablesEntry_DoNotUse(::google::protobuf::Arena* arena)
    : SuperType(arena) {}
void ShardsRouter_VariablesEntry_DoNotUse::MergeFrom(const ShardsRouter_VariablesEntry_DoNotUse& other) {
  MergeFromInternal(other);
}
::google::protobuf::Metadata ShardsRouter_VariablesEntry_DoNotUse::GetMetadata() const {
  ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_shardsRouter_2eproto);
  return ::file_level_metadata_shardsRouter_2eproto[3];
}
void ShardsRouter_VariablesEntry_DoNotUse::MergeFrom(
    const ::google::protobuf::Message& other) {
  ::google::protobuf::Message::MergeFrom(other);
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool ShardsRouter_VariablesEntry_DoNotUse::_ParseMap(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx) {
  using MF = ::google::protobuf::internal::MapField<
      ShardsRouter_VariablesEntry_DoNotUse, EntryKeyType, EntryValueType,
      kEntryKeyFieldType, kEntryValueFieldType,
      kEntryDefaultEnumValue>;
  auto mf = static_cast<MF*>(object);
  Parser<MF, ::google::protobuf::Map<EntryKeyType, EntryValueType>> parser(mf);
#define DO_(x) if (!(x)) return false
  DO_(parser.ParseMap(begin, end));
  DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
    parser.key().data(), static_cast<int>(parser.key().length()),
    ::google::protobuf::internal::WireFormatLite::PARSE,
    "com.alipay.dds.api.v1.ShardsRouter.VariablesEntry.key"));
  DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
    parser.value().data(), static_cast<int>(parser.value().length()),
    ::google::protobuf::internal::WireFormatLite::PARSE,
    "com.alipay.dds.api.v1.ShardsRouter.VariablesEntry.value"));
#undef DO_
  return true;
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER


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

void ShardsRouter::InitAsDefaultInstance() {
  ::com::alipay::dds::api::v1::_ShardsRouter_default_instance_._instance.get_mutable()->metadata_ = const_cast< ::com::alipay::dds::api::v1::MetaData*>(
      ::com::alipay::dds::api::v1::MetaData::internal_default_instance());
}
class ShardsRouter::HasBitSetters {
 public:
  static const ::com::alipay::dds::api::v1::MetaData& metadata(const ShardsRouter* msg);
};

const ::com::alipay::dds::api::v1::MetaData&
ShardsRouter::HasBitSetters::metadata(const ShardsRouter* msg) {
  return *msg->metadata_;
}
void ShardsRouter::clear_metadata() {
  if (GetArenaNoVirtual() == nullptr && metadata_ != nullptr) {
    delete metadata_;
  }
  metadata_ = nullptr;
}
void ShardsRouter::clear_extension() {
  extension_.Clear();
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ShardsRouter::kMetadataFieldNumber;
const int ShardsRouter::kRoutersFieldNumber;
const int ShardsRouter::kVariablesFieldNumber;
const int ShardsRouter::kExtensionFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ShardsRouter::ShardsRouter()
  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:com.alipay.dds.api.v1.ShardsRouter)
}
ShardsRouter::ShardsRouter(const ShardsRouter& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(nullptr),
      routers_(from.routers_),
      extension_(from.extension_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  variables_.MergeFrom(from.variables_);
  if (from.has_metadata()) {
    metadata_ = new ::com::alipay::dds::api::v1::MetaData(*from.metadata_);
  } else {
    metadata_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:com.alipay.dds.api.v1.ShardsRouter)
}

void ShardsRouter::SharedCtor() {
  ::google::protobuf::internal::InitSCC(
      &scc_info_ShardsRouter_shardsRouter_2eproto.base);
  metadata_ = nullptr;
}

ShardsRouter::~ShardsRouter() {
  // @@protoc_insertion_point(destructor:com.alipay.dds.api.v1.ShardsRouter)
  SharedDtor();
}

void ShardsRouter::SharedDtor() {
  if (this != internal_default_instance()) delete metadata_;
}

void ShardsRouter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ShardsRouter& ShardsRouter::default_instance() {
  ::google::protobuf::internal::InitSCC(&::scc_info_ShardsRouter_shardsRouter_2eproto.base);
  return *internal_default_instance();
}


void ShardsRouter::Clear() {
// @@protoc_insertion_point(message_clear_start:com.alipay.dds.api.v1.ShardsRouter)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  routers_.Clear();
  variables_.Clear();
  extension_.Clear();
  if (GetArenaNoVirtual() == nullptr && metadata_ != nullptr) {
    delete metadata_;
  }
  metadata_ = nullptr;
  _internal_metadata_.Clear();
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* ShardsRouter::_InternalParse(const char* begin, const char* end, void* object,
                  ::google::protobuf::internal::ParseContext* ctx) {
  auto msg = static_cast<ShardsRouter*>(object);
  ::google::protobuf::int32 size; (void)size;
  int depth; (void)depth;
  ::google::protobuf::uint32 tag;
  ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
  auto ptr = begin;
  while (ptr < end) {
    ptr = ::google::protobuf::io::Parse32(ptr, &tag);
    GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
    switch (tag >> 3) {
      // .com.alipay.dds.api.v1.MetaData metadata = 1;
      case 1: {
        if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        parser_till_end = ::com::alipay::dds::api::v1::MetaData::_InternalParse;
        object = msg->mutable_metadata();
        if (size > end - ptr) goto len_delim_till_end;
        ptr += size;
        GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
            {parser_till_end, object}, ptr - size, ptr));
        break;
      }
      // repeated .com.alipay.dds.api.v1.MarkedRouter routers = 2;
      case 2: {
        if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual;
        do {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          parser_till_end = ::com::alipay::dds::api::v1::MarkedRouter::_InternalParse;
          object = msg->add_routers();
          if (size > end - ptr) goto len_delim_till_end;
          ptr += size;
          GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
              {parser_till_end, object}, ptr - size, ptr));
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 18 && (ptr += 1));
        break;
      }
      // map<string, string> variables = 3;
      case 3: {
        if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual;
        do {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          parser_till_end = ::google::protobuf::internal::SlowMapEntryParser;
          auto parse_map = ::com::alipay::dds::api::v1::ShardsRouter_VariablesEntry_DoNotUse::_ParseMap;
          ctx->extra_parse_data().payload.clear();
          ctx->extra_parse_data().parse_map = parse_map;
          object = &msg->variables_;
          if (size > end - ptr) goto len_delim_till_end;
          auto newend = ptr + size;
          GOOGLE_PROTOBUF_PARSER_ASSERT(parse_map(ptr, newend, object, ctx));
          ptr = newend;
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 26 && (ptr += 1));
        break;
      }
      // repeated .com.alipay.dds.api.v1.MarkedMultiReference extension = 4;
      case 4: {
        if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual;
        do {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          parser_till_end = ::com::alipay::dds::api::v1::MarkedMultiReference::_InternalParse;
          object = msg->add_extension();
          if (size > end - ptr) goto len_delim_till_end;
          ptr += size;
          GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
              {parser_till_end, object}, ptr - size, ptr));
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 34 && (ptr += 1));
        break;
      }
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->EndGroup(tag);
          return ptr;
        }
        auto res = UnknownFieldParse(tag, {_InternalParse, msg},
          ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
        ptr = res.first;
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
        if (res.second) return ptr;
      }
    }  // switch
  }  // while
  return ptr;
len_delim_till_end:
  return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
                               {parser_till_end, object}, size);
}
#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool ShardsRouter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:com.alipay.dds.api.v1.ShardsRouter)
  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)) {
      // .com.alipay.dds.api.v1.MetaData metadata = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_metadata()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .com.alipay.dds.api.v1.MarkedRouter routers = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_routers()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // map<string, string> variables = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) {
          ShardsRouter_VariablesEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
              ShardsRouter_VariablesEntry_DoNotUse,
              ::std::string, ::std::string,
              ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
              ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
              0 >,
            ::google::protobuf::Map< ::std::string, ::std::string > > parser(&variables_);
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
              input, &parser));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            parser.key().data(), static_cast<int>(parser.key().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "com.alipay.dds.api.v1.ShardsRouter.VariablesEntry.key"));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            parser.value().data(), static_cast<int>(parser.value().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "com.alipay.dds.api.v1.ShardsRouter.VariablesEntry.value"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .com.alipay.dds.api.v1.MarkedMultiReference extension = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_extension()));
        } 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:com.alipay.dds.api.v1.ShardsRouter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:com.alipay.dds.api.v1.ShardsRouter)
  return false;
#undef DO_
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER

void ShardsRouter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:com.alipay.dds.api.v1.ShardsRouter)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .com.alipay.dds.api.v1.MetaData metadata = 1;
  if (this->has_metadata()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, HasBitSetters::metadata(this), output);
  }

  // repeated .com.alipay.dds.api.v1.MarkedRouter routers = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->routers_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2,
      this->routers(static_cast<int>(i)),
      output);
  }

  // map<string, string> variables = 3;
  if (!this->variables().empty()) {
    typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
        ConstPtr;
    typedef ConstPtr SortItem;
    typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
    struct Utf8Check {
      static void Check(ConstPtr p) {
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->first.data(), static_cast<int>(p->first.length()),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "com.alipay.dds.api.v1.ShardsRouter.VariablesEntry.key");
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->second.data(), static_cast<int>(p->second.length()),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "com.alipay.dds.api.v1.ShardsRouter.VariablesEntry.value");
      }
    };

    if (output->IsSerializationDeterministic() &&
        this->variables().size() > 1) {
      ::std::unique_ptr<SortItem[]> items(
          new SortItem[this->variables().size()]);
      typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
      size_type n = 0;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->variables().begin();
          it != this->variables().end(); ++it, ++n) {
        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
      }
      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
      ::std::unique_ptr<ShardsRouter_VariablesEntry_DoNotUse> entry;
      for (size_type i = 0; i < n; i++) {
        entry.reset(variables_.NewEntryWrapper(items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(3, *entry, output);
        Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
      }
    } else {
      ::std::unique_ptr<ShardsRouter_VariablesEntry_DoNotUse> entry;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->variables().begin();
          it != this->variables().end(); ++it) {
        entry.reset(variables_.NewEntryWrapper(it->first, it->second));
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(3, *entry, output);
        Utf8Check::Check(&(*it));
      }
    }
  }

  // repeated .com.alipay.dds.api.v1.MarkedMultiReference extension = 4;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->extension_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      4,
      this->extension(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:com.alipay.dds.api.v1.ShardsRouter)
}

::google::protobuf::uint8* ShardsRouter::InternalSerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:com.alipay.dds.api.v1.ShardsRouter)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .com.alipay.dds.api.v1.MetaData metadata = 1;
  if (this->has_metadata()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, HasBitSetters::metadata(this), target);
  }

  // repeated .com.alipay.dds.api.v1.MarkedRouter routers = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->routers_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, this->routers(static_cast<int>(i)), target);
  }

  // map<string, string> variables = 3;
  if (!this->variables().empty()) {
    typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
        ConstPtr;
    typedef ConstPtr SortItem;
    typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
    struct Utf8Check {
      static void Check(ConstPtr p) {
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->first.data(), static_cast<int>(p->first.length()),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "com.alipay.dds.api.v1.ShardsRouter.VariablesEntry.key");
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->second.data(), static_cast<int>(p->second.length()),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "com.alipay.dds.api.v1.ShardsRouter.VariablesEntry.value");
      }
    };

    if (false &&
        this->variables().size() > 1) {
      ::std::unique_ptr<SortItem[]> items(
          new SortItem[this->variables().size()]);
      typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
      size_type n = 0;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->variables().begin();
          it != this->variables().end(); ++it, ++n) {
        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
      }
      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
      ::std::unique_ptr<ShardsRouter_VariablesEntry_DoNotUse> entry;
      for (size_type i = 0; i < n; i++) {
        entry.reset(variables_.NewEntryWrapper(items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
        target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessageNoVirtualToArray(3, *entry, target);
        Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
      }
    } else {
      ::std::unique_ptr<ShardsRouter_VariablesEntry_DoNotUse> entry;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->variables().begin();
          it != this->variables().end(); ++it) {
        entry.reset(variables_.NewEntryWrapper(it->first, it->second));
        target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessageNoVirtualToArray(3, *entry, target);
        Utf8Check::Check(&(*it));
      }
    }
  }

  // repeated .com.alipay.dds.api.v1.MarkedMultiReference extension = 4;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->extension_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        4, this->extension(static_cast<int>(i)), 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:com.alipay.dds.api.v1.ShardsRouter)
  return target;
}

size_t ShardsRouter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:com.alipay.dds.api.v1.ShardsRouter)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .com.alipay.dds.api.v1.MarkedRouter routers = 2;
  {
    unsigned int count = static_cast<unsigned int>(this->routers_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->routers(static_cast<int>(i)));
    }
  }

  // map<string, string> variables = 3;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->variables_size());
  {
    ::std::unique_ptr<ShardsRouter_VariablesEntry_DoNotUse> entry;
    for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
        it = this->variables().begin();
        it != this->variables().end(); ++it) {
      entry.reset(variables_.NewEntryWrapper(it->first, it->second));
      total_size += ::google::protobuf::internal::WireFormatLite::
          MessageSizeNoVirtual(*entry);
    }
  }

  // repeated .com.alipay.dds.api.v1.MarkedMultiReference extension = 4;
  {
    unsigned int count = static_cast<unsigned int>(this->extension_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->extension(static_cast<int>(i)));
    }
  }

  // .com.alipay.dds.api.v1.MetaData metadata = 1;
  if (this->has_metadata()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *metadata_);
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void ShardsRouter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:com.alipay.dds.api.v1.ShardsRouter)
  GOOGLE_DCHECK_NE(&from, this);
  const ShardsRouter* source =
      ::google::protobuf::DynamicCastToGenerated<ShardsRouter>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:com.alipay.dds.api.v1.ShardsRouter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:com.alipay.dds.api.v1.ShardsRouter)
    MergeFrom(*source);
  }
}

void ShardsRouter::MergeFrom(const ShardsRouter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:com.alipay.dds.api.v1.ShardsRouter)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  routers_.MergeFrom(from.routers_);
  variables_.MergeFrom(from.variables_);
  extension_.MergeFrom(from.extension_);
  if (from.has_metadata()) {
    mutable_metadata()->::com::alipay::dds::api::v1::MetaData::MergeFrom(from.metadata());
  }
}

void ShardsRouter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:com.alipay.dds.api.v1.ShardsRouter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ShardsRouter::CopyFrom(const ShardsRouter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:com.alipay.dds.api.v1.ShardsRouter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void ShardsRouter::Swap(ShardsRouter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ShardsRouter::InternalSwap(ShardsRouter* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  CastToBase(&routers_)->InternalSwap(CastToBase(&other->routers_));
  variables_.Swap(&other->variables_);
  CastToBase(&extension_)->InternalSwap(CastToBase(&other->extension_));
  swap(metadata_, other->metadata_);
}

::google::protobuf::Metadata ShardsRouter::GetMetadata() const {
  ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_shardsRouter_2eproto);
  return ::file_level_metadata_shardsRouter_2eproto[kIndexInFileMessages];
}


// @@protoc_insertion_point(namespace_scope)
}  // namespace v1
}  // namespace api
}  // namespace dds
}  // namespace alipay
}  // namespace com
namespace google {
namespace protobuf {
template<> PROTOBUF_NOINLINE ::com::alipay::dds::api::v1::Router_RulesEntry_DoNotUse* Arena::CreateMaybeMessage< ::com::alipay::dds::api::v1::Router_RulesEntry_DoNotUse >(Arena* arena) {
  return Arena::CreateInternal< ::com::alipay::dds::api::v1::Router_RulesEntry_DoNotUse >(arena);
}
template<> PROTOBUF_NOINLINE ::com::alipay::dds::api::v1::Router* Arena::CreateMaybeMessage< ::com::alipay::dds::api::v1::Router >(Arena* arena) {
  return Arena::CreateInternal< ::com::alipay::dds::api::v1::Router >(arena);
}
template<> PROTOBUF_NOINLINE ::com::alipay::dds::api::v1::MarkedRouter* Arena::CreateMaybeMessage< ::com::alipay::dds::api::v1::MarkedRouter >(Arena* arena) {
  return Arena::CreateInternal< ::com::alipay::dds::api::v1::MarkedRouter >(arena);
}
template<> PROTOBUF_NOINLINE ::com::alipay::dds::api::v1::ShardsRouter_VariablesEntry_DoNotUse* Arena::CreateMaybeMessage< ::com::alipay::dds::api::v1::ShardsRouter_VariablesEntry_DoNotUse >(Arena* arena) {
  return Arena::CreateInternal< ::com::alipay::dds::api::v1::ShardsRouter_VariablesEntry_DoNotUse >(arena);
}
template<> PROTOBUF_NOINLINE ::com::alipay::dds::api::v1::ShardsRouter* Arena::CreateMaybeMessage< ::com::alipay::dds::api::v1::ShardsRouter >(Arena* arena) {
  return Arena::CreateInternal< ::com::alipay::dds::api::v1::ShardsRouter >(arena);
}
}  // namespace protobuf
}  // namespace google

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