// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: envoy/api/v2/discovery.proto

#include "envoy/api/v2/discovery.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_envoy_2fapi_2fv2_2fcore_2fbase_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_Node_envoy_2fapi_2fv2_2fcore_2fbase_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_envoy_2fapi_2fv2_2fdiscovery_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_CRSummary_envoy_2fapi_2fv2_2fdiscovery_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_envoy_2fapi_2fv2_2fdiscovery_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse_envoy_2fapi_2fv2_2fdiscovery_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_envoy_2fapi_2fv2_2fdiscovery_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_CheckMessage_envoy_2fapi_2fv2_2fdiscovery_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_envoy_2fapi_2fv2_2fdiscovery_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_DiscoveryResponseExpand_envoy_2fapi_2fv2_2fdiscovery_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_envoy_2fapi_2fv2_2fdiscovery_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Resource_envoy_2fapi_2fv2_2fdiscovery_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fany_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Any_google_2fprotobuf_2fany_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2frpc_2fstatus_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Status_google_2frpc_2fstatus_2eproto;
namespace envoy {
namespace api {
namespace v2 {
class DiscoveryRequestDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<DiscoveryRequest> _instance;
} _DiscoveryRequest_default_instance_;
class DiscoveryResponseDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<DiscoveryResponse> _instance;
} _DiscoveryResponse_default_instance_;
class DiscoveryResponseExpandDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<DiscoveryResponseExpand> _instance;
} _DiscoveryResponseExpand_default_instance_;
class CheckMessageDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<CheckMessage> _instance;
} _CheckMessage_default_instance_;
class CRSummaryDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<CRSummary> _instance;
} _CRSummary_default_instance_;
class IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUseDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse> _instance;
} _IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse_default_instance_;
class IncrementalDiscoveryRequestDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<IncrementalDiscoveryRequest> _instance;
} _IncrementalDiscoveryRequest_default_instance_;
class IncrementalDiscoveryResponseDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<IncrementalDiscoveryResponse> _instance;
} _IncrementalDiscoveryResponse_default_instance_;
class ResourceDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<Resource> _instance;
} _Resource_default_instance_;
}  // namespace v2
}  // namespace api
}  // namespace envoy
static void InitDefaultsDiscoveryRequest_envoy_2fapi_2fv2_2fdiscovery_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::envoy::api::v2::_DiscoveryRequest_default_instance_;
    new (ptr) ::envoy::api::v2::DiscoveryRequest();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::envoy::api::v2::DiscoveryRequest::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<2> scc_info_DiscoveryRequest_envoy_2fapi_2fv2_2fdiscovery_2eproto =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsDiscoveryRequest_envoy_2fapi_2fv2_2fdiscovery_2eproto}, {
      &scc_info_Node_envoy_2fapi_2fv2_2fcore_2fbase_2eproto.base,
      &scc_info_Status_google_2frpc_2fstatus_2eproto.base,}};

static void InitDefaultsDiscoveryResponse_envoy_2fapi_2fv2_2fdiscovery_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::envoy::api::v2::_DiscoveryResponse_default_instance_;
    new (ptr) ::envoy::api::v2::DiscoveryResponse();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::envoy::api::v2::DiscoveryResponse::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<3> scc_info_DiscoveryResponse_envoy_2fapi_2fv2_2fdiscovery_2eproto =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsDiscoveryResponse_envoy_2fapi_2fv2_2fdiscovery_2eproto}, {
      &scc_info_Any_google_2fprotobuf_2fany_2eproto.base,
      &scc_info_Status_google_2frpc_2fstatus_2eproto.base,
      &scc_info_DiscoveryResponseExpand_envoy_2fapi_2fv2_2fdiscovery_2eproto.base,}};

static void InitDefaultsDiscoveryResponseExpand_envoy_2fapi_2fv2_2fdiscovery_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::envoy::api::v2::_DiscoveryResponseExpand_default_instance_;
    new (ptr) ::envoy::api::v2::DiscoveryResponseExpand();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::envoy::api::v2::DiscoveryResponseExpand::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_DiscoveryResponseExpand_envoy_2fapi_2fv2_2fdiscovery_2eproto =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsDiscoveryResponseExpand_envoy_2fapi_2fv2_2fdiscovery_2eproto}, {
      &scc_info_CheckMessage_envoy_2fapi_2fv2_2fdiscovery_2eproto.base,}};

static void InitDefaultsCheckMessage_envoy_2fapi_2fv2_2fdiscovery_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::envoy::api::v2::_CheckMessage_default_instance_;
    new (ptr) ::envoy::api::v2::CheckMessage();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::envoy::api::v2::CheckMessage::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_CheckMessage_envoy_2fapi_2fv2_2fdiscovery_2eproto =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsCheckMessage_envoy_2fapi_2fv2_2fdiscovery_2eproto}, {
      &scc_info_CRSummary_envoy_2fapi_2fv2_2fdiscovery_2eproto.base,}};

static void InitDefaultsCRSummary_envoy_2fapi_2fv2_2fdiscovery_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::envoy::api::v2::_CRSummary_default_instance_;
    new (ptr) ::envoy::api::v2::CRSummary();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::envoy::api::v2::CRSummary::InitAsDefaultInstance();
}

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

static void InitDefaultsIncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse_envoy_2fapi_2fv2_2fdiscovery_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::envoy::api::v2::_IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse_default_instance_;
    new (ptr) ::envoy::api::v2::IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse();
  }
  ::envoy::api::v2::IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse::InitAsDefaultInstance();
}

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

static void InitDefaultsIncrementalDiscoveryRequest_envoy_2fapi_2fv2_2fdiscovery_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::envoy::api::v2::_IncrementalDiscoveryRequest_default_instance_;
    new (ptr) ::envoy::api::v2::IncrementalDiscoveryRequest();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::envoy::api::v2::IncrementalDiscoveryRequest::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<3> scc_info_IncrementalDiscoveryRequest_envoy_2fapi_2fv2_2fdiscovery_2eproto =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsIncrementalDiscoveryRequest_envoy_2fapi_2fv2_2fdiscovery_2eproto}, {
      &scc_info_Node_envoy_2fapi_2fv2_2fcore_2fbase_2eproto.base,
      &scc_info_IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse_envoy_2fapi_2fv2_2fdiscovery_2eproto.base,
      &scc_info_Status_google_2frpc_2fstatus_2eproto.base,}};

static void InitDefaultsIncrementalDiscoveryResponse_envoy_2fapi_2fv2_2fdiscovery_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::envoy::api::v2::_IncrementalDiscoveryResponse_default_instance_;
    new (ptr) ::envoy::api::v2::IncrementalDiscoveryResponse();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::envoy::api::v2::IncrementalDiscoveryResponse::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_IncrementalDiscoveryResponse_envoy_2fapi_2fv2_2fdiscovery_2eproto =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsIncrementalDiscoveryResponse_envoy_2fapi_2fv2_2fdiscovery_2eproto}, {
      &scc_info_Resource_envoy_2fapi_2fv2_2fdiscovery_2eproto.base,}};

static void InitDefaultsResource_envoy_2fapi_2fv2_2fdiscovery_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::envoy::api::v2::_Resource_default_instance_;
    new (ptr) ::envoy::api::v2::Resource();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::envoy::api::v2::Resource::InitAsDefaultInstance();
}

::google::protobuf::internal::SCCInfo<1> scc_info_Resource_envoy_2fapi_2fv2_2fdiscovery_2eproto =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsResource_envoy_2fapi_2fv2_2fdiscovery_2eproto}, {
      &scc_info_Any_google_2fprotobuf_2fany_2eproto.base,}};

void InitDefaults_envoy_2fapi_2fv2_2fdiscovery_2eproto() {
  ::google::protobuf::internal::InitSCC(&scc_info_DiscoveryRequest_envoy_2fapi_2fv2_2fdiscovery_2eproto.base);
  ::google::protobuf::internal::InitSCC(&scc_info_DiscoveryResponse_envoy_2fapi_2fv2_2fdiscovery_2eproto.base);
  ::google::protobuf::internal::InitSCC(&scc_info_DiscoveryResponseExpand_envoy_2fapi_2fv2_2fdiscovery_2eproto.base);
  ::google::protobuf::internal::InitSCC(&scc_info_CheckMessage_envoy_2fapi_2fv2_2fdiscovery_2eproto.base);
  ::google::protobuf::internal::InitSCC(&scc_info_CRSummary_envoy_2fapi_2fv2_2fdiscovery_2eproto.base);
  ::google::protobuf::internal::InitSCC(&scc_info_IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse_envoy_2fapi_2fv2_2fdiscovery_2eproto.base);
  ::google::protobuf::internal::InitSCC(&scc_info_IncrementalDiscoveryRequest_envoy_2fapi_2fv2_2fdiscovery_2eproto.base);
  ::google::protobuf::internal::InitSCC(&scc_info_IncrementalDiscoveryResponse_envoy_2fapi_2fv2_2fdiscovery_2eproto.base);
  ::google::protobuf::internal::InitSCC(&scc_info_Resource_envoy_2fapi_2fv2_2fdiscovery_2eproto.base);
}

::google::protobuf::Metadata file_level_metadata_envoy_2fapi_2fv2_2fdiscovery_2eproto[9];
constexpr ::google::protobuf::EnumDescriptor const** file_level_enum_descriptors_envoy_2fapi_2fv2_2fdiscovery_2eproto = nullptr;
constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_envoy_2fapi_2fv2_2fdiscovery_2eproto = nullptr;

