milvus/proxy/src/grpc/etcd.pb.cc
rain a95f6843aa Add create index interface and update the proto of master
Signed-off-by: rain <boyan.wang@zilliz.com>
2020-09-21 15:10:54 +08:00

5059 lines
181 KiB
C++

// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: etcd.proto
#include "etcd.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.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_etcd_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Event_etcd_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_etcd_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_KeyValue_etcd_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_etcd_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ResponseHeader_etcd_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_etcd_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_WatchCancelRequest_etcd_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_etcd_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_WatchCreateRequest_etcd_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_etcd_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_WatchProgressRequest_etcd_2eproto;
namespace etcdserverpb {
class RangeRequestDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<RangeRequest> _instance;
} _RangeRequest_default_instance_;
class RangeResponseDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<RangeResponse> _instance;
} _RangeResponse_default_instance_;
class WatchRequestDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<WatchRequest> _instance;
const ::etcdserverpb::WatchCreateRequest* create_request_;
const ::etcdserverpb::WatchCancelRequest* cancel_request_;
const ::etcdserverpb::WatchProgressRequest* progress_request_;
} _WatchRequest_default_instance_;
class WatchCreateRequestDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<WatchCreateRequest> _instance;
} _WatchCreateRequest_default_instance_;
class WatchCancelRequestDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<WatchCancelRequest> _instance;
} _WatchCancelRequest_default_instance_;
class WatchProgressRequestDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<WatchProgressRequest> _instance;
} _WatchProgressRequest_default_instance_;
class WatchResponseDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<WatchResponse> _instance;
} _WatchResponse_default_instance_;
class ResponseHeaderDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ResponseHeader> _instance;
} _ResponseHeader_default_instance_;
class KeyValueDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<KeyValue> _instance;
} _KeyValue_default_instance_;
class EventDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Event> _instance;
} _Event_default_instance_;
} // namespace etcdserverpb
static void InitDefaultsscc_info_Event_etcd_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::etcdserverpb::_Event_default_instance_;
new (ptr) ::etcdserverpb::Event();
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
}
::etcdserverpb::Event::InitAsDefaultInstance();
}
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Event_etcd_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_Event_etcd_2eproto}, {
&scc_info_KeyValue_etcd_2eproto.base,}};
static void InitDefaultsscc_info_KeyValue_etcd_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::etcdserverpb::_KeyValue_default_instance_;
new (ptr) ::etcdserverpb::KeyValue();
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
}
::etcdserverpb::KeyValue::InitAsDefaultInstance();
}
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_KeyValue_etcd_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_KeyValue_etcd_2eproto}, {}};
static void InitDefaultsscc_info_RangeRequest_etcd_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::etcdserverpb::_RangeRequest_default_instance_;
new (ptr) ::etcdserverpb::RangeRequest();
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
}
::etcdserverpb::RangeRequest::InitAsDefaultInstance();
}
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_RangeRequest_etcd_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_RangeRequest_etcd_2eproto}, {}};
static void InitDefaultsscc_info_RangeResponse_etcd_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::etcdserverpb::_RangeResponse_default_instance_;
new (ptr) ::etcdserverpb::RangeResponse();
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
}
::etcdserverpb::RangeResponse::InitAsDefaultInstance();
}
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_RangeResponse_etcd_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_RangeResponse_etcd_2eproto}, {
&scc_info_ResponseHeader_etcd_2eproto.base,
&scc_info_KeyValue_etcd_2eproto.base,}};
static void InitDefaultsscc_info_ResponseHeader_etcd_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::etcdserverpb::_ResponseHeader_default_instance_;
new (ptr) ::etcdserverpb::ResponseHeader();
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
}
::etcdserverpb::ResponseHeader::InitAsDefaultInstance();
}
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ResponseHeader_etcd_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_ResponseHeader_etcd_2eproto}, {}};
static void InitDefaultsscc_info_WatchCancelRequest_etcd_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::etcdserverpb::_WatchCancelRequest_default_instance_;
new (ptr) ::etcdserverpb::WatchCancelRequest();
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
}
::etcdserverpb::WatchCancelRequest::InitAsDefaultInstance();
}
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_WatchCancelRequest_etcd_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_WatchCancelRequest_etcd_2eproto}, {}};
static void InitDefaultsscc_info_WatchCreateRequest_etcd_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::etcdserverpb::_WatchCreateRequest_default_instance_;
new (ptr) ::etcdserverpb::WatchCreateRequest();
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
}
::etcdserverpb::WatchCreateRequest::InitAsDefaultInstance();
}
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_WatchCreateRequest_etcd_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_WatchCreateRequest_etcd_2eproto}, {}};
static void InitDefaultsscc_info_WatchProgressRequest_etcd_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::etcdserverpb::_WatchProgressRequest_default_instance_;
new (ptr) ::etcdserverpb::WatchProgressRequest();
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
}
::etcdserverpb::WatchProgressRequest::InitAsDefaultInstance();
}
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_WatchProgressRequest_etcd_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_WatchProgressRequest_etcd_2eproto}, {}};
static void InitDefaultsscc_info_WatchRequest_etcd_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::etcdserverpb::_WatchRequest_default_instance_;
new (ptr) ::etcdserverpb::WatchRequest();
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
}
::etcdserverpb::WatchRequest::InitAsDefaultInstance();
}
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_WatchRequest_etcd_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsscc_info_WatchRequest_etcd_2eproto}, {
&scc_info_WatchCreateRequest_etcd_2eproto.base,
&scc_info_WatchCancelRequest_etcd_2eproto.base,
&scc_info_WatchProgressRequest_etcd_2eproto.base,}};
static void InitDefaultsscc_info_WatchResponse_etcd_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::etcdserverpb::_WatchResponse_default_instance_;
new (ptr) ::etcdserverpb::WatchResponse();
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
}
::etcdserverpb::WatchResponse::InitAsDefaultInstance();
}
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_WatchResponse_etcd_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_WatchResponse_etcd_2eproto}, {
&scc_info_ResponseHeader_etcd_2eproto.base,
&scc_info_Event_etcd_2eproto.base,}};
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_etcd_2eproto[10];
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_etcd_2eproto[4];
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_etcd_2eproto = nullptr;
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_etcd_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::etcdserverpb::RangeRequest, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::etcdserverpb::RangeRequest, key_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::RangeRequest, range_end_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::RangeRequest, limit_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::RangeRequest, revision_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::RangeRequest, sort_order_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::RangeRequest, sort_target_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::RangeRequest, serializable_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::RangeRequest, keys_only_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::RangeRequest, count_only_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::RangeRequest, min_mod_revision_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::RangeRequest, max_mod_revision_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::RangeRequest, min_create_revision_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::RangeRequest, max_create_revision_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::etcdserverpb::RangeResponse, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::etcdserverpb::RangeResponse, header_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::RangeResponse, kvs_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::RangeResponse, more_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::RangeResponse, count_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::etcdserverpb::WatchRequest, _internal_metadata_),
~0u, // no _extensions_
PROTOBUF_FIELD_OFFSET(::etcdserverpb::WatchRequest, _oneof_case_[0]),
~0u, // no _weak_field_map_
offsetof(::etcdserverpb::WatchRequestDefaultTypeInternal, create_request_),
offsetof(::etcdserverpb::WatchRequestDefaultTypeInternal, cancel_request_),
offsetof(::etcdserverpb::WatchRequestDefaultTypeInternal, progress_request_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::WatchRequest, request_union_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::etcdserverpb::WatchCreateRequest, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::etcdserverpb::WatchCreateRequest, key_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::WatchCreateRequest, range_end_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::WatchCreateRequest, start_revision_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::WatchCreateRequest, progress_notify_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::WatchCreateRequest, filters_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::WatchCreateRequest, prev_kv_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::WatchCreateRequest, watch_id_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::WatchCreateRequest, fragment_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::etcdserverpb::WatchCancelRequest, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::etcdserverpb::WatchCancelRequest, watch_id_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::etcdserverpb::WatchProgressRequest, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::etcdserverpb::WatchResponse, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::etcdserverpb::WatchResponse, header_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::WatchResponse, watch_id_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::WatchResponse, created_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::WatchResponse, canceled_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::WatchResponse, compact_revision_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::WatchResponse, cancel_reason_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::WatchResponse, fragment_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::WatchResponse, events_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::etcdserverpb::ResponseHeader, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::etcdserverpb::ResponseHeader, cluster_id_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::ResponseHeader, member_id_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::ResponseHeader, revision_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::ResponseHeader, raft_term_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::etcdserverpb::KeyValue, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::etcdserverpb::KeyValue, key_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::KeyValue, create_revision_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::KeyValue, mod_revision_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::KeyValue, version_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::KeyValue, value_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::KeyValue, lease_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::etcdserverpb::Event, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::etcdserverpb::Event, type_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::Event, kv_),
PROTOBUF_FIELD_OFFSET(::etcdserverpb::Event, prev_kv_),
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(::etcdserverpb::RangeRequest)},
{ 18, -1, sizeof(::etcdserverpb::RangeResponse)},
{ 27, -1, sizeof(::etcdserverpb::WatchRequest)},
{ 36, -1, sizeof(::etcdserverpb::WatchCreateRequest)},
{ 49, -1, sizeof(::etcdserverpb::WatchCancelRequest)},
{ 55, -1, sizeof(::etcdserverpb::WatchProgressRequest)},
{ 60, -1, sizeof(::etcdserverpb::WatchResponse)},
{ 73, -1, sizeof(::etcdserverpb::ResponseHeader)},
{ 82, -1, sizeof(::etcdserverpb::KeyValue)},
{ 93, -1, sizeof(::etcdserverpb::Event)},
};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::etcdserverpb::_RangeRequest_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::etcdserverpb::_RangeResponse_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::etcdserverpb::_WatchRequest_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::etcdserverpb::_WatchCreateRequest_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::etcdserverpb::_WatchCancelRequest_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::etcdserverpb::_WatchProgressRequest_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::etcdserverpb::_WatchResponse_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::etcdserverpb::_ResponseHeader_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::etcdserverpb::_KeyValue_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::etcdserverpb::_Event_default_instance_),
};
const char descriptor_table_protodef_etcd_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\netcd.proto\022\014etcdserverpb\"\344\003\n\014RangeRequ"
"est\022\013\n\003key\030\001 \001(\014\022\021\n\trange_end\030\002 \001(\014\022\r\n\005l"
"imit\030\003 \001(\003\022\020\n\010revision\030\004 \001(\003\0228\n\nsort_ord"
"er\030\005 \001(\0162$.etcdserverpb.RangeRequest.Sor"
"tOrder\022:\n\013sort_target\030\006 \001(\0162%.etcdserver"
"pb.RangeRequest.SortTarget\022\024\n\014serializab"
"le\030\007 \001(\010\022\021\n\tkeys_only\030\010 \001(\010\022\022\n\ncount_onl"
"y\030\t \001(\010\022\030\n\020min_mod_revision\030\n \001(\003\022\030\n\020max"
"_mod_revision\030\013 \001(\003\022\033\n\023min_create_revisi"
"on\030\014 \001(\003\022\033\n\023max_create_revision\030\r \001(\003\".\n"
"\tSortOrder\022\010\n\004NONE\020\000\022\n\n\006ASCEND\020\001\022\013\n\007DESC"
"END\020\002\"B\n\nSortTarget\022\007\n\003KEY\020\000\022\013\n\007VERSION\020"
"\001\022\n\n\006CREATE\020\002\022\007\n\003MOD\020\003\022\t\n\005VALUE\020\004\"\177\n\rRan"
"geResponse\022,\n\006header\030\001 \001(\0132\034.etcdserverp"
"b.ResponseHeader\022#\n\003kvs\030\002 \003(\0132\026.etcdserv"
"erpb.KeyValue\022\014\n\004more\030\003 \001(\010\022\r\n\005count\030\004 \001"
"(\003\"\327\001\n\014WatchRequest\022:\n\016create_request\030\001 "
"\001(\0132 .etcdserverpb.WatchCreateRequestH\000\022"
":\n\016cancel_request\030\002 \001(\0132 .etcdserverpb.W"
"atchCancelRequestH\000\022>\n\020progress_request\030"
"\003 \001(\0132\".etcdserverpb.WatchProgressReques"
"tH\000B\017\n\rrequest_union\"\377\001\n\022WatchCreateRequ"
"est\022\013\n\003key\030\001 \001(\014\022\021\n\trange_end\030\002 \001(\014\022\026\n\016s"
"tart_revision\030\003 \001(\003\022\027\n\017progress_notify\030\004"
" \001(\010\022<\n\007filters\030\005 \003(\0162+.etcdserverpb.Wat"
"chCreateRequest.FilterType\022\017\n\007prev_kv\030\006 "
"\001(\010\022\020\n\010watch_id\030\007 \001(\003\022\020\n\010fragment\030\010 \001(\010\""
"%\n\nFilterType\022\t\n\005NOPUT\020\000\022\014\n\010NODELETE\020\001\"&"
"\n\022WatchCancelRequest\022\020\n\010watch_id\030\001 \001(\003\"\026"
"\n\024WatchProgressRequest\"\332\001\n\rWatchResponse"
"\022,\n\006header\030\001 \001(\0132\034.etcdserverpb.Response"
"Header\022\020\n\010watch_id\030\002 \001(\003\022\017\n\007created\030\003 \001("
"\010\022\020\n\010canceled\030\004 \001(\010\022\030\n\020compact_revision\030"
"\005 \001(\003\022\025\n\rcancel_reason\030\006 \001(\t\022\020\n\010fragment"
"\030\007 \001(\010\022#\n\006events\030\013 \003(\0132\023.etcdserverpb.Ev"
"ent\"\\\n\016ResponseHeader\022\022\n\ncluster_id\030\001 \001("
"\004\022\021\n\tmember_id\030\002 \001(\004\022\020\n\010revision\030\003 \001(\003\022\021"
"\n\traft_term\030\004 \001(\004\"u\n\010KeyValue\022\013\n\003key\030\001 \001"
"(\014\022\027\n\017create_revision\030\002 \001(\003\022\024\n\014mod_revis"
"ion\030\003 \001(\003\022\017\n\007version\030\004 \001(\003\022\r\n\005value\030\005 \001("
"\014\022\r\n\005lease\030\006 \001(\003\"\243\001\n\005Event\022+\n\004type\030\001 \001(\016"
"2\035.etcdserverpb.Event.EventType\022\"\n\002kv\030\002 "
"\001(\0132\026.etcdserverpb.KeyValue\022\'\n\007prev_kv\030\003"
" \001(\0132\026.etcdserverpb.KeyValue\" \n\tEventTyp"
"e\022\007\n\003PUT\020\000\022\n\n\006DELETE\020\0012O\n\005Watch\022F\n\005Watch"
"\022\032.etcdserverpb.WatchRequest\032\033.etcdserve"
"rpb.WatchResponse\"\000(\0010\0012H\n\002KV\022B\n\005Range\022\032"
".etcdserverpb.RangeRequest\032\033.etcdserverp"
"b.RangeResponse\"\000b\006proto3"
;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_etcd_2eproto_deps[1] = {
};
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_etcd_2eproto_sccs[10] = {
&scc_info_Event_etcd_2eproto.base,
&scc_info_KeyValue_etcd_2eproto.base,
&scc_info_RangeRequest_etcd_2eproto.base,
&scc_info_RangeResponse_etcd_2eproto.base,
&scc_info_ResponseHeader_etcd_2eproto.base,
&scc_info_WatchCancelRequest_etcd_2eproto.base,
&scc_info_WatchCreateRequest_etcd_2eproto.base,
&scc_info_WatchProgressRequest_etcd_2eproto.base,
&scc_info_WatchRequest_etcd_2eproto.base,
&scc_info_WatchResponse_etcd_2eproto.base,
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_etcd_2eproto_once;
static bool descriptor_table_etcd_2eproto_initialized = false;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_etcd_2eproto = {
&descriptor_table_etcd_2eproto_initialized, descriptor_table_protodef_etcd_2eproto, "etcd.proto", 1945,
&descriptor_table_etcd_2eproto_once, descriptor_table_etcd_2eproto_sccs, descriptor_table_etcd_2eproto_deps, 10, 0,
schemas, file_default_instances, TableStruct_etcd_2eproto::offsets,
file_level_metadata_etcd_2eproto, 10, file_level_enum_descriptors_etcd_2eproto, file_level_service_descriptors_etcd_2eproto,
};
// Force running AddDescriptors() at dynamic initialization time.
static bool dynamic_init_dummy_etcd_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_etcd_2eproto), true);
namespace etcdserverpb {
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* RangeRequest_SortOrder_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_etcd_2eproto);
return file_level_enum_descriptors_etcd_2eproto[0];
}
bool RangeRequest_SortOrder_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
constexpr RangeRequest_SortOrder RangeRequest::NONE;
constexpr RangeRequest_SortOrder RangeRequest::ASCEND;
constexpr RangeRequest_SortOrder RangeRequest::DESCEND;
constexpr RangeRequest_SortOrder RangeRequest::SortOrder_MIN;
constexpr RangeRequest_SortOrder RangeRequest::SortOrder_MAX;
constexpr int RangeRequest::SortOrder_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* RangeRequest_SortTarget_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_etcd_2eproto);
return file_level_enum_descriptors_etcd_2eproto[1];
}
bool RangeRequest_SortTarget_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
case 3:
case 4:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
constexpr RangeRequest_SortTarget RangeRequest::KEY;
constexpr RangeRequest_SortTarget RangeRequest::VERSION;
constexpr RangeRequest_SortTarget RangeRequest::CREATE;
constexpr RangeRequest_SortTarget RangeRequest::MOD;
constexpr RangeRequest_SortTarget RangeRequest::VALUE;
constexpr RangeRequest_SortTarget RangeRequest::SortTarget_MIN;
constexpr RangeRequest_SortTarget RangeRequest::SortTarget_MAX;
constexpr int RangeRequest::SortTarget_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* WatchCreateRequest_FilterType_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_etcd_2eproto);
return file_level_enum_descriptors_etcd_2eproto[2];
}
bool WatchCreateRequest_FilterType_IsValid(int value) {
switch (value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
constexpr WatchCreateRequest_FilterType WatchCreateRequest::NOPUT;
constexpr WatchCreateRequest_FilterType WatchCreateRequest::NODELETE;
constexpr WatchCreateRequest_FilterType WatchCreateRequest::FilterType_MIN;
constexpr WatchCreateRequest_FilterType WatchCreateRequest::FilterType_MAX;
constexpr int WatchCreateRequest::FilterType_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Event_EventType_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_etcd_2eproto);
return file_level_enum_descriptors_etcd_2eproto[3];
}
bool Event_EventType_IsValid(int value) {
switch (value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
constexpr Event_EventType Event::PUT;
constexpr Event_EventType Event::DELETE;
constexpr Event_EventType Event::EventType_MIN;
constexpr Event_EventType Event::EventType_MAX;
constexpr int Event::EventType_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
// ===================================================================
void RangeRequest::InitAsDefaultInstance() {
}
class RangeRequest::_Internal {
public:
};
RangeRequest::RangeRequest()
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:etcdserverpb.RangeRequest)
}
RangeRequest::RangeRequest(const RangeRequest& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_internal_metadata_(nullptr) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from.key().empty()) {
key_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.key_);
}
range_end_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from.range_end().empty()) {
range_end_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.range_end_);
}
::memcpy(&limit_, &from.limit_,
static_cast<size_t>(reinterpret_cast<char*>(&count_only_) -
reinterpret_cast<char*>(&limit_)) + sizeof(count_only_));
// @@protoc_insertion_point(copy_constructor:etcdserverpb.RangeRequest)
}
void RangeRequest::SharedCtor() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_RangeRequest_etcd_2eproto.base);
key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
range_end_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
::memset(&limit_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&count_only_) -
reinterpret_cast<char*>(&limit_)) + sizeof(count_only_));
}
RangeRequest::~RangeRequest() {
// @@protoc_insertion_point(destructor:etcdserverpb.RangeRequest)
SharedDtor();
}
void RangeRequest::SharedDtor() {
key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
range_end_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
void RangeRequest::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const RangeRequest& RangeRequest::default_instance() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RangeRequest_etcd_2eproto.base);
return *internal_default_instance();
}
void RangeRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:etcdserverpb.RangeRequest)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
key_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
range_end_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
::memset(&limit_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&count_only_) -
reinterpret_cast<char*>(&limit_)) + sizeof(count_only_));
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* RangeRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
CHK_(ptr);
switch (tag >> 3) {
// bytes key = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_key(), ptr, ctx);
CHK_(ptr);
} else goto handle_unusual;
continue;
// bytes range_end = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_range_end(), ptr, ctx);
CHK_(ptr);
} else goto handle_unusual;
continue;
// int64 limit = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
limit_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// int64 revision = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
revision_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// .etcdserverpb.RangeRequest.SortOrder sort_order = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
set_sort_order(static_cast<::etcdserverpb::RangeRequest_SortOrder>(val));
} else goto handle_unusual;
continue;
// .etcdserverpb.RangeRequest.SortTarget sort_target = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) {
::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
set_sort_target(static_cast<::etcdserverpb::RangeRequest_SortTarget>(val));
} else goto handle_unusual;
continue;
// bool serializable = 7;
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) {
serializable_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// bool keys_only = 8;
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) {
keys_only_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// bool count_only = 9;
case 9:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) {
count_only_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// int64 min_mod_revision = 10;
case 10:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) {
min_mod_revision_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// int64 max_mod_revision = 11;
case 11:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 88)) {
max_mod_revision_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// int64 min_create_revision = 12;
case 12:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 96)) {
min_create_revision_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// int64 max_create_revision = 13;
case 13:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 104)) {
max_create_revision_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
default: {
handle_unusual:
if ((tag & 7) == 4 || tag == 0) {
ctx->SetLastTag(tag);
goto success;
}
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
CHK_(ptr != nullptr);
continue;
}
} // switch
} // while
success:
return ptr;
failure:
ptr = nullptr;
goto success;
#undef CHK_
}
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool RangeRequest::MergePartialFromCodedStream(
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::PROTOBUF_NAMESPACE_ID::uint32 tag;
// @@protoc_insertion_point(parse_start:etcdserverpb.RangeRequest)
for (;;) {
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// bytes key = 1;
case 1: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes(
input, this->mutable_key()));
} else {
goto handle_unusual;
}
break;
}
// bytes range_end = 2;
case 2: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes(
input, this->mutable_range_end()));
} else {
goto handle_unusual;
}
break;
}
// int64 limit = 3;
case 3: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
input, &limit_)));
} else {
goto handle_unusual;
}
break;
}
// int64 revision = 4;
case 4: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
input, &revision_)));
} else {
goto handle_unusual;
}
break;
}
// .etcdserverpb.RangeRequest.SortOrder sort_order = 5;
case 5: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) {
int value = 0;
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
set_sort_order(static_cast< ::etcdserverpb::RangeRequest_SortOrder >(value));
} else {
goto handle_unusual;
}
break;
}
// .etcdserverpb.RangeRequest.SortTarget sort_target = 6;
case 6: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (48 & 0xFF)) {
int value = 0;
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
set_sort_target(static_cast< ::etcdserverpb::RangeRequest_SortTarget >(value));
} else {
goto handle_unusual;
}
break;
}
// bool serializable = 7;
case 7: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (56 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
input, &serializable_)));
} else {
goto handle_unusual;
}
break;
}
// bool keys_only = 8;
case 8: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (64 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
input, &keys_only_)));
} else {
goto handle_unusual;
}
break;
}
// bool count_only = 9;
case 9: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (72 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
input, &count_only_)));
} else {
goto handle_unusual;
}
break;
}
// int64 min_mod_revision = 10;
case 10: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (80 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
input, &min_mod_revision_)));
} else {
goto handle_unusual;
}
break;
}
// int64 max_mod_revision = 11;
case 11: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (88 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
input, &max_mod_revision_)));
} else {
goto handle_unusual;
}
break;
}
// int64 min_create_revision = 12;
case 12: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (96 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
input, &min_create_revision_)));
} else {
goto handle_unusual;
}
break;
}
// int64 max_create_revision = 13;
case 13: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (104 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
input, &max_create_revision_)));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:etcdserverpb.RangeRequest)
return true;
failure:
// @@protoc_insertion_point(parse_failure:etcdserverpb.RangeRequest)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void RangeRequest::SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:etcdserverpb.RangeRequest)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// bytes key = 1;
if (this->key().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased(
1, this->key(), output);
}
// bytes range_end = 2;
if (this->range_end().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased(
2, this->range_end(), output);
}
// int64 limit = 3;
if (this->limit() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(3, this->limit(), output);
}
// int64 revision = 4;
if (this->revision() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(4, this->revision(), output);
}
// .etcdserverpb.RangeRequest.SortOrder sort_order = 5;
if (this->sort_order() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum(
5, this->sort_order(), output);
}
// .etcdserverpb.RangeRequest.SortTarget sort_target = 6;
if (this->sort_target() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum(
6, this->sort_target(), output);
}
// bool serializable = 7;
if (this->serializable() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(7, this->serializable(), output);
}
// bool keys_only = 8;
if (this->keys_only() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(8, this->keys_only(), output);
}
// bool count_only = 9;
if (this->count_only() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(9, this->count_only(), output);
}
// int64 min_mod_revision = 10;
if (this->min_mod_revision() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(10, this->min_mod_revision(), output);
}
// int64 max_mod_revision = 11;
if (this->max_mod_revision() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(11, this->max_mod_revision(), output);
}
// int64 min_create_revision = 12;
if (this->min_create_revision() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(12, this->min_create_revision(), output);
}
// int64 max_create_revision = 13;
if (this->max_create_revision() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(13, this->max_create_revision(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:etcdserverpb.RangeRequest)
}
::PROTOBUF_NAMESPACE_ID::uint8* RangeRequest::InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:etcdserverpb.RangeRequest)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// bytes key = 1;
if (this->key().size() > 0) {
target =
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray(
1, this->key(), target);
}
// bytes range_end = 2;
if (this->range_end().size() > 0) {
target =
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray(
2, this->range_end(), target);
}
// int64 limit = 3;
if (this->limit() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->limit(), target);
}
// int64 revision = 4;
if (this->revision() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->revision(), target);
}
// .etcdserverpb.RangeRequest.SortOrder sort_order = 5;
if (this->sort_order() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
5, this->sort_order(), target);
}
// .etcdserverpb.RangeRequest.SortTarget sort_target = 6;
if (this->sort_target() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
6, this->sort_target(), target);
}
// bool serializable = 7;
if (this->serializable() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->serializable(), target);
}
// bool keys_only = 8;
if (this->keys_only() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->keys_only(), target);
}
// bool count_only = 9;
if (this->count_only() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->count_only(), target);
}
// int64 min_mod_revision = 10;
if (this->min_mod_revision() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(10, this->min_mod_revision(), target);
}
// int64 max_mod_revision = 11;
if (this->max_mod_revision() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(11, this->max_mod_revision(), target);
}
// int64 min_create_revision = 12;
if (this->min_create_revision() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(12, this->min_create_revision(), target);
}
// int64 max_create_revision = 13;
if (this->max_create_revision() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(13, this->max_create_revision(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:etcdserverpb.RangeRequest)
return target;
}
size_t RangeRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:etcdserverpb.RangeRequest)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// bytes key = 1;
if (this->key().size() > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
this->key());
}
// bytes range_end = 2;
if (this->range_end().size() > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
this->range_end());
}
// int64 limit = 3;
if (this->limit() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
this->limit());
}
// int64 revision = 4;
if (this->revision() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
this->revision());
}
// .etcdserverpb.RangeRequest.SortOrder sort_order = 5;
if (this->sort_order() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->sort_order());
}
// .etcdserverpb.RangeRequest.SortTarget sort_target = 6;
if (this->sort_target() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->sort_target());
}
// int64 min_mod_revision = 10;
if (this->min_mod_revision() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
this->min_mod_revision());
}
// int64 max_mod_revision = 11;
if (this->max_mod_revision() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
this->max_mod_revision());
}
// int64 min_create_revision = 12;
if (this->min_create_revision() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
this->min_create_revision());
}
// int64 max_create_revision = 13;
if (this->max_create_revision() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
this->max_create_revision());
}
// bool serializable = 7;
if (this->serializable() != 0) {
total_size += 1 + 1;
}
// bool keys_only = 8;
if (this->keys_only() != 0) {
total_size += 1 + 1;
}
// bool count_only = 9;
if (this->count_only() != 0) {
total_size += 1 + 1;
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void RangeRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:etcdserverpb.RangeRequest)
GOOGLE_DCHECK_NE(&from, this);
const RangeRequest* source =
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<RangeRequest>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:etcdserverpb.RangeRequest)
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:etcdserverpb.RangeRequest)
MergeFrom(*source);
}
}
void RangeRequest::MergeFrom(const RangeRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:etcdserverpb.RangeRequest)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.key().size() > 0) {
key_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.key_);
}
if (from.range_end().size() > 0) {
range_end_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.range_end_);
}
if (from.limit() != 0) {
set_limit(from.limit());
}
if (from.revision() != 0) {
set_revision(from.revision());
}
if (from.sort_order() != 0) {
set_sort_order(from.sort_order());
}
if (from.sort_target() != 0) {
set_sort_target(from.sort_target());
}
if (from.min_mod_revision() != 0) {
set_min_mod_revision(from.min_mod_revision());
}
if (from.max_mod_revision() != 0) {
set_max_mod_revision(from.max_mod_revision());
}
if (from.min_create_revision() != 0) {
set_min_create_revision(from.min_create_revision());
}
if (from.max_create_revision() != 0) {
set_max_create_revision(from.max_create_revision());
}
if (from.serializable() != 0) {
set_serializable(from.serializable());
}
if (from.keys_only() != 0) {
set_keys_only(from.keys_only());
}
if (from.count_only() != 0) {
set_count_only(from.count_only());
}
}
void RangeRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:etcdserverpb.RangeRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void RangeRequest::CopyFrom(const RangeRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:etcdserverpb.RangeRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool RangeRequest::IsInitialized() const {
return true;
}
void RangeRequest::InternalSwap(RangeRequest* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
key_.Swap(&other->key_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
range_end_.Swap(&other->range_end_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
swap(limit_, other->limit_);
swap(revision_, other->revision_);
swap(sort_order_, other->sort_order_);
swap(sort_target_, other->sort_target_);
swap(min_mod_revision_, other->min_mod_revision_);
swap(max_mod_revision_, other->max_mod_revision_);
swap(min_create_revision_, other->min_create_revision_);
swap(max_create_revision_, other->max_create_revision_);
swap(serializable_, other->serializable_);
swap(keys_only_, other->keys_only_);
swap(count_only_, other->count_only_);
}
::PROTOBUF_NAMESPACE_ID::Metadata RangeRequest::GetMetadata() const {
return GetMetadataStatic();
}
// ===================================================================
void RangeResponse::InitAsDefaultInstance() {
::etcdserverpb::_RangeResponse_default_instance_._instance.get_mutable()->header_ = const_cast< ::etcdserverpb::ResponseHeader*>(
::etcdserverpb::ResponseHeader::internal_default_instance());
}
class RangeResponse::_Internal {
public:
static const ::etcdserverpb::ResponseHeader& header(const RangeResponse* msg);
};
const ::etcdserverpb::ResponseHeader&
RangeResponse::_Internal::header(const RangeResponse* msg) {
return *msg->header_;
}
RangeResponse::RangeResponse()
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:etcdserverpb.RangeResponse)
}
RangeResponse::RangeResponse(const RangeResponse& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_internal_metadata_(nullptr),
kvs_(from.kvs_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
if (from.has_header()) {
header_ = new ::etcdserverpb::ResponseHeader(*from.header_);
} else {
header_ = nullptr;
}
::memcpy(&count_, &from.count_,
static_cast<size_t>(reinterpret_cast<char*>(&more_) -
reinterpret_cast<char*>(&count_)) + sizeof(more_));
// @@protoc_insertion_point(copy_constructor:etcdserverpb.RangeResponse)
}
void RangeResponse::SharedCtor() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_RangeResponse_etcd_2eproto.base);
::memset(&header_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&more_) -
reinterpret_cast<char*>(&header_)) + sizeof(more_));
}
RangeResponse::~RangeResponse() {
// @@protoc_insertion_point(destructor:etcdserverpb.RangeResponse)
SharedDtor();
}
void RangeResponse::SharedDtor() {
if (this != internal_default_instance()) delete header_;
}
void RangeResponse::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const RangeResponse& RangeResponse::default_instance() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RangeResponse_etcd_2eproto.base);
return *internal_default_instance();
}
void RangeResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:etcdserverpb.RangeResponse)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
kvs_.Clear();
if (GetArenaNoVirtual() == nullptr && header_ != nullptr) {
delete header_;
}
header_ = nullptr;
::memset(&count_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&more_) -
reinterpret_cast<char*>(&count_)) + sizeof(more_));
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* RangeResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
CHK_(ptr);
switch (tag >> 3) {
// .etcdserverpb.ResponseHeader header = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
ptr = ctx->ParseMessage(mutable_header(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// repeated .etcdserverpb.KeyValue kvs = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(add_kvs(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18);
} else goto handle_unusual;
continue;
// bool more = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
more_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// int64 count = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
default: {
handle_unusual:
if ((tag & 7) == 4 || tag == 0) {
ctx->SetLastTag(tag);
goto success;
}
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
CHK_(ptr != nullptr);
continue;
}
} // switch
} // while
success:
return ptr;
failure:
ptr = nullptr;
goto success;
#undef CHK_
}
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool RangeResponse::MergePartialFromCodedStream(
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::PROTOBUF_NAMESPACE_ID::uint32 tag;
// @@protoc_insertion_point(parse_start:etcdserverpb.RangeResponse)
for (;;) {
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// .etcdserverpb.ResponseHeader header = 1;
case 1: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, mutable_header()));
} else {
goto handle_unusual;
}
break;
}
// repeated .etcdserverpb.KeyValue kvs = 2;
case 2: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, add_kvs()));
} else {
goto handle_unusual;
}
break;
}
// bool more = 3;
case 3: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
input, &more_)));
} else {
goto handle_unusual;
}
break;
}
// int64 count = 4;
case 4: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
input, &count_)));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:etcdserverpb.RangeResponse)
return true;
failure:
// @@protoc_insertion_point(parse_failure:etcdserverpb.RangeResponse)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void RangeResponse::SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:etcdserverpb.RangeResponse)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// .etcdserverpb.ResponseHeader header = 1;
if (this->has_header()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
1, _Internal::header(this), output);
}
// repeated .etcdserverpb.KeyValue kvs = 2;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->kvs_size()); i < n; i++) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
2,
this->kvs(static_cast<int>(i)),
output);
}
// bool more = 3;
if (this->more() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(3, this->more(), output);
}
// int64 count = 4;
if (this->count() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(4, this->count(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:etcdserverpb.RangeResponse)
}
::PROTOBUF_NAMESPACE_ID::uint8* RangeResponse::InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:etcdserverpb.RangeResponse)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// .etcdserverpb.ResponseHeader header = 1;
if (this->has_header()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
1, _Internal::header(this), target);
}
// repeated .etcdserverpb.KeyValue kvs = 2;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->kvs_size()); i < n; i++) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
2, this->kvs(static_cast<int>(i)), target);
}
// bool more = 3;
if (this->more() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->more(), target);
}
// int64 count = 4;
if (this->count() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->count(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:etcdserverpb.RangeResponse)
return target;
}
size_t RangeResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:etcdserverpb.RangeResponse)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated .etcdserverpb.KeyValue kvs = 2;
{
unsigned int count = static_cast<unsigned int>(this->kvs_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
this->kvs(static_cast<int>(i)));
}
}
// .etcdserverpb.ResponseHeader header = 1;
if (this->has_header()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*header_);
}
// int64 count = 4;
if (this->count() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
this->count());
}
// bool more = 3;
if (this->more() != 0) {
total_size += 1 + 1;
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void RangeResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:etcdserverpb.RangeResponse)
GOOGLE_DCHECK_NE(&from, this);
const RangeResponse* source =
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<RangeResponse>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:etcdserverpb.RangeResponse)
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:etcdserverpb.RangeResponse)
MergeFrom(*source);
}
}
void RangeResponse::MergeFrom(const RangeResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:etcdserverpb.RangeResponse)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
kvs_.MergeFrom(from.kvs_);
if (from.has_header()) {
mutable_header()->::etcdserverpb::ResponseHeader::MergeFrom(from.header());
}
if (from.count() != 0) {
set_count(from.count());
}
if (from.more() != 0) {
set_more(from.more());
}
}
void RangeResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:etcdserverpb.RangeResponse)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void RangeResponse::CopyFrom(const RangeResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:etcdserverpb.RangeResponse)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool RangeResponse::IsInitialized() const {
return true;
}
void RangeResponse::InternalSwap(RangeResponse* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
CastToBase(&kvs_)->InternalSwap(CastToBase(&other->kvs_));
swap(header_, other->header_);
swap(count_, other->count_);
swap(more_, other->more_);
}
::PROTOBUF_NAMESPACE_ID::Metadata RangeResponse::GetMetadata() const {
return GetMetadataStatic();
}
// ===================================================================
void WatchRequest::InitAsDefaultInstance() {
::etcdserverpb::_WatchRequest_default_instance_.create_request_ = const_cast< ::etcdserverpb::WatchCreateRequest*>(
::etcdserverpb::WatchCreateRequest::internal_default_instance());
::etcdserverpb::_WatchRequest_default_instance_.cancel_request_ = const_cast< ::etcdserverpb::WatchCancelRequest*>(
::etcdserverpb::WatchCancelRequest::internal_default_instance());
::etcdserverpb::_WatchRequest_default_instance_.progress_request_ = const_cast< ::etcdserverpb::WatchProgressRequest*>(
::etcdserverpb::WatchProgressRequest::internal_default_instance());
}
class WatchRequest::_Internal {
public:
static const ::etcdserverpb::WatchCreateRequest& create_request(const WatchRequest* msg);
static const ::etcdserverpb::WatchCancelRequest& cancel_request(const WatchRequest* msg);
static const ::etcdserverpb::WatchProgressRequest& progress_request(const WatchRequest* msg);
};
const ::etcdserverpb::WatchCreateRequest&
WatchRequest::_Internal::create_request(const WatchRequest* msg) {
return *msg->request_union_.create_request_;
}
const ::etcdserverpb::WatchCancelRequest&
WatchRequest::_Internal::cancel_request(const WatchRequest* msg) {
return *msg->request_union_.cancel_request_;
}
const ::etcdserverpb::WatchProgressRequest&
WatchRequest::_Internal::progress_request(const WatchRequest* msg) {
return *msg->request_union_.progress_request_;
}
void WatchRequest::set_allocated_create_request(::etcdserverpb::WatchCreateRequest* create_request) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
clear_request_union();
if (create_request) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
if (message_arena != submessage_arena) {
create_request = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, create_request, submessage_arena);
}
set_has_create_request();
request_union_.create_request_ = create_request;
}
// @@protoc_insertion_point(field_set_allocated:etcdserverpb.WatchRequest.create_request)
}
void WatchRequest::set_allocated_cancel_request(::etcdserverpb::WatchCancelRequest* cancel_request) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
clear_request_union();
if (cancel_request) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
if (message_arena != submessage_arena) {
cancel_request = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, cancel_request, submessage_arena);
}
set_has_cancel_request();
request_union_.cancel_request_ = cancel_request;
}
// @@protoc_insertion_point(field_set_allocated:etcdserverpb.WatchRequest.cancel_request)
}
void WatchRequest::set_allocated_progress_request(::etcdserverpb::WatchProgressRequest* progress_request) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
clear_request_union();
if (progress_request) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
if (message_arena != submessage_arena) {
progress_request = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, progress_request, submessage_arena);
}
set_has_progress_request();
request_union_.progress_request_ = progress_request;
}
// @@protoc_insertion_point(field_set_allocated:etcdserverpb.WatchRequest.progress_request)
}
WatchRequest::WatchRequest()
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:etcdserverpb.WatchRequest)
}
WatchRequest::WatchRequest(const WatchRequest& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_internal_metadata_(nullptr) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
clear_has_request_union();
switch (from.request_union_case()) {
case kCreateRequest: {
mutable_create_request()->::etcdserverpb::WatchCreateRequest::MergeFrom(from.create_request());
break;
}
case kCancelRequest: {
mutable_cancel_request()->::etcdserverpb::WatchCancelRequest::MergeFrom(from.cancel_request());
break;
}
case kProgressRequest: {
mutable_progress_request()->::etcdserverpb::WatchProgressRequest::MergeFrom(from.progress_request());
break;
}
case REQUEST_UNION_NOT_SET: {
break;
}
}
// @@protoc_insertion_point(copy_constructor:etcdserverpb.WatchRequest)
}
void WatchRequest::SharedCtor() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_WatchRequest_etcd_2eproto.base);
clear_has_request_union();
}
WatchRequest::~WatchRequest() {
// @@protoc_insertion_point(destructor:etcdserverpb.WatchRequest)
SharedDtor();
}
void WatchRequest::SharedDtor() {
if (has_request_union()) {
clear_request_union();
}
}
void WatchRequest::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const WatchRequest& WatchRequest::default_instance() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_WatchRequest_etcd_2eproto.base);
return *internal_default_instance();
}
void WatchRequest::clear_request_union() {
// @@protoc_insertion_point(one_of_clear_start:etcdserverpb.WatchRequest)
switch (request_union_case()) {
case kCreateRequest: {
delete request_union_.create_request_;
break;
}
case kCancelRequest: {
delete request_union_.cancel_request_;
break;
}
case kProgressRequest: {
delete request_union_.progress_request_;
break;
}
case REQUEST_UNION_NOT_SET: {
break;
}
}
_oneof_case_[0] = REQUEST_UNION_NOT_SET;
}
void WatchRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:etcdserverpb.WatchRequest)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
clear_request_union();
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* WatchRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
CHK_(ptr);
switch (tag >> 3) {
// .etcdserverpb.WatchCreateRequest create_request = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
ptr = ctx->ParseMessage(mutable_create_request(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// .etcdserverpb.WatchCancelRequest cancel_request = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
ptr = ctx->ParseMessage(mutable_cancel_request(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// .etcdserverpb.WatchProgressRequest progress_request = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
ptr = ctx->ParseMessage(mutable_progress_request(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
default: {
handle_unusual:
if ((tag & 7) == 4 || tag == 0) {
ctx->SetLastTag(tag);
goto success;
}
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
CHK_(ptr != nullptr);
continue;
}
} // switch
} // while
success:
return ptr;
failure:
ptr = nullptr;
goto success;
#undef CHK_
}
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool WatchRequest::MergePartialFromCodedStream(
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::PROTOBUF_NAMESPACE_ID::uint32 tag;
// @@protoc_insertion_point(parse_start:etcdserverpb.WatchRequest)
for (;;) {
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// .etcdserverpb.WatchCreateRequest create_request = 1;
case 1: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, mutable_create_request()));
} else {
goto handle_unusual;
}
break;
}
// .etcdserverpb.WatchCancelRequest cancel_request = 2;
case 2: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, mutable_cancel_request()));
} else {
goto handle_unusual;
}
break;
}
// .etcdserverpb.WatchProgressRequest progress_request = 3;
case 3: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, mutable_progress_request()));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:etcdserverpb.WatchRequest)
return true;
failure:
// @@protoc_insertion_point(parse_failure:etcdserverpb.WatchRequest)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void WatchRequest::SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:etcdserverpb.WatchRequest)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// .etcdserverpb.WatchCreateRequest create_request = 1;
if (has_create_request()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
1, _Internal::create_request(this), output);
}
// .etcdserverpb.WatchCancelRequest cancel_request = 2;
if (has_cancel_request()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
2, _Internal::cancel_request(this), output);
}
// .etcdserverpb.WatchProgressRequest progress_request = 3;
if (has_progress_request()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
3, _Internal::progress_request(this), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:etcdserverpb.WatchRequest)
}
::PROTOBUF_NAMESPACE_ID::uint8* WatchRequest::InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:etcdserverpb.WatchRequest)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// .etcdserverpb.WatchCreateRequest create_request = 1;
if (has_create_request()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
1, _Internal::create_request(this), target);
}
// .etcdserverpb.WatchCancelRequest cancel_request = 2;
if (has_cancel_request()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
2, _Internal::cancel_request(this), target);
}
// .etcdserverpb.WatchProgressRequest progress_request = 3;
if (has_progress_request()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
3, _Internal::progress_request(this), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:etcdserverpb.WatchRequest)
return target;
}
size_t WatchRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:etcdserverpb.WatchRequest)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
switch (request_union_case()) {
// .etcdserverpb.WatchCreateRequest create_request = 1;
case kCreateRequest: {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*request_union_.create_request_);
break;
}
// .etcdserverpb.WatchCancelRequest cancel_request = 2;
case kCancelRequest: {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*request_union_.cancel_request_);
break;
}
// .etcdserverpb.WatchProgressRequest progress_request = 3;
case kProgressRequest: {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*request_union_.progress_request_);
break;
}
case REQUEST_UNION_NOT_SET: {
break;
}
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void WatchRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:etcdserverpb.WatchRequest)
GOOGLE_DCHECK_NE(&from, this);
const WatchRequest* source =
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<WatchRequest>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:etcdserverpb.WatchRequest)
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:etcdserverpb.WatchRequest)
MergeFrom(*source);
}
}
void WatchRequest::MergeFrom(const WatchRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:etcdserverpb.WatchRequest)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
switch (from.request_union_case()) {
case kCreateRequest: {
mutable_create_request()->::etcdserverpb::WatchCreateRequest::MergeFrom(from.create_request());
break;
}
case kCancelRequest: {
mutable_cancel_request()->::etcdserverpb::WatchCancelRequest::MergeFrom(from.cancel_request());
break;
}
case kProgressRequest: {
mutable_progress_request()->::etcdserverpb::WatchProgressRequest::MergeFrom(from.progress_request());
break;
}
case REQUEST_UNION_NOT_SET: {
break;
}
}
}
void WatchRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:etcdserverpb.WatchRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void WatchRequest::CopyFrom(const WatchRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:etcdserverpb.WatchRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool WatchRequest::IsInitialized() const {
return true;
}
void WatchRequest::InternalSwap(WatchRequest* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(request_union_, other->request_union_);
swap(_oneof_case_[0], other->_oneof_case_[0]);
}
::PROTOBUF_NAMESPACE_ID::Metadata WatchRequest::GetMetadata() const {
return GetMetadataStatic();
}
// ===================================================================
void WatchCreateRequest::InitAsDefaultInstance() {
}
class WatchCreateRequest::_Internal {
public:
};
WatchCreateRequest::WatchCreateRequest()
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:etcdserverpb.WatchCreateRequest)
}
WatchCreateRequest::WatchCreateRequest(const WatchCreateRequest& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_internal_metadata_(nullptr),
filters_(from.filters_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from.key().empty()) {
key_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.key_);
}
range_end_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from.range_end().empty()) {
range_end_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.range_end_);
}
::memcpy(&start_revision_, &from.start_revision_,
static_cast<size_t>(reinterpret_cast<char*>(&fragment_) -
reinterpret_cast<char*>(&start_revision_)) + sizeof(fragment_));
// @@protoc_insertion_point(copy_constructor:etcdserverpb.WatchCreateRequest)
}
void WatchCreateRequest::SharedCtor() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_WatchCreateRequest_etcd_2eproto.base);
key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
range_end_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
::memset(&start_revision_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&fragment_) -
reinterpret_cast<char*>(&start_revision_)) + sizeof(fragment_));
}
WatchCreateRequest::~WatchCreateRequest() {
// @@protoc_insertion_point(destructor:etcdserverpb.WatchCreateRequest)
SharedDtor();
}
void WatchCreateRequest::SharedDtor() {
key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
range_end_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
void WatchCreateRequest::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const WatchCreateRequest& WatchCreateRequest::default_instance() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_WatchCreateRequest_etcd_2eproto.base);
return *internal_default_instance();
}
void WatchCreateRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:etcdserverpb.WatchCreateRequest)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
filters_.Clear();
key_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
range_end_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
::memset(&start_revision_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&fragment_) -
reinterpret_cast<char*>(&start_revision_)) + sizeof(fragment_));
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* WatchCreateRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
CHK_(ptr);
switch (tag >> 3) {
// bytes key = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_key(), ptr, ctx);
CHK_(ptr);
} else goto handle_unusual;
continue;
// bytes range_end = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_range_end(), ptr, ctx);
CHK_(ptr);
} else goto handle_unusual;
continue;
// int64 start_revision = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
start_revision_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// bool progress_notify = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
progress_notify_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// repeated .etcdserverpb.WatchCreateRequest.FilterType filters = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(mutable_filters(), ptr, ctx);
CHK_(ptr);
} else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40) {
::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
add_filters(static_cast<::etcdserverpb::WatchCreateRequest_FilterType>(val));
} else goto handle_unusual;
continue;
// bool prev_kv = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) {
prev_kv_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// int64 watch_id = 7;
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) {
watch_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// bool fragment = 8;
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) {
fragment_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
default: {
handle_unusual:
if ((tag & 7) == 4 || tag == 0) {
ctx->SetLastTag(tag);
goto success;
}
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
CHK_(ptr != nullptr);
continue;
}
} // switch
} // while
success:
return ptr;
failure:
ptr = nullptr;
goto success;
#undef CHK_
}
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool WatchCreateRequest::MergePartialFromCodedStream(
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::PROTOBUF_NAMESPACE_ID::uint32 tag;
// @@protoc_insertion_point(parse_start:etcdserverpb.WatchCreateRequest)
for (;;) {
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// bytes key = 1;
case 1: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes(
input, this->mutable_key()));
} else {
goto handle_unusual;
}
break;
}
// bytes range_end = 2;
case 2: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes(
input, this->mutable_range_end()));
} else {
goto handle_unusual;
}
break;
}
// int64 start_revision = 3;
case 3: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
input, &start_revision_)));
} else {
goto handle_unusual;
}
break;
}
// bool progress_notify = 4;
case 4: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
input, &progress_notify_)));
} else {
goto handle_unusual;
}
break;
}
// repeated .etcdserverpb.WatchCreateRequest.FilterType filters = 5;
case 5: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) {
::PROTOBUF_NAMESPACE_ID::uint32 length;
DO_(input->ReadVarint32(&length));
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream::Limit limit = input->PushLimit(static_cast<int>(length));
while (input->BytesUntilLimit() > 0) {
int value = 0;
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
add_filters(static_cast< ::etcdserverpb::WatchCreateRequest_FilterType >(value));
}
input->PopLimit(limit);
} else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) {
int value = 0;
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
add_filters(static_cast< ::etcdserverpb::WatchCreateRequest_FilterType >(value));
} else {
goto handle_unusual;
}
break;
}
// bool prev_kv = 6;
case 6: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (48 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
input, &prev_kv_)));
} else {
goto handle_unusual;
}
break;
}
// int64 watch_id = 7;
case 7: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (56 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
input, &watch_id_)));
} else {
goto handle_unusual;
}
break;
}
// bool fragment = 8;
case 8: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (64 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
input, &fragment_)));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:etcdserverpb.WatchCreateRequest)
return true;
failure:
// @@protoc_insertion_point(parse_failure:etcdserverpb.WatchCreateRequest)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void WatchCreateRequest::SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:etcdserverpb.WatchCreateRequest)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// bytes key = 1;
if (this->key().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased(
1, this->key(), output);
}
// bytes range_end = 2;
if (this->range_end().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased(
2, this->range_end(), output);
}
// int64 start_revision = 3;
if (this->start_revision() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(3, this->start_revision(), output);
}
// bool progress_notify = 4;
if (this->progress_notify() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(4, this->progress_notify(), output);
}
// repeated .etcdserverpb.WatchCreateRequest.FilterType filters = 5;
if (this->filters_size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(
5,
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
output);
output->WriteVarint32(_filters_cached_byte_size_.load(
std::memory_order_relaxed));
}
for (int i = 0, n = this->filters_size(); i < n; i++) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumNoTag(
this->filters(i), output);
}
// bool prev_kv = 6;
if (this->prev_kv() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(6, this->prev_kv(), output);
}
// int64 watch_id = 7;
if (this->watch_id() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(7, this->watch_id(), output);
}
// bool fragment = 8;
if (this->fragment() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(8, this->fragment(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:etcdserverpb.WatchCreateRequest)
}
::PROTOBUF_NAMESPACE_ID::uint8* WatchCreateRequest::InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:etcdserverpb.WatchCreateRequest)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// bytes key = 1;
if (this->key().size() > 0) {
target =
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray(
1, this->key(), target);
}
// bytes range_end = 2;
if (this->range_end().size() > 0) {
target =
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray(
2, this->range_end(), target);
}
// int64 start_revision = 3;
if (this->start_revision() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->start_revision(), target);
}
// bool progress_notify = 4;
if (this->progress_notify() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->progress_notify(), target);
}
// repeated .etcdserverpb.WatchCreateRequest.FilterType filters = 5;
if (this->filters_size() > 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray(
5,
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
target);
target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( _filters_cached_byte_size_.load(std::memory_order_relaxed),
target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumNoTagToArray(
this->filters_, target);
}
// bool prev_kv = 6;
if (this->prev_kv() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->prev_kv(), target);
}
// int64 watch_id = 7;
if (this->watch_id() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(7, this->watch_id(), target);
}
// bool fragment = 8;
if (this->fragment() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->fragment(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:etcdserverpb.WatchCreateRequest)
return target;
}
size_t WatchCreateRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:etcdserverpb.WatchCreateRequest)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated .etcdserverpb.WatchCreateRequest.FilterType filters = 5;
{
size_t data_size = 0;
unsigned int count = static_cast<unsigned int>(this->filters_size());for (unsigned int i = 0; i < count; i++) {
data_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(
this->filters(static_cast<int>(i)));
}
if (data_size > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size));
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
_filters_cached_byte_size_.store(cached_size,
std::memory_order_relaxed);
total_size += data_size;
}
// bytes key = 1;
if (this->key().size() > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
this->key());
}
// bytes range_end = 2;
if (this->range_end().size() > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
this->range_end());
}
// int64 start_revision = 3;
if (this->start_revision() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
this->start_revision());
}
// int64 watch_id = 7;
if (this->watch_id() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
this->watch_id());
}
// bool progress_notify = 4;
if (this->progress_notify() != 0) {
total_size += 1 + 1;
}
// bool prev_kv = 6;
if (this->prev_kv() != 0) {
total_size += 1 + 1;
}
// bool fragment = 8;
if (this->fragment() != 0) {
total_size += 1 + 1;
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void WatchCreateRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:etcdserverpb.WatchCreateRequest)
GOOGLE_DCHECK_NE(&from, this);
const WatchCreateRequest* source =
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<WatchCreateRequest>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:etcdserverpb.WatchCreateRequest)
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:etcdserverpb.WatchCreateRequest)
MergeFrom(*source);
}
}
void WatchCreateRequest::MergeFrom(const WatchCreateRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:etcdserverpb.WatchCreateRequest)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
filters_.MergeFrom(from.filters_);
if (from.key().size() > 0) {
key_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.key_);
}
if (from.range_end().size() > 0) {
range_end_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.range_end_);
}
if (from.start_revision() != 0) {
set_start_revision(from.start_revision());
}
if (from.watch_id() != 0) {
set_watch_id(from.watch_id());
}
if (from.progress_notify() != 0) {
set_progress_notify(from.progress_notify());
}
if (from.prev_kv() != 0) {
set_prev_kv(from.prev_kv());
}
if (from.fragment() != 0) {
set_fragment(from.fragment());
}
}
void WatchCreateRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:etcdserverpb.WatchCreateRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void WatchCreateRequest::CopyFrom(const WatchCreateRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:etcdserverpb.WatchCreateRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool WatchCreateRequest::IsInitialized() const {
return true;
}
void WatchCreateRequest::InternalSwap(WatchCreateRequest* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
filters_.InternalSwap(&other->filters_);
key_.Swap(&other->key_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
range_end_.Swap(&other->range_end_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
swap(start_revision_, other->start_revision_);
swap(watch_id_, other->watch_id_);
swap(progress_notify_, other->progress_notify_);
swap(prev_kv_, other->prev_kv_);
swap(fragment_, other->fragment_);
}
::PROTOBUF_NAMESPACE_ID::Metadata WatchCreateRequest::GetMetadata() const {
return GetMetadataStatic();
}
// ===================================================================
void WatchCancelRequest::InitAsDefaultInstance() {
}
class WatchCancelRequest::_Internal {
public:
};
WatchCancelRequest::WatchCancelRequest()
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:etcdserverpb.WatchCancelRequest)
}
WatchCancelRequest::WatchCancelRequest(const WatchCancelRequest& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_internal_metadata_(nullptr) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
watch_id_ = from.watch_id_;
// @@protoc_insertion_point(copy_constructor:etcdserverpb.WatchCancelRequest)
}
void WatchCancelRequest::SharedCtor() {
watch_id_ = PROTOBUF_LONGLONG(0);
}
WatchCancelRequest::~WatchCancelRequest() {
// @@protoc_insertion_point(destructor:etcdserverpb.WatchCancelRequest)
SharedDtor();
}
void WatchCancelRequest::SharedDtor() {
}
void WatchCancelRequest::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const WatchCancelRequest& WatchCancelRequest::default_instance() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_WatchCancelRequest_etcd_2eproto.base);
return *internal_default_instance();
}
void WatchCancelRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:etcdserverpb.WatchCancelRequest)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
watch_id_ = PROTOBUF_LONGLONG(0);
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* WatchCancelRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
CHK_(ptr);
switch (tag >> 3) {
// int64 watch_id = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
watch_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
default: {
handle_unusual:
if ((tag & 7) == 4 || tag == 0) {
ctx->SetLastTag(tag);
goto success;
}
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
CHK_(ptr != nullptr);
continue;
}
} // switch
} // while
success:
return ptr;
failure:
ptr = nullptr;
goto success;
#undef CHK_
}
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool WatchCancelRequest::MergePartialFromCodedStream(
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::PROTOBUF_NAMESPACE_ID::uint32 tag;
// @@protoc_insertion_point(parse_start:etcdserverpb.WatchCancelRequest)
for (;;) {
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// int64 watch_id = 1;
case 1: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
input, &watch_id_)));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:etcdserverpb.WatchCancelRequest)
return true;
failure:
// @@protoc_insertion_point(parse_failure:etcdserverpb.WatchCancelRequest)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void WatchCancelRequest::SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:etcdserverpb.WatchCancelRequest)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// int64 watch_id = 1;
if (this->watch_id() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(1, this->watch_id(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:etcdserverpb.WatchCancelRequest)
}
::PROTOBUF_NAMESPACE_ID::uint8* WatchCancelRequest::InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:etcdserverpb.WatchCancelRequest)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// int64 watch_id = 1;
if (this->watch_id() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->watch_id(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:etcdserverpb.WatchCancelRequest)
return target;
}
size_t WatchCancelRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:etcdserverpb.WatchCancelRequest)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// int64 watch_id = 1;
if (this->watch_id() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
this->watch_id());
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void WatchCancelRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:etcdserverpb.WatchCancelRequest)
GOOGLE_DCHECK_NE(&from, this);
const WatchCancelRequest* source =
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<WatchCancelRequest>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:etcdserverpb.WatchCancelRequest)
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:etcdserverpb.WatchCancelRequest)
MergeFrom(*source);
}
}
void WatchCancelRequest::MergeFrom(const WatchCancelRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:etcdserverpb.WatchCancelRequest)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.watch_id() != 0) {
set_watch_id(from.watch_id());
}
}
void WatchCancelRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:etcdserverpb.WatchCancelRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void WatchCancelRequest::CopyFrom(const WatchCancelRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:etcdserverpb.WatchCancelRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool WatchCancelRequest::IsInitialized() const {
return true;
}
void WatchCancelRequest::InternalSwap(WatchCancelRequest* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(watch_id_, other->watch_id_);
}
::PROTOBUF_NAMESPACE_ID::Metadata WatchCancelRequest::GetMetadata() const {
return GetMetadataStatic();
}
// ===================================================================
void WatchProgressRequest::InitAsDefaultInstance() {
}
class WatchProgressRequest::_Internal {
public:
};
WatchProgressRequest::WatchProgressRequest()
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:etcdserverpb.WatchProgressRequest)
}
WatchProgressRequest::WatchProgressRequest(const WatchProgressRequest& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_internal_metadata_(nullptr) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:etcdserverpb.WatchProgressRequest)
}
void WatchProgressRequest::SharedCtor() {
}
WatchProgressRequest::~WatchProgressRequest() {
// @@protoc_insertion_point(destructor:etcdserverpb.WatchProgressRequest)
SharedDtor();
}
void WatchProgressRequest::SharedDtor() {
}
void WatchProgressRequest::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const WatchProgressRequest& WatchProgressRequest::default_instance() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_WatchProgressRequest_etcd_2eproto.base);
return *internal_default_instance();
}
void WatchProgressRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:etcdserverpb.WatchProgressRequest)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* WatchProgressRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
CHK_(ptr);
switch (tag >> 3) {
default: {
if ((tag & 7) == 4 || tag == 0) {
ctx->SetLastTag(tag);
goto success;
}
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
CHK_(ptr != nullptr);
continue;
}
} // switch
} // while
success:
return ptr;
failure:
ptr = nullptr;
goto success;
#undef CHK_
}
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool WatchProgressRequest::MergePartialFromCodedStream(
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::PROTOBUF_NAMESPACE_ID::uint32 tag;
// @@protoc_insertion_point(parse_start:etcdserverpb.WatchProgressRequest)
for (;;) {
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
}
success:
// @@protoc_insertion_point(parse_success:etcdserverpb.WatchProgressRequest)
return true;
failure:
// @@protoc_insertion_point(parse_failure:etcdserverpb.WatchProgressRequest)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void WatchProgressRequest::SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:etcdserverpb.WatchProgressRequest)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (_internal_metadata_.have_unknown_fields()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:etcdserverpb.WatchProgressRequest)
}
::PROTOBUF_NAMESPACE_ID::uint8* WatchProgressRequest::InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:etcdserverpb.WatchProgressRequest)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (_internal_metadata_.have_unknown_fields()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:etcdserverpb.WatchProgressRequest)
return target;
}
size_t WatchProgressRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:etcdserverpb.WatchProgressRequest)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void WatchProgressRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:etcdserverpb.WatchProgressRequest)
GOOGLE_DCHECK_NE(&from, this);
const WatchProgressRequest* source =
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<WatchProgressRequest>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:etcdserverpb.WatchProgressRequest)
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:etcdserverpb.WatchProgressRequest)
MergeFrom(*source);
}
}
void WatchProgressRequest::MergeFrom(const WatchProgressRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:etcdserverpb.WatchProgressRequest)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
}
void WatchProgressRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:etcdserverpb.WatchProgressRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void WatchProgressRequest::CopyFrom(const WatchProgressRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:etcdserverpb.WatchProgressRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool WatchProgressRequest::IsInitialized() const {
return true;
}
void WatchProgressRequest::InternalSwap(WatchProgressRequest* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
}
::PROTOBUF_NAMESPACE_ID::Metadata WatchProgressRequest::GetMetadata() const {
return GetMetadataStatic();
}
// ===================================================================
void WatchResponse::InitAsDefaultInstance() {
::etcdserverpb::_WatchResponse_default_instance_._instance.get_mutable()->header_ = const_cast< ::etcdserverpb::ResponseHeader*>(
::etcdserverpb::ResponseHeader::internal_default_instance());
}
class WatchResponse::_Internal {
public:
static const ::etcdserverpb::ResponseHeader& header(const WatchResponse* msg);
};
const ::etcdserverpb::ResponseHeader&
WatchResponse::_Internal::header(const WatchResponse* msg) {
return *msg->header_;
}
WatchResponse::WatchResponse()
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:etcdserverpb.WatchResponse)
}
WatchResponse::WatchResponse(const WatchResponse& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_internal_metadata_(nullptr),
events_(from.events_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
cancel_reason_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from.cancel_reason().empty()) {
cancel_reason_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.cancel_reason_);
}
if (from.has_header()) {
header_ = new ::etcdserverpb::ResponseHeader(*from.header_);
} else {
header_ = nullptr;
}
::memcpy(&watch_id_, &from.watch_id_,
static_cast<size_t>(reinterpret_cast<char*>(&fragment_) -
reinterpret_cast<char*>(&watch_id_)) + sizeof(fragment_));
// @@protoc_insertion_point(copy_constructor:etcdserverpb.WatchResponse)
}
void WatchResponse::SharedCtor() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_WatchResponse_etcd_2eproto.base);
cancel_reason_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
::memset(&header_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&fragment_) -
reinterpret_cast<char*>(&header_)) + sizeof(fragment_));
}
WatchResponse::~WatchResponse() {
// @@protoc_insertion_point(destructor:etcdserverpb.WatchResponse)
SharedDtor();
}
void WatchResponse::SharedDtor() {
cancel_reason_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (this != internal_default_instance()) delete header_;
}
void WatchResponse::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const WatchResponse& WatchResponse::default_instance() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_WatchResponse_etcd_2eproto.base);
return *internal_default_instance();
}
void WatchResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:etcdserverpb.WatchResponse)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
events_.Clear();
cancel_reason_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (GetArenaNoVirtual() == nullptr && header_ != nullptr) {
delete header_;
}
header_ = nullptr;
::memset(&watch_id_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&fragment_) -
reinterpret_cast<char*>(&watch_id_)) + sizeof(fragment_));
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* WatchResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
CHK_(ptr);
switch (tag >> 3) {
// .etcdserverpb.ResponseHeader header = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
ptr = ctx->ParseMessage(mutable_header(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// int64 watch_id = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
watch_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// bool created = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
created_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// bool canceled = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
canceled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// int64 compact_revision = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
compact_revision_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// string cancel_reason = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_cancel_reason(), ptr, ctx, "etcdserverpb.WatchResponse.cancel_reason");
CHK_(ptr);
} else goto handle_unusual;
continue;
// bool fragment = 7;
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) {
fragment_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// repeated .etcdserverpb.Event events = 11;
case 11:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 90)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(add_events(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 90);
} else goto handle_unusual;
continue;
default: {
handle_unusual:
if ((tag & 7) == 4 || tag == 0) {
ctx->SetLastTag(tag);
goto success;
}
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
CHK_(ptr != nullptr);
continue;
}
} // switch
} // while
success:
return ptr;
failure:
ptr = nullptr;
goto success;
#undef CHK_
}
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool WatchResponse::MergePartialFromCodedStream(
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::PROTOBUF_NAMESPACE_ID::uint32 tag;
// @@protoc_insertion_point(parse_start:etcdserverpb.WatchResponse)
for (;;) {
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// .etcdserverpb.ResponseHeader header = 1;
case 1: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, mutable_header()));
} else {
goto handle_unusual;
}
break;
}
// int64 watch_id = 2;
case 2: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
input, &watch_id_)));
} else {
goto handle_unusual;
}
break;
}
// bool created = 3;
case 3: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
input, &created_)));
} else {
goto handle_unusual;
}
break;
}
// bool canceled = 4;
case 4: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
input, &canceled_)));
} else {
goto handle_unusual;
}
break;
}
// int64 compact_revision = 5;
case 5: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
input, &compact_revision_)));
} else {
goto handle_unusual;
}
break;
}
// string cancel_reason = 6;
case 6: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
input, this->mutable_cancel_reason()));
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->cancel_reason().data(), static_cast<int>(this->cancel_reason().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
"etcdserverpb.WatchResponse.cancel_reason"));
} else {
goto handle_unusual;
}
break;
}
// bool fragment = 7;
case 7: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (56 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
input, &fragment_)));
} else {
goto handle_unusual;
}
break;
}
// repeated .etcdserverpb.Event events = 11;
case 11: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (90 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, add_events()));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:etcdserverpb.WatchResponse)
return true;
failure:
// @@protoc_insertion_point(parse_failure:etcdserverpb.WatchResponse)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void WatchResponse::SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:etcdserverpb.WatchResponse)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// .etcdserverpb.ResponseHeader header = 1;
if (this->has_header()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
1, _Internal::header(this), output);
}
// int64 watch_id = 2;
if (this->watch_id() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(2, this->watch_id(), output);
}
// bool created = 3;
if (this->created() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(3, this->created(), output);
}
// bool canceled = 4;
if (this->canceled() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(4, this->canceled(), output);
}
// int64 compact_revision = 5;
if (this->compact_revision() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(5, this->compact_revision(), output);
}
// string cancel_reason = 6;
if (this->cancel_reason().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->cancel_reason().data(), static_cast<int>(this->cancel_reason().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"etcdserverpb.WatchResponse.cancel_reason");
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
6, this->cancel_reason(), output);
}
// bool fragment = 7;
if (this->fragment() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(7, this->fragment(), output);
}
// repeated .etcdserverpb.Event events = 11;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->events_size()); i < n; i++) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
11,
this->events(static_cast<int>(i)),
output);
}
if (_internal_metadata_.have_unknown_fields()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:etcdserverpb.WatchResponse)
}
::PROTOBUF_NAMESPACE_ID::uint8* WatchResponse::InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:etcdserverpb.WatchResponse)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// .etcdserverpb.ResponseHeader header = 1;
if (this->has_header()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
1, _Internal::header(this), target);
}
// int64 watch_id = 2;
if (this->watch_id() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->watch_id(), target);
}
// bool created = 3;
if (this->created() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->created(), target);
}
// bool canceled = 4;
if (this->canceled() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->canceled(), target);
}
// int64 compact_revision = 5;
if (this->compact_revision() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(5, this->compact_revision(), target);
}
// string cancel_reason = 6;
if (this->cancel_reason().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->cancel_reason().data(), static_cast<int>(this->cancel_reason().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"etcdserverpb.WatchResponse.cancel_reason");
target =
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
6, this->cancel_reason(), target);
}
// bool fragment = 7;
if (this->fragment() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->fragment(), target);
}
// repeated .etcdserverpb.Event events = 11;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->events_size()); i < n; i++) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
11, this->events(static_cast<int>(i)), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:etcdserverpb.WatchResponse)
return target;
}
size_t WatchResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:etcdserverpb.WatchResponse)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated .etcdserverpb.Event events = 11;
{
unsigned int count = static_cast<unsigned int>(this->events_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
this->events(static_cast<int>(i)));
}
}
// string cancel_reason = 6;
if (this->cancel_reason().size() > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->cancel_reason());
}
// .etcdserverpb.ResponseHeader header = 1;
if (this->has_header()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*header_);
}
// int64 watch_id = 2;
if (this->watch_id() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
this->watch_id());
}
// int64 compact_revision = 5;
if (this->compact_revision() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
this->compact_revision());
}
// bool created = 3;
if (this->created() != 0) {
total_size += 1 + 1;
}
// bool canceled = 4;
if (this->canceled() != 0) {
total_size += 1 + 1;
}
// bool fragment = 7;
if (this->fragment() != 0) {
total_size += 1 + 1;
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void WatchResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:etcdserverpb.WatchResponse)
GOOGLE_DCHECK_NE(&from, this);
const WatchResponse* source =
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<WatchResponse>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:etcdserverpb.WatchResponse)
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:etcdserverpb.WatchResponse)
MergeFrom(*source);
}
}
void WatchResponse::MergeFrom(const WatchResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:etcdserverpb.WatchResponse)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
events_.MergeFrom(from.events_);
if (from.cancel_reason().size() > 0) {
cancel_reason_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.cancel_reason_);
}
if (from.has_header()) {
mutable_header()->::etcdserverpb::ResponseHeader::MergeFrom(from.header());
}
if (from.watch_id() != 0) {
set_watch_id(from.watch_id());
}
if (from.compact_revision() != 0) {
set_compact_revision(from.compact_revision());
}
if (from.created() != 0) {
set_created(from.created());
}
if (from.canceled() != 0) {
set_canceled(from.canceled());
}
if (from.fragment() != 0) {
set_fragment(from.fragment());
}
}
void WatchResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:etcdserverpb.WatchResponse)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void WatchResponse::CopyFrom(const WatchResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:etcdserverpb.WatchResponse)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool WatchResponse::IsInitialized() const {
return true;
}
void WatchResponse::InternalSwap(WatchResponse* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
CastToBase(&events_)->InternalSwap(CastToBase(&other->events_));
cancel_reason_.Swap(&other->cancel_reason_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
swap(header_, other->header_);
swap(watch_id_, other->watch_id_);
swap(compact_revision_, other->compact_revision_);
swap(created_, other->created_);
swap(canceled_, other->canceled_);
swap(fragment_, other->fragment_);
}
::PROTOBUF_NAMESPACE_ID::Metadata WatchResponse::GetMetadata() const {
return GetMetadataStatic();
}
// ===================================================================
void ResponseHeader::InitAsDefaultInstance() {
}
class ResponseHeader::_Internal {
public:
};
ResponseHeader::ResponseHeader()
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:etcdserverpb.ResponseHeader)
}
ResponseHeader::ResponseHeader(const ResponseHeader& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_internal_metadata_(nullptr) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
::memcpy(&cluster_id_, &from.cluster_id_,
static_cast<size_t>(reinterpret_cast<char*>(&raft_term_) -
reinterpret_cast<char*>(&cluster_id_)) + sizeof(raft_term_));
// @@protoc_insertion_point(copy_constructor:etcdserverpb.ResponseHeader)
}
void ResponseHeader::SharedCtor() {
::memset(&cluster_id_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&raft_term_) -
reinterpret_cast<char*>(&cluster_id_)) + sizeof(raft_term_));
}
ResponseHeader::~ResponseHeader() {
// @@protoc_insertion_point(destructor:etcdserverpb.ResponseHeader)
SharedDtor();
}
void ResponseHeader::SharedDtor() {
}
void ResponseHeader::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const ResponseHeader& ResponseHeader::default_instance() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ResponseHeader_etcd_2eproto.base);
return *internal_default_instance();
}
void ResponseHeader::Clear() {
// @@protoc_insertion_point(message_clear_start:etcdserverpb.ResponseHeader)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
::memset(&cluster_id_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&raft_term_) -
reinterpret_cast<char*>(&cluster_id_)) + sizeof(raft_term_));
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* ResponseHeader::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
CHK_(ptr);
switch (tag >> 3) {
// uint64 cluster_id = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
cluster_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// uint64 member_id = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
member_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// int64 revision = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
revision_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// uint64 raft_term = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
raft_term_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
default: {
handle_unusual:
if ((tag & 7) == 4 || tag == 0) {
ctx->SetLastTag(tag);
goto success;
}
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
CHK_(ptr != nullptr);
continue;
}
} // switch
} // while
success:
return ptr;
failure:
ptr = nullptr;
goto success;
#undef CHK_
}
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool ResponseHeader::MergePartialFromCodedStream(
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::PROTOBUF_NAMESPACE_ID::uint32 tag;
// @@protoc_insertion_point(parse_start:etcdserverpb.ResponseHeader)
for (;;) {
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// uint64 cluster_id = 1;
case 1: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>(
input, &cluster_id_)));
} else {
goto handle_unusual;
}
break;
}
// uint64 member_id = 2;
case 2: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>(
input, &member_id_)));
} else {
goto handle_unusual;
}
break;
}
// int64 revision = 3;
case 3: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
input, &revision_)));
} else {
goto handle_unusual;
}
break;
}
// uint64 raft_term = 4;
case 4: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>(
input, &raft_term_)));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:etcdserverpb.ResponseHeader)
return true;
failure:
// @@protoc_insertion_point(parse_failure:etcdserverpb.ResponseHeader)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void ResponseHeader::SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:etcdserverpb.ResponseHeader)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// uint64 cluster_id = 1;
if (this->cluster_id() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(1, this->cluster_id(), output);
}
// uint64 member_id = 2;
if (this->member_id() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(2, this->member_id(), output);
}
// int64 revision = 3;
if (this->revision() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(3, this->revision(), output);
}
// uint64 raft_term = 4;
if (this->raft_term() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(4, this->raft_term(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:etcdserverpb.ResponseHeader)
}
::PROTOBUF_NAMESPACE_ID::uint8* ResponseHeader::InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:etcdserverpb.ResponseHeader)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// uint64 cluster_id = 1;
if (this->cluster_id() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(1, this->cluster_id(), target);
}
// uint64 member_id = 2;
if (this->member_id() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(2, this->member_id(), target);
}
// int64 revision = 3;
if (this->revision() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->revision(), target);
}
// uint64 raft_term = 4;
if (this->raft_term() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(4, this->raft_term(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:etcdserverpb.ResponseHeader)
return target;
}
size_t ResponseHeader::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:etcdserverpb.ResponseHeader)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// uint64 cluster_id = 1;
if (this->cluster_id() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size(
this->cluster_id());
}
// uint64 member_id = 2;
if (this->member_id() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size(
this->member_id());
}
// int64 revision = 3;
if (this->revision() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
this->revision());
}
// uint64 raft_term = 4;
if (this->raft_term() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size(
this->raft_term());
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void ResponseHeader::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:etcdserverpb.ResponseHeader)
GOOGLE_DCHECK_NE(&from, this);
const ResponseHeader* source =
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ResponseHeader>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:etcdserverpb.ResponseHeader)
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:etcdserverpb.ResponseHeader)
MergeFrom(*source);
}
}
void ResponseHeader::MergeFrom(const ResponseHeader& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:etcdserverpb.ResponseHeader)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.cluster_id() != 0) {
set_cluster_id(from.cluster_id());
}
if (from.member_id() != 0) {
set_member_id(from.member_id());
}
if (from.revision() != 0) {
set_revision(from.revision());
}
if (from.raft_term() != 0) {
set_raft_term(from.raft_term());
}
}
void ResponseHeader::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:etcdserverpb.ResponseHeader)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void ResponseHeader::CopyFrom(const ResponseHeader& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:etcdserverpb.ResponseHeader)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ResponseHeader::IsInitialized() const {
return true;
}
void ResponseHeader::InternalSwap(ResponseHeader* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(cluster_id_, other->cluster_id_);
swap(member_id_, other->member_id_);
swap(revision_, other->revision_);
swap(raft_term_, other->raft_term_);
}
::PROTOBUF_NAMESPACE_ID::Metadata ResponseHeader::GetMetadata() const {
return GetMetadataStatic();
}
// ===================================================================
void KeyValue::InitAsDefaultInstance() {
}
class KeyValue::_Internal {
public:
};
KeyValue::KeyValue()
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:etcdserverpb.KeyValue)
}
KeyValue::KeyValue(const KeyValue& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_internal_metadata_(nullptr) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from.key().empty()) {
key_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.key_);
}
value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from.value().empty()) {
value_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.value_);
}
::memcpy(&create_revision_, &from.create_revision_,
static_cast<size_t>(reinterpret_cast<char*>(&lease_) -
reinterpret_cast<char*>(&create_revision_)) + sizeof(lease_));
// @@protoc_insertion_point(copy_constructor:etcdserverpb.KeyValue)
}
void KeyValue::SharedCtor() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_KeyValue_etcd_2eproto.base);
key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
::memset(&create_revision_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&lease_) -
reinterpret_cast<char*>(&create_revision_)) + sizeof(lease_));
}
KeyValue::~KeyValue() {
// @@protoc_insertion_point(destructor:etcdserverpb.KeyValue)
SharedDtor();
}
void KeyValue::SharedDtor() {
key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
value_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
void KeyValue::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const KeyValue& KeyValue::default_instance() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_KeyValue_etcd_2eproto.base);
return *internal_default_instance();
}
void KeyValue::Clear() {
// @@protoc_insertion_point(message_clear_start:etcdserverpb.KeyValue)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
key_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
value_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
::memset(&create_revision_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&lease_) -
reinterpret_cast<char*>(&create_revision_)) + sizeof(lease_));
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* KeyValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
CHK_(ptr);
switch (tag >> 3) {
// bytes key = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_key(), ptr, ctx);
CHK_(ptr);
} else goto handle_unusual;
continue;
// int64 create_revision = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
create_revision_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// int64 mod_revision = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
mod_revision_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// int64 version = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// bytes value = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_value(), ptr, ctx);
CHK_(ptr);
} else goto handle_unusual;
continue;
// int64 lease = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) {
lease_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
default: {
handle_unusual:
if ((tag & 7) == 4 || tag == 0) {
ctx->SetLastTag(tag);
goto success;
}
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
CHK_(ptr != nullptr);
continue;
}
} // switch
} // while
success:
return ptr;
failure:
ptr = nullptr;
goto success;
#undef CHK_
}
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool KeyValue::MergePartialFromCodedStream(
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::PROTOBUF_NAMESPACE_ID::uint32 tag;
// @@protoc_insertion_point(parse_start:etcdserverpb.KeyValue)
for (;;) {
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// bytes key = 1;
case 1: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes(
input, this->mutable_key()));
} else {
goto handle_unusual;
}
break;
}
// int64 create_revision = 2;
case 2: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
input, &create_revision_)));
} else {
goto handle_unusual;
}
break;
}
// int64 mod_revision = 3;
case 3: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
input, &mod_revision_)));
} else {
goto handle_unusual;
}
break;
}
// int64 version = 4;
case 4: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
input, &version_)));
} else {
goto handle_unusual;
}
break;
}
// bytes value = 5;
case 5: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes(
input, this->mutable_value()));
} else {
goto handle_unusual;
}
break;
}
// int64 lease = 6;
case 6: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (48 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
input, &lease_)));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:etcdserverpb.KeyValue)
return true;
failure:
// @@protoc_insertion_point(parse_failure:etcdserverpb.KeyValue)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void KeyValue::SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:etcdserverpb.KeyValue)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// bytes key = 1;
if (this->key().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased(
1, this->key(), output);
}
// int64 create_revision = 2;
if (this->create_revision() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(2, this->create_revision(), output);
}
// int64 mod_revision = 3;
if (this->mod_revision() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(3, this->mod_revision(), output);
}
// int64 version = 4;
if (this->version() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(4, this->version(), output);
}
// bytes value = 5;
if (this->value().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased(
5, this->value(), output);
}
// int64 lease = 6;
if (this->lease() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(6, this->lease(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:etcdserverpb.KeyValue)
}
::PROTOBUF_NAMESPACE_ID::uint8* KeyValue::InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:etcdserverpb.KeyValue)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// bytes key = 1;
if (this->key().size() > 0) {
target =
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray(
1, this->key(), target);
}
// int64 create_revision = 2;
if (this->create_revision() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->create_revision(), target);
}
// int64 mod_revision = 3;
if (this->mod_revision() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->mod_revision(), target);
}
// int64 version = 4;
if (this->version() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->version(), target);
}
// bytes value = 5;
if (this->value().size() > 0) {
target =
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray(
5, this->value(), target);
}
// int64 lease = 6;
if (this->lease() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(6, this->lease(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:etcdserverpb.KeyValue)
return target;
}
size_t KeyValue::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:etcdserverpb.KeyValue)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// bytes key = 1;
if (this->key().size() > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
this->key());
}
// bytes value = 5;
if (this->value().size() > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
this->value());
}
// int64 create_revision = 2;
if (this->create_revision() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
this->create_revision());
}
// int64 mod_revision = 3;
if (this->mod_revision() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
this->mod_revision());
}
// int64 version = 4;
if (this->version() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
this->version());
}
// int64 lease = 6;
if (this->lease() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
this->lease());
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void KeyValue::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:etcdserverpb.KeyValue)
GOOGLE_DCHECK_NE(&from, this);
const KeyValue* source =
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<KeyValue>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:etcdserverpb.KeyValue)
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:etcdserverpb.KeyValue)
MergeFrom(*source);
}
}
void KeyValue::MergeFrom(const KeyValue& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:etcdserverpb.KeyValue)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.key().size() > 0) {
key_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.key_);
}
if (from.value().size() > 0) {
value_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.value_);
}
if (from.create_revision() != 0) {
set_create_revision(from.create_revision());
}
if (from.mod_revision() != 0) {
set_mod_revision(from.mod_revision());
}
if (from.version() != 0) {
set_version(from.version());
}
if (from.lease() != 0) {
set_lease(from.lease());
}
}
void KeyValue::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:etcdserverpb.KeyValue)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void KeyValue::CopyFrom(const KeyValue& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:etcdserverpb.KeyValue)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool KeyValue::IsInitialized() const {
return true;
}
void KeyValue::InternalSwap(KeyValue* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
key_.Swap(&other->key_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
value_.Swap(&other->value_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
swap(create_revision_, other->create_revision_);
swap(mod_revision_, other->mod_revision_);
swap(version_, other->version_);
swap(lease_, other->lease_);
}
::PROTOBUF_NAMESPACE_ID::Metadata KeyValue::GetMetadata() const {
return GetMetadataStatic();
}
// ===================================================================
void Event::InitAsDefaultInstance() {
::etcdserverpb::_Event_default_instance_._instance.get_mutable()->kv_ = const_cast< ::etcdserverpb::KeyValue*>(
::etcdserverpb::KeyValue::internal_default_instance());
::etcdserverpb::_Event_default_instance_._instance.get_mutable()->prev_kv_ = const_cast< ::etcdserverpb::KeyValue*>(
::etcdserverpb::KeyValue::internal_default_instance());
}
class Event::_Internal {
public:
static const ::etcdserverpb::KeyValue& kv(const Event* msg);
static const ::etcdserverpb::KeyValue& prev_kv(const Event* msg);
};
const ::etcdserverpb::KeyValue&
Event::_Internal::kv(const Event* msg) {
return *msg->kv_;
}
const ::etcdserverpb::KeyValue&
Event::_Internal::prev_kv(const Event* msg) {
return *msg->prev_kv_;
}
Event::Event()
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:etcdserverpb.Event)
}
Event::Event(const Event& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_internal_metadata_(nullptr) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
if (from.has_kv()) {
kv_ = new ::etcdserverpb::KeyValue(*from.kv_);
} else {
kv_ = nullptr;
}
if (from.has_prev_kv()) {
prev_kv_ = new ::etcdserverpb::KeyValue(*from.prev_kv_);
} else {
prev_kv_ = nullptr;
}
type_ = from.type_;
// @@protoc_insertion_point(copy_constructor:etcdserverpb.Event)
}
void Event::SharedCtor() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Event_etcd_2eproto.base);
::memset(&kv_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&type_) -
reinterpret_cast<char*>(&kv_)) + sizeof(type_));
}
Event::~Event() {
// @@protoc_insertion_point(destructor:etcdserverpb.Event)
SharedDtor();
}
void Event::SharedDtor() {
if (this != internal_default_instance()) delete kv_;
if (this != internal_default_instance()) delete prev_kv_;
}
void Event::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const Event& Event::default_instance() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Event_etcd_2eproto.base);
return *internal_default_instance();
}
void Event::Clear() {
// @@protoc_insertion_point(message_clear_start:etcdserverpb.Event)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
if (GetArenaNoVirtual() == nullptr && kv_ != nullptr) {
delete kv_;
}
kv_ = nullptr;
if (GetArenaNoVirtual() == nullptr && prev_kv_ != nullptr) {
delete prev_kv_;
}
prev_kv_ = nullptr;
type_ = 0;
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* Event::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
CHK_(ptr);
switch (tag >> 3) {
// .etcdserverpb.Event.EventType type = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
set_type(static_cast<::etcdserverpb::Event_EventType>(val));
} else goto handle_unusual;
continue;
// .etcdserverpb.KeyValue kv = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
ptr = ctx->ParseMessage(mutable_kv(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// .etcdserverpb.KeyValue prev_kv = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
ptr = ctx->ParseMessage(mutable_prev_kv(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
default: {
handle_unusual:
if ((tag & 7) == 4 || tag == 0) {
ctx->SetLastTag(tag);
goto success;
}
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
CHK_(ptr != nullptr);
continue;
}
} // switch
} // while
success:
return ptr;
failure:
ptr = nullptr;
goto success;
#undef CHK_
}
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool Event::MergePartialFromCodedStream(
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::PROTOBUF_NAMESPACE_ID::uint32 tag;
// @@protoc_insertion_point(parse_start:etcdserverpb.Event)
for (;;) {
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// .etcdserverpb.Event.EventType type = 1;
case 1: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
int value = 0;
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
set_type(static_cast< ::etcdserverpb::Event_EventType >(value));
} else {
goto handle_unusual;
}
break;
}
// .etcdserverpb.KeyValue kv = 2;
case 2: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, mutable_kv()));
} else {
goto handle_unusual;
}
break;
}
// .etcdserverpb.KeyValue prev_kv = 3;
case 3: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, mutable_prev_kv()));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:etcdserverpb.Event)
return true;
failure:
// @@protoc_insertion_point(parse_failure:etcdserverpb.Event)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void Event::SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:etcdserverpb.Event)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// .etcdserverpb.Event.EventType type = 1;
if (this->type() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum(
1, this->type(), output);
}
// .etcdserverpb.KeyValue kv = 2;
if (this->has_kv()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
2, _Internal::kv(this), output);
}
// .etcdserverpb.KeyValue prev_kv = 3;
if (this->has_prev_kv()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
3, _Internal::prev_kv(this), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:etcdserverpb.Event)
}
::PROTOBUF_NAMESPACE_ID::uint8* Event::InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:etcdserverpb.Event)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// .etcdserverpb.Event.EventType type = 1;
if (this->type() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
1, this->type(), target);
}
// .etcdserverpb.KeyValue kv = 2;
if (this->has_kv()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
2, _Internal::kv(this), target);
}
// .etcdserverpb.KeyValue prev_kv = 3;
if (this->has_prev_kv()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
3, _Internal::prev_kv(this), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:etcdserverpb.Event)
return target;
}
size_t Event::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:etcdserverpb.Event)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// .etcdserverpb.KeyValue kv = 2;
if (this->has_kv()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*kv_);
}
// .etcdserverpb.KeyValue prev_kv = 3;
if (this->has_prev_kv()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*prev_kv_);
}
// .etcdserverpb.Event.EventType type = 1;
if (this->type() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->type());
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void Event::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:etcdserverpb.Event)
GOOGLE_DCHECK_NE(&from, this);
const Event* source =
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Event>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:etcdserverpb.Event)
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:etcdserverpb.Event)
MergeFrom(*source);
}
}
void Event::MergeFrom(const Event& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:etcdserverpb.Event)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.has_kv()) {
mutable_kv()->::etcdserverpb::KeyValue::MergeFrom(from.kv());
}
if (from.has_prev_kv()) {
mutable_prev_kv()->::etcdserverpb::KeyValue::MergeFrom(from.prev_kv());
}
if (from.type() != 0) {
set_type(from.type());
}
}
void Event::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:etcdserverpb.Event)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Event::CopyFrom(const Event& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:etcdserverpb.Event)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Event::IsInitialized() const {
return true;
}
void Event::InternalSwap(Event* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(kv_, other->kv_);
swap(prev_kv_, other->prev_kv_);
swap(type_, other->type_);
}
::PROTOBUF_NAMESPACE_ID::Metadata Event::GetMetadata() const {
return GetMetadataStatic();
}
// @@protoc_insertion_point(namespace_scope)
} // namespace etcdserverpb
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::etcdserverpb::RangeRequest* Arena::CreateMaybeMessage< ::etcdserverpb::RangeRequest >(Arena* arena) {
return Arena::CreateInternal< ::etcdserverpb::RangeRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::etcdserverpb::RangeResponse* Arena::CreateMaybeMessage< ::etcdserverpb::RangeResponse >(Arena* arena) {
return Arena::CreateInternal< ::etcdserverpb::RangeResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::etcdserverpb::WatchRequest* Arena::CreateMaybeMessage< ::etcdserverpb::WatchRequest >(Arena* arena) {
return Arena::CreateInternal< ::etcdserverpb::WatchRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::etcdserverpb::WatchCreateRequest* Arena::CreateMaybeMessage< ::etcdserverpb::WatchCreateRequest >(Arena* arena) {
return Arena::CreateInternal< ::etcdserverpb::WatchCreateRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::etcdserverpb::WatchCancelRequest* Arena::CreateMaybeMessage< ::etcdserverpb::WatchCancelRequest >(Arena* arena) {
return Arena::CreateInternal< ::etcdserverpb::WatchCancelRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::etcdserverpb::WatchProgressRequest* Arena::CreateMaybeMessage< ::etcdserverpb::WatchProgressRequest >(Arena* arena) {
return Arena::CreateInternal< ::etcdserverpb::WatchProgressRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::etcdserverpb::WatchResponse* Arena::CreateMaybeMessage< ::etcdserverpb::WatchResponse >(Arena* arena) {
return Arena::CreateInternal< ::etcdserverpb::WatchResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::etcdserverpb::ResponseHeader* Arena::CreateMaybeMessage< ::etcdserverpb::ResponseHeader >(Arena* arena) {
return Arena::CreateInternal< ::etcdserverpb::ResponseHeader >(arena);
}
template<> PROTOBUF_NOINLINE ::etcdserverpb::KeyValue* Arena::CreateMaybeMessage< ::etcdserverpb::KeyValue >(Arena* arena) {
return Arena::CreateInternal< ::etcdserverpb::KeyValue >(arena);
}
template<> PROTOBUF_NOINLINE ::etcdserverpb::Event* Arena::CreateMaybeMessage< ::etcdserverpb::Event >(Arena* arena) {
return Arena::CreateInternal< ::etcdserverpb::Event >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>