blob: a67bb559d8b7fdc963f0af88efb2d0c274930664 [file] [log] [blame]
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: PulsarApi.proto
#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "PulsarApi.pb.h"
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.h>
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
// @@protoc_insertion_point(includes)
namespace pulsar {
namespace proto {
void protobuf_ShutdownFile_PulsarApi_2eproto() {
delete MessageIdData::default_instance_;
delete KeyValue::default_instance_;
delete MessageMetadata::default_instance_;
delete SingleMessageMetadata::default_instance_;
delete CommandConnect::default_instance_;
delete CommandConnected::default_instance_;
delete CommandSubscribe::default_instance_;
delete CommandPartitionedTopicMetadata::default_instance_;
delete CommandPartitionedTopicMetadataResponse::default_instance_;
delete CommandLookupTopic::default_instance_;
delete CommandLookupTopicResponse::default_instance_;
delete CommandProducer::default_instance_;
delete CommandSend::default_instance_;
delete CommandSendReceipt::default_instance_;
delete CommandSendError::default_instance_;
delete CommandMessage::default_instance_;
delete CommandAck::default_instance_;
delete CommandFlow::default_instance_;
delete CommandUnsubscribe::default_instance_;
delete CommandCloseProducer::default_instance_;
delete CommandCloseConsumer::default_instance_;
delete CommandRedeliverUnacknowledgedMessages::default_instance_;
delete CommandSuccess::default_instance_;
delete CommandProducerSuccess::default_instance_;
delete CommandError::default_instance_;
delete CommandPing::default_instance_;
delete CommandPong::default_instance_;
delete CommandConsumerStats::default_instance_;
delete CommandConsumerStatsResponse::default_instance_;
delete BaseCommand::default_instance_;
}
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
void protobuf_AddDesc_PulsarApi_2eproto_impl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#else
void protobuf_AddDesc_PulsarApi_2eproto() {
static bool already_here = false;
if (already_here) return;
already_here = true;
GOOGLE_PROTOBUF_VERIFY_VERSION;
#endif
MessageIdData::default_instance_ = new MessageIdData();
KeyValue::default_instance_ = new KeyValue();
MessageMetadata::default_instance_ = new MessageMetadata();
SingleMessageMetadata::default_instance_ = new SingleMessageMetadata();
CommandConnect::default_instance_ = new CommandConnect();
CommandConnected::default_instance_ = new CommandConnected();
CommandSubscribe::default_instance_ = new CommandSubscribe();
CommandPartitionedTopicMetadata::default_instance_ = new CommandPartitionedTopicMetadata();
CommandPartitionedTopicMetadataResponse::default_instance_ = new CommandPartitionedTopicMetadataResponse();
CommandLookupTopic::default_instance_ = new CommandLookupTopic();
CommandLookupTopicResponse::default_instance_ = new CommandLookupTopicResponse();
CommandProducer::default_instance_ = new CommandProducer();
CommandSend::default_instance_ = new CommandSend();
CommandSendReceipt::default_instance_ = new CommandSendReceipt();
CommandSendError::default_instance_ = new CommandSendError();
CommandMessage::default_instance_ = new CommandMessage();
CommandAck::default_instance_ = new CommandAck();
CommandFlow::default_instance_ = new CommandFlow();
CommandUnsubscribe::default_instance_ = new CommandUnsubscribe();
CommandCloseProducer::default_instance_ = new CommandCloseProducer();
CommandCloseConsumer::default_instance_ = new CommandCloseConsumer();
CommandRedeliverUnacknowledgedMessages::default_instance_ = new CommandRedeliverUnacknowledgedMessages();
CommandSuccess::default_instance_ = new CommandSuccess();
CommandProducerSuccess::default_instance_ = new CommandProducerSuccess();
CommandError::default_instance_ = new CommandError();
CommandPing::default_instance_ = new CommandPing();
CommandPong::default_instance_ = new CommandPong();
CommandConsumerStats::default_instance_ = new CommandConsumerStats();
CommandConsumerStatsResponse::default_instance_ = new CommandConsumerStatsResponse();
BaseCommand::default_instance_ = new BaseCommand();
MessageIdData::default_instance_->InitAsDefaultInstance();
KeyValue::default_instance_->InitAsDefaultInstance();
MessageMetadata::default_instance_->InitAsDefaultInstance();
SingleMessageMetadata::default_instance_->InitAsDefaultInstance();
CommandConnect::default_instance_->InitAsDefaultInstance();
CommandConnected::default_instance_->InitAsDefaultInstance();
CommandSubscribe::default_instance_->InitAsDefaultInstance();
CommandPartitionedTopicMetadata::default_instance_->InitAsDefaultInstance();
CommandPartitionedTopicMetadataResponse::default_instance_->InitAsDefaultInstance();
CommandLookupTopic::default_instance_->InitAsDefaultInstance();
CommandLookupTopicResponse::default_instance_->InitAsDefaultInstance();
CommandProducer::default_instance_->InitAsDefaultInstance();
CommandSend::default_instance_->InitAsDefaultInstance();
CommandSendReceipt::default_instance_->InitAsDefaultInstance();
CommandSendError::default_instance_->InitAsDefaultInstance();
CommandMessage::default_instance_->InitAsDefaultInstance();
CommandAck::default_instance_->InitAsDefaultInstance();
CommandFlow::default_instance_->InitAsDefaultInstance();
CommandUnsubscribe::default_instance_->InitAsDefaultInstance();
CommandCloseProducer::default_instance_->InitAsDefaultInstance();
CommandCloseConsumer::default_instance_->InitAsDefaultInstance();
CommandRedeliverUnacknowledgedMessages::default_instance_->InitAsDefaultInstance();
CommandSuccess::default_instance_->InitAsDefaultInstance();
CommandProducerSuccess::default_instance_->InitAsDefaultInstance();
CommandError::default_instance_->InitAsDefaultInstance();
CommandPing::default_instance_->InitAsDefaultInstance();
CommandPong::default_instance_->InitAsDefaultInstance();
CommandConsumerStats::default_instance_->InitAsDefaultInstance();
CommandConsumerStatsResponse::default_instance_->InitAsDefaultInstance();
BaseCommand::default_instance_->InitAsDefaultInstance();
::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_PulsarApi_2eproto);
}
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_PulsarApi_2eproto_once_);
void protobuf_AddDesc_PulsarApi_2eproto() {
::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_PulsarApi_2eproto_once_,
&protobuf_AddDesc_PulsarApi_2eproto_impl);
}
#else
// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_PulsarApi_2eproto {
StaticDescriptorInitializer_PulsarApi_2eproto() {
protobuf_AddDesc_PulsarApi_2eproto();
}
} static_descriptor_initializer_PulsarApi_2eproto_;
#endif
bool CompressionType_IsValid(int value) {
switch(value) {
case 0:
case 1:
case 2:
return true;
default:
return false;
}
}
bool ServerError_IsValid(int value) {
switch(value) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
case 12:
case 13:
return true;
default:
return false;
}
}
bool AuthMethod_IsValid(int value) {
switch(value) {
case 0:
case 1:
case 2:
return true;
default:
return false;
}
}
bool ProtocolVersion_IsValid(int value) {
switch(value) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
return true;
default:
return false;
}
}
// ===================================================================
#ifndef _MSC_VER
const int MessageIdData::kLedgerIdFieldNumber;
const int MessageIdData::kEntryIdFieldNumber;
const int MessageIdData::kPartitionFieldNumber;
const int MessageIdData::kBatchIndexFieldNumber;
#endif // !_MSC_VER
MessageIdData::MessageIdData()
: ::google::protobuf::MessageLite() {
SharedCtor();
// @@protoc_insertion_point(constructor:pulsar.proto.MessageIdData)
}
void MessageIdData::InitAsDefaultInstance() {
}
MessageIdData::MessageIdData(const MessageIdData& from)
: ::google::protobuf::MessageLite() {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:pulsar.proto.MessageIdData)
}
void MessageIdData::SharedCtor() {
_cached_size_ = 0;
ledgerid_ = GOOGLE_ULONGLONG(0);
entryid_ = GOOGLE_ULONGLONG(0);
partition_ = -1;
batch_index_ = -1;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
MessageIdData::~MessageIdData() {
// @@protoc_insertion_point(destructor:pulsar.proto.MessageIdData)
SharedDtor();
}
void MessageIdData::SharedDtor() {
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
if (this != &default_instance()) {
#else
if (this != default_instance_) {
#endif
}
}
void MessageIdData::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const MessageIdData& MessageIdData::default_instance() {
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
protobuf_AddDesc_PulsarApi_2eproto();
#else
if (default_instance_ == NULL) protobuf_AddDesc_PulsarApi_2eproto();
#endif
return *default_instance_;
}
MessageIdData* MessageIdData::default_instance_ = NULL;
MessageIdData* MessageIdData::New() const {
return new MessageIdData;
}
void MessageIdData::Clear() {
#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \
&reinterpret_cast<MessageIdData*>(16)->f) - \
reinterpret_cast<char*>(16))
#define ZR_(first, last) do { \
size_t f = OFFSET_OF_FIELD_(first); \
size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \
::memset(&first, 0, n); \
} while (0)
if (_has_bits_[0 / 32] & 15) {
ZR_(ledgerid_, entryid_);
partition_ = -1;
batch_index_ = -1;
}
#undef OFFSET_OF_FIELD_
#undef ZR_
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->clear();
}
bool MessageIdData::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::StringOutputStream unknown_fields_string(
mutable_unknown_fields());
::google::protobuf::io::CodedOutputStream unknown_fields_stream(
&unknown_fields_string);
// @@protoc_insertion_point(parse_start:pulsar.proto.MessageIdData)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required uint64 ledgerId = 1;
case 1: {
if (tag == 8) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
input, &ledgerid_)));
set_has_ledgerid();
} else {
goto handle_unusual;
}
if (input->ExpectTag(16)) goto parse_entryId;
break;
}
// required uint64 entryId = 2;
case 2: {
if (tag == 16) {
parse_entryId:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
input, &entryid_)));
set_has_entryid();
} else {
goto handle_unusual;
}
if (input->ExpectTag(24)) goto parse_partition;
break;
}
// optional int32 partition = 3 [default = -1];
case 3: {
if (tag == 24) {
parse_partition:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &partition_)));
set_has_partition();
} else {
goto handle_unusual;
}
if (input->ExpectTag(32)) goto parse_batch_index;
break;
}
// optional int32 batch_index = 4 [default = -1];
case 4: {
if (tag == 32) {
parse_batch_index:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &batch_index_)));
set_has_batch_index();
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormatLite::SkipField(
input, tag, &unknown_fields_stream));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:pulsar.proto.MessageIdData)
return true;
failure:
// @@protoc_insertion_point(parse_failure:pulsar.proto.MessageIdData)
return false;
#undef DO_
}
void MessageIdData::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:pulsar.proto.MessageIdData)
// required uint64 ledgerId = 1;
if (has_ledgerid()) {
::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->ledgerid(), output);
}
// required uint64 entryId = 2;
if (has_entryid()) {
::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->entryid(), output);
}
// optional int32 partition = 3 [default = -1];
if (has_partition()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->partition(), output);
}
// optional int32 batch_index = 4 [default = -1];
if (has_batch_index()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->batch_index(), output);
}
output->WriteRaw(unknown_fields().data(),
unknown_fields().size());
// @@protoc_insertion_point(serialize_end:pulsar.proto.MessageIdData)
}
int MessageIdData::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// required uint64 ledgerId = 1;
if (has_ledgerid()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt64Size(
this->ledgerid());
}
// required uint64 entryId = 2;
if (has_entryid()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt64Size(
this->entryid());
}
// optional int32 partition = 3 [default = -1];
if (has_partition()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->partition());
}
// optional int32 batch_index = 4 [default = -1];
if (has_batch_index()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->batch_index());
}
}
total_size += unknown_fields().size();
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void MessageIdData::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) {
MergeFrom(*::google::protobuf::down_cast<const MessageIdData*>(&from));
}
void MessageIdData::MergeFrom(const MessageIdData& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_ledgerid()) {
set_ledgerid(from.ledgerid());
}
if (from.has_entryid()) {
set_entryid(from.entryid());
}
if (from.has_partition()) {
set_partition(from.partition());
}
if (from.has_batch_index()) {
set_batch_index(from.batch_index());
}
}
mutable_unknown_fields()->append(from.unknown_fields());
}
void MessageIdData::CopyFrom(const MessageIdData& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool MessageIdData::IsInitialized() const {
if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
return true;
}
void MessageIdData::Swap(MessageIdData* other) {
if (other != this) {
std::swap(ledgerid_, other->ledgerid_);
std::swap(entryid_, other->entryid_);
std::swap(partition_, other->partition_);
std::swap(batch_index_, other->batch_index_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.swap(other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::std::string MessageIdData::GetTypeName() const {
return "pulsar.proto.MessageIdData";
}
// ===================================================================
#ifndef _MSC_VER
const int KeyValue::kKeyFieldNumber;
const int KeyValue::kValueFieldNumber;
#endif // !_MSC_VER
KeyValue::KeyValue()
: ::google::protobuf::MessageLite() {
SharedCtor();
// @@protoc_insertion_point(constructor:pulsar.proto.KeyValue)
}
void KeyValue::InitAsDefaultInstance() {
}
KeyValue::KeyValue(const KeyValue& from)
: ::google::protobuf::MessageLite() {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:pulsar.proto.KeyValue)
}
void KeyValue::SharedCtor() {
::google::protobuf::internal::GetEmptyString();
_cached_size_ = 0;
key_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
KeyValue::~KeyValue() {
// @@protoc_insertion_point(destructor:pulsar.proto.KeyValue)
SharedDtor();
}
void KeyValue::SharedDtor() {
if (key_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
delete key_;
}
if (value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
delete value_;
}
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
if (this != &default_instance()) {
#else
if (this != default_instance_) {
#endif
}
}
void KeyValue::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const KeyValue& KeyValue::default_instance() {
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
protobuf_AddDesc_PulsarApi_2eproto();
#else
if (default_instance_ == NULL) protobuf_AddDesc_PulsarApi_2eproto();
#endif
return *default_instance_;
}
KeyValue* KeyValue::default_instance_ = NULL;
KeyValue* KeyValue::New() const {
return new KeyValue;
}
void KeyValue::Clear() {
if (_has_bits_[0 / 32] & 3) {
if (has_key()) {
if (key_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
key_->clear();
}
}
if (has_value()) {
if (value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
value_->clear();
}
}
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->clear();
}
bool KeyValue::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::StringOutputStream unknown_fields_string(
mutable_unknown_fields());
::google::protobuf::io::CodedOutputStream unknown_fields_stream(
&unknown_fields_string);
// @@protoc_insertion_point(parse_start:pulsar.proto.KeyValue)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required string key = 1;
case 1: {
if (tag == 10) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_key()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(18)) goto parse_value;
break;
}
// required string value = 2;
case 2: {
if (tag == 18) {
parse_value:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_value()));
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormatLite::SkipField(
input, tag, &unknown_fields_stream));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:pulsar.proto.KeyValue)
return true;
failure:
// @@protoc_insertion_point(parse_failure:pulsar.proto.KeyValue)
return false;
#undef DO_
}
void KeyValue::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:pulsar.proto.KeyValue)
// required string key = 1;
if (has_key()) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->key(), output);
}
// required string value = 2;
if (has_value()) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2, this->value(), output);
}
output->WriteRaw(unknown_fields().data(),
unknown_fields().size());
// @@protoc_insertion_point(serialize_end:pulsar.proto.KeyValue)
}
int KeyValue::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// required string key = 1;
if (has_key()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->key());
}
// required string value = 2;
if (has_value()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->value());
}
}
total_size += unknown_fields().size();
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void KeyValue::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) {
MergeFrom(*::google::protobuf::down_cast<const KeyValue*>(&from));
}
void KeyValue::MergeFrom(const KeyValue& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_key()) {
set_key(from.key());
}
if (from.has_value()) {
set_value(from.value());
}
}
mutable_unknown_fields()->append(from.unknown_fields());
}
void KeyValue::CopyFrom(const KeyValue& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool KeyValue::IsInitialized() const {
if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
return true;
}
void KeyValue::Swap(KeyValue* other) {
if (other != this) {
std::swap(key_, other->key_);
std::swap(value_, other->value_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.swap(other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::std::string KeyValue::GetTypeName() const {
return "pulsar.proto.KeyValue";
}
// ===================================================================
#ifndef _MSC_VER
const int MessageMetadata::kProducerNameFieldNumber;
const int MessageMetadata::kSequenceIdFieldNumber;
const int MessageMetadata::kPublishTimeFieldNumber;
const int MessageMetadata::kPropertiesFieldNumber;
const int MessageMetadata::kReplicatedFromFieldNumber;
const int MessageMetadata::kPartitionKeyFieldNumber;
const int MessageMetadata::kReplicateToFieldNumber;
const int MessageMetadata::kCompressionFieldNumber;
const int MessageMetadata::kUncompressedSizeFieldNumber;
const int MessageMetadata::kNumMessagesInBatchFieldNumber;
#endif // !_MSC_VER
MessageMetadata::MessageMetadata()
: ::google::protobuf::MessageLite() {
SharedCtor();
// @@protoc_insertion_point(constructor:pulsar.proto.MessageMetadata)
}
void MessageMetadata::InitAsDefaultInstance() {
}
MessageMetadata::MessageMetadata(const MessageMetadata& from)
: ::google::protobuf::MessageLite() {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:pulsar.proto.MessageMetadata)
}
void MessageMetadata::SharedCtor() {
::google::protobuf::internal::GetEmptyString();
_cached_size_ = 0;
producer_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
sequence_id_ = GOOGLE_ULONGLONG(0);
publish_time_ = GOOGLE_ULONGLONG(0);
replicated_from_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
partition_key_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
compression_ = 0;
uncompressed_size_ = 0u;
num_messages_in_batch_ = 1;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
MessageMetadata::~MessageMetadata() {
// @@protoc_insertion_point(destructor:pulsar.proto.MessageMetadata)
SharedDtor();
}
void MessageMetadata::SharedDtor() {
if (producer_name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
delete producer_name_;
}
if (replicated_from_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
delete replicated_from_;
}
if (partition_key_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
delete partition_key_;
}
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
if (this != &default_instance()) {
#else
if (this != default_instance_) {
#endif
}
}
void MessageMetadata::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const MessageMetadata& MessageMetadata::default_instance() {
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
protobuf_AddDesc_PulsarApi_2eproto();
#else
if (default_instance_ == NULL) protobuf_AddDesc_PulsarApi_2eproto();
#endif
return *default_instance_;
}
MessageMetadata* MessageMetadata::default_instance_ = NULL;
MessageMetadata* MessageMetadata::New() const {
return new MessageMetadata;
}
void MessageMetadata::Clear() {
#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \
&reinterpret_cast<MessageMetadata*>(16)->f) - \
reinterpret_cast<char*>(16))
#define ZR_(first, last) do { \
size_t f = OFFSET_OF_FIELD_(first); \
size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \
::memset(&first, 0, n); \
} while (0)
if (_has_bits_[0 / 32] & 183) {
ZR_(sequence_id_, publish_time_);
if (has_producer_name()) {
if (producer_name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
producer_name_->clear();
}
}
if (has_replicated_from()) {
if (replicated_from_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
replicated_from_->clear();
}
}
if (has_partition_key()) {
if (partition_key_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
partition_key_->clear();
}
}
compression_ = 0;
}
if (_has_bits_[8 / 32] & 768) {
uncompressed_size_ = 0u;
num_messages_in_batch_ = 1;
}
#undef OFFSET_OF_FIELD_
#undef ZR_
properties_.Clear();
replicate_to_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->clear();
}
bool MessageMetadata::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::StringOutputStream unknown_fields_string(
mutable_unknown_fields());
::google::protobuf::io::CodedOutputStream unknown_fields_stream(
&unknown_fields_string);
// @@protoc_insertion_point(parse_start:pulsar.proto.MessageMetadata)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required string producer_name = 1;
case 1: {
if (tag == 10) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_producer_name()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(16)) goto parse_sequence_id;
break;
}
// required uint64 sequence_id = 2;
case 2: {
if (tag == 16) {
parse_sequence_id:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
input, &sequence_id_)));
set_has_sequence_id();
} else {
goto handle_unusual;
}
if (input->ExpectTag(24)) goto parse_publish_time;
break;
}
// required uint64 publish_time = 3;
case 3: {
if (tag == 24) {
parse_publish_time:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
input, &publish_time_)));
set_has_publish_time();
} else {
goto handle_unusual;
}
if (input->ExpectTag(34)) goto parse_properties;
break;
}
// repeated .pulsar.proto.KeyValue properties = 4;
case 4: {
if (tag == 34) {
parse_properties:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_properties()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(34)) goto parse_properties;
if (input->ExpectTag(42)) goto parse_replicated_from;
break;
}
// optional string replicated_from = 5;
case 5: {
if (tag == 42) {
parse_replicated_from:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_replicated_from()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(50)) goto parse_partition_key;
break;
}
// optional string partition_key = 6;
case 6: {
if (tag == 50) {
parse_partition_key:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_partition_key()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(58)) goto parse_replicate_to;
break;
}
// repeated string replicate_to = 7;
case 7: {
if (tag == 58) {
parse_replicate_to:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_replicate_to()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(58)) goto parse_replicate_to;
if (input->ExpectTag(64)) goto parse_compression;
break;
}
// optional .pulsar.proto.CompressionType compression = 8 [default = NONE];
case 8: {
if (tag == 64) {
parse_compression:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::pulsar::proto::CompressionType_IsValid(value)) {
set_compression(static_cast< ::pulsar::proto::CompressionType >(value));
} else {
unknown_fields_stream.WriteVarint32(tag);
unknown_fields_stream.WriteVarint32(value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(72)) goto parse_uncompressed_size;
break;
}
// optional uint32 uncompressed_size = 9 [default = 0];
case 9: {
if (tag == 72) {
parse_uncompressed_size:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &uncompressed_size_)));
set_has_uncompressed_size();
} else {
goto handle_unusual;
}
if (input->ExpectTag(88)) goto parse_num_messages_in_batch;
break;
}
// optional int32 num_messages_in_batch = 11 [default = 1];
case 11: {
if (tag == 88) {
parse_num_messages_in_batch:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &num_messages_in_batch_)));
set_has_num_messages_in_batch();
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormatLite::SkipField(
input, tag, &unknown_fields_stream));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:pulsar.proto.MessageMetadata)
return true;
failure:
// @@protoc_insertion_point(parse_failure:pulsar.proto.MessageMetadata)
return false;
#undef DO_
}
void MessageMetadata::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:pulsar.proto.MessageMetadata)
// required string producer_name = 1;
if (has_producer_name()) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->producer_name(), output);
}
// required uint64 sequence_id = 2;
if (has_sequence_id()) {
::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->sequence_id(), output);
}
// required uint64 publish_time = 3;
if (has_publish_time()) {
::google::protobuf::internal::WireFormatLite::WriteUInt64(3, this->publish_time(), output);
}
// repeated .pulsar.proto.KeyValue properties = 4;
for (int i = 0; i < this->properties_size(); i++) {
::google::protobuf::internal::WireFormatLite::WriteMessage(
4, this->properties(i), output);
}
// optional string replicated_from = 5;
if (has_replicated_from()) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
5, this->replicated_from(), output);
}
// optional string partition_key = 6;
if (has_partition_key()) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
6, this->partition_key(), output);
}
// repeated string replicate_to = 7;
for (int i = 0; i < this->replicate_to_size(); i++) {
::google::protobuf::internal::WireFormatLite::WriteString(
7, this->replicate_to(i), output);
}
// optional .pulsar.proto.CompressionType compression = 8 [default = NONE];
if (has_compression()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
8, this->compression(), output);
}
// optional uint32 uncompressed_size = 9 [default = 0];
if (has_uncompressed_size()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(9, this->uncompressed_size(), output);
}
// optional int32 num_messages_in_batch = 11 [default = 1];
if (has_num_messages_in_batch()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(11, this->num_messages_in_batch(), output);
}
output->WriteRaw(unknown_fields().data(),
unknown_fields().size());
// @@protoc_insertion_point(serialize_end:pulsar.proto.MessageMetadata)
}
int MessageMetadata::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// required string producer_name = 1;
if (has_producer_name()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->producer_name());
}
// required uint64 sequence_id = 2;
if (has_sequence_id()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt64Size(
this->sequence_id());
}
// required uint64 publish_time = 3;
if (has_publish_time()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt64Size(
this->publish_time());
}
// optional string replicated_from = 5;
if (has_replicated_from()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->replicated_from());
}
// optional string partition_key = 6;
if (has_partition_key()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->partition_key());
}
// optional .pulsar.proto.CompressionType compression = 8 [default = NONE];
if (has_compression()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->compression());
}
}
if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
// optional uint32 uncompressed_size = 9 [default = 0];
if (has_uncompressed_size()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->uncompressed_size());
}
// optional int32 num_messages_in_batch = 11 [default = 1];
if (has_num_messages_in_batch()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->num_messages_in_batch());
}
}
// repeated .pulsar.proto.KeyValue properties = 4;
total_size += 1 * this->properties_size();
for (int i = 0; i < this->properties_size(); i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->properties(i));
}
// repeated string replicate_to = 7;
total_size += 1 * this->replicate_to_size();
for (int i = 0; i < this->replicate_to_size(); i++) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
this->replicate_to(i));
}
total_size += unknown_fields().size();
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void MessageMetadata::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) {
MergeFrom(*::google::protobuf::down_cast<const MessageMetadata*>(&from));
}
void MessageMetadata::MergeFrom(const MessageMetadata& from) {
GOOGLE_CHECK_NE(&from, this);
properties_.MergeFrom(from.properties_);
replicate_to_.MergeFrom(from.replicate_to_);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_producer_name()) {
set_producer_name(from.producer_name());
}
if (from.has_sequence_id()) {
set_sequence_id(from.sequence_id());
}
if (from.has_publish_time()) {
set_publish_time(from.publish_time());
}
if (from.has_replicated_from()) {
set_replicated_from(from.replicated_from());
}
if (from.has_partition_key()) {
set_partition_key(from.partition_key());
}
if (from.has_compression()) {
set_compression(from.compression());
}
}
if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
if (from.has_uncompressed_size()) {
set_uncompressed_size(from.uncompressed_size());
}
if (from.has_num_messages_in_batch()) {
set_num_messages_in_batch(from.num_messages_in_batch());
}
}
mutable_unknown_fields()->append(from.unknown_fields());
}
void MessageMetadata::CopyFrom(const MessageMetadata& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool MessageMetadata::IsInitialized() const {
if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false;
if (!::google::protobuf::internal::AllAreInitialized(this->properties())) return false;
return true;
}
void MessageMetadata::Swap(MessageMetadata* other) {
if (other != this) {
std::swap(producer_name_, other->producer_name_);
std::swap(sequence_id_, other->sequence_id_);
std::swap(publish_time_, other->publish_time_);
properties_.Swap(&other->properties_);
std::swap(replicated_from_, other->replicated_from_);
std::swap(partition_key_, other->partition_key_);
replicate_to_.Swap(&other->replicate_to_);
std::swap(compression_, other->compression_);
std::swap(uncompressed_size_, other->uncompressed_size_);
std::swap(num_messages_in_batch_, other->num_messages_in_batch_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.swap(other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::std::string MessageMetadata::GetTypeName() const {
return "pulsar.proto.MessageMetadata";
}
// ===================================================================
#ifndef _MSC_VER
const int SingleMessageMetadata::kPropertiesFieldNumber;
const int SingleMessageMetadata::kPartitionKeyFieldNumber;
const int SingleMessageMetadata::kPayloadSizeFieldNumber;
#endif // !_MSC_VER
SingleMessageMetadata::SingleMessageMetadata()
: ::google::protobuf::MessageLite() {
SharedCtor();
// @@protoc_insertion_point(constructor:pulsar.proto.SingleMessageMetadata)
}
void SingleMessageMetadata::InitAsDefaultInstance() {
}
SingleMessageMetadata::SingleMessageMetadata(const SingleMessageMetadata& from)
: ::google::protobuf::MessageLite() {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:pulsar.proto.SingleMessageMetadata)
}
void SingleMessageMetadata::SharedCtor() {
::google::protobuf::internal::GetEmptyString();
_cached_size_ = 0;
partition_key_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
payload_size_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
SingleMessageMetadata::~SingleMessageMetadata() {
// @@protoc_insertion_point(destructor:pulsar.proto.SingleMessageMetadata)
SharedDtor();
}
void SingleMessageMetadata::SharedDtor() {
if (partition_key_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
delete partition_key_;
}
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
if (this != &default_instance()) {
#else
if (this != default_instance_) {
#endif
}
}
void SingleMessageMetadata::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const SingleMessageMetadata& SingleMessageMetadata::default_instance() {
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
protobuf_AddDesc_PulsarApi_2eproto();
#else
if (default_instance_ == NULL) protobuf_AddDesc_PulsarApi_2eproto();
#endif
return *default_instance_;
}
SingleMessageMetadata* SingleMessageMetadata::default_instance_ = NULL;
SingleMessageMetadata* SingleMessageMetadata::New() const {
return new SingleMessageMetadata;
}
void SingleMessageMetadata::Clear() {
if (_has_bits_[0 / 32] & 6) {
if (has_partition_key()) {
if (partition_key_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
partition_key_->clear();
}
}
payload_size_ = 0;
}
properties_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->clear();
}
bool SingleMessageMetadata::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::StringOutputStream unknown_fields_string(
mutable_unknown_fields());
::google::protobuf::io::CodedOutputStream unknown_fields_stream(
&unknown_fields_string);
// @@protoc_insertion_point(parse_start:pulsar.proto.SingleMessageMetadata)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// repeated .pulsar.proto.KeyValue properties = 1;
case 1: {
if (tag == 10) {
parse_properties:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_properties()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(10)) goto parse_properties;
if (input->ExpectTag(18)) goto parse_partition_key;
break;
}
// optional string partition_key = 2;
case 2: {
if (tag == 18) {
parse_partition_key:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_partition_key()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(24)) goto parse_payload_size;
break;
}
// required int32 payload_size = 3;
case 3: {
if (tag == 24) {
parse_payload_size:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &payload_size_)));
set_has_payload_size();
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormatLite::SkipField(
input, tag, &unknown_fields_stream));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:pulsar.proto.SingleMessageMetadata)
return true;
failure:
// @@protoc_insertion_point(parse_failure:pulsar.proto.SingleMessageMetadata)
return false;
#undef DO_
}
void SingleMessageMetadata::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:pulsar.proto.SingleMessageMetadata)
// repeated .pulsar.proto.KeyValue properties = 1;
for (int i = 0; i < this->properties_size(); i++) {
::google::protobuf::internal::WireFormatLite::WriteMessage(
1, this->properties(i), output);
}
// optional string partition_key = 2;
if (has_partition_key()) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2, this->partition_key(), output);
}
// required int32 payload_size = 3;
if (has_payload_size()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->payload_size(), output);
}
output->WriteRaw(unknown_fields().data(),
unknown_fields().size());
// @@protoc_insertion_point(serialize_end:pulsar.proto.SingleMessageMetadata)
}
int SingleMessageMetadata::ByteSize() const {
int total_size = 0;
if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) {
// optional string partition_key = 2;
if (has_partition_key()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->partition_key());
}
// required int32 payload_size = 3;
if (has_payload_size()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->payload_size());
}
}
// repeated .pulsar.proto.KeyValue properties = 1;
total_size += 1 * this->properties_size();
for (int i = 0; i < this->properties_size(); i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->properties(i));
}
total_size += unknown_fields().size();
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void SingleMessageMetadata::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) {
MergeFrom(*::google::protobuf::down_cast<const SingleMessageMetadata*>(&from));
}
void SingleMessageMetadata::MergeFrom(const SingleMessageMetadata& from) {
GOOGLE_CHECK_NE(&from, this);
properties_.MergeFrom(from.properties_);
if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) {
if (from.has_partition_key()) {
set_partition_key(from.partition_key());
}
if (from.has_payload_size()) {
set_payload_size(from.payload_size());
}
}
mutable_unknown_fields()->append(from.unknown_fields());
}
void SingleMessageMetadata::CopyFrom(const SingleMessageMetadata& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool SingleMessageMetadata::IsInitialized() const {
if ((_has_bits_[0] & 0x00000004) != 0x00000004) return false;
if (!::google::protobuf::internal::AllAreInitialized(this->properties())) return false;
return true;
}
void SingleMessageMetadata::Swap(SingleMessageMetadata* other) {
if (other != this) {
properties_.Swap(&other->properties_);
std::swap(partition_key_, other->partition_key_);
std::swap(payload_size_, other->payload_size_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.swap(other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::std::string SingleMessageMetadata::GetTypeName() const {
return "pulsar.proto.SingleMessageMetadata";
}
// ===================================================================
#ifndef _MSC_VER
const int CommandConnect::kClientVersionFieldNumber;
const int CommandConnect::kAuthMethodFieldNumber;
const int CommandConnect::kAuthMethodNameFieldNumber;
const int CommandConnect::kAuthDataFieldNumber;
const int CommandConnect::kProtocolVersionFieldNumber;
#endif // !_MSC_VER
CommandConnect::CommandConnect()
: ::google::protobuf::MessageLite() {
SharedCtor();
// @@protoc_insertion_point(constructor:pulsar.proto.CommandConnect)
}
void CommandConnect::InitAsDefaultInstance() {
}
CommandConnect::CommandConnect(const CommandConnect& from)
: ::google::protobuf::MessageLite() {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:pulsar.proto.CommandConnect)
}
void CommandConnect::SharedCtor() {
::google::protobuf::internal::GetEmptyString();
_cached_size_ = 0;
client_version_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
auth_method_ = 0;
auth_method_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
auth_data_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
protocol_version_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
CommandConnect::~CommandConnect() {
// @@protoc_insertion_point(destructor:pulsar.proto.CommandConnect)
SharedDtor();
}
void CommandConnect::SharedDtor() {
if (client_version_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
delete client_version_;
}
if (auth_method_name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
delete auth_method_name_;
}
if (auth_data_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
delete auth_data_;
}
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
if (this != &default_instance()) {
#else
if (this != default_instance_) {
#endif
}
}
void CommandConnect::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const CommandConnect& CommandConnect::default_instance() {
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
protobuf_AddDesc_PulsarApi_2eproto();
#else
if (default_instance_ == NULL) protobuf_AddDesc_PulsarApi_2eproto();
#endif
return *default_instance_;
}
CommandConnect* CommandConnect::default_instance_ = NULL;
CommandConnect* CommandConnect::New() const {
return new CommandConnect;
}
void CommandConnect::Clear() {
#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \
&reinterpret_cast<CommandConnect*>(16)->f) - \
reinterpret_cast<char*>(16))
#define ZR_(first, last) do { \
size_t f = OFFSET_OF_FIELD_(first); \
size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \
::memset(&first, 0, n); \
} while (0)
if (_has_bits_[0 / 32] & 31) {
ZR_(auth_method_, protocol_version_);
if (has_client_version()) {
if (client_version_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
client_version_->clear();
}
}
if (has_auth_method_name()) {
if (auth_method_name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
auth_method_name_->clear();
}
}
if (has_auth_data()) {
if (auth_data_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
auth_data_->clear();
}
}
}
#undef OFFSET_OF_FIELD_
#undef ZR_
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->clear();
}
bool CommandConnect::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::StringOutputStream unknown_fields_string(
mutable_unknown_fields());
::google::protobuf::io::CodedOutputStream unknown_fields_stream(
&unknown_fields_string);
// @@protoc_insertion_point(parse_start:pulsar.proto.CommandConnect)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required string client_version = 1;
case 1: {
if (tag == 10) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_client_version()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(16)) goto parse_auth_method;
break;
}
// optional .pulsar.proto.AuthMethod auth_method = 2;
case 2: {
if (tag == 16) {
parse_auth_method:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::pulsar::proto::AuthMethod_IsValid(value)) {
set_auth_method(static_cast< ::pulsar::proto::AuthMethod >(value));
} else {
unknown_fields_stream.WriteVarint32(tag);
unknown_fields_stream.WriteVarint32(value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(26)) goto parse_auth_data;
break;
}
// optional bytes auth_data = 3;
case 3: {
if (tag == 26) {
parse_auth_data:
DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
input, this->mutable_auth_data()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(32)) goto parse_protocol_version;
break;
}
// optional int32 protocol_version = 4 [default = 0];
case 4: {
if (tag == 32) {
parse_protocol_version:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &protocol_version_)));
set_has_protocol_version();
} else {
goto handle_unusual;
}
if (input->ExpectTag(42)) goto parse_auth_method_name;
break;
}
// optional string auth_method_name = 5;
case 5: {
if (tag == 42) {
parse_auth_method_name:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_auth_method_name()));
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormatLite::SkipField(
input, tag, &unknown_fields_stream));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:pulsar.proto.CommandConnect)
return true;
failure:
// @@protoc_insertion_point(parse_failure:pulsar.proto.CommandConnect)
return false;
#undef DO_
}
void CommandConnect::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:pulsar.proto.CommandConnect)
// required string client_version = 1;
if (has_client_version()) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->client_version(), output);
}
// optional .pulsar.proto.AuthMethod auth_method = 2;
if (has_auth_method()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
2, this->auth_method(), output);
}
// optional bytes auth_data = 3;
if (has_auth_data()) {
::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
3, this->auth_data(), output);
}
// optional int32 protocol_version = 4 [default = 0];
if (has_protocol_version()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->protocol_version(), output);
}
// optional string auth_method_name = 5;
if (has_auth_method_name()) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
5, this->auth_method_name(), output);
}
output->WriteRaw(unknown_fields().data(),
unknown_fields().size());
// @@protoc_insertion_point(serialize_end:pulsar.proto.CommandConnect)
}
int CommandConnect::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// required string client_version = 1;
if (has_client_version()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->client_version());
}
// optional .pulsar.proto.AuthMethod auth_method = 2;
if (has_auth_method()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->auth_method());
}
// optional string auth_method_name = 5;
if (has_auth_method_name()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->auth_method_name());
}
// optional bytes auth_data = 3;
if (has_auth_data()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::BytesSize(
this->auth_data());
}
// optional int32 protocol_version = 4 [default = 0];
if (has_protocol_version()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->protocol_version());
}
}
total_size += unknown_fields().size();
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void CommandConnect::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) {
MergeFrom(*::google::protobuf::down_cast<const CommandConnect*>(&from));
}
void CommandConnect::MergeFrom(const CommandConnect& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_client_version()) {
set_client_version(from.client_version());
}
if (from.has_auth_method()) {
set_auth_method(from.auth_method());
}
if (from.has_auth_method_name()) {
set_auth_method_name(from.auth_method_name());
}
if (from.has_auth_data()) {
set_auth_data(from.auth_data());
}
if (from.has_protocol_version()) {
set_protocol_version(from.protocol_version());
}
}
mutable_unknown_fields()->append(from.unknown_fields());
}
void CommandConnect::CopyFrom(const CommandConnect& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool CommandConnect::IsInitialized() const {
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
return true;
}
void CommandConnect::Swap(CommandConnect* other) {
if (other != this) {
std::swap(client_version_, other->client_version_);
std::swap(auth_method_, other->auth_method_);
std::swap(auth_method_name_, other->auth_method_name_);
std::swap(auth_data_, other->auth_data_);
std::swap(protocol_version_, other->protocol_version_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.swap(other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::std::string CommandConnect::GetTypeName() const {
return "pulsar.proto.CommandConnect";
}
// ===================================================================
#ifndef _MSC_VER
const int CommandConnected::kServerVersionFieldNumber;
const int CommandConnected::kProtocolVersionFieldNumber;
#endif // !_MSC_VER
CommandConnected::CommandConnected()
: ::google::protobuf::MessageLite() {
SharedCtor();
// @@protoc_insertion_point(constructor:pulsar.proto.CommandConnected)
}
void CommandConnected::InitAsDefaultInstance() {
}
CommandConnected::CommandConnected(const CommandConnected& from)
: ::google::protobuf::MessageLite() {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:pulsar.proto.CommandConnected)
}
void CommandConnected::SharedCtor() {
::google::protobuf::internal::GetEmptyString();
_cached_size_ = 0;
server_version_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
protocol_version_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
CommandConnected::~CommandConnected() {
// @@protoc_insertion_point(destructor:pulsar.proto.CommandConnected)
SharedDtor();
}
void CommandConnected::SharedDtor() {
if (server_version_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
delete server_version_;
}
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
if (this != &default_instance()) {
#else
if (this != default_instance_) {
#endif
}
}
void CommandConnected::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const CommandConnected& CommandConnected::default_instance() {
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
protobuf_AddDesc_PulsarApi_2eproto();
#else
if (default_instance_ == NULL) protobuf_AddDesc_PulsarApi_2eproto();
#endif
return *default_instance_;
}
CommandConnected* CommandConnected::default_instance_ = NULL;
CommandConnected* CommandConnected::New() const {
return new CommandConnected;
}
void CommandConnected::Clear() {
if (_has_bits_[0 / 32] & 3) {
if (has_server_version()) {
if (server_version_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
server_version_->clear();
}
}
protocol_version_ = 0;
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->clear();
}
bool CommandConnected::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::StringOutputStream unknown_fields_string(
mutable_unknown_fields());
::google::protobuf::io::CodedOutputStream unknown_fields_stream(
&unknown_fields_string);
// @@protoc_insertion_point(parse_start:pulsar.proto.CommandConnected)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required string server_version = 1;
case 1: {
if (tag == 10) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_server_version()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(16)) goto parse_protocol_version;
break;
}
// optional int32 protocol_version = 2 [default = 0];
case 2: {
if (tag == 16) {
parse_protocol_version:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &protocol_version_)));
set_has_protocol_version();
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormatLite::SkipField(
input, tag, &unknown_fields_stream));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:pulsar.proto.CommandConnected)
return true;
failure:
// @@protoc_insertion_point(parse_failure:pulsar.proto.CommandConnected)
return false;
#undef DO_
}
void CommandConnected::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:pulsar.proto.CommandConnected)
// required string server_version = 1;
if (has_server_version()) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->server_version(), output);
}
// optional int32 protocol_version = 2 [default = 0];
if (has_protocol_version()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->protocol_version(), output);
}
output->WriteRaw(unknown_fields().data(),
unknown_fields().size());
// @@protoc_insertion_point(serialize_end:pulsar.proto.CommandConnected)
}
int CommandConnected::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// required string server_version = 1;
if (has_server_version()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->server_version());
}
// optional int32 protocol_version = 2 [default = 0];
if (has_protocol_version()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->protocol_version());
}
}
total_size += unknown_fields().size();
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void CommandConnected::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) {
MergeFrom(*::google::protobuf::down_cast<const CommandConnected*>(&from));
}
void CommandConnected::MergeFrom(const CommandConnected& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_server_version()) {
set_server_version(from.server_version());
}
if (from.has_protocol_version()) {
set_protocol_version(from.protocol_version());
}
}
mutable_unknown_fields()->append(from.unknown_fields());
}
void CommandConnected::CopyFrom(const CommandConnected& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool CommandConnected::IsInitialized() const {
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
return true;
}
void CommandConnected::Swap(CommandConnected* other) {
if (other != this) {
std::swap(server_version_, other->server_version_);
std::swap(protocol_version_, other->protocol_version_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.swap(other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::std::string CommandConnected::GetTypeName() const {
return "pulsar.proto.CommandConnected";
}
// ===================================================================
bool CommandSubscribe_SubType_IsValid(int value) {
switch(value) {
case 0:
case 1:
case 2:
return true;
default:
return false;
}
}
#ifndef _MSC_VER
const CommandSubscribe_SubType CommandSubscribe::Exclusive;
const CommandSubscribe_SubType CommandSubscribe::Shared;
const CommandSubscribe_SubType CommandSubscribe::Failover;
const CommandSubscribe_SubType CommandSubscribe::SubType_MIN;
const CommandSubscribe_SubType CommandSubscribe::SubType_MAX;
const int CommandSubscribe::SubType_ARRAYSIZE;
#endif // _MSC_VER
#ifndef _MSC_VER
const int CommandSubscribe::kTopicFieldNumber;
const int CommandSubscribe::kSubscriptionFieldNumber;
const int CommandSubscribe::kSubTypeFieldNumber;
const int CommandSubscribe::kConsumerIdFieldNumber;
const int CommandSubscribe::kRequestIdFieldNumber;
const int CommandSubscribe::kConsumerNameFieldNumber;
#endif // !_MSC_VER
CommandSubscribe::CommandSubscribe()
: ::google::protobuf::MessageLite() {
SharedCtor();
// @@protoc_insertion_point(constructor:pulsar.proto.CommandSubscribe)
}
void CommandSubscribe::InitAsDefaultInstance() {
}
CommandSubscribe::CommandSubscribe(const CommandSubscribe& from)
: ::google::protobuf::MessageLite() {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:pulsar.proto.CommandSubscribe)
}
void CommandSubscribe::SharedCtor() {
::google::protobuf::internal::GetEmptyString();
_cached_size_ = 0;
topic_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
subscription_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
subtype_ = 0;
consumer_id_ = GOOGLE_ULONGLONG(0);
request_id_ = GOOGLE_ULONGLONG(0);
consumer_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
CommandSubscribe::~CommandSubscribe() {
// @@protoc_insertion_point(destructor:pulsar.proto.CommandSubscribe)
SharedDtor();
}
void CommandSubscribe::SharedDtor() {
if (topic_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
delete topic_;
}
if (subscription_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
delete subscription_;
}
if (consumer_name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
delete consumer_name_;
}
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
if (this != &default_instance()) {
#else
if (this != default_instance_) {
#endif
}
}
void CommandSubscribe::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const CommandSubscribe& CommandSubscribe::default_instance() {
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
protobuf_AddDesc_PulsarApi_2eproto();
#else
if (default_instance_ == NULL) protobuf_AddDesc_PulsarApi_2eproto();
#endif
return *default_instance_;
}
CommandSubscribe* CommandSubscribe::default_instance_ = NULL;
CommandSubscribe* CommandSubscribe::New() const {
return new CommandSubscribe;
}
void CommandSubscribe::Clear() {
#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \
&reinterpret_cast<CommandSubscribe*>(16)->f) - \
reinterpret_cast<char*>(16))
#define ZR_(first, last) do { \
size_t f = OFFSET_OF_FIELD_(first); \
size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \
::memset(&first, 0, n); \
} while (0)
if (_has_bits_[0 / 32] & 63) {
ZR_(consumer_id_, request_id_);
if (has_topic()) {
if (topic_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
topic_->clear();
}
}
if (has_subscription()) {
if (subscription_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
subscription_->clear();
}
}
subtype_ = 0;
if (has_consumer_name()) {
if (consumer_name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
consumer_name_->clear();
}
}
}
#undef OFFSET_OF_FIELD_
#undef ZR_
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->clear();
}
bool CommandSubscribe::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
::google::protobuf::io::StringOutputStream unknown_fields_string(
mutable_unknown_fields());
::google::protobuf::io::CodedOutputStream unknown_fields_stream(
&unknown_fields_string);
// @@protoc_insertion_point(parse_start:pulsar.proto.CommandSubscribe)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required string topic = 1;
case 1: {
if (tag == 10) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_topic()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(18)) goto parse_subscription;
break;
}
// required string subscription = 2;
case 2: {
if (tag == 18) {
parse_subscription:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_subscription()));
} else {
goto handle_unusual;
}
if (input->ExpectTag(24)) goto parse_subType;
break;
}
// required .pulsar.proto.CommandSubscribe.SubType subType = 3;
case 3: {
if (tag == 24) {
parse_subType:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::pulsar::proto::CommandSubscribe_SubType_IsValid(value)) {
set_subtype(static_cast< ::pulsar::proto::CommandSubscribe_SubType >(value));
} else {
unknown_fields_stream.WriteVarint32(tag);
unknown_fields_stream.WriteVarint32(value);
}
} else {
goto handle_unusual;
}
if (input->ExpectTag(32)) goto parse_consumer_id;
break;
}
// required uint64 consumer_id = 4;
case 4: {
if (tag == 32) {
parse_consumer_id:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
input, &consumer_id_)));
set_has_consumer_id();
} else {
goto handle_unusual;
}
if (input->ExpectTag(40)) goto parse_request_id;
break;
}
// required uint64 request_id = 5;
case 5: {
if (tag == 40) {
parse_request_id:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
input, &request_id_)));
set_has_request_id();
} else {
goto handle_unusual;
}
if (input->ExpectTag(50)) goto parse_consumer_name;
break;
}
// optional string consumer_name = 6;
case 6: {
if (tag == 50) {
parse_consumer_name:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_consumer_name()));
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
default: {
handle_unusual:
if (tag == 0 ||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
goto success;
}
DO_(::google::protobuf::internal::WireFormatLite::SkipField(
input, tag, &unknown_fields_stream));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:pulsar.proto.CommandSubscribe)
return true;
failure:
// @@protoc_insertion_point(parse_failure:pulsar.proto.CommandSubscribe)
return false;
#undef DO_
}
void CommandSubscribe::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:pulsar.proto.CommandSubscribe)
// required string topic = 1;
if (has_topic()) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->topic(), output);
}
// required string subscription = 2;
if (has_subscription()) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2, this->subscription(), output);
}
// required .pulsar.proto.CommandSubscribe.SubType subType = 3;
if (has_subtype()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
3, this->subtype(), output);
}
// required uint64 consumer_id = 4;
if (has_consumer_id()) {
::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->consumer_id(), output);
}
// required uint64 request_id = 5;
if (has_request_id()) {
::google::protobuf::internal::WireFormatLite::WriteUInt64(5, this->request_id(), output);
}
// optional string consumer_name = 6;
if (has_consumer_name()) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
6, this->consumer_name(), output);
}
output->WriteRaw(unknown_fields().data(),
unknown_fields().size());
// @@protoc_insertion_point(serialize_end:pulsar.proto.CommandSubscribe)
}
int CommandSubscribe::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// required string topic = 1;
if (has_topic()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->topic());
}
// required string subscription = 2;
if (has_subscription()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->subscription());
}
// required .pulsar.proto.CommandSubscribe.SubType subType = 3;
if (has_subtype()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->subtype());
}
// required uint64 consumer_id = 4;
if (has_consumer_id()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt64Size(
this->consumer_id());
}
// required uint64 request_id = 5;
if (has_request_id()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt64Size(
this->request_id());
}
// optional string consumer_name = 6;
if (has_consumer_name()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->consumer_name());
}
}
total_size += unknown_fields().size();
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void CommandSubscribe::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) {
MergeFrom(*::google::protobuf::down_cast<const CommandSubscribe*>(&from));
}
void CommandSubscribe::MergeFrom(const CommandSubscribe& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_topic()) {
set_topic(from.topic());
}
if (from.has_subscription()) {
set_subscription(from.subscription());
}
if (from.has_subtype()) {
set_subtype(from.subtype());
}
if (from.has_consumer_id()) {
set_consumer_id(from.consumer_id());
}
if (from.has_request_id()) {
set_request_id(from.request_id());
}
if (from.has_consumer_name()) {
set_consumer_name(from.consumer_name());
}
}
mutable_unknown_fields()->append(from.unknown_fields());
}
void CommandSubscribe::CopyFrom(const CommandSubscribe& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool CommandSubscribe::IsInitialized() const {
if ((_has_bits_[0] & 0x0000001f) != 0x0000001f) return false;
return true;
}
void CommandSubscribe::Swap(CommandSubscribe* other) {
if (other != this) {
std::swap(topic_, other->topic_);
std::swap(subscription_, other->subscription_);
std::swap(subtype_, other->subtype_);
std::swap(consumer_id_, other->consumer_id_);
std::swap(