const ::google::protobuf::uint32 TableStruct_envoy_2fapi_2fv2_2fdiscovery_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::DiscoveryRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::DiscoveryRequest, version_info_),
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::DiscoveryRequest, node_),
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::DiscoveryRequest, resource_names_),
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::DiscoveryRequest, type_url_),
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::DiscoveryRequest, response_nonce_),
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::DiscoveryRequest, error_detail_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::DiscoveryResponse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::DiscoveryResponse, version_info_),
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::DiscoveryResponse, resources_),
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::DiscoveryResponse, canary_),
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::DiscoveryResponse, type_url_),
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::DiscoveryResponse, nonce_),
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::DiscoveryResponse, error_detail_),
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::DiscoveryResponse, expand_field_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::DiscoveryResponseExpand, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::DiscoveryResponseExpand, check_message_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::CheckMessage, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::CheckMessage, cr_summarys_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::CRSummary, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::CRSummary, cr_name_),
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::CRSummary, cr_kind_),
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::CRSummary, cr_version_),
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse, key_),
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse, value_),
  0,
  1,
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::IncrementalDiscoveryRequest, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::IncrementalDiscoveryRequest, node_),
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::IncrementalDiscoveryRequest, type_url_),
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::IncrementalDiscoveryRequest, resource_names_subscribe_),
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::IncrementalDiscoveryRequest, resource_names_unsubscribe_),
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::IncrementalDiscoveryRequest, initial_resource_versions_),
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::IncrementalDiscoveryRequest, response_nonce_),
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::IncrementalDiscoveryRequest, error_detail_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::IncrementalDiscoveryResponse, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::IncrementalDiscoveryResponse, system_version_info_),
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::IncrementalDiscoveryResponse, resources_),
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::IncrementalDiscoveryResponse, removed_resources_),
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::IncrementalDiscoveryResponse, nonce_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::Resource, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::Resource, version_),
  PROTOBUF_FIELD_OFFSET(::envoy::api::v2::Resource, resource_),
};
static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, sizeof(::envoy::api::v2::DiscoveryRequest)},
  { 11, -1, sizeof(::envoy::api::v2::DiscoveryResponse)},
  { 23, -1, sizeof(::envoy::api::v2::DiscoveryResponseExpand)},
  { 29, -1, sizeof(::envoy::api::v2::CheckMessage)},
  { 35, -1, sizeof(::envoy::api::v2::CRSummary)},
  { 43, 50, sizeof(::envoy::api::v2::IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse)},
  { 52, -1, sizeof(::envoy::api::v2::IncrementalDiscoveryRequest)},
  { 64, -1, sizeof(::envoy::api::v2::IncrementalDiscoveryResponse)},
  { 73, -1, sizeof(::envoy::api::v2::Resource)},
};

static ::google::protobuf::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::google::protobuf::Message*>(&::envoy::api::v2::_DiscoveryRequest_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::envoy::api::v2::_DiscoveryResponse_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::envoy::api::v2::_DiscoveryResponseExpand_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::envoy::api::v2::_CheckMessage_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::envoy::api::v2::_CRSummary_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::envoy::api::v2::_IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::envoy::api::v2::_IncrementalDiscoveryRequest_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::envoy::api::v2::_IncrementalDiscoveryResponse_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::envoy::api::v2::_Resource_default_instance_),
};

::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_envoy_2fapi_2fv2_2fdiscovery_2eproto = {
  {}, AddDescriptors_envoy_2fapi_2fv2_2fdiscovery_2eproto, "envoy/api/v2/discovery.proto", schemas,
  file_default_instances, TableStruct_envoy_2fapi_2fv2_2fdiscovery_2eproto::offsets,
  file_level_metadata_envoy_2fapi_2fv2_2fdiscovery_2eproto, 9, file_level_enum_descriptors_envoy_2fapi_2fv2_2fdiscovery_2eproto, file_level_service_descriptors_envoy_2fapi_2fv2_2fdiscovery_2eproto,
};

const char descriptor_table_protodef_envoy_2fapi_2fv2_2fdiscovery_2eproto[] =
  "\n\034envoy/api/v2/discovery.proto\022\014envoy.ap"
  "i.v2\032\034envoy/api/v2/core/base.proto\032\031goog"
  "le/protobuf/any.proto\032\027google/rpc/status"
  ".proto\032\024gogoproto/gogo.proto\"\273\001\n\020Discove"
  "ryRequest\022\024\n\014version_info\030\001 \001(\t\022%\n\004node\030"
  "\002 \001(\0132\027.envoy.api.v2.core.Node\022\026\n\016resour"
  "ce_names\030\003 \003(\t\022\020\n\010type_url\030\004 \001(\t\022\026\n\016resp"
  "onse_nonce\030\005 \001(\t\022(\n\014error_detail\030\006 \001(\0132\022"
  ".google.rpc.Status\"\360\001\n\021DiscoveryResponse"
  "\022\024\n\014version_info\030\001 \001(\t\022-\n\tresources\030\002 \003("
  "\0132\024.google.protobuf.AnyB\004\310\336\037\000\022\016\n\006canary\030"
  "\003 \001(\010\022\020\n\010type_url\030\004 \001(\t\022\r\n\005nonce\030\005 \001(\t\022("
  "\n\014error_detail\030P \001(\0132\022.google.rpc.Status"
  "\022;\n\014expand_field\030Z \001(\0132%.envoy.api.v2.Di"
  "scoveryResponseExpand\"L\n\027DiscoveryRespon"
  "seExpand\0221\n\rcheck_message\030\001 \001(\0132\032.envoy."
  "api.v2.CheckMessage\"<\n\014CheckMessage\022,\n\013c"
  "r_summarys\030\001 \003(\0132\027.envoy.api.v2.CRSummar"
  "y\"A\n\tCRSummary\022\017\n\007cr_name\030\001 \001(\t\022\017\n\007cr_ki"
  "nd\030\002 \001(\t\022\022\n\ncr_version\030\003 \001(\t\"\211\003\n\033Increme"
  "ntalDiscoveryRequest\022%\n\004node\030\001 \001(\0132\027.env"
  "oy.api.v2.core.Node\022\020\n\010type_url\030\002 \001(\t\022 \n"
  "\030resource_names_subscribe\030\003 \003(\t\022\"\n\032resou"
  "rce_names_unsubscribe\030\004 \003(\t\022i\n\031initial_r"
  "esource_versions\030\005 \003(\0132F.envoy.api.v2.In"
  "crementalDiscoveryRequest.InitialResourc"
  "eVersionsEntry\022\026\n\016response_nonce\030\006 \001(\t\022("
  "\n\014error_detail\030\007 \001(\0132\022.google.rpc.Status"
  "\032>\n\034InitialResourceVersionsEntry\022\013\n\003key\030"
  "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\226\001\n\034Incremental"
  "DiscoveryResponse\022\033\n\023system_version_info"
  "\030\001 \001(\t\022/\n\tresources\030\002 \003(\0132\026.envoy.api.v2"
  ".ResourceB\004\310\336\037\000\022\031\n\021removed_resources\030\006 \003"
  "(\t\022\r\n\005nonce\030\005 \001(\t\"C\n\010Resource\022\017\n\007version"
  "\030\001 \001(\t\022&\n\010resource\030\002 \001(\0132\024.google.protob"
  "uf.AnyB\010Z\002v2\250\342\036\001b\006proto3"
  ;
::google::protobuf::internal::DescriptorTable descriptor_table_envoy_2fapi_2fv2_2fdiscovery_2eproto = {
  false, InitDefaults_envoy_2fapi_2fv2_2fdiscovery_2eproto, 
  descriptor_table_protodef_envoy_2fapi_2fv2_2fdiscovery_2eproto,
  "envoy/api/v2/discovery.proto", &assign_descriptors_table_envoy_2fapi_2fv2_2fdiscovery_2eproto, 1424,
};

void AddDescriptors_envoy_2fapi_2fv2_2fdiscovery_2eproto() {
  static constexpr ::google::protobuf::internal::InitFunc deps[4] =
  {
    ::AddDescriptors_envoy_2fapi_2fv2_2fcore_2fbase_2eproto,
    ::AddDescriptors_google_2fprotobuf_2fany_2eproto,
    ::AddDescriptors_google_2frpc_2fstatus_2eproto,
    ::AddDescriptors_gogoproto_2fgogo_2eproto,
  };
 ::google::protobuf::internal::AddDescriptors(&descriptor_table_envoy_2fapi_2fv2_2fdiscovery_2eproto, deps, 4);
}

// Force running AddDescriptors() at dynamic initialization time.
static bool dynamic_init_dummy_envoy_2fapi_2fv2_2fdiscovery_2eproto = []() { AddDescriptors_envoy_2fapi_2fv2_2fdiscovery_2eproto(); return true; }();
namespace envoy {
namespace api {
namespace v2 {

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

void DiscoveryRequest::InitAsDefaultInstance() {
  ::envoy::api::v2::_DiscoveryRequest_default_instance_._instance.get_mutable()->node_ = const_cast< ::envoy::api::v2::core::Node*>(
      ::envoy::api::v2::core::Node::internal_default_instance());
  ::envoy::api::v2::_DiscoveryRequest_default_instance_._instance.get_mutable()->error_detail_ = const_cast< ::google::rpc::Status*>(
      ::google::rpc::Status::internal_default_instance());
}
class DiscoveryRequest::HasBitSetters {
 public:
  static const ::envoy::api::v2::core::Node& node(const DiscoveryRequest* msg);
  static const ::google::rpc::Status& error_detail(const DiscoveryRequest* msg);
};

const ::envoy::api::v2::core::Node&
DiscoveryRequest::HasBitSetters::node(const DiscoveryRequest* msg) {
  return *msg->node_;
}
const ::google::rpc::Status&
DiscoveryRequest::HasBitSetters::error_detail(const DiscoveryRequest* msg) {
  return *msg->error_detail_;
}
void DiscoveryRequest::clear_node() {
  if (GetArenaNoVirtual() == nullptr && node_ != nullptr) {
    delete node_;
  }
  node_ = nullptr;
}
void DiscoveryRequest::clear_error_detail() {
  if (GetArenaNoVirtual() == nullptr && error_detail_ != nullptr) {
    delete error_detail_;
  }
  error_detail_ = nullptr;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int DiscoveryRequest::kVersionInfoFieldNumber;
const int DiscoveryRequest::kNodeFieldNumber;
const int DiscoveryRequest::kResourceNamesFieldNumber;
const int DiscoveryRequest::kTypeUrlFieldNumber;
const int DiscoveryRequest::kResponseNonceFieldNumber;
const int DiscoveryRequest::kErrorDetailFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

DiscoveryRequest::DiscoveryRequest()
  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:envoy.api.v2.DiscoveryRequest)
}
DiscoveryRequest::DiscoveryRequest(const DiscoveryRequest& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(nullptr),
      resource_names_(from.resource_names_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  version_info_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.version_info().size() > 0) {
    version_info_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.version_info_);
  }
  type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.type_url().size() > 0) {
    type_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_url_);
  }
  response_nonce_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.response_nonce().size() > 0) {
    response_nonce_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.response_nonce_);
  }
  if (from.has_node()) {
    node_ = new ::envoy::api::v2::core::Node(*from.node_);
  } else {
    node_ = nullptr;
  }
  if (from.has_error_detail()) {
    error_detail_ = new ::google::rpc::Status(*from.error_detail_);
  } else {
    error_detail_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:envoy.api.v2.DiscoveryRequest)
}

void DiscoveryRequest::SharedCtor() {
  ::google::protobuf::internal::InitSCC(
      &scc_info_DiscoveryRequest_envoy_2fapi_2fv2_2fdiscovery_2eproto.base);
  version_info_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  response_nonce_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&node_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&error_detail_) -
      reinterpret_cast<char*>(&node_)) + sizeof(error_detail_));
}

DiscoveryRequest::~DiscoveryRequest() {
  // @@protoc_insertion_point(destructor:envoy.api.v2.DiscoveryRequest)
  SharedDtor();
}

void DiscoveryRequest::SharedDtor() {
  version_info_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  type_url_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  response_nonce_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete node_;
  if (this != internal_default_instance()) delete error_detail_;
}

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


void DiscoveryRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:envoy.api.v2.DiscoveryRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  resource_names_.Clear();
  version_info_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  response_nonce_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == nullptr && node_ != nullptr) {
    delete node_;
  }
  node_ = nullptr;
  if (GetArenaNoVirtual() == nullptr && error_detail_ != nullptr) {
    delete error_detail_;
  }
  error_detail_ = nullptr;
  _internal_metadata_.Clear();
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* DiscoveryRequest::_InternalParse(const char* begin, const char* end, void* object,
                  ::google::protobuf::internal::ParseContext* ctx) {
  auto msg = static_cast<DiscoveryRequest*>(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 version_info = 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("envoy.api.v2.DiscoveryRequest.version_info");
        object = msg->mutable_version_info();
        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;
      }
      // .envoy.api.v2.core.Node node = 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 = ::envoy::api::v2::core::Node::_InternalParse;
        object = msg->mutable_node();
        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 string resource_names = 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);
          ctx->extra_parse_data().SetFieldName("envoy.api.v2.DiscoveryRequest.resource_names");
          object = msg->add_resource_names();
          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;
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 26 && (ptr += 1));
        break;
      }
      // string type_url = 4;
      case 4: {
        if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("envoy.api.v2.DiscoveryRequest.type_url");
        object = msg->mutable_type_url();
        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;
      }
      // string response_nonce = 5;
      case 5: {
        if (static_cast<::google::protobuf::uint8>(tag) != 42) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("envoy.api.v2.DiscoveryRequest.response_nonce");
        object = msg->mutable_response_nonce();
        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;
      }
      // .google.rpc.Status error_detail = 6;
      case 6: {
        if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        parser_till_end = ::google::rpc::Status::_InternalParse;
        object = msg->mutable_error_detail();
        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;
      }
      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 DiscoveryRequest::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:envoy.api.v2.DiscoveryRequest)
  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 version_info = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_version_info()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->version_info().data(), static_cast<int>(this->version_info().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "envoy.api.v2.DiscoveryRequest.version_info"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .envoy.api.v2.core.Node node = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_node()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated string resource_names = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_resource_names()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->resource_names(this->resource_names_size() - 1).data(),
            static_cast<int>(this->resource_names(this->resource_names_size() - 1).length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "envoy.api.v2.DiscoveryRequest.resource_names"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string type_url = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_type_url()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->type_url().data(), static_cast<int>(this->type_url().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "envoy.api.v2.DiscoveryRequest.type_url"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string response_nonce = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (42 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_response_nonce()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->response_nonce().data(), static_cast<int>(this->response_nonce().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "envoy.api.v2.DiscoveryRequest.response_nonce"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.rpc.Status error_detail = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_error_detail()));
        } 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:envoy.api.v2.DiscoveryRequest)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:envoy.api.v2.DiscoveryRequest)
  return false;
#undef DO_
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER

void DiscoveryRequest::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:envoy.api.v2.DiscoveryRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string version_info = 1;
  if (this->version_info().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->version_info().data(), static_cast<int>(this->version_info().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.DiscoveryRequest.version_info");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->version_info(), output);
  }

  // .envoy.api.v2.core.Node node = 2;
  if (this->has_node()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, HasBitSetters::node(this), output);
  }

  // repeated string resource_names = 3;
  for (int i = 0, n = this->resource_names_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->resource_names(i).data(), static_cast<int>(this->resource_names(i).length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.DiscoveryRequest.resource_names");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      3, this->resource_names(i), output);
  }

  // string type_url = 4;
  if (this->type_url().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->type_url().data(), static_cast<int>(this->type_url().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.DiscoveryRequest.type_url");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      4, this->type_url(), output);
  }

  // string response_nonce = 5;
  if (this->response_nonce().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->response_nonce().data(), static_cast<int>(this->response_nonce().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.DiscoveryRequest.response_nonce");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      5, this->response_nonce(), output);
  }

  // .google.rpc.Status error_detail = 6;
  if (this->has_error_detail()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      6, HasBitSetters::error_detail(this), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:envoy.api.v2.DiscoveryRequest)
}

::google::protobuf::uint8* DiscoveryRequest::InternalSerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:envoy.api.v2.DiscoveryRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string version_info = 1;
  if (this->version_info().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->version_info().data(), static_cast<int>(this->version_info().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.DiscoveryRequest.version_info");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->version_info(), target);
  }

  // .envoy.api.v2.core.Node node = 2;
  if (this->has_node()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, HasBitSetters::node(this), target);
  }

  // repeated string resource_names = 3;
  for (int i = 0, n = this->resource_names_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->resource_names(i).data(), static_cast<int>(this->resource_names(i).length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.DiscoveryRequest.resource_names");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(3, this->resource_names(i), target);
  }

  // string type_url = 4;
  if (this->type_url().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->type_url().data(), static_cast<int>(this->type_url().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.DiscoveryRequest.type_url");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        4, this->type_url(), target);
  }

  // string response_nonce = 5;
  if (this->response_nonce().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->response_nonce().data(), static_cast<int>(this->response_nonce().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.DiscoveryRequest.response_nonce");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        5, this->response_nonce(), target);
  }

  // .google.rpc.Status error_detail = 6;
  if (this->has_error_detail()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        6, HasBitSetters::error_detail(this), 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:envoy.api.v2.DiscoveryRequest)
  return target;
}

size_t DiscoveryRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:envoy.api.v2.DiscoveryRequest)
  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 string resource_names = 3;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->resource_names_size());
  for (int i = 0, n = this->resource_names_size(); i < n; i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->resource_names(i));
  }

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

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

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

  // .envoy.api.v2.core.Node node = 2;
  if (this->has_node()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *node_);
  }

  // .google.rpc.Status error_detail = 6;
  if (this->has_error_detail()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *error_detail_);
  }

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

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

void DiscoveryRequest::MergeFrom(const DiscoveryRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:envoy.api.v2.DiscoveryRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  resource_names_.MergeFrom(from.resource_names_);
  if (from.version_info().size() > 0) {

    version_info_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.version_info_);
  }
  if (from.type_url().size() > 0) {

    type_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_url_);
  }
  if (from.response_nonce().size() > 0) {

    response_nonce_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.response_nonce_);
  }
  if (from.has_node()) {
    mutable_node()->::envoy::api::v2::core::Node::MergeFrom(from.node());
  }
  if (from.has_error_detail()) {
    mutable_error_detail()->::google::rpc::Status::MergeFrom(from.error_detail());
  }
}

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

void DiscoveryRequest::CopyFrom(const DiscoveryRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:envoy.api.v2.DiscoveryRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void DiscoveryRequest::Swap(DiscoveryRequest* other) {
  if (other == this) return;
  InternalSwap(other);
}
void DiscoveryRequest::InternalSwap(DiscoveryRequest* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  resource_names_.InternalSwap(CastToBase(&other->resource_names_));
  version_info_.Swap(&other->version_info_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  type_url_.Swap(&other->type_url_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  response_nonce_.Swap(&other->response_nonce_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(node_, other->node_);
  swap(error_detail_, other->error_detail_);
}

::google::protobuf::Metadata DiscoveryRequest::GetMetadata() const {
  ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_envoy_2fapi_2fv2_2fdiscovery_2eproto);
  return ::file_level_metadata_envoy_2fapi_2fv2_2fdiscovery_2eproto[kIndexInFileMessages];
}


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

void DiscoveryResponse::InitAsDefaultInstance() {
  ::envoy::api::v2::_DiscoveryResponse_default_instance_._instance.get_mutable()->error_detail_ = const_cast< ::google::rpc::Status*>(
      ::google::rpc::Status::internal_default_instance());
  ::envoy::api::v2::_DiscoveryResponse_default_instance_._instance.get_mutable()->expand_field_ = const_cast< ::envoy::api::v2::DiscoveryResponseExpand*>(
      ::envoy::api::v2::DiscoveryResponseExpand::internal_default_instance());
}
class DiscoveryResponse::HasBitSetters {
 public:
  static const ::google::rpc::Status& error_detail(const DiscoveryResponse* msg);
  static const ::envoy::api::v2::DiscoveryResponseExpand& expand_field(const DiscoveryResponse* msg);
};

const ::google::rpc::Status&
DiscoveryResponse::HasBitSetters::error_detail(const DiscoveryResponse* msg) {
  return *msg->error_detail_;
}
const ::envoy::api::v2::DiscoveryResponseExpand&
DiscoveryResponse::HasBitSetters::expand_field(const DiscoveryResponse* msg) {
  return *msg->expand_field_;
}
void DiscoveryResponse::clear_resources() {
  resources_.Clear();
}
void DiscoveryResponse::clear_error_detail() {
  if (GetArenaNoVirtual() == nullptr && error_detail_ != nullptr) {
    delete error_detail_;
  }
  error_detail_ = nullptr;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int DiscoveryResponse::kVersionInfoFieldNumber;
const int DiscoveryResponse::kResourcesFieldNumber;
const int DiscoveryResponse::kCanaryFieldNumber;
const int DiscoveryResponse::kTypeUrlFieldNumber;
const int DiscoveryResponse::kNonceFieldNumber;
const int DiscoveryResponse::kErrorDetailFieldNumber;
const int DiscoveryResponse::kExpandFieldFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

DiscoveryResponse::DiscoveryResponse()
  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:envoy.api.v2.DiscoveryResponse)
}
DiscoveryResponse::DiscoveryResponse(const DiscoveryResponse& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(nullptr),
      resources_(from.resources_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  version_info_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.version_info().size() > 0) {
    version_info_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.version_info_);
  }
  type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.type_url().size() > 0) {
    type_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_url_);
  }
  nonce_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.nonce().size() > 0) {
    nonce_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.nonce_);
  }
  if (from.has_error_detail()) {
    error_detail_ = new ::google::rpc::Status(*from.error_detail_);
  } else {
    error_detail_ = nullptr;
  }
  if (from.has_expand_field()) {
    expand_field_ = new ::envoy::api::v2::DiscoveryResponseExpand(*from.expand_field_);
  } else {
    expand_field_ = nullptr;
  }
  canary_ = from.canary_;
  // @@protoc_insertion_point(copy_constructor:envoy.api.v2.DiscoveryResponse)
}

void DiscoveryResponse::SharedCtor() {
  ::google::protobuf::internal::InitSCC(
      &scc_info_DiscoveryResponse_envoy_2fapi_2fv2_2fdiscovery_2eproto.base);
  version_info_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  nonce_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&error_detail_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&canary_) -
      reinterpret_cast<char*>(&error_detail_)) + sizeof(canary_));
}

DiscoveryResponse::~DiscoveryResponse() {
  // @@protoc_insertion_point(destructor:envoy.api.v2.DiscoveryResponse)
  SharedDtor();
}

void DiscoveryResponse::SharedDtor() {
  version_info_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  type_url_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  nonce_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete error_detail_;
  if (this != internal_default_instance()) delete expand_field_;
}

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


void DiscoveryResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:envoy.api.v2.DiscoveryResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  resources_.Clear();
  version_info_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  nonce_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == nullptr && error_detail_ != nullptr) {
    delete error_detail_;
  }
  error_detail_ = nullptr;
  if (GetArenaNoVirtual() == nullptr && expand_field_ != nullptr) {
    delete expand_field_;
  }
  expand_field_ = nullptr;
  canary_ = false;
  _internal_metadata_.Clear();
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* DiscoveryResponse::_InternalParse(const char* begin, const char* end, void* object,
                  ::google::protobuf::internal::ParseContext* ctx) {
  auto msg = static_cast<DiscoveryResponse*>(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 version_info = 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("envoy.api.v2.DiscoveryResponse.version_info");
        object = msg->mutable_version_info();
        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;
      }
      // repeated .google.protobuf.Any resources = 2 [(.gogoproto.nullable) = false];
      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 = ::google::protobuf::Any::_InternalParse;
          object = msg->add_resources();
          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;
      }
      // bool canary = 3;
      case 3: {
        if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual;
        msg->set_canary(::google::protobuf::internal::ReadVarint(&ptr));
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        break;
      }
      // string type_url = 4;
      case 4: {
        if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("envoy.api.v2.DiscoveryResponse.type_url");
        object = msg->mutable_type_url();
        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;
      }
      // string nonce = 5;
      case 5: {
        if (static_cast<::google::protobuf::uint8>(tag) != 42) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("envoy.api.v2.DiscoveryResponse.nonce");
        object = msg->mutable_nonce();
        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;
      }
      // .google.rpc.Status error_detail = 80;
      case 80: {
        if (static_cast<::google::protobuf::uint8>(tag) != 130) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        parser_till_end = ::google::rpc::Status::_InternalParse;
        object = msg->mutable_error_detail();
        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;
      }
      // .envoy.api.v2.DiscoveryResponseExpand expand_field = 90;
      case 90: {
        if (static_cast<::google::protobuf::uint8>(tag) != 210) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        parser_till_end = ::envoy::api::v2::DiscoveryResponseExpand::_InternalParse;
        object = msg->mutable_expand_field();
        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;
      }
      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 DiscoveryResponse::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:envoy.api.v2.DiscoveryResponse)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // string version_info = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_version_info()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->version_info().data(), static_cast<int>(this->version_info().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "envoy.api.v2.DiscoveryResponse.version_info"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .google.protobuf.Any resources = 2 [(.gogoproto.nullable) = false];
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_resources()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // bool canary = 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, &canary_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string type_url = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_type_url()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->type_url().data(), static_cast<int>(this->type_url().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "envoy.api.v2.DiscoveryResponse.type_url"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string nonce = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (42 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_nonce()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->nonce().data(), static_cast<int>(this->nonce().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "envoy.api.v2.DiscoveryResponse.nonce"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.rpc.Status error_detail = 80;
      case 80: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (642 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_error_detail()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .envoy.api.v2.DiscoveryResponseExpand expand_field = 90;
      case 90: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (722 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_expand_field()));
        } 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:envoy.api.v2.DiscoveryResponse)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:envoy.api.v2.DiscoveryResponse)
  return false;
#undef DO_
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER

void DiscoveryResponse::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:envoy.api.v2.DiscoveryResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string version_info = 1;
  if (this->version_info().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->version_info().data(), static_cast<int>(this->version_info().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.DiscoveryResponse.version_info");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->version_info(), output);
  }

  // repeated .google.protobuf.Any resources = 2 [(.gogoproto.nullable) = false];
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->resources_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2,
      this->resources(static_cast<int>(i)),
      output);
  }

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

  // string type_url = 4;
  if (this->type_url().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->type_url().data(), static_cast<int>(this->type_url().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.DiscoveryResponse.type_url");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      4, this->type_url(), output);
  }

  // string nonce = 5;
  if (this->nonce().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->nonce().data(), static_cast<int>(this->nonce().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.DiscoveryResponse.nonce");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      5, this->nonce(), output);
  }

  // .google.rpc.Status error_detail = 80;
  if (this->has_error_detail()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      80, HasBitSetters::error_detail(this), output);
  }

  // .envoy.api.v2.DiscoveryResponseExpand expand_field = 90;
  if (this->has_expand_field()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      90, HasBitSetters::expand_field(this), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:envoy.api.v2.DiscoveryResponse)
}

::google::protobuf::uint8* DiscoveryResponse::InternalSerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:envoy.api.v2.DiscoveryResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string version_info = 1;
  if (this->version_info().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->version_info().data(), static_cast<int>(this->version_info().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.DiscoveryResponse.version_info");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->version_info(), target);
  }

  // repeated .google.protobuf.Any resources = 2 [(.gogoproto.nullable) = false];
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->resources_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, this->resources(static_cast<int>(i)), target);
  }

  // bool canary = 3;
  if (this->canary() != 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->canary(), target);
  }

  // string type_url = 4;
  if (this->type_url().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->type_url().data(), static_cast<int>(this->type_url().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.DiscoveryResponse.type_url");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        4, this->type_url(), target);
  }

  // string nonce = 5;
  if (this->nonce().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->nonce().data(), static_cast<int>(this->nonce().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.DiscoveryResponse.nonce");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        5, this->nonce(), target);
  }

  // .google.rpc.Status error_detail = 80;
  if (this->has_error_detail()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        80, HasBitSetters::error_detail(this), target);
  }

  // .envoy.api.v2.DiscoveryResponseExpand expand_field = 90;
  if (this->has_expand_field()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        90, HasBitSetters::expand_field(this), 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:envoy.api.v2.DiscoveryResponse)
  return target;
}

size_t DiscoveryResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:envoy.api.v2.DiscoveryResponse)
  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 .google.protobuf.Any resources = 2 [(.gogoproto.nullable) = false];
  {
    unsigned int count = static_cast<unsigned int>(this->resources_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->resources(static_cast<int>(i)));
    }
  }

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

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

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

  // .google.rpc.Status error_detail = 80;
  if (this->has_error_detail()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *error_detail_);
  }

  // .envoy.api.v2.DiscoveryResponseExpand expand_field = 90;
  if (this->has_expand_field()) {
    total_size += 2 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *expand_field_);
  }

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

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

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

void DiscoveryResponse::MergeFrom(const DiscoveryResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:envoy.api.v2.DiscoveryResponse)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  resources_.MergeFrom(from.resources_);
  if (from.version_info().size() > 0) {

    version_info_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.version_info_);
  }
  if (from.type_url().size() > 0) {

    type_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_url_);
  }
  if (from.nonce().size() > 0) {

    nonce_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.nonce_);
  }
  if (from.has_error_detail()) {
    mutable_error_detail()->::google::rpc::Status::MergeFrom(from.error_detail());
  }
  if (from.has_expand_field()) {
    mutable_expand_field()->::envoy::api::v2::DiscoveryResponseExpand::MergeFrom(from.expand_field());
  }
  if (from.canary() != 0) {
    set_canary(from.canary());
  }
}

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

void DiscoveryResponse::CopyFrom(const DiscoveryResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:envoy.api.v2.DiscoveryResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void DiscoveryResponse::Swap(DiscoveryResponse* other) {
  if (other == this) return;
  InternalSwap(other);
}
void DiscoveryResponse::InternalSwap(DiscoveryResponse* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  CastToBase(&resources_)->InternalSwap(CastToBase(&other->resources_));
  version_info_.Swap(&other->version_info_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  type_url_.Swap(&other->type_url_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  nonce_.Swap(&other->nonce_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(error_detail_, other->error_detail_);
  swap(expand_field_, other->expand_field_);
  swap(canary_, other->canary_);
}

::google::protobuf::Metadata DiscoveryResponse::GetMetadata() const {
  ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_envoy_2fapi_2fv2_2fdiscovery_2eproto);
  return ::file_level_metadata_envoy_2fapi_2fv2_2fdiscovery_2eproto[kIndexInFileMessages];
}


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

void DiscoveryResponseExpand::InitAsDefaultInstance() {
  ::envoy::api::v2::_DiscoveryResponseExpand_default_instance_._instance.get_mutable()->check_message_ = const_cast< ::envoy::api::v2::CheckMessage*>(
      ::envoy::api::v2::CheckMessage::internal_default_instance());
}
class DiscoveryResponseExpand::HasBitSetters {
 public:
  static const ::envoy::api::v2::CheckMessage& check_message(const DiscoveryResponseExpand* msg);
};

const ::envoy::api::v2::CheckMessage&
DiscoveryResponseExpand::HasBitSetters::check_message(const DiscoveryResponseExpand* msg) {
  return *msg->check_message_;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int DiscoveryResponseExpand::kCheckMessageFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

DiscoveryResponseExpand::DiscoveryResponseExpand()
  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:envoy.api.v2.DiscoveryResponseExpand)
}
DiscoveryResponseExpand::DiscoveryResponseExpand(const DiscoveryResponseExpand& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from.has_check_message()) {
    check_message_ = new ::envoy::api::v2::CheckMessage(*from.check_message_);
  } else {
    check_message_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:envoy.api.v2.DiscoveryResponseExpand)
}

void DiscoveryResponseExpand::SharedCtor() {
  ::google::protobuf::internal::InitSCC(
      &scc_info_DiscoveryResponseExpand_envoy_2fapi_2fv2_2fdiscovery_2eproto.base);
  check_message_ = nullptr;
}

DiscoveryResponseExpand::~DiscoveryResponseExpand() {
  // @@protoc_insertion_point(destructor:envoy.api.v2.DiscoveryResponseExpand)
  SharedDtor();
}

void DiscoveryResponseExpand::SharedDtor() {
  if (this != internal_default_instance()) delete check_message_;
}

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


void DiscoveryResponseExpand::Clear() {
// @@protoc_insertion_point(message_clear_start:envoy.api.v2.DiscoveryResponseExpand)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  if (GetArenaNoVirtual() == nullptr && check_message_ != nullptr) {
    delete check_message_;
  }
  check_message_ = nullptr;
  _internal_metadata_.Clear();
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* DiscoveryResponseExpand::_InternalParse(const char* begin, const char* end, void* object,
                  ::google::protobuf::internal::ParseContext* ctx) {
  auto msg = static_cast<DiscoveryResponseExpand*>(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) {
      // .envoy.api.v2.CheckMessage check_message = 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 = ::envoy::api::v2::CheckMessage::_InternalParse;
        object = msg->mutable_check_message();
        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;
      }
      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 DiscoveryResponseExpand::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:envoy.api.v2.DiscoveryResponseExpand)
  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)) {
      // .envoy.api.v2.CheckMessage check_message = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_check_message()));
        } 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:envoy.api.v2.DiscoveryResponseExpand)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:envoy.api.v2.DiscoveryResponseExpand)
  return false;
#undef DO_
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER

void DiscoveryResponseExpand::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:envoy.api.v2.DiscoveryResponseExpand)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .envoy.api.v2.CheckMessage check_message = 1;
  if (this->has_check_message()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, HasBitSetters::check_message(this), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:envoy.api.v2.DiscoveryResponseExpand)
}

::google::protobuf::uint8* DiscoveryResponseExpand::InternalSerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:envoy.api.v2.DiscoveryResponseExpand)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .envoy.api.v2.CheckMessage check_message = 1;
  if (this->has_check_message()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, HasBitSetters::check_message(this), 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:envoy.api.v2.DiscoveryResponseExpand)
  return target;
}

size_t DiscoveryResponseExpand::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:envoy.api.v2.DiscoveryResponseExpand)
  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;

  // .envoy.api.v2.CheckMessage check_message = 1;
  if (this->has_check_message()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *check_message_);
  }

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

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

void DiscoveryResponseExpand::MergeFrom(const DiscoveryResponseExpand& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:envoy.api.v2.DiscoveryResponseExpand)
  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_check_message()) {
    mutable_check_message()->::envoy::api::v2::CheckMessage::MergeFrom(from.check_message());
  }
}

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

void DiscoveryResponseExpand::CopyFrom(const DiscoveryResponseExpand& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:envoy.api.v2.DiscoveryResponseExpand)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

::google::protobuf::Metadata DiscoveryResponseExpand::GetMetadata() const {
  ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_envoy_2fapi_2fv2_2fdiscovery_2eproto);
  return ::file_level_metadata_envoy_2fapi_2fv2_2fdiscovery_2eproto[kIndexInFileMessages];
}


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

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

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

CheckMessage::CheckMessage()
  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:envoy.api.v2.CheckMessage)
}
CheckMessage::CheckMessage(const CheckMessage& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(nullptr),
      cr_summarys_(from.cr_summarys_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:envoy.api.v2.CheckMessage)
}

void CheckMessage::SharedCtor() {
  ::google::protobuf::internal::InitSCC(
      &scc_info_CheckMessage_envoy_2fapi_2fv2_2fdiscovery_2eproto.base);
}

CheckMessage::~CheckMessage() {
  // @@protoc_insertion_point(destructor:envoy.api.v2.CheckMessage)
  SharedDtor();
}

void CheckMessage::SharedDtor() {
}

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


void CheckMessage::Clear() {
// @@protoc_insertion_point(message_clear_start:envoy.api.v2.CheckMessage)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cr_summarys_.Clear();
  _internal_metadata_.Clear();
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* CheckMessage::_InternalParse(const char* begin, const char* end, void* object,
                  ::google::protobuf::internal::ParseContext* ctx) {
  auto msg = static_cast<CheckMessage*>(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) {
      // repeated .envoy.api.v2.CRSummary cr_summarys = 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 = ::envoy::api::v2::CRSummary::_InternalParse;
          object = msg->add_cr_summarys();
          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) == 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 CheckMessage::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:envoy.api.v2.CheckMessage)
  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)) {
      // repeated .envoy.api.v2.CRSummary cr_summarys = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_cr_summarys()));
        } 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:envoy.api.v2.CheckMessage)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:envoy.api.v2.CheckMessage)
  return false;
#undef DO_
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER

void CheckMessage::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:envoy.api.v2.CheckMessage)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .envoy.api.v2.CRSummary cr_summarys = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->cr_summarys_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1,
      this->cr_summarys(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:envoy.api.v2.CheckMessage)
}

::google::protobuf::uint8* CheckMessage::InternalSerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:envoy.api.v2.CheckMessage)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .envoy.api.v2.CRSummary cr_summarys = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->cr_summarys_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->cr_summarys(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:envoy.api.v2.CheckMessage)
  return target;
}

size_t CheckMessage::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:envoy.api.v2.CheckMessage)
  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 .envoy.api.v2.CRSummary cr_summarys = 1;
  {
    unsigned int count = static_cast<unsigned int>(this->cr_summarys_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->cr_summarys(static_cast<int>(i)));
    }
  }

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

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

void CheckMessage::MergeFrom(const CheckMessage& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:envoy.api.v2.CheckMessage)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cr_summarys_.MergeFrom(from.cr_summarys_);
}

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

void CheckMessage::CopyFrom(const CheckMessage& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:envoy.api.v2.CheckMessage)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

::google::protobuf::Metadata CheckMessage::GetMetadata() const {
  ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_envoy_2fapi_2fv2_2fdiscovery_2eproto);
  return ::file_level_metadata_envoy_2fapi_2fv2_2fdiscovery_2eproto[kIndexInFileMessages];
}


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

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int CRSummary::kCrNameFieldNumber;
const int CRSummary::kCrKindFieldNumber;
const int CRSummary::kCrVersionFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

CRSummary::CRSummary()
  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:envoy.api.v2.CRSummary)
}
CRSummary::CRSummary(const CRSummary& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  cr_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.cr_name().size() > 0) {
    cr_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cr_name_);
  }
  cr_kind_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.cr_kind().size() > 0) {
    cr_kind_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cr_kind_);
  }
  cr_version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.cr_version().size() > 0) {
    cr_version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cr_version_);
  }
  // @@protoc_insertion_point(copy_constructor:envoy.api.v2.CRSummary)
}

void CRSummary::SharedCtor() {
  ::google::protobuf::internal::InitSCC(
      &scc_info_CRSummary_envoy_2fapi_2fv2_2fdiscovery_2eproto.base);
  cr_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  cr_kind_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  cr_version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

CRSummary::~CRSummary() {
  // @@protoc_insertion_point(destructor:envoy.api.v2.CRSummary)
  SharedDtor();
}

void CRSummary::SharedDtor() {
  cr_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  cr_kind_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  cr_version_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

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


void CRSummary::Clear() {
// @@protoc_insertion_point(message_clear_start:envoy.api.v2.CRSummary)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cr_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  cr_kind_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  cr_version_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  _internal_metadata_.Clear();
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* CRSummary::_InternalParse(const char* begin, const char* end, void* object,
                  ::google::protobuf::internal::ParseContext* ctx) {
  auto msg = static_cast<CRSummary*>(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 cr_name = 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("envoy.api.v2.CRSummary.cr_name");
        object = msg->mutable_cr_name();
        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;
      }
      // string cr_kind = 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);
        ctx->extra_parse_data().SetFieldName("envoy.api.v2.CRSummary.cr_kind");
        object = msg->mutable_cr_kind();
        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;
      }
      // string cr_version = 3;
      case 3: {
        if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("envoy.api.v2.CRSummary.cr_version");
        object = msg->mutable_cr_version();
        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;
      }
      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 CRSummary::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:envoy.api.v2.CRSummary)
  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 cr_name = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_cr_name()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->cr_name().data(), static_cast<int>(this->cr_name().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "envoy.api.v2.CRSummary.cr_name"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string cr_kind = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_cr_kind()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->cr_kind().data(), static_cast<int>(this->cr_kind().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "envoy.api.v2.CRSummary.cr_kind"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string cr_version = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_cr_version()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->cr_version().data(), static_cast<int>(this->cr_version().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "envoy.api.v2.CRSummary.cr_version"));
        } 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:envoy.api.v2.CRSummary)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:envoy.api.v2.CRSummary)
  return false;
#undef DO_
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER

void CRSummary::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:envoy.api.v2.CRSummary)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string cr_name = 1;
  if (this->cr_name().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->cr_name().data(), static_cast<int>(this->cr_name().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.CRSummary.cr_name");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->cr_name(), output);
  }

  // string cr_kind = 2;
  if (this->cr_kind().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->cr_kind().data(), static_cast<int>(this->cr_kind().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.CRSummary.cr_kind");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->cr_kind(), output);
  }

  // string cr_version = 3;
  if (this->cr_version().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->cr_version().data(), static_cast<int>(this->cr_version().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.CRSummary.cr_version");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      3, this->cr_version(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:envoy.api.v2.CRSummary)
}

::google::protobuf::uint8* CRSummary::InternalSerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:envoy.api.v2.CRSummary)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string cr_name = 1;
  if (this->cr_name().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->cr_name().data(), static_cast<int>(this->cr_name().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.CRSummary.cr_name");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->cr_name(), target);
  }

  // string cr_kind = 2;
  if (this->cr_kind().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->cr_kind().data(), static_cast<int>(this->cr_kind().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.CRSummary.cr_kind");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->cr_kind(), target);
  }

  // string cr_version = 3;
  if (this->cr_version().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->cr_version().data(), static_cast<int>(this->cr_version().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.CRSummary.cr_version");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        3, this->cr_version(), 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:envoy.api.v2.CRSummary)
  return target;
}

size_t CRSummary::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:envoy.api.v2.CRSummary)
  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 cr_name = 1;
  if (this->cr_name().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->cr_name());
  }

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

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

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

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

void CRSummary::MergeFrom(const CRSummary& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:envoy.api.v2.CRSummary)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

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

    cr_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cr_name_);
  }
  if (from.cr_kind().size() > 0) {

    cr_kind_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cr_kind_);
  }
  if (from.cr_version().size() > 0) {

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

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

void CRSummary::CopyFrom(const CRSummary& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:envoy.api.v2.CRSummary)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void CRSummary::Swap(CRSummary* other) {
  if (other == this) return;
  InternalSwap(other);
}
void CRSummary::InternalSwap(CRSummary* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  cr_name_.Swap(&other->cr_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  cr_kind_.Swap(&other->cr_kind_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  cr_version_.Swap(&other->cr_version_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
}

::google::protobuf::Metadata CRSummary::GetMetadata() const {
  ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_envoy_2fapi_2fv2_2fdiscovery_2eproto);
  return ::file_level_metadata_envoy_2fapi_2fv2_2fdiscovery_2eproto[kIndexInFileMessages];
}


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

IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse::IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse() {}
IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse::IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse(::google::protobuf::Arena* arena)
    : SuperType(arena) {}
void IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse::MergeFrom(const IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse& other) {
  MergeFromInternal(other);
}
::google::protobuf::Metadata IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse::GetMetadata() const {
  ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_envoy_2fapi_2fv2_2fdiscovery_2eproto);
  return ::file_level_metadata_envoy_2fapi_2fv2_2fdiscovery_2eproto[5];
}
void IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse::MergeFrom(
    const ::google::protobuf::Message& other) {
  ::google::protobuf::Message::MergeFrom(other);
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse::_ParseMap(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx) {
  using MF = ::google::protobuf::internal::MapField<
      IncrementalDiscoveryRequest_InitialResourceVersionsEntry_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,
    "envoy.api.v2.IncrementalDiscoveryRequest.InitialResourceVersionsEntry.key"));
  DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
    parser.value().data(), static_cast<int>(parser.value().length()),
    ::google::protobuf::internal::WireFormatLite::PARSE,
    "envoy.api.v2.IncrementalDiscoveryRequest.InitialResourceVersionsEntry.value"));
#undef DO_
  return true;
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER


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

void IncrementalDiscoveryRequest::InitAsDefaultInstance() {
  ::envoy::api::v2::_IncrementalDiscoveryRequest_default_instance_._instance.get_mutable()->node_ = const_cast< ::envoy::api::v2::core::Node*>(
      ::envoy::api::v2::core::Node::internal_default_instance());
  ::envoy::api::v2::_IncrementalDiscoveryRequest_default_instance_._instance.get_mutable()->error_detail_ = const_cast< ::google::rpc::Status*>(
      ::google::rpc::Status::internal_default_instance());
}
class IncrementalDiscoveryRequest::HasBitSetters {
 public:
  static const ::envoy::api::v2::core::Node& node(const IncrementalDiscoveryRequest* msg);
  static const ::google::rpc::Status& error_detail(const IncrementalDiscoveryRequest* msg);
};

const ::envoy::api::v2::core::Node&
IncrementalDiscoveryRequest::HasBitSetters::node(const IncrementalDiscoveryRequest* msg) {
  return *msg->node_;
}
const ::google::rpc::Status&
IncrementalDiscoveryRequest::HasBitSetters::error_detail(const IncrementalDiscoveryRequest* msg) {
  return *msg->error_detail_;
}
void IncrementalDiscoveryRequest::clear_node() {
  if (GetArenaNoVirtual() == nullptr && node_ != nullptr) {
    delete node_;
  }
  node_ = nullptr;
}
void IncrementalDiscoveryRequest::clear_error_detail() {
  if (GetArenaNoVirtual() == nullptr && error_detail_ != nullptr) {
    delete error_detail_;
  }
  error_detail_ = nullptr;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int IncrementalDiscoveryRequest::kNodeFieldNumber;
const int IncrementalDiscoveryRequest::kTypeUrlFieldNumber;
const int IncrementalDiscoveryRequest::kResourceNamesSubscribeFieldNumber;
const int IncrementalDiscoveryRequest::kResourceNamesUnsubscribeFieldNumber;
const int IncrementalDiscoveryRequest::kInitialResourceVersionsFieldNumber;
const int IncrementalDiscoveryRequest::kResponseNonceFieldNumber;
const int IncrementalDiscoveryRequest::kErrorDetailFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

IncrementalDiscoveryRequest::IncrementalDiscoveryRequest()
  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:envoy.api.v2.IncrementalDiscoveryRequest)
}
IncrementalDiscoveryRequest::IncrementalDiscoveryRequest(const IncrementalDiscoveryRequest& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(nullptr),
      resource_names_subscribe_(from.resource_names_subscribe_),
      resource_names_unsubscribe_(from.resource_names_unsubscribe_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  initial_resource_versions_.MergeFrom(from.initial_resource_versions_);
  type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.type_url().size() > 0) {
    type_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_url_);
  }
  response_nonce_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.response_nonce().size() > 0) {
    response_nonce_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.response_nonce_);
  }
  if (from.has_node()) {
    node_ = new ::envoy::api::v2::core::Node(*from.node_);
  } else {
    node_ = nullptr;
  }
  if (from.has_error_detail()) {
    error_detail_ = new ::google::rpc::Status(*from.error_detail_);
  } else {
    error_detail_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:envoy.api.v2.IncrementalDiscoveryRequest)
}

void IncrementalDiscoveryRequest::SharedCtor() {
  ::google::protobuf::internal::InitSCC(
      &scc_info_IncrementalDiscoveryRequest_envoy_2fapi_2fv2_2fdiscovery_2eproto.base);
  type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  response_nonce_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&node_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&error_detail_) -
      reinterpret_cast<char*>(&node_)) + sizeof(error_detail_));
}

IncrementalDiscoveryRequest::~IncrementalDiscoveryRequest() {
  // @@protoc_insertion_point(destructor:envoy.api.v2.IncrementalDiscoveryRequest)
  SharedDtor();
}

void IncrementalDiscoveryRequest::SharedDtor() {
  type_url_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  response_nonce_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete node_;
  if (this != internal_default_instance()) delete error_detail_;
}

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


void IncrementalDiscoveryRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:envoy.api.v2.IncrementalDiscoveryRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  resource_names_subscribe_.Clear();
  resource_names_unsubscribe_.Clear();
  initial_resource_versions_.Clear();
  type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  response_nonce_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == nullptr && node_ != nullptr) {
    delete node_;
  }
  node_ = nullptr;
  if (GetArenaNoVirtual() == nullptr && error_detail_ != nullptr) {
    delete error_detail_;
  }
  error_detail_ = nullptr;
  _internal_metadata_.Clear();
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* IncrementalDiscoveryRequest::_InternalParse(const char* begin, const char* end, void* object,
                  ::google::protobuf::internal::ParseContext* ctx) {
  auto msg = static_cast<IncrementalDiscoveryRequest*>(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) {
      // .envoy.api.v2.core.Node node = 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 = ::envoy::api::v2::core::Node::_InternalParse;
        object = msg->mutable_node();
        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;
      }
      // string type_url = 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);
        ctx->extra_parse_data().SetFieldName("envoy.api.v2.IncrementalDiscoveryRequest.type_url");
        object = msg->mutable_type_url();
        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;
      }
      // repeated string resource_names_subscribe = 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);
          ctx->extra_parse_data().SetFieldName("envoy.api.v2.IncrementalDiscoveryRequest.resource_names_subscribe");
          object = msg->add_resource_names_subscribe();
          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;
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 26 && (ptr += 1));
        break;
      }
      // repeated string resource_names_unsubscribe = 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);
          ctx->extra_parse_data().SetFieldName("envoy.api.v2.IncrementalDiscoveryRequest.resource_names_unsubscribe");
          object = msg->add_resource_names_unsubscribe();
          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;
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 34 && (ptr += 1));
        break;
      }
      // map<string, string> initial_resource_versions = 5;
      case 5: {
        if (static_cast<::google::protobuf::uint8>(tag) != 42) 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 = ::envoy::api::v2::IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse::_ParseMap;
          ctx->extra_parse_data().payload.clear();
          ctx->extra_parse_data().parse_map = parse_map;
          object = &msg->initial_resource_versions_;
          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) == 42 && (ptr += 1));
        break;
      }
      // string response_nonce = 6;
      case 6: {
        if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("envoy.api.v2.IncrementalDiscoveryRequest.response_nonce");
        object = msg->mutable_response_nonce();
        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;
      }
      // .google.rpc.Status error_detail = 7;
      case 7: {
        if (static_cast<::google::protobuf::uint8>(tag) != 58) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        parser_till_end = ::google::rpc::Status::_InternalParse;
        object = msg->mutable_error_detail();
        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;
      }
      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 IncrementalDiscoveryRequest::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:envoy.api.v2.IncrementalDiscoveryRequest)
  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)) {
      // .envoy.api.v2.core.Node node = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_node()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string type_url = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_type_url()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->type_url().data(), static_cast<int>(this->type_url().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "envoy.api.v2.IncrementalDiscoveryRequest.type_url"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated string resource_names_subscribe = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_resource_names_subscribe()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->resource_names_subscribe(this->resource_names_subscribe_size() - 1).data(),
            static_cast<int>(this->resource_names_subscribe(this->resource_names_subscribe_size() - 1).length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "envoy.api.v2.IncrementalDiscoveryRequest.resource_names_subscribe"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated string resource_names_unsubscribe = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_resource_names_unsubscribe()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->resource_names_unsubscribe(this->resource_names_unsubscribe_size() - 1).data(),
            static_cast<int>(this->resource_names_unsubscribe(this->resource_names_unsubscribe_size() - 1).length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "envoy.api.v2.IncrementalDiscoveryRequest.resource_names_unsubscribe"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // map<string, string> initial_resource_versions = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (42 & 0xFF)) {
          IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
              IncrementalDiscoveryRequest_InitialResourceVersionsEntry_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(&initial_resource_versions_);
          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,
            "envoy.api.v2.IncrementalDiscoveryRequest.InitialResourceVersionsEntry.key"));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            parser.value().data(), static_cast<int>(parser.value().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "envoy.api.v2.IncrementalDiscoveryRequest.InitialResourceVersionsEntry.value"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string response_nonce = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_response_nonce()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->response_nonce().data(), static_cast<int>(this->response_nonce().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "envoy.api.v2.IncrementalDiscoveryRequest.response_nonce"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.rpc.Status error_detail = 7;
      case 7: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (58 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_error_detail()));
        } 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:envoy.api.v2.IncrementalDiscoveryRequest)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:envoy.api.v2.IncrementalDiscoveryRequest)
  return false;
#undef DO_
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER

void IncrementalDiscoveryRequest::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:envoy.api.v2.IncrementalDiscoveryRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .envoy.api.v2.core.Node node = 1;
  if (this->has_node()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, HasBitSetters::node(this), output);
  }

  // string type_url = 2;
  if (this->type_url().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->type_url().data(), static_cast<int>(this->type_url().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.IncrementalDiscoveryRequest.type_url");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->type_url(), output);
  }

  // repeated string resource_names_subscribe = 3;
  for (int i = 0, n = this->resource_names_subscribe_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->resource_names_subscribe(i).data(), static_cast<int>(this->resource_names_subscribe(i).length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.IncrementalDiscoveryRequest.resource_names_subscribe");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      3, this->resource_names_subscribe(i), output);
  }

  // repeated string resource_names_unsubscribe = 4;
  for (int i = 0, n = this->resource_names_unsubscribe_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->resource_names_unsubscribe(i).data(), static_cast<int>(this->resource_names_unsubscribe(i).length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.IncrementalDiscoveryRequest.resource_names_unsubscribe");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      4, this->resource_names_unsubscribe(i), output);
  }

  // map<string, string> initial_resource_versions = 5;
  if (!this->initial_resource_versions().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,
          "envoy.api.v2.IncrementalDiscoveryRequest.InitialResourceVersionsEntry.key");
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->second.data(), static_cast<int>(p->second.length()),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "envoy.api.v2.IncrementalDiscoveryRequest.InitialResourceVersionsEntry.value");
      }
    };

    if (output->IsSerializationDeterministic() &&
        this->initial_resource_versions().size() > 1) {
      ::std::unique_ptr<SortItem[]> items(
          new SortItem[this->initial_resource_versions().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->initial_resource_versions().begin();
          it != this->initial_resource_versions().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<IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse> entry;
      for (size_type i = 0; i < n; i++) {
        entry.reset(initial_resource_versions_.NewEntryWrapper(items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(5, *entry, output);
        Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
      }
    } else {
      ::std::unique_ptr<IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse> entry;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->initial_resource_versions().begin();
          it != this->initial_resource_versions().end(); ++it) {
        entry.reset(initial_resource_versions_.NewEntryWrapper(it->first, it->second));
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(5, *entry, output);
        Utf8Check::Check(&(*it));
      }
    }
  }

  // string response_nonce = 6;
  if (this->response_nonce().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->response_nonce().data(), static_cast<int>(this->response_nonce().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.IncrementalDiscoveryRequest.response_nonce");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      6, this->response_nonce(), output);
  }

  // .google.rpc.Status error_detail = 7;
  if (this->has_error_detail()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      7, HasBitSetters::error_detail(this), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:envoy.api.v2.IncrementalDiscoveryRequest)
}

::google::protobuf::uint8* IncrementalDiscoveryRequest::InternalSerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:envoy.api.v2.IncrementalDiscoveryRequest)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .envoy.api.v2.core.Node node = 1;
  if (this->has_node()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, HasBitSetters::node(this), target);
  }

  // string type_url = 2;
  if (this->type_url().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->type_url().data(), static_cast<int>(this->type_url().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.IncrementalDiscoveryRequest.type_url");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->type_url(), target);
  }

  // repeated string resource_names_subscribe = 3;
  for (int i = 0, n = this->resource_names_subscribe_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->resource_names_subscribe(i).data(), static_cast<int>(this->resource_names_subscribe(i).length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.IncrementalDiscoveryRequest.resource_names_subscribe");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(3, this->resource_names_subscribe(i), target);
  }

  // repeated string resource_names_unsubscribe = 4;
  for (int i = 0, n = this->resource_names_unsubscribe_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->resource_names_unsubscribe(i).data(), static_cast<int>(this->resource_names_unsubscribe(i).length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.IncrementalDiscoveryRequest.resource_names_unsubscribe");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(4, this->resource_names_unsubscribe(i), target);
  }

  // map<string, string> initial_resource_versions = 5;
  if (!this->initial_resource_versions().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,
          "envoy.api.v2.IncrementalDiscoveryRequest.InitialResourceVersionsEntry.key");
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->second.data(), static_cast<int>(p->second.length()),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "envoy.api.v2.IncrementalDiscoveryRequest.InitialResourceVersionsEntry.value");
      }
    };

    if (false &&
        this->initial_resource_versions().size() > 1) {
      ::std::unique_ptr<SortItem[]> items(
          new SortItem[this->initial_resource_versions().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->initial_resource_versions().begin();
          it != this->initial_resource_versions().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<IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse> entry;
      for (size_type i = 0; i < n; i++) {
        entry.reset(initial_resource_versions_.NewEntryWrapper(items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
        target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessageNoVirtualToArray(5, *entry, target);
        Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
      }
    } else {
      ::std::unique_ptr<IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse> entry;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->initial_resource_versions().begin();
          it != this->initial_resource_versions().end(); ++it) {
        entry.reset(initial_resource_versions_.NewEntryWrapper(it->first, it->second));
        target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessageNoVirtualToArray(5, *entry, target);
        Utf8Check::Check(&(*it));
      }
    }
  }

  // string response_nonce = 6;
  if (this->response_nonce().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->response_nonce().data(), static_cast<int>(this->response_nonce().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.IncrementalDiscoveryRequest.response_nonce");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        6, this->response_nonce(), target);
  }

  // .google.rpc.Status error_detail = 7;
  if (this->has_error_detail()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        7, HasBitSetters::error_detail(this), 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:envoy.api.v2.IncrementalDiscoveryRequest)
  return target;
}

size_t IncrementalDiscoveryRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:envoy.api.v2.IncrementalDiscoveryRequest)
  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 string resource_names_subscribe = 3;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->resource_names_subscribe_size());
  for (int i = 0, n = this->resource_names_subscribe_size(); i < n; i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->resource_names_subscribe(i));
  }

  // repeated string resource_names_unsubscribe = 4;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->resource_names_unsubscribe_size());
  for (int i = 0, n = this->resource_names_unsubscribe_size(); i < n; i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->resource_names_unsubscribe(i));
  }

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

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

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

  // .envoy.api.v2.core.Node node = 1;
  if (this->has_node()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *node_);
  }

  // .google.rpc.Status error_detail = 7;
  if (this->has_error_detail()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *error_detail_);
  }

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

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

void IncrementalDiscoveryRequest::MergeFrom(const IncrementalDiscoveryRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:envoy.api.v2.IncrementalDiscoveryRequest)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  resource_names_subscribe_.MergeFrom(from.resource_names_subscribe_);
  resource_names_unsubscribe_.MergeFrom(from.resource_names_unsubscribe_);
  initial_resource_versions_.MergeFrom(from.initial_resource_versions_);
  if (from.type_url().size() > 0) {

    type_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_url_);
  }
  if (from.response_nonce().size() > 0) {

    response_nonce_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.response_nonce_);
  }
  if (from.has_node()) {
    mutable_node()->::envoy::api::v2::core::Node::MergeFrom(from.node());
  }
  if (from.has_error_detail()) {
    mutable_error_detail()->::google::rpc::Status::MergeFrom(from.error_detail());
  }
}

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

void IncrementalDiscoveryRequest::CopyFrom(const IncrementalDiscoveryRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:envoy.api.v2.IncrementalDiscoveryRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void IncrementalDiscoveryRequest::Swap(IncrementalDiscoveryRequest* other) {
  if (other == this) return;
  InternalSwap(other);
}
void IncrementalDiscoveryRequest::InternalSwap(IncrementalDiscoveryRequest* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  resource_names_subscribe_.InternalSwap(CastToBase(&other->resource_names_subscribe_));
  resource_names_unsubscribe_.InternalSwap(CastToBase(&other->resource_names_unsubscribe_));
  initial_resource_versions_.Swap(&other->initial_resource_versions_);
  type_url_.Swap(&other->type_url_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  response_nonce_.Swap(&other->response_nonce_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(node_, other->node_);
  swap(error_detail_, other->error_detail_);
}

::google::protobuf::Metadata IncrementalDiscoveryRequest::GetMetadata() const {
  ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_envoy_2fapi_2fv2_2fdiscovery_2eproto);
  return ::file_level_metadata_envoy_2fapi_2fv2_2fdiscovery_2eproto[kIndexInFileMessages];
}


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

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int IncrementalDiscoveryResponse::kSystemVersionInfoFieldNumber;
const int IncrementalDiscoveryResponse::kResourcesFieldNumber;
const int IncrementalDiscoveryResponse::kRemovedResourcesFieldNumber;
const int IncrementalDiscoveryResponse::kNonceFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

IncrementalDiscoveryResponse::IncrementalDiscoveryResponse()
  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:envoy.api.v2.IncrementalDiscoveryResponse)
}
IncrementalDiscoveryResponse::IncrementalDiscoveryResponse(const IncrementalDiscoveryResponse& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(nullptr),
      resources_(from.resources_),
      removed_resources_(from.removed_resources_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  system_version_info_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.system_version_info().size() > 0) {
    system_version_info_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.system_version_info_);
  }
  nonce_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.nonce().size() > 0) {
    nonce_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.nonce_);
  }
  // @@protoc_insertion_point(copy_constructor:envoy.api.v2.IncrementalDiscoveryResponse)
}

void IncrementalDiscoveryResponse::SharedCtor() {
  ::google::protobuf::internal::InitSCC(
      &scc_info_IncrementalDiscoveryResponse_envoy_2fapi_2fv2_2fdiscovery_2eproto.base);
  system_version_info_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  nonce_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

IncrementalDiscoveryResponse::~IncrementalDiscoveryResponse() {
  // @@protoc_insertion_point(destructor:envoy.api.v2.IncrementalDiscoveryResponse)
  SharedDtor();
}

void IncrementalDiscoveryResponse::SharedDtor() {
  system_version_info_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  nonce_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

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


void IncrementalDiscoveryResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:envoy.api.v2.IncrementalDiscoveryResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  resources_.Clear();
  removed_resources_.Clear();
  system_version_info_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  nonce_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  _internal_metadata_.Clear();
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* IncrementalDiscoveryResponse::_InternalParse(const char* begin, const char* end, void* object,
                  ::google::protobuf::internal::ParseContext* ctx) {
  auto msg = static_cast<IncrementalDiscoveryResponse*>(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 system_version_info = 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("envoy.api.v2.IncrementalDiscoveryResponse.system_version_info");
        object = msg->mutable_system_version_info();
        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;
      }
      // repeated .envoy.api.v2.Resource resources = 2 [(.gogoproto.nullable) = false];
      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 = ::envoy::api::v2::Resource::_InternalParse;
          object = msg->add_resources();
          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;
      }
      // string nonce = 5;
      case 5: {
        if (static_cast<::google::protobuf::uint8>(tag) != 42) goto handle_unusual;
        ptr = ::google::protobuf::io::ReadSize(ptr, &size);
        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
        ctx->extra_parse_data().SetFieldName("envoy.api.v2.IncrementalDiscoveryResponse.nonce");
        object = msg->mutable_nonce();
        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;
      }
      // repeated string removed_resources = 6;
      case 6: {
        if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual;
        do {
          ptr = ::google::protobuf::io::ReadSize(ptr, &size);
          GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
          ctx->extra_parse_data().SetFieldName("envoy.api.v2.IncrementalDiscoveryResponse.removed_resources");
          object = msg->add_removed_resources();
          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;
          if (ptr >= end) break;
        } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 50 && (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;
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 IncrementalDiscoveryResponse::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:envoy.api.v2.IncrementalDiscoveryResponse)
  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 system_version_info = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_system_version_info()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->system_version_info().data(), static_cast<int>(this->system_version_info().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "envoy.api.v2.IncrementalDiscoveryResponse.system_version_info"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .envoy.api.v2.Resource resources = 2 [(.gogoproto.nullable) = false];
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_resources()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // string nonce = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (42 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_nonce()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->nonce().data(), static_cast<int>(this->nonce().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "envoy.api.v2.IncrementalDiscoveryResponse.nonce"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated string removed_resources = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_removed_resources()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->removed_resources(this->removed_resources_size() - 1).data(),
            static_cast<int>(this->removed_resources(this->removed_resources_size() - 1).length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "envoy.api.v2.IncrementalDiscoveryResponse.removed_resources"));
        } 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:envoy.api.v2.IncrementalDiscoveryResponse)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:envoy.api.v2.IncrementalDiscoveryResponse)
  return false;
#undef DO_
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER

void IncrementalDiscoveryResponse::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:envoy.api.v2.IncrementalDiscoveryResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string system_version_info = 1;
  if (this->system_version_info().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->system_version_info().data(), static_cast<int>(this->system_version_info().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.IncrementalDiscoveryResponse.system_version_info");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->system_version_info(), output);
  }

  // repeated .envoy.api.v2.Resource resources = 2 [(.gogoproto.nullable) = false];
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->resources_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2,
      this->resources(static_cast<int>(i)),
      output);
  }

  // string nonce = 5;
  if (this->nonce().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->nonce().data(), static_cast<int>(this->nonce().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.IncrementalDiscoveryResponse.nonce");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      5, this->nonce(), output);
  }

  // repeated string removed_resources = 6;
  for (int i = 0, n = this->removed_resources_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->removed_resources(i).data(), static_cast<int>(this->removed_resources(i).length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.IncrementalDiscoveryResponse.removed_resources");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      6, this->removed_resources(i), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:envoy.api.v2.IncrementalDiscoveryResponse)
}

::google::protobuf::uint8* IncrementalDiscoveryResponse::InternalSerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:envoy.api.v2.IncrementalDiscoveryResponse)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string system_version_info = 1;
  if (this->system_version_info().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->system_version_info().data(), static_cast<int>(this->system_version_info().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.IncrementalDiscoveryResponse.system_version_info");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->system_version_info(), target);
  }

  // repeated .envoy.api.v2.Resource resources = 2 [(.gogoproto.nullable) = false];
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->resources_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, this->resources(static_cast<int>(i)), target);
  }

  // string nonce = 5;
  if (this->nonce().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->nonce().data(), static_cast<int>(this->nonce().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.IncrementalDiscoveryResponse.nonce");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        5, this->nonce(), target);
  }

  // repeated string removed_resources = 6;
  for (int i = 0, n = this->removed_resources_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->removed_resources(i).data(), static_cast<int>(this->removed_resources(i).length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.IncrementalDiscoveryResponse.removed_resources");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(6, this->removed_resources(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:envoy.api.v2.IncrementalDiscoveryResponse)
  return target;
}

size_t IncrementalDiscoveryResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:envoy.api.v2.IncrementalDiscoveryResponse)
  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 .envoy.api.v2.Resource resources = 2 [(.gogoproto.nullable) = false];
  {
    unsigned int count = static_cast<unsigned int>(this->resources_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->resources(static_cast<int>(i)));
    }
  }

  // repeated string removed_resources = 6;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->removed_resources_size());
  for (int i = 0, n = this->removed_resources_size(); i < n; i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->removed_resources(i));
  }

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

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

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

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

void IncrementalDiscoveryResponse::MergeFrom(const IncrementalDiscoveryResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:envoy.api.v2.IncrementalDiscoveryResponse)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  resources_.MergeFrom(from.resources_);
  removed_resources_.MergeFrom(from.removed_resources_);
  if (from.system_version_info().size() > 0) {

    system_version_info_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.system_version_info_);
  }
  if (from.nonce().size() > 0) {

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

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

void IncrementalDiscoveryResponse::CopyFrom(const IncrementalDiscoveryResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:envoy.api.v2.IncrementalDiscoveryResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void IncrementalDiscoveryResponse::Swap(IncrementalDiscoveryResponse* other) {
  if (other == this) return;
  InternalSwap(other);
}
void IncrementalDiscoveryResponse::InternalSwap(IncrementalDiscoveryResponse* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  CastToBase(&resources_)->InternalSwap(CastToBase(&other->resources_));
  removed_resources_.InternalSwap(CastToBase(&other->removed_resources_));
  system_version_info_.Swap(&other->system_version_info_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  nonce_.Swap(&other->nonce_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
}

::google::protobuf::Metadata IncrementalDiscoveryResponse::GetMetadata() const {
  ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_envoy_2fapi_2fv2_2fdiscovery_2eproto);
  return ::file_level_metadata_envoy_2fapi_2fv2_2fdiscovery_2eproto[kIndexInFileMessages];
}


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

void Resource::InitAsDefaultInstance() {
  ::envoy::api::v2::_Resource_default_instance_._instance.get_mutable()->resource_ = const_cast< ::google::protobuf::Any*>(
      ::google::protobuf::Any::internal_default_instance());
}
class Resource::HasBitSetters {
 public:
  static const ::google::protobuf::Any& resource(const Resource* msg);
};

const ::google::protobuf::Any&
Resource::HasBitSetters::resource(const Resource* msg) {
  return *msg->resource_;
}
void Resource::clear_resource() {
  if (GetArenaNoVirtual() == nullptr && resource_ != nullptr) {
    delete resource_;
  }
  resource_ = nullptr;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Resource::kVersionFieldNumber;
const int Resource::kResourceFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

Resource::Resource()
  : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:envoy.api.v2.Resource)
}
Resource::Resource(const Resource& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.version().size() > 0) {
    version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.version_);
  }
  if (from.has_resource()) {
    resource_ = new ::google::protobuf::Any(*from.resource_);
  } else {
    resource_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:envoy.api.v2.Resource)
}

void Resource::SharedCtor() {
  ::google::protobuf::internal::InitSCC(
      &scc_info_Resource_envoy_2fapi_2fv2_2fdiscovery_2eproto.base);
  version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  resource_ = nullptr;
}

Resource::~Resource() {
  // @@protoc_insertion_point(destructor:envoy.api.v2.Resource)
  SharedDtor();
}

void Resource::SharedDtor() {
  version_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete resource_;
}

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


void Resource::Clear() {
// @@protoc_insertion_point(message_clear_start:envoy.api.v2.Resource)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  version_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == nullptr && resource_ != nullptr) {
    delete resource_;
  }
  resource_ = nullptr;
  _internal_metadata_.Clear();
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* Resource::_InternalParse(const char* begin, const char* end, void* object,
                  ::google::protobuf::internal::ParseContext* ctx) {
  auto msg = static_cast<Resource*>(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 version = 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("envoy.api.v2.Resource.version");
        object = msg->mutable_version();
        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;
      }
      // .google.protobuf.Any resource = 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 = ::google::protobuf::Any::_InternalParse;
        object = msg->mutable_resource();
        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;
      }
      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 Resource::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:envoy.api.v2.Resource)
  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 version = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_version()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->version().data(), static_cast<int>(this->version().length()),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "envoy.api.v2.Resource.version"));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // .google.protobuf.Any resource = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_resource()));
        } 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:envoy.api.v2.Resource)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:envoy.api.v2.Resource)
  return false;
#undef DO_
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER

void Resource::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:envoy.api.v2.Resource)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string version = 1;
  if (this->version().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->version().data(), static_cast<int>(this->version().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.Resource.version");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->version(), output);
  }

  // .google.protobuf.Any resource = 2;
  if (this->has_resource()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, HasBitSetters::resource(this), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:envoy.api.v2.Resource)
}

::google::protobuf::uint8* Resource::InternalSerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:envoy.api.v2.Resource)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string version = 1;
  if (this->version().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->version().data(), static_cast<int>(this->version().length()),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "envoy.api.v2.Resource.version");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->version(), target);
  }

  // .google.protobuf.Any resource = 2;
  if (this->has_resource()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, HasBitSetters::resource(this), 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:envoy.api.v2.Resource)
  return target;
}

size_t Resource::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:envoy.api.v2.Resource)
  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 version = 1;
  if (this->version().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->version());
  }

  // .google.protobuf.Any resource = 2;
  if (this->has_resource()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *resource_);
  }

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

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

void Resource::MergeFrom(const Resource& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:envoy.api.v2.Resource)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

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

    version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.version_);
  }
  if (from.has_resource()) {
    mutable_resource()->::google::protobuf::Any::MergeFrom(from.resource());
  }
}

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

void Resource::CopyFrom(const Resource& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:envoy.api.v2.Resource)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

::google::protobuf::Metadata Resource::GetMetadata() const {
  ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_envoy_2fapi_2fv2_2fdiscovery_2eproto);
  return ::file_level_metadata_envoy_2fapi_2fv2_2fdiscovery_2eproto[kIndexInFileMessages];
}


// @@protoc_insertion_point(namespace_scope)
}  // namespace v2
}  // namespace api
}  // namespace envoy
namespace google {
namespace protobuf {
template<> PROTOBUF_NOINLINE ::envoy::api::v2::DiscoveryRequest* Arena::CreateMaybeMessage< ::envoy::api::v2::DiscoveryRequest >(Arena* arena) {
  return Arena::CreateInternal< ::envoy::api::v2::DiscoveryRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::envoy::api::v2::DiscoveryResponse* Arena::CreateMaybeMessage< ::envoy::api::v2::DiscoveryResponse >(Arena* arena) {
  return Arena::CreateInternal< ::envoy::api::v2::DiscoveryResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::envoy::api::v2::DiscoveryResponseExpand* Arena::CreateMaybeMessage< ::envoy::api::v2::DiscoveryResponseExpand >(Arena* arena) {
  return Arena::CreateInternal< ::envoy::api::v2::DiscoveryResponseExpand >(arena);
}
template<> PROTOBUF_NOINLINE ::envoy::api::v2::CheckMessage* Arena::CreateMaybeMessage< ::envoy::api::v2::CheckMessage >(Arena* arena) {
  return Arena::CreateInternal< ::envoy::api::v2::CheckMessage >(arena);
}
template<> PROTOBUF_NOINLINE ::envoy::api::v2::CRSummary* Arena::CreateMaybeMessage< ::envoy::api::v2::CRSummary >(Arena* arena) {
  return Arena::CreateInternal< ::envoy::api::v2::CRSummary >(arena);
}
template<> PROTOBUF_NOINLINE ::envoy::api::v2::IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse* Arena::CreateMaybeMessage< ::envoy::api::v2::IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse >(Arena* arena) {
  return Arena::CreateInternal< ::envoy::api::v2::IncrementalDiscoveryRequest_InitialResourceVersionsEntry_DoNotUse >(arena);
}
template<> PROTOBUF_NOINLINE ::envoy::api::v2::IncrementalDiscoveryRequest* Arena::CreateMaybeMessage< ::envoy::api::v2::IncrementalDiscoveryRequest >(Arena* arena) {
  return Arena::CreateInternal< ::envoy::api::v2::IncrementalDiscoveryRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::envoy::api::v2::IncrementalDiscoveryResponse* Arena::CreateMaybeMessage< ::envoy::api::v2::IncrementalDiscoveryResponse >(Arena* arena) {
  return Arena::CreateInternal< ::envoy::api::v2::IncrementalDiscoveryResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::envoy::api::v2::Resource* Arena::CreateMaybeMessage< ::envoy::api::v2::Resource >(Arena* arena) {
  return Arena::CreateInternal< ::envoy::api::v2::Resource >(arena);
}
}  // namespace protobuf
}  // namespace google

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