| // 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: |
| case 14: |
| 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: |
| case 8: |
| 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; |
| const int CommandSubscribe::kPriorityLevelFieldNumber; |
| #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()); |
| priority_level_ = 0; |
| ::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] & 127) { |
| ZR_(consumer_id_, priority_level_); |
| if (has_topic()) { |
| if (topic_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| topic_->clear(); |
| } |
| } |
| if (has_subscription()) { |
| if (subscription_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| subscription_->clear(); |
| } |
| } |
| 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->ExpectTag(56)) goto parse_priority_level; |
| break; |
| } |
| |
| // optional int32 priority_level = 7; |
| case 7: { |
| if (tag == 56) { |
| parse_priority_level: |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| input, &priority_level_))); |
| set_has_priority_level(); |
| } 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); |
| } |
| |
| // optional int32 priority_level = 7; |
| if (has_priority_level()) { |
| ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->priority_level(), 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()); |
| } |
| |
| // optional int32 priority_level = 7; |
| if (has_priority_level()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::Int32Size( |
| this->priority_level()); |
| } |
| |
| } |
| 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()); |
| } |
| if (from.has_priority_level()) { |
| set_priority_level(from.priority_level()); |
| } |
| } |
| 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(request_id_, other->request_id_); |
| std::swap(consumer_name_, other->consumer_name_); |
| std::swap(priority_level_, other->priority_level_); |
| std::swap(_has_bits_[0], other->_has_bits_[0]); |
| _unknown_fields_.swap(other->_unknown_fields_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| } |
| |
| ::std::string CommandSubscribe::GetTypeName() const { |
| return "pulsar.proto.CommandSubscribe"; |
| } |
| |
| |
| // =================================================================== |
| |
| #ifndef _MSC_VER |
| const int CommandPartitionedTopicMetadata::kTopicFieldNumber; |
| const int CommandPartitionedTopicMetadata::kRequestIdFieldNumber; |
| #endif // !_MSC_VER |
| |
| CommandPartitionedTopicMetadata::CommandPartitionedTopicMetadata() |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:pulsar.proto.CommandPartitionedTopicMetadata) |
| } |
| |
| void CommandPartitionedTopicMetadata::InitAsDefaultInstance() { |
| } |
| |
| CommandPartitionedTopicMetadata::CommandPartitionedTopicMetadata(const CommandPartitionedTopicMetadata& from) |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:pulsar.proto.CommandPartitionedTopicMetadata) |
| } |
| |
| void CommandPartitionedTopicMetadata::SharedCtor() { |
| ::google::protobuf::internal::GetEmptyString(); |
| _cached_size_ = 0; |
| topic_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| request_id_ = GOOGLE_ULONGLONG(0); |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| } |
| |
| CommandPartitionedTopicMetadata::~CommandPartitionedTopicMetadata() { |
| // @@protoc_insertion_point(destructor:pulsar.proto.CommandPartitionedTopicMetadata) |
| SharedDtor(); |
| } |
| |
| void CommandPartitionedTopicMetadata::SharedDtor() { |
| if (topic_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| delete topic_; |
| } |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| if (this != &default_instance()) { |
| #else |
| if (this != default_instance_) { |
| #endif |
| } |
| } |
| |
| void CommandPartitionedTopicMetadata::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const CommandPartitionedTopicMetadata& CommandPartitionedTopicMetadata::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_; |
| } |
| |
| CommandPartitionedTopicMetadata* CommandPartitionedTopicMetadata::default_instance_ = NULL; |
| |
| CommandPartitionedTopicMetadata* CommandPartitionedTopicMetadata::New() const { |
| return new CommandPartitionedTopicMetadata; |
| } |
| |
| void CommandPartitionedTopicMetadata::Clear() { |
| if (_has_bits_[0 / 32] & 3) { |
| if (has_topic()) { |
| if (topic_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| topic_->clear(); |
| } |
| } |
| request_id_ = GOOGLE_ULONGLONG(0); |
| } |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| mutable_unknown_fields()->clear(); |
| } |
| |
| bool CommandPartitionedTopicMetadata::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.CommandPartitionedTopicMetadata) |
| 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(16)) goto parse_request_id; |
| break; |
| } |
| |
| // required uint64 request_id = 2; |
| case 2: { |
| if (tag == 16) { |
| 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->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.CommandPartitionedTopicMetadata) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:pulsar.proto.CommandPartitionedTopicMetadata) |
| return false; |
| #undef DO_ |
| } |
| |
| void CommandPartitionedTopicMetadata::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:pulsar.proto.CommandPartitionedTopicMetadata) |
| // required string topic = 1; |
| if (has_topic()) { |
| ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 1, this->topic(), output); |
| } |
| |
| // required uint64 request_id = 2; |
| if (has_request_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->request_id(), output); |
| } |
| |
| output->WriteRaw(unknown_fields().data(), |
| unknown_fields().size()); |
| // @@protoc_insertion_point(serialize_end:pulsar.proto.CommandPartitionedTopicMetadata) |
| } |
| |
| int CommandPartitionedTopicMetadata::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 uint64 request_id = 2; |
| if (has_request_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->request_id()); |
| } |
| |
| } |
| total_size += unknown_fields().size(); |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void CommandPartitionedTopicMetadata::CheckTypeAndMergeFrom( |
| const ::google::protobuf::MessageLite& from) { |
| MergeFrom(*::google::protobuf::down_cast<const CommandPartitionedTopicMetadata*>(&from)); |
| } |
| |
| void CommandPartitionedTopicMetadata::MergeFrom(const CommandPartitionedTopicMetadata& 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_request_id()) { |
| set_request_id(from.request_id()); |
| } |
| } |
| mutable_unknown_fields()->append(from.unknown_fields()); |
| } |
| |
| void CommandPartitionedTopicMetadata::CopyFrom(const CommandPartitionedTopicMetadata& from) { |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool CommandPartitionedTopicMetadata::IsInitialized() const { |
| if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; |
| |
| return true; |
| } |
| |
| void CommandPartitionedTopicMetadata::Swap(CommandPartitionedTopicMetadata* other) { |
| if (other != this) { |
| std::swap(topic_, other->topic_); |
| std::swap(request_id_, other->request_id_); |
| std::swap(_has_bits_[0], other->_has_bits_[0]); |
| _unknown_fields_.swap(other->_unknown_fields_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| } |
| |
| ::std::string CommandPartitionedTopicMetadata::GetTypeName() const { |
| return "pulsar.proto.CommandPartitionedTopicMetadata"; |
| } |
| |
| |
| // =================================================================== |
| |
| bool CommandPartitionedTopicMetadataResponse_LookupType_IsValid(int value) { |
| switch(value) { |
| case 0: |
| case 1: |
| return true; |
| default: |
| return false; |
| } |
| } |
| |
| #ifndef _MSC_VER |
| const CommandPartitionedTopicMetadataResponse_LookupType CommandPartitionedTopicMetadataResponse::Success; |
| const CommandPartitionedTopicMetadataResponse_LookupType CommandPartitionedTopicMetadataResponse::Failed; |
| const CommandPartitionedTopicMetadataResponse_LookupType CommandPartitionedTopicMetadataResponse::LookupType_MIN; |
| const CommandPartitionedTopicMetadataResponse_LookupType CommandPartitionedTopicMetadataResponse::LookupType_MAX; |
| const int CommandPartitionedTopicMetadataResponse::LookupType_ARRAYSIZE; |
| #endif // _MSC_VER |
| #ifndef _MSC_VER |
| const int CommandPartitionedTopicMetadataResponse::kPartitionsFieldNumber; |
| const int CommandPartitionedTopicMetadataResponse::kRequestIdFieldNumber; |
| const int CommandPartitionedTopicMetadataResponse::kResponseFieldNumber; |
| const int CommandPartitionedTopicMetadataResponse::kErrorFieldNumber; |
| const int CommandPartitionedTopicMetadataResponse::kMessageFieldNumber; |
| #endif // !_MSC_VER |
| |
| CommandPartitionedTopicMetadataResponse::CommandPartitionedTopicMetadataResponse() |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:pulsar.proto.CommandPartitionedTopicMetadataResponse) |
| } |
| |
| void CommandPartitionedTopicMetadataResponse::InitAsDefaultInstance() { |
| } |
| |
| CommandPartitionedTopicMetadataResponse::CommandPartitionedTopicMetadataResponse(const CommandPartitionedTopicMetadataResponse& from) |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:pulsar.proto.CommandPartitionedTopicMetadataResponse) |
| } |
| |
| void CommandPartitionedTopicMetadataResponse::SharedCtor() { |
| ::google::protobuf::internal::GetEmptyString(); |
| _cached_size_ = 0; |
| partitions_ = 0u; |
| request_id_ = GOOGLE_ULONGLONG(0); |
| response_ = 0; |
| error_ = 0; |
| message_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| } |
| |
| CommandPartitionedTopicMetadataResponse::~CommandPartitionedTopicMetadataResponse() { |
| // @@protoc_insertion_point(destructor:pulsar.proto.CommandPartitionedTopicMetadataResponse) |
| SharedDtor(); |
| } |
| |
| void CommandPartitionedTopicMetadataResponse::SharedDtor() { |
| if (message_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| delete message_; |
| } |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| if (this != &default_instance()) { |
| #else |
| if (this != default_instance_) { |
| #endif |
| } |
| } |
| |
| void CommandPartitionedTopicMetadataResponse::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const CommandPartitionedTopicMetadataResponse& CommandPartitionedTopicMetadataResponse::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_; |
| } |
| |
| CommandPartitionedTopicMetadataResponse* CommandPartitionedTopicMetadataResponse::default_instance_ = NULL; |
| |
| CommandPartitionedTopicMetadataResponse* CommandPartitionedTopicMetadataResponse::New() const { |
| return new CommandPartitionedTopicMetadataResponse; |
| } |
| |
| void CommandPartitionedTopicMetadataResponse::Clear() { |
| #define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \ |
| &reinterpret_cast<CommandPartitionedTopicMetadataResponse*>(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_(request_id_, response_); |
| error_ = 0; |
| if (has_message()) { |
| if (message_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| message_->clear(); |
| } |
| } |
| } |
| |
| #undef OFFSET_OF_FIELD_ |
| #undef ZR_ |
| |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| mutable_unknown_fields()->clear(); |
| } |
| |
| bool CommandPartitionedTopicMetadataResponse::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.CommandPartitionedTopicMetadataResponse) |
| for (;;) { |
| ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| tag = p.first; |
| if (!p.second) goto handle_unusual; |
| switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| // optional uint32 partitions = 1; |
| case 1: { |
| if (tag == 8) { |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( |
| input, &partitions_))); |
| set_has_partitions(); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(16)) goto parse_request_id; |
| break; |
| } |
| |
| // required uint64 request_id = 2; |
| case 2: { |
| if (tag == 16) { |
| 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(24)) goto parse_response; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandPartitionedTopicMetadataResponse.LookupType response = 3; |
| case 3: { |
| if (tag == 24) { |
| parse_response: |
| int value; |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| input, &value))); |
| if (::pulsar::proto::CommandPartitionedTopicMetadataResponse_LookupType_IsValid(value)) { |
| set_response(static_cast< ::pulsar::proto::CommandPartitionedTopicMetadataResponse_LookupType >(value)); |
| } else { |
| unknown_fields_stream.WriteVarint32(tag); |
| unknown_fields_stream.WriteVarint32(value); |
| } |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(32)) goto parse_error; |
| break; |
| } |
| |
| // optional .pulsar.proto.ServerError error = 4; |
| case 4: { |
| if (tag == 32) { |
| parse_error: |
| int value; |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| input, &value))); |
| if (::pulsar::proto::ServerError_IsValid(value)) { |
| set_error(static_cast< ::pulsar::proto::ServerError >(value)); |
| } else { |
| unknown_fields_stream.WriteVarint32(tag); |
| unknown_fields_stream.WriteVarint32(value); |
| } |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(42)) goto parse_message; |
| break; |
| } |
| |
| // optional string message = 5; |
| case 5: { |
| if (tag == 42) { |
| parse_message: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| input, this->mutable_message())); |
| } 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.CommandPartitionedTopicMetadataResponse) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:pulsar.proto.CommandPartitionedTopicMetadataResponse) |
| return false; |
| #undef DO_ |
| } |
| |
| void CommandPartitionedTopicMetadataResponse::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:pulsar.proto.CommandPartitionedTopicMetadataResponse) |
| // optional uint32 partitions = 1; |
| if (has_partitions()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->partitions(), output); |
| } |
| |
| // required uint64 request_id = 2; |
| if (has_request_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->request_id(), output); |
| } |
| |
| // optional .pulsar.proto.CommandPartitionedTopicMetadataResponse.LookupType response = 3; |
| if (has_response()) { |
| ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 3, this->response(), output); |
| } |
| |
| // optional .pulsar.proto.ServerError error = 4; |
| if (has_error()) { |
| ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 4, this->error(), output); |
| } |
| |
| // optional string message = 5; |
| if (has_message()) { |
| ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 5, this->message(), output); |
| } |
| |
| output->WriteRaw(unknown_fields().data(), |
| unknown_fields().size()); |
| // @@protoc_insertion_point(serialize_end:pulsar.proto.CommandPartitionedTopicMetadataResponse) |
| } |
| |
| int CommandPartitionedTopicMetadataResponse::ByteSize() const { |
| int total_size = 0; |
| |
| if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| // optional uint32 partitions = 1; |
| if (has_partitions()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt32Size( |
| this->partitions()); |
| } |
| |
| // required uint64 request_id = 2; |
| if (has_request_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->request_id()); |
| } |
| |
| // optional .pulsar.proto.CommandPartitionedTopicMetadataResponse.LookupType response = 3; |
| if (has_response()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::EnumSize(this->response()); |
| } |
| |
| // optional .pulsar.proto.ServerError error = 4; |
| if (has_error()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::EnumSize(this->error()); |
| } |
| |
| // optional string message = 5; |
| if (has_message()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::StringSize( |
| this->message()); |
| } |
| |
| } |
| total_size += unknown_fields().size(); |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void CommandPartitionedTopicMetadataResponse::CheckTypeAndMergeFrom( |
| const ::google::protobuf::MessageLite& from) { |
| MergeFrom(*::google::protobuf::down_cast<const CommandPartitionedTopicMetadataResponse*>(&from)); |
| } |
| |
| void CommandPartitionedTopicMetadataResponse::MergeFrom(const CommandPartitionedTopicMetadataResponse& from) { |
| GOOGLE_CHECK_NE(&from, this); |
| if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| if (from.has_partitions()) { |
| set_partitions(from.partitions()); |
| } |
| if (from.has_request_id()) { |
| set_request_id(from.request_id()); |
| } |
| if (from.has_response()) { |
| set_response(from.response()); |
| } |
| if (from.has_error()) { |
| set_error(from.error()); |
| } |
| if (from.has_message()) { |
| set_message(from.message()); |
| } |
| } |
| mutable_unknown_fields()->append(from.unknown_fields()); |
| } |
| |
| void CommandPartitionedTopicMetadataResponse::CopyFrom(const CommandPartitionedTopicMetadataResponse& from) { |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool CommandPartitionedTopicMetadataResponse::IsInitialized() const { |
| if ((_has_bits_[0] & 0x00000002) != 0x00000002) return false; |
| |
| return true; |
| } |
| |
| void CommandPartitionedTopicMetadataResponse::Swap(CommandPartitionedTopicMetadataResponse* other) { |
| if (other != this) { |
| std::swap(partitions_, other->partitions_); |
| std::swap(request_id_, other->request_id_); |
| std::swap(response_, other->response_); |
| std::swap(error_, other->error_); |
| std::swap(message_, other->message_); |
| std::swap(_has_bits_[0], other->_has_bits_[0]); |
| _unknown_fields_.swap(other->_unknown_fields_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| } |
| |
| ::std::string CommandPartitionedTopicMetadataResponse::GetTypeName() const { |
| return "pulsar.proto.CommandPartitionedTopicMetadataResponse"; |
| } |
| |
| |
| // =================================================================== |
| |
| #ifndef _MSC_VER |
| const int CommandLookupTopic::kTopicFieldNumber; |
| const int CommandLookupTopic::kRequestIdFieldNumber; |
| const int CommandLookupTopic::kAuthoritativeFieldNumber; |
| #endif // !_MSC_VER |
| |
| CommandLookupTopic::CommandLookupTopic() |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:pulsar.proto.CommandLookupTopic) |
| } |
| |
| void CommandLookupTopic::InitAsDefaultInstance() { |
| } |
| |
| CommandLookupTopic::CommandLookupTopic(const CommandLookupTopic& from) |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:pulsar.proto.CommandLookupTopic) |
| } |
| |
| void CommandLookupTopic::SharedCtor() { |
| ::google::protobuf::internal::GetEmptyString(); |
| _cached_size_ = 0; |
| topic_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| request_id_ = GOOGLE_ULONGLONG(0); |
| authoritative_ = false; |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| } |
| |
| CommandLookupTopic::~CommandLookupTopic() { |
| // @@protoc_insertion_point(destructor:pulsar.proto.CommandLookupTopic) |
| SharedDtor(); |
| } |
| |
| void CommandLookupTopic::SharedDtor() { |
| if (topic_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| delete topic_; |
| } |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| if (this != &default_instance()) { |
| #else |
| if (this != default_instance_) { |
| #endif |
| } |
| } |
| |
| void CommandLookupTopic::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const CommandLookupTopic& CommandLookupTopic::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_; |
| } |
| |
| CommandLookupTopic* CommandLookupTopic::default_instance_ = NULL; |
| |
| CommandLookupTopic* CommandLookupTopic::New() const { |
| return new CommandLookupTopic; |
| } |
| |
| void CommandLookupTopic::Clear() { |
| #define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \ |
| &reinterpret_cast<CommandLookupTopic*>(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] & 7) { |
| ZR_(request_id_, authoritative_); |
| if (has_topic()) { |
| if (topic_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| topic_->clear(); |
| } |
| } |
| } |
| |
| #undef OFFSET_OF_FIELD_ |
| #undef ZR_ |
| |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| mutable_unknown_fields()->clear(); |
| } |
| |
| bool CommandLookupTopic::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.CommandLookupTopic) |
| 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(16)) goto parse_request_id; |
| break; |
| } |
| |
| // required uint64 request_id = 2; |
| case 2: { |
| if (tag == 16) { |
| 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(24)) goto parse_authoritative; |
| break; |
| } |
| |
| // optional bool authoritative = 3 [default = false]; |
| case 3: { |
| if (tag == 24) { |
| parse_authoritative: |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| input, &authoritative_))); |
| set_has_authoritative(); |
| } 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.CommandLookupTopic) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:pulsar.proto.CommandLookupTopic) |
| return false; |
| #undef DO_ |
| } |
| |
| void CommandLookupTopic::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:pulsar.proto.CommandLookupTopic) |
| // required string topic = 1; |
| if (has_topic()) { |
| ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 1, this->topic(), output); |
| } |
| |
| // required uint64 request_id = 2; |
| if (has_request_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->request_id(), output); |
| } |
| |
| // optional bool authoritative = 3 [default = false]; |
| if (has_authoritative()) { |
| ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->authoritative(), output); |
| } |
| |
| output->WriteRaw(unknown_fields().data(), |
| unknown_fields().size()); |
| // @@protoc_insertion_point(serialize_end:pulsar.proto.CommandLookupTopic) |
| } |
| |
| int CommandLookupTopic::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 uint64 request_id = 2; |
| if (has_request_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->request_id()); |
| } |
| |
| // optional bool authoritative = 3 [default = false]; |
| if (has_authoritative()) { |
| total_size += 1 + 1; |
| } |
| |
| } |
| total_size += unknown_fields().size(); |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void CommandLookupTopic::CheckTypeAndMergeFrom( |
| const ::google::protobuf::MessageLite& from) { |
| MergeFrom(*::google::protobuf::down_cast<const CommandLookupTopic*>(&from)); |
| } |
| |
| void CommandLookupTopic::MergeFrom(const CommandLookupTopic& 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_request_id()) { |
| set_request_id(from.request_id()); |
| } |
| if (from.has_authoritative()) { |
| set_authoritative(from.authoritative()); |
| } |
| } |
| mutable_unknown_fields()->append(from.unknown_fields()); |
| } |
| |
| void CommandLookupTopic::CopyFrom(const CommandLookupTopic& from) { |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool CommandLookupTopic::IsInitialized() const { |
| if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; |
| |
| return true; |
| } |
| |
| void CommandLookupTopic::Swap(CommandLookupTopic* other) { |
| if (other != this) { |
| std::swap(topic_, other->topic_); |
| std::swap(request_id_, other->request_id_); |
| std::swap(authoritative_, other->authoritative_); |
| std::swap(_has_bits_[0], other->_has_bits_[0]); |
| _unknown_fields_.swap(other->_unknown_fields_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| } |
| |
| ::std::string CommandLookupTopic::GetTypeName() const { |
| return "pulsar.proto.CommandLookupTopic"; |
| } |
| |
| |
| // =================================================================== |
| |
| bool CommandLookupTopicResponse_LookupType_IsValid(int value) { |
| switch(value) { |
| case 0: |
| case 1: |
| case 2: |
| return true; |
| default: |
| return false; |
| } |
| } |
| |
| #ifndef _MSC_VER |
| const CommandLookupTopicResponse_LookupType CommandLookupTopicResponse::Redirect; |
| const CommandLookupTopicResponse_LookupType CommandLookupTopicResponse::Connect; |
| const CommandLookupTopicResponse_LookupType CommandLookupTopicResponse::Failed; |
| const CommandLookupTopicResponse_LookupType CommandLookupTopicResponse::LookupType_MIN; |
| const CommandLookupTopicResponse_LookupType CommandLookupTopicResponse::LookupType_MAX; |
| const int CommandLookupTopicResponse::LookupType_ARRAYSIZE; |
| #endif // _MSC_VER |
| #ifndef _MSC_VER |
| const int CommandLookupTopicResponse::kBrokerServiceUrlFieldNumber; |
| const int CommandLookupTopicResponse::kBrokerServiceUrlTlsFieldNumber; |
| const int CommandLookupTopicResponse::kResponseFieldNumber; |
| const int CommandLookupTopicResponse::kRequestIdFieldNumber; |
| const int CommandLookupTopicResponse::kAuthoritativeFieldNumber; |
| const int CommandLookupTopicResponse::kErrorFieldNumber; |
| const int CommandLookupTopicResponse::kMessageFieldNumber; |
| #endif // !_MSC_VER |
| |
| CommandLookupTopicResponse::CommandLookupTopicResponse() |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:pulsar.proto.CommandLookupTopicResponse) |
| } |
| |
| void CommandLookupTopicResponse::InitAsDefaultInstance() { |
| } |
| |
| CommandLookupTopicResponse::CommandLookupTopicResponse(const CommandLookupTopicResponse& from) |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:pulsar.proto.CommandLookupTopicResponse) |
| } |
| |
| void CommandLookupTopicResponse::SharedCtor() { |
| ::google::protobuf::internal::GetEmptyString(); |
| _cached_size_ = 0; |
| brokerserviceurl_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| brokerserviceurltls_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| response_ = 0; |
| request_id_ = GOOGLE_ULONGLONG(0); |
| authoritative_ = false; |
| error_ = 0; |
| message_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| } |
| |
| CommandLookupTopicResponse::~CommandLookupTopicResponse() { |
| // @@protoc_insertion_point(destructor:pulsar.proto.CommandLookupTopicResponse) |
| SharedDtor(); |
| } |
| |
| void CommandLookupTopicResponse::SharedDtor() { |
| if (brokerserviceurl_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| delete brokerserviceurl_; |
| } |
| if (brokerserviceurltls_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| delete brokerserviceurltls_; |
| } |
| if (message_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| delete message_; |
| } |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| if (this != &default_instance()) { |
| #else |
| if (this != default_instance_) { |
| #endif |
| } |
| } |
| |
| void CommandLookupTopicResponse::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const CommandLookupTopicResponse& CommandLookupTopicResponse::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_; |
| } |
| |
| CommandLookupTopicResponse* CommandLookupTopicResponse::default_instance_ = NULL; |
| |
| CommandLookupTopicResponse* CommandLookupTopicResponse::New() const { |
| return new CommandLookupTopicResponse; |
| } |
| |
| void CommandLookupTopicResponse::Clear() { |
| #define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \ |
| &reinterpret_cast<CommandLookupTopicResponse*>(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] & 127) { |
| ZR_(request_id_, authoritative_); |
| if (has_brokerserviceurl()) { |
| if (brokerserviceurl_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| brokerserviceurl_->clear(); |
| } |
| } |
| if (has_brokerserviceurltls()) { |
| if (brokerserviceurltls_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| brokerserviceurltls_->clear(); |
| } |
| } |
| error_ = 0; |
| if (has_message()) { |
| if (message_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| message_->clear(); |
| } |
| } |
| } |
| |
| #undef OFFSET_OF_FIELD_ |
| #undef ZR_ |
| |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| mutable_unknown_fields()->clear(); |
| } |
| |
| bool CommandLookupTopicResponse::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.CommandLookupTopicResponse) |
| for (;;) { |
| ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| tag = p.first; |
| if (!p.second) goto handle_unusual; |
| switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| // optional string brokerServiceUrl = 1; |
| case 1: { |
| if (tag == 10) { |
| DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| input, this->mutable_brokerserviceurl())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(18)) goto parse_brokerServiceUrlTls; |
| break; |
| } |
| |
| // optional string brokerServiceUrlTls = 2; |
| case 2: { |
| if (tag == 18) { |
| parse_brokerServiceUrlTls: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| input, this->mutable_brokerserviceurltls())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(24)) goto parse_response; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandLookupTopicResponse.LookupType response = 3; |
| case 3: { |
| if (tag == 24) { |
| parse_response: |
| int value; |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| input, &value))); |
| if (::pulsar::proto::CommandLookupTopicResponse_LookupType_IsValid(value)) { |
| set_response(static_cast< ::pulsar::proto::CommandLookupTopicResponse_LookupType >(value)); |
| } else { |
| unknown_fields_stream.WriteVarint32(tag); |
| unknown_fields_stream.WriteVarint32(value); |
| } |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(32)) goto parse_request_id; |
| break; |
| } |
| |
| // required uint64 request_id = 4; |
| case 4: { |
| if (tag == 32) { |
| 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(40)) goto parse_authoritative; |
| break; |
| } |
| |
| // optional bool authoritative = 5 [default = false]; |
| case 5: { |
| if (tag == 40) { |
| parse_authoritative: |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| input, &authoritative_))); |
| set_has_authoritative(); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(48)) goto parse_error; |
| break; |
| } |
| |
| // optional .pulsar.proto.ServerError error = 6; |
| case 6: { |
| if (tag == 48) { |
| parse_error: |
| int value; |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| input, &value))); |
| if (::pulsar::proto::ServerError_IsValid(value)) { |
| set_error(static_cast< ::pulsar::proto::ServerError >(value)); |
| } else { |
| unknown_fields_stream.WriteVarint32(tag); |
| unknown_fields_stream.WriteVarint32(value); |
| } |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(58)) goto parse_message; |
| break; |
| } |
| |
| // optional string message = 7; |
| case 7: { |
| if (tag == 58) { |
| parse_message: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| input, this->mutable_message())); |
| } 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.CommandLookupTopicResponse) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:pulsar.proto.CommandLookupTopicResponse) |
| return false; |
| #undef DO_ |
| } |
| |
| void CommandLookupTopicResponse::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:pulsar.proto.CommandLookupTopicResponse) |
| // optional string brokerServiceUrl = 1; |
| if (has_brokerserviceurl()) { |
| ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 1, this->brokerserviceurl(), output); |
| } |
| |
| // optional string brokerServiceUrlTls = 2; |
| if (has_brokerserviceurltls()) { |
| ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 2, this->brokerserviceurltls(), output); |
| } |
| |
| // optional .pulsar.proto.CommandLookupTopicResponse.LookupType response = 3; |
| if (has_response()) { |
| ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 3, this->response(), output); |
| } |
| |
| // required uint64 request_id = 4; |
| if (has_request_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->request_id(), output); |
| } |
| |
| // optional bool authoritative = 5 [default = false]; |
| if (has_authoritative()) { |
| ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->authoritative(), output); |
| } |
| |
| // optional .pulsar.proto.ServerError error = 6; |
| if (has_error()) { |
| ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 6, this->error(), output); |
| } |
| |
| // optional string message = 7; |
| if (has_message()) { |
| ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 7, this->message(), output); |
| } |
| |
| output->WriteRaw(unknown_fields().data(), |
| unknown_fields().size()); |
| // @@protoc_insertion_point(serialize_end:pulsar.proto.CommandLookupTopicResponse) |
| } |
| |
| int CommandLookupTopicResponse::ByteSize() const { |
| int total_size = 0; |
| |
| if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| // optional string brokerServiceUrl = 1; |
| if (has_brokerserviceurl()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::StringSize( |
| this->brokerserviceurl()); |
| } |
| |
| // optional string brokerServiceUrlTls = 2; |
| if (has_brokerserviceurltls()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::StringSize( |
| this->brokerserviceurltls()); |
| } |
| |
| // optional .pulsar.proto.CommandLookupTopicResponse.LookupType response = 3; |
| if (has_response()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::EnumSize(this->response()); |
| } |
| |
| // required uint64 request_id = 4; |
| if (has_request_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->request_id()); |
| } |
| |
| // optional bool authoritative = 5 [default = false]; |
| if (has_authoritative()) { |
| total_size += 1 + 1; |
| } |
| |
| // optional .pulsar.proto.ServerError error = 6; |
| if (has_error()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::EnumSize(this->error()); |
| } |
| |
| // optional string message = 7; |
| if (has_message()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::StringSize( |
| this->message()); |
| } |
| |
| } |
| total_size += unknown_fields().size(); |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void CommandLookupTopicResponse::CheckTypeAndMergeFrom( |
| const ::google::protobuf::MessageLite& from) { |
| MergeFrom(*::google::protobuf::down_cast<const CommandLookupTopicResponse*>(&from)); |
| } |
| |
| void CommandLookupTopicResponse::MergeFrom(const CommandLookupTopicResponse& from) { |
| GOOGLE_CHECK_NE(&from, this); |
| if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| if (from.has_brokerserviceurl()) { |
| set_brokerserviceurl(from.brokerserviceurl()); |
| } |
| if (from.has_brokerserviceurltls()) { |
| set_brokerserviceurltls(from.brokerserviceurltls()); |
| } |
| if (from.has_response()) { |
| set_response(from.response()); |
| } |
| if (from.has_request_id()) { |
| set_request_id(from.request_id()); |
| } |
| if (from.has_authoritative()) { |
| set_authoritative(from.authoritative()); |
| } |
| if (from.has_error()) { |
| set_error(from.error()); |
| } |
| if (from.has_message()) { |
| set_message(from.message()); |
| } |
| } |
| mutable_unknown_fields()->append(from.unknown_fields()); |
| } |
| |
| void CommandLookupTopicResponse::CopyFrom(const CommandLookupTopicResponse& from) { |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool CommandLookupTopicResponse::IsInitialized() const { |
| if ((_has_bits_[0] & 0x00000008) != 0x00000008) return false; |
| |
| return true; |
| } |
| |
| void CommandLookupTopicResponse::Swap(CommandLookupTopicResponse* other) { |
| if (other != this) { |
| std::swap(brokerserviceurl_, other->brokerserviceurl_); |
| std::swap(brokerserviceurltls_, other->brokerserviceurltls_); |
| std::swap(response_, other->response_); |
| std::swap(request_id_, other->request_id_); |
| std::swap(authoritative_, other->authoritative_); |
| std::swap(error_, other->error_); |
| std::swap(message_, other->message_); |
| std::swap(_has_bits_[0], other->_has_bits_[0]); |
| _unknown_fields_.swap(other->_unknown_fields_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| } |
| |
| ::std::string CommandLookupTopicResponse::GetTypeName() const { |
| return "pulsar.proto.CommandLookupTopicResponse"; |
| } |
| |
| |
| // =================================================================== |
| |
| #ifndef _MSC_VER |
| const int CommandProducer::kTopicFieldNumber; |
| const int CommandProducer::kProducerIdFieldNumber; |
| const int CommandProducer::kRequestIdFieldNumber; |
| const int CommandProducer::kProducerNameFieldNumber; |
| #endif // !_MSC_VER |
| |
| CommandProducer::CommandProducer() |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:pulsar.proto.CommandProducer) |
| } |
| |
| void CommandProducer::InitAsDefaultInstance() { |
| } |
| |
| CommandProducer::CommandProducer(const CommandProducer& from) |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:pulsar.proto.CommandProducer) |
| } |
| |
| void CommandProducer::SharedCtor() { |
| ::google::protobuf::internal::GetEmptyString(); |
| _cached_size_ = 0; |
| topic_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| producer_id_ = GOOGLE_ULONGLONG(0); |
| request_id_ = GOOGLE_ULONGLONG(0); |
| producer_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| } |
| |
| CommandProducer::~CommandProducer() { |
| // @@protoc_insertion_point(destructor:pulsar.proto.CommandProducer) |
| SharedDtor(); |
| } |
| |
| void CommandProducer::SharedDtor() { |
| if (topic_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| delete topic_; |
| } |
| if (producer_name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| delete producer_name_; |
| } |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| if (this != &default_instance()) { |
| #else |
| if (this != default_instance_) { |
| #endif |
| } |
| } |
| |
| void CommandProducer::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const CommandProducer& CommandProducer::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_; |
| } |
| |
| CommandProducer* CommandProducer::default_instance_ = NULL; |
| |
| CommandProducer* CommandProducer::New() const { |
| return new CommandProducer; |
| } |
| |
| void CommandProducer::Clear() { |
| #define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \ |
| &reinterpret_cast<CommandProducer*>(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_(producer_id_, request_id_); |
| if (has_topic()) { |
| if (topic_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| topic_->clear(); |
| } |
| } |
| if (has_producer_name()) { |
| if (producer_name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| producer_name_->clear(); |
| } |
| } |
| } |
| |
| #undef OFFSET_OF_FIELD_ |
| #undef ZR_ |
| |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| mutable_unknown_fields()->clear(); |
| } |
| |
| bool CommandProducer::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.CommandProducer) |
| 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(16)) goto parse_producer_id; |
| break; |
| } |
| |
| // required uint64 producer_id = 2; |
| case 2: { |
| if (tag == 16) { |
| parse_producer_id: |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( |
| input, &producer_id_))); |
| set_has_producer_id(); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(24)) goto parse_request_id; |
| break; |
| } |
| |
| // required uint64 request_id = 3; |
| case 3: { |
| if (tag == 24) { |
| 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(34)) goto parse_producer_name; |
| break; |
| } |
| |
| // optional string producer_name = 4; |
| case 4: { |
| if (tag == 34) { |
| parse_producer_name: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| input, this->mutable_producer_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.CommandProducer) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:pulsar.proto.CommandProducer) |
| return false; |
| #undef DO_ |
| } |
| |
| void CommandProducer::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:pulsar.proto.CommandProducer) |
| // required string topic = 1; |
| if (has_topic()) { |
| ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 1, this->topic(), output); |
| } |
| |
| // required uint64 producer_id = 2; |
| if (has_producer_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->producer_id(), output); |
| } |
| |
| // required uint64 request_id = 3; |
| if (has_request_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(3, this->request_id(), output); |
| } |
| |
| // optional string producer_name = 4; |
| if (has_producer_name()) { |
| ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 4, this->producer_name(), output); |
| } |
| |
| output->WriteRaw(unknown_fields().data(), |
| unknown_fields().size()); |
| // @@protoc_insertion_point(serialize_end:pulsar.proto.CommandProducer) |
| } |
| |
| int CommandProducer::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 uint64 producer_id = 2; |
| if (has_producer_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->producer_id()); |
| } |
| |
| // required uint64 request_id = 3; |
| if (has_request_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->request_id()); |
| } |
| |
| // optional string producer_name = 4; |
| if (has_producer_name()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::StringSize( |
| this->producer_name()); |
| } |
| |
| } |
| total_size += unknown_fields().size(); |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void CommandProducer::CheckTypeAndMergeFrom( |
| const ::google::protobuf::MessageLite& from) { |
| MergeFrom(*::google::protobuf::down_cast<const CommandProducer*>(&from)); |
| } |
| |
| void CommandProducer::MergeFrom(const CommandProducer& 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_producer_id()) { |
| set_producer_id(from.producer_id()); |
| } |
| if (from.has_request_id()) { |
| set_request_id(from.request_id()); |
| } |
| if (from.has_producer_name()) { |
| set_producer_name(from.producer_name()); |
| } |
| } |
| mutable_unknown_fields()->append(from.unknown_fields()); |
| } |
| |
| void CommandProducer::CopyFrom(const CommandProducer& from) { |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool CommandProducer::IsInitialized() const { |
| if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false; |
| |
| return true; |
| } |
| |
| void CommandProducer::Swap(CommandProducer* other) { |
| if (other != this) { |
| std::swap(topic_, other->topic_); |
| std::swap(producer_id_, other->producer_id_); |
| std::swap(request_id_, other->request_id_); |
| std::swap(producer_name_, other->producer_name_); |
| std::swap(_has_bits_[0], other->_has_bits_[0]); |
| _unknown_fields_.swap(other->_unknown_fields_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| } |
| |
| ::std::string CommandProducer::GetTypeName() const { |
| return "pulsar.proto.CommandProducer"; |
| } |
| |
| |
| // =================================================================== |
| |
| #ifndef _MSC_VER |
| const int CommandSend::kProducerIdFieldNumber; |
| const int CommandSend::kSequenceIdFieldNumber; |
| const int CommandSend::kNumMessagesFieldNumber; |
| #endif // !_MSC_VER |
| |
| CommandSend::CommandSend() |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:pulsar.proto.CommandSend) |
| } |
| |
| void CommandSend::InitAsDefaultInstance() { |
| } |
| |
| CommandSend::CommandSend(const CommandSend& from) |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:pulsar.proto.CommandSend) |
| } |
| |
| void CommandSend::SharedCtor() { |
| _cached_size_ = 0; |
| producer_id_ = GOOGLE_ULONGLONG(0); |
| sequence_id_ = GOOGLE_ULONGLONG(0); |
| num_messages_ = 1; |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| } |
| |
| CommandSend::~CommandSend() { |
| // @@protoc_insertion_point(destructor:pulsar.proto.CommandSend) |
| SharedDtor(); |
| } |
| |
| void CommandSend::SharedDtor() { |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| if (this != &default_instance()) { |
| #else |
| if (this != default_instance_) { |
| #endif |
| } |
| } |
| |
| void CommandSend::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const CommandSend& CommandSend::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_; |
| } |
| |
| CommandSend* CommandSend::default_instance_ = NULL; |
| |
| CommandSend* CommandSend::New() const { |
| return new CommandSend; |
| } |
| |
| void CommandSend::Clear() { |
| #define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \ |
| &reinterpret_cast<CommandSend*>(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] & 7) { |
| ZR_(producer_id_, sequence_id_); |
| num_messages_ = 1; |
| } |
| |
| #undef OFFSET_OF_FIELD_ |
| #undef ZR_ |
| |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| mutable_unknown_fields()->clear(); |
| } |
| |
| bool CommandSend::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.CommandSend) |
| 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 producer_id = 1; |
| case 1: { |
| if (tag == 8) { |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( |
| input, &producer_id_))); |
| set_has_producer_id(); |
| } 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_num_messages; |
| break; |
| } |
| |
| // optional int32 num_messages = 3 [default = 1]; |
| case 3: { |
| if (tag == 24) { |
| parse_num_messages: |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| input, &num_messages_))); |
| set_has_num_messages(); |
| } 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.CommandSend) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:pulsar.proto.CommandSend) |
| return false; |
| #undef DO_ |
| } |
| |
| void CommandSend::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:pulsar.proto.CommandSend) |
| // required uint64 producer_id = 1; |
| if (has_producer_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->producer_id(), output); |
| } |
| |
| // required uint64 sequence_id = 2; |
| if (has_sequence_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->sequence_id(), output); |
| } |
| |
| // optional int32 num_messages = 3 [default = 1]; |
| if (has_num_messages()) { |
| ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->num_messages(), output); |
| } |
| |
| output->WriteRaw(unknown_fields().data(), |
| unknown_fields().size()); |
| // @@protoc_insertion_point(serialize_end:pulsar.proto.CommandSend) |
| } |
| |
| int CommandSend::ByteSize() const { |
| int total_size = 0; |
| |
| if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| // required uint64 producer_id = 1; |
| if (has_producer_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->producer_id()); |
| } |
| |
| // required uint64 sequence_id = 2; |
| if (has_sequence_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->sequence_id()); |
| } |
| |
| // optional int32 num_messages = 3 [default = 1]; |
| if (has_num_messages()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::Int32Size( |
| this->num_messages()); |
| } |
| |
| } |
| total_size += unknown_fields().size(); |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void CommandSend::CheckTypeAndMergeFrom( |
| const ::google::protobuf::MessageLite& from) { |
| MergeFrom(*::google::protobuf::down_cast<const CommandSend*>(&from)); |
| } |
| |
| void CommandSend::MergeFrom(const CommandSend& from) { |
| GOOGLE_CHECK_NE(&from, this); |
| if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| if (from.has_producer_id()) { |
| set_producer_id(from.producer_id()); |
| } |
| if (from.has_sequence_id()) { |
| set_sequence_id(from.sequence_id()); |
| } |
| if (from.has_num_messages()) { |
| set_num_messages(from.num_messages()); |
| } |
| } |
| mutable_unknown_fields()->append(from.unknown_fields()); |
| } |
| |
| void CommandSend::CopyFrom(const CommandSend& from) { |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool CommandSend::IsInitialized() const { |
| if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; |
| |
| return true; |
| } |
| |
| void CommandSend::Swap(CommandSend* other) { |
| if (other != this) { |
| std::swap(producer_id_, other->producer_id_); |
| std::swap(sequence_id_, other->sequence_id_); |
| std::swap(num_messages_, other->num_messages_); |
| std::swap(_has_bits_[0], other->_has_bits_[0]); |
| _unknown_fields_.swap(other->_unknown_fields_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| } |
| |
| ::std::string CommandSend::GetTypeName() const { |
| return "pulsar.proto.CommandSend"; |
| } |
| |
| |
| // =================================================================== |
| |
| #ifndef _MSC_VER |
| const int CommandSendReceipt::kProducerIdFieldNumber; |
| const int CommandSendReceipt::kSequenceIdFieldNumber; |
| const int CommandSendReceipt::kMessageIdFieldNumber; |
| #endif // !_MSC_VER |
| |
| CommandSendReceipt::CommandSendReceipt() |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:pulsar.proto.CommandSendReceipt) |
| } |
| |
| void CommandSendReceipt::InitAsDefaultInstance() { |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| message_id_ = const_cast< ::pulsar::proto::MessageIdData*>( |
| ::pulsar::proto::MessageIdData::internal_default_instance()); |
| #else |
| message_id_ = const_cast< ::pulsar::proto::MessageIdData*>(&::pulsar::proto::MessageIdData::default_instance()); |
| #endif |
| } |
| |
| CommandSendReceipt::CommandSendReceipt(const CommandSendReceipt& from) |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:pulsar.proto.CommandSendReceipt) |
| } |
| |
| void CommandSendReceipt::SharedCtor() { |
| _cached_size_ = 0; |
| producer_id_ = GOOGLE_ULONGLONG(0); |
| sequence_id_ = GOOGLE_ULONGLONG(0); |
| message_id_ = NULL; |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| } |
| |
| CommandSendReceipt::~CommandSendReceipt() { |
| // @@protoc_insertion_point(destructor:pulsar.proto.CommandSendReceipt) |
| SharedDtor(); |
| } |
| |
| void CommandSendReceipt::SharedDtor() { |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| if (this != &default_instance()) { |
| #else |
| if (this != default_instance_) { |
| #endif |
| delete message_id_; |
| } |
| } |
| |
| void CommandSendReceipt::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const CommandSendReceipt& CommandSendReceipt::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_; |
| } |
| |
| CommandSendReceipt* CommandSendReceipt::default_instance_ = NULL; |
| |
| CommandSendReceipt* CommandSendReceipt::New() const { |
| return new CommandSendReceipt; |
| } |
| |
| void CommandSendReceipt::Clear() { |
| #define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \ |
| &reinterpret_cast<CommandSendReceipt*>(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] & 7) { |
| ZR_(producer_id_, sequence_id_); |
| if (has_message_id()) { |
| if (message_id_ != NULL) message_id_->::pulsar::proto::MessageIdData::Clear(); |
| } |
| } |
| |
| #undef OFFSET_OF_FIELD_ |
| #undef ZR_ |
| |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| mutable_unknown_fields()->clear(); |
| } |
| |
| bool CommandSendReceipt::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.CommandSendReceipt) |
| 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 producer_id = 1; |
| case 1: { |
| if (tag == 8) { |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( |
| input, &producer_id_))); |
| set_has_producer_id(); |
| } 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(26)) goto parse_message_id; |
| break; |
| } |
| |
| // optional .pulsar.proto.MessageIdData message_id = 3; |
| case 3: { |
| if (tag == 26) { |
| parse_message_id: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_message_id())); |
| } 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.CommandSendReceipt) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:pulsar.proto.CommandSendReceipt) |
| return false; |
| #undef DO_ |
| } |
| |
| void CommandSendReceipt::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:pulsar.proto.CommandSendReceipt) |
| // required uint64 producer_id = 1; |
| if (has_producer_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->producer_id(), output); |
| } |
| |
| // required uint64 sequence_id = 2; |
| if (has_sequence_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->sequence_id(), output); |
| } |
| |
| // optional .pulsar.proto.MessageIdData message_id = 3; |
| if (has_message_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 3, this->message_id(), output); |
| } |
| |
| output->WriteRaw(unknown_fields().data(), |
| unknown_fields().size()); |
| // @@protoc_insertion_point(serialize_end:pulsar.proto.CommandSendReceipt) |
| } |
| |
| int CommandSendReceipt::ByteSize() const { |
| int total_size = 0; |
| |
| if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| // required uint64 producer_id = 1; |
| if (has_producer_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->producer_id()); |
| } |
| |
| // required uint64 sequence_id = 2; |
| if (has_sequence_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->sequence_id()); |
| } |
| |
| // optional .pulsar.proto.MessageIdData message_id = 3; |
| if (has_message_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->message_id()); |
| } |
| |
| } |
| total_size += unknown_fields().size(); |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void CommandSendReceipt::CheckTypeAndMergeFrom( |
| const ::google::protobuf::MessageLite& from) { |
| MergeFrom(*::google::protobuf::down_cast<const CommandSendReceipt*>(&from)); |
| } |
| |
| void CommandSendReceipt::MergeFrom(const CommandSendReceipt& from) { |
| GOOGLE_CHECK_NE(&from, this); |
| if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| if (from.has_producer_id()) { |
| set_producer_id(from.producer_id()); |
| } |
| if (from.has_sequence_id()) { |
| set_sequence_id(from.sequence_id()); |
| } |
| if (from.has_message_id()) { |
| mutable_message_id()->::pulsar::proto::MessageIdData::MergeFrom(from.message_id()); |
| } |
| } |
| mutable_unknown_fields()->append(from.unknown_fields()); |
| } |
| |
| void CommandSendReceipt::CopyFrom(const CommandSendReceipt& from) { |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool CommandSendReceipt::IsInitialized() const { |
| if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; |
| |
| if (has_message_id()) { |
| if (!this->message_id().IsInitialized()) return false; |
| } |
| return true; |
| } |
| |
| void CommandSendReceipt::Swap(CommandSendReceipt* other) { |
| if (other != this) { |
| std::swap(producer_id_, other->producer_id_); |
| std::swap(sequence_id_, other->sequence_id_); |
| std::swap(message_id_, other->message_id_); |
| std::swap(_has_bits_[0], other->_has_bits_[0]); |
| _unknown_fields_.swap(other->_unknown_fields_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| } |
| |
| ::std::string CommandSendReceipt::GetTypeName() const { |
| return "pulsar.proto.CommandSendReceipt"; |
| } |
| |
| |
| // =================================================================== |
| |
| #ifndef _MSC_VER |
| const int CommandSendError::kProducerIdFieldNumber; |
| const int CommandSendError::kSequenceIdFieldNumber; |
| const int CommandSendError::kErrorFieldNumber; |
| const int CommandSendError::kMessageFieldNumber; |
| #endif // !_MSC_VER |
| |
| CommandSendError::CommandSendError() |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:pulsar.proto.CommandSendError) |
| } |
| |
| void CommandSendError::InitAsDefaultInstance() { |
| } |
| |
| CommandSendError::CommandSendError(const CommandSendError& from) |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:pulsar.proto.CommandSendError) |
| } |
| |
| void CommandSendError::SharedCtor() { |
| ::google::protobuf::internal::GetEmptyString(); |
| _cached_size_ = 0; |
| producer_id_ = GOOGLE_ULONGLONG(0); |
| sequence_id_ = GOOGLE_ULONGLONG(0); |
| error_ = 0; |
| message_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| } |
| |
| CommandSendError::~CommandSendError() { |
| // @@protoc_insertion_point(destructor:pulsar.proto.CommandSendError) |
| SharedDtor(); |
| } |
| |
| void CommandSendError::SharedDtor() { |
| if (message_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| delete message_; |
| } |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| if (this != &default_instance()) { |
| #else |
| if (this != default_instance_) { |
| #endif |
| } |
| } |
| |
| void CommandSendError::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const CommandSendError& CommandSendError::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_; |
| } |
| |
| CommandSendError* CommandSendError::default_instance_ = NULL; |
| |
| CommandSendError* CommandSendError::New() const { |
| return new CommandSendError; |
| } |
| |
| void CommandSendError::Clear() { |
| #define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \ |
| &reinterpret_cast<CommandSendError*>(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_(producer_id_, sequence_id_); |
| error_ = 0; |
| if (has_message()) { |
| if (message_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| message_->clear(); |
| } |
| } |
| } |
| |
| #undef OFFSET_OF_FIELD_ |
| #undef ZR_ |
| |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| mutable_unknown_fields()->clear(); |
| } |
| |
| bool CommandSendError::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.CommandSendError) |
| 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 producer_id = 1; |
| case 1: { |
| if (tag == 8) { |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( |
| input, &producer_id_))); |
| set_has_producer_id(); |
| } 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_error; |
| break; |
| } |
| |
| // required .pulsar.proto.ServerError error = 3; |
| case 3: { |
| if (tag == 24) { |
| parse_error: |
| int value; |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| input, &value))); |
| if (::pulsar::proto::ServerError_IsValid(value)) { |
| set_error(static_cast< ::pulsar::proto::ServerError >(value)); |
| } else { |
| unknown_fields_stream.WriteVarint32(tag); |
| unknown_fields_stream.WriteVarint32(value); |
| } |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(34)) goto parse_message; |
| break; |
| } |
| |
| // required string message = 4; |
| case 4: { |
| if (tag == 34) { |
| parse_message: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| input, this->mutable_message())); |
| } 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.CommandSendError) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:pulsar.proto.CommandSendError) |
| return false; |
| #undef DO_ |
| } |
| |
| void CommandSendError::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:pulsar.proto.CommandSendError) |
| // required uint64 producer_id = 1; |
| if (has_producer_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->producer_id(), output); |
| } |
| |
| // required uint64 sequence_id = 2; |
| if (has_sequence_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->sequence_id(), output); |
| } |
| |
| // required .pulsar.proto.ServerError error = 3; |
| if (has_error()) { |
| ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 3, this->error(), output); |
| } |
| |
| // required string message = 4; |
| if (has_message()) { |
| ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 4, this->message(), output); |
| } |
| |
| output->WriteRaw(unknown_fields().data(), |
| unknown_fields().size()); |
| // @@protoc_insertion_point(serialize_end:pulsar.proto.CommandSendError) |
| } |
| |
| int CommandSendError::ByteSize() const { |
| int total_size = 0; |
| |
| if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| // required uint64 producer_id = 1; |
| if (has_producer_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->producer_id()); |
| } |
| |
| // required uint64 sequence_id = 2; |
| if (has_sequence_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->sequence_id()); |
| } |
| |
| // required .pulsar.proto.ServerError error = 3; |
| if (has_error()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::EnumSize(this->error()); |
| } |
| |
| // required string message = 4; |
| if (has_message()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::StringSize( |
| this->message()); |
| } |
| |
| } |
| total_size += unknown_fields().size(); |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void CommandSendError::CheckTypeAndMergeFrom( |
| const ::google::protobuf::MessageLite& from) { |
| MergeFrom(*::google::protobuf::down_cast<const CommandSendError*>(&from)); |
| } |
| |
| void CommandSendError::MergeFrom(const CommandSendError& from) { |
| GOOGLE_CHECK_NE(&from, this); |
| if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| if (from.has_producer_id()) { |
| set_producer_id(from.producer_id()); |
| } |
| if (from.has_sequence_id()) { |
| set_sequence_id(from.sequence_id()); |
| } |
| if (from.has_error()) { |
| set_error(from.error()); |
| } |
| if (from.has_message()) { |
| set_message(from.message()); |
| } |
| } |
| mutable_unknown_fields()->append(from.unknown_fields()); |
| } |
| |
| void CommandSendError::CopyFrom(const CommandSendError& from) { |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool CommandSendError::IsInitialized() const { |
| if ((_has_bits_[0] & 0x0000000f) != 0x0000000f) return false; |
| |
| return true; |
| } |
| |
| void CommandSendError::Swap(CommandSendError* other) { |
| if (other != this) { |
| std::swap(producer_id_, other->producer_id_); |
| std::swap(sequence_id_, other->sequence_id_); |
| std::swap(error_, other->error_); |
| std::swap(message_, other->message_); |
| std::swap(_has_bits_[0], other->_has_bits_[0]); |
| _unknown_fields_.swap(other->_unknown_fields_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| } |
| |
| ::std::string CommandSendError::GetTypeName() const { |
| return "pulsar.proto.CommandSendError"; |
| } |
| |
| |
| // =================================================================== |
| |
| #ifndef _MSC_VER |
| const int CommandMessage::kConsumerIdFieldNumber; |
| const int CommandMessage::kMessageIdFieldNumber; |
| #endif // !_MSC_VER |
| |
| CommandMessage::CommandMessage() |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:pulsar.proto.CommandMessage) |
| } |
| |
| void CommandMessage::InitAsDefaultInstance() { |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| message_id_ = const_cast< ::pulsar::proto::MessageIdData*>( |
| ::pulsar::proto::MessageIdData::internal_default_instance()); |
| #else |
| message_id_ = const_cast< ::pulsar::proto::MessageIdData*>(&::pulsar::proto::MessageIdData::default_instance()); |
| #endif |
| } |
| |
| CommandMessage::CommandMessage(const CommandMessage& from) |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:pulsar.proto.CommandMessage) |
| } |
| |
| void CommandMessage::SharedCtor() { |
| _cached_size_ = 0; |
| consumer_id_ = GOOGLE_ULONGLONG(0); |
| message_id_ = NULL; |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| } |
| |
| CommandMessage::~CommandMessage() { |
| // @@protoc_insertion_point(destructor:pulsar.proto.CommandMessage) |
| SharedDtor(); |
| } |
| |
| void CommandMessage::SharedDtor() { |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| if (this != &default_instance()) { |
| #else |
| if (this != default_instance_) { |
| #endif |
| delete message_id_; |
| } |
| } |
| |
| void CommandMessage::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const CommandMessage& CommandMessage::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_; |
| } |
| |
| CommandMessage* CommandMessage::default_instance_ = NULL; |
| |
| CommandMessage* CommandMessage::New() const { |
| return new CommandMessage; |
| } |
| |
| void CommandMessage::Clear() { |
| if (_has_bits_[0 / 32] & 3) { |
| consumer_id_ = GOOGLE_ULONGLONG(0); |
| if (has_message_id()) { |
| if (message_id_ != NULL) message_id_->::pulsar::proto::MessageIdData::Clear(); |
| } |
| } |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| mutable_unknown_fields()->clear(); |
| } |
| |
| bool CommandMessage::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.CommandMessage) |
| 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 consumer_id = 1; |
| case 1: { |
| if (tag == 8) { |
| 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(18)) goto parse_message_id; |
| break; |
| } |
| |
| // required .pulsar.proto.MessageIdData message_id = 2; |
| case 2: { |
| if (tag == 18) { |
| parse_message_id: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_message_id())); |
| } 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.CommandMessage) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:pulsar.proto.CommandMessage) |
| return false; |
| #undef DO_ |
| } |
| |
| void CommandMessage::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:pulsar.proto.CommandMessage) |
| // required uint64 consumer_id = 1; |
| if (has_consumer_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->consumer_id(), output); |
| } |
| |
| // required .pulsar.proto.MessageIdData message_id = 2; |
| if (has_message_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 2, this->message_id(), output); |
| } |
| |
| output->WriteRaw(unknown_fields().data(), |
| unknown_fields().size()); |
| // @@protoc_insertion_point(serialize_end:pulsar.proto.CommandMessage) |
| } |
| |
| int CommandMessage::ByteSize() const { |
| int total_size = 0; |
| |
| if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| // required uint64 consumer_id = 1; |
| if (has_consumer_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->consumer_id()); |
| } |
| |
| // required .pulsar.proto.MessageIdData message_id = 2; |
| if (has_message_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->message_id()); |
| } |
| |
| } |
| total_size += unknown_fields().size(); |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void CommandMessage::CheckTypeAndMergeFrom( |
| const ::google::protobuf::MessageLite& from) { |
| MergeFrom(*::google::protobuf::down_cast<const CommandMessage*>(&from)); |
| } |
| |
| void CommandMessage::MergeFrom(const CommandMessage& from) { |
| GOOGLE_CHECK_NE(&from, this); |
| if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| if (from.has_consumer_id()) { |
| set_consumer_id(from.consumer_id()); |
| } |
| if (from.has_message_id()) { |
| mutable_message_id()->::pulsar::proto::MessageIdData::MergeFrom(from.message_id()); |
| } |
| } |
| mutable_unknown_fields()->append(from.unknown_fields()); |
| } |
| |
| void CommandMessage::CopyFrom(const CommandMessage& from) { |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool CommandMessage::IsInitialized() const { |
| if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; |
| |
| if (has_message_id()) { |
| if (!this->message_id().IsInitialized()) return false; |
| } |
| return true; |
| } |
| |
| void CommandMessage::Swap(CommandMessage* other) { |
| if (other != this) { |
| std::swap(consumer_id_, other->consumer_id_); |
| std::swap(message_id_, other->message_id_); |
| std::swap(_has_bits_[0], other->_has_bits_[0]); |
| _unknown_fields_.swap(other->_unknown_fields_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| } |
| |
| ::std::string CommandMessage::GetTypeName() const { |
| return "pulsar.proto.CommandMessage"; |
| } |
| |
| |
| // =================================================================== |
| |
| bool CommandAck_AckType_IsValid(int value) { |
| switch(value) { |
| case 0: |
| case 1: |
| return true; |
| default: |
| return false; |
| } |
| } |
| |
| #ifndef _MSC_VER |
| const CommandAck_AckType CommandAck::Individual; |
| const CommandAck_AckType CommandAck::Cumulative; |
| const CommandAck_AckType CommandAck::AckType_MIN; |
| const CommandAck_AckType CommandAck::AckType_MAX; |
| const int CommandAck::AckType_ARRAYSIZE; |
| #endif // _MSC_VER |
| bool CommandAck_ValidationError_IsValid(int value) { |
| switch(value) { |
| case 0: |
| case 1: |
| case 2: |
| case 3: |
| return true; |
| default: |
| return false; |
| } |
| } |
| |
| #ifndef _MSC_VER |
| const CommandAck_ValidationError CommandAck::UncompressedSizeCorruption; |
| const CommandAck_ValidationError CommandAck::DecompressionError; |
| const CommandAck_ValidationError CommandAck::ChecksumMismatch; |
| const CommandAck_ValidationError CommandAck::BatchDeSerializeError; |
| const CommandAck_ValidationError CommandAck::ValidationError_MIN; |
| const CommandAck_ValidationError CommandAck::ValidationError_MAX; |
| const int CommandAck::ValidationError_ARRAYSIZE; |
| #endif // _MSC_VER |
| #ifndef _MSC_VER |
| const int CommandAck::kConsumerIdFieldNumber; |
| const int CommandAck::kAckTypeFieldNumber; |
| const int CommandAck::kMessageIdFieldNumber; |
| const int CommandAck::kValidationErrorFieldNumber; |
| #endif // !_MSC_VER |
| |
| CommandAck::CommandAck() |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:pulsar.proto.CommandAck) |
| } |
| |
| void CommandAck::InitAsDefaultInstance() { |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| message_id_ = const_cast< ::pulsar::proto::MessageIdData*>( |
| ::pulsar::proto::MessageIdData::internal_default_instance()); |
| #else |
| message_id_ = const_cast< ::pulsar::proto::MessageIdData*>(&::pulsar::proto::MessageIdData::default_instance()); |
| #endif |
| } |
| |
| CommandAck::CommandAck(const CommandAck& from) |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:pulsar.proto.CommandAck) |
| } |
| |
| void CommandAck::SharedCtor() { |
| _cached_size_ = 0; |
| consumer_id_ = GOOGLE_ULONGLONG(0); |
| ack_type_ = 0; |
| message_id_ = NULL; |
| validation_error_ = 0; |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| } |
| |
| CommandAck::~CommandAck() { |
| // @@protoc_insertion_point(destructor:pulsar.proto.CommandAck) |
| SharedDtor(); |
| } |
| |
| void CommandAck::SharedDtor() { |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| if (this != &default_instance()) { |
| #else |
| if (this != default_instance_) { |
| #endif |
| delete message_id_; |
| } |
| } |
| |
| void CommandAck::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const CommandAck& CommandAck::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_; |
| } |
| |
| CommandAck* CommandAck::default_instance_ = NULL; |
| |
| CommandAck* CommandAck::New() const { |
| return new CommandAck; |
| } |
| |
| void CommandAck::Clear() { |
| #define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \ |
| &reinterpret_cast<CommandAck*>(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_(ack_type_, validation_error_); |
| consumer_id_ = GOOGLE_ULONGLONG(0); |
| if (has_message_id()) { |
| if (message_id_ != NULL) message_id_->::pulsar::proto::MessageIdData::Clear(); |
| } |
| } |
| |
| #undef OFFSET_OF_FIELD_ |
| #undef ZR_ |
| |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| mutable_unknown_fields()->clear(); |
| } |
| |
| bool CommandAck::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.CommandAck) |
| 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 consumer_id = 1; |
| case 1: { |
| if (tag == 8) { |
| 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(16)) goto parse_ack_type; |
| break; |
| } |
| |
| // required .pulsar.proto.CommandAck.AckType ack_type = 2; |
| case 2: { |
| if (tag == 16) { |
| parse_ack_type: |
| int value; |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| input, &value))); |
| if (::pulsar::proto::CommandAck_AckType_IsValid(value)) { |
| set_ack_type(static_cast< ::pulsar::proto::CommandAck_AckType >(value)); |
| } else { |
| unknown_fields_stream.WriteVarint32(tag); |
| unknown_fields_stream.WriteVarint32(value); |
| } |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(26)) goto parse_message_id; |
| break; |
| } |
| |
| // required .pulsar.proto.MessageIdData message_id = 3; |
| case 3: { |
| if (tag == 26) { |
| parse_message_id: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_message_id())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(32)) goto parse_validation_error; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandAck.ValidationError validation_error = 4; |
| case 4: { |
| if (tag == 32) { |
| parse_validation_error: |
| int value; |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| input, &value))); |
| if (::pulsar::proto::CommandAck_ValidationError_IsValid(value)) { |
| set_validation_error(static_cast< ::pulsar::proto::CommandAck_ValidationError >(value)); |
| } else { |
| unknown_fields_stream.WriteVarint32(tag); |
| unknown_fields_stream.WriteVarint32(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.CommandAck) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:pulsar.proto.CommandAck) |
| return false; |
| #undef DO_ |
| } |
| |
| void CommandAck::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:pulsar.proto.CommandAck) |
| // required uint64 consumer_id = 1; |
| if (has_consumer_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->consumer_id(), output); |
| } |
| |
| // required .pulsar.proto.CommandAck.AckType ack_type = 2; |
| if (has_ack_type()) { |
| ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 2, this->ack_type(), output); |
| } |
| |
| // required .pulsar.proto.MessageIdData message_id = 3; |
| if (has_message_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 3, this->message_id(), output); |
| } |
| |
| // optional .pulsar.proto.CommandAck.ValidationError validation_error = 4; |
| if (has_validation_error()) { |
| ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 4, this->validation_error(), output); |
| } |
| |
| output->WriteRaw(unknown_fields().data(), |
| unknown_fields().size()); |
| // @@protoc_insertion_point(serialize_end:pulsar.proto.CommandAck) |
| } |
| |
| int CommandAck::ByteSize() const { |
| int total_size = 0; |
| |
| if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| // required uint64 consumer_id = 1; |
| if (has_consumer_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->consumer_id()); |
| } |
| |
| // required .pulsar.proto.CommandAck.AckType ack_type = 2; |
| if (has_ack_type()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::EnumSize(this->ack_type()); |
| } |
| |
| // required .pulsar.proto.MessageIdData message_id = 3; |
| if (has_message_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->message_id()); |
| } |
| |
| // optional .pulsar.proto.CommandAck.ValidationError validation_error = 4; |
| if (has_validation_error()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::EnumSize(this->validation_error()); |
| } |
| |
| } |
| total_size += unknown_fields().size(); |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void CommandAck::CheckTypeAndMergeFrom( |
| const ::google::protobuf::MessageLite& from) { |
| MergeFrom(*::google::protobuf::down_cast<const CommandAck*>(&from)); |
| } |
| |
| void CommandAck::MergeFrom(const CommandAck& from) { |
| GOOGLE_CHECK_NE(&from, this); |
| if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| if (from.has_consumer_id()) { |
| set_consumer_id(from.consumer_id()); |
| } |
| if (from.has_ack_type()) { |
| set_ack_type(from.ack_type()); |
| } |
| if (from.has_message_id()) { |
| mutable_message_id()->::pulsar::proto::MessageIdData::MergeFrom(from.message_id()); |
| } |
| if (from.has_validation_error()) { |
| set_validation_error(from.validation_error()); |
| } |
| } |
| mutable_unknown_fields()->append(from.unknown_fields()); |
| } |
| |
| void CommandAck::CopyFrom(const CommandAck& from) { |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool CommandAck::IsInitialized() const { |
| if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false; |
| |
| if (has_message_id()) { |
| if (!this->message_id().IsInitialized()) return false; |
| } |
| return true; |
| } |
| |
| void CommandAck::Swap(CommandAck* other) { |
| if (other != this) { |
| std::swap(consumer_id_, other->consumer_id_); |
| std::swap(ack_type_, other->ack_type_); |
| std::swap(message_id_, other->message_id_); |
| std::swap(validation_error_, other->validation_error_); |
| std::swap(_has_bits_[0], other->_has_bits_[0]); |
| _unknown_fields_.swap(other->_unknown_fields_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| } |
| |
| ::std::string CommandAck::GetTypeName() const { |
| return "pulsar.proto.CommandAck"; |
| } |
| |
| |
| // =================================================================== |
| |
| #ifndef _MSC_VER |
| const int CommandFlow::kConsumerIdFieldNumber; |
| const int CommandFlow::kMessagePermitsFieldNumber; |
| #endif // !_MSC_VER |
| |
| CommandFlow::CommandFlow() |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:pulsar.proto.CommandFlow) |
| } |
| |
| void CommandFlow::InitAsDefaultInstance() { |
| } |
| |
| CommandFlow::CommandFlow(const CommandFlow& from) |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:pulsar.proto.CommandFlow) |
| } |
| |
| void CommandFlow::SharedCtor() { |
| _cached_size_ = 0; |
| consumer_id_ = GOOGLE_ULONGLONG(0); |
| messagepermits_ = 0u; |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| } |
| |
| CommandFlow::~CommandFlow() { |
| // @@protoc_insertion_point(destructor:pulsar.proto.CommandFlow) |
| SharedDtor(); |
| } |
| |
| void CommandFlow::SharedDtor() { |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| if (this != &default_instance()) { |
| #else |
| if (this != default_instance_) { |
| #endif |
| } |
| } |
| |
| void CommandFlow::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const CommandFlow& CommandFlow::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_; |
| } |
| |
| CommandFlow* CommandFlow::default_instance_ = NULL; |
| |
| CommandFlow* CommandFlow::New() const { |
| return new CommandFlow; |
| } |
| |
| void CommandFlow::Clear() { |
| #define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \ |
| &reinterpret_cast<CommandFlow*>(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) |
| |
| ZR_(consumer_id_, messagepermits_); |
| |
| #undef OFFSET_OF_FIELD_ |
| #undef ZR_ |
| |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| mutable_unknown_fields()->clear(); |
| } |
| |
| bool CommandFlow::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.CommandFlow) |
| 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 consumer_id = 1; |
| case 1: { |
| if (tag == 8) { |
| 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(16)) goto parse_messagePermits; |
| break; |
| } |
| |
| // required uint32 messagePermits = 2; |
| case 2: { |
| if (tag == 16) { |
| parse_messagePermits: |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( |
| input, &messagepermits_))); |
| set_has_messagepermits(); |
| } 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.CommandFlow) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:pulsar.proto.CommandFlow) |
| return false; |
| #undef DO_ |
| } |
| |
| void CommandFlow::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:pulsar.proto.CommandFlow) |
| // required uint64 consumer_id = 1; |
| if (has_consumer_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->consumer_id(), output); |
| } |
| |
| // required uint32 messagePermits = 2; |
| if (has_messagepermits()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->messagepermits(), output); |
| } |
| |
| output->WriteRaw(unknown_fields().data(), |
| unknown_fields().size()); |
| // @@protoc_insertion_point(serialize_end:pulsar.proto.CommandFlow) |
| } |
| |
| int CommandFlow::ByteSize() const { |
| int total_size = 0; |
| |
| if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| // required uint64 consumer_id = 1; |
| if (has_consumer_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->consumer_id()); |
| } |
| |
| // required uint32 messagePermits = 2; |
| if (has_messagepermits()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt32Size( |
| this->messagepermits()); |
| } |
| |
| } |
| total_size += unknown_fields().size(); |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void CommandFlow::CheckTypeAndMergeFrom( |
| const ::google::protobuf::MessageLite& from) { |
| MergeFrom(*::google::protobuf::down_cast<const CommandFlow*>(&from)); |
| } |
| |
| void CommandFlow::MergeFrom(const CommandFlow& from) { |
| GOOGLE_CHECK_NE(&from, this); |
| if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| if (from.has_consumer_id()) { |
| set_consumer_id(from.consumer_id()); |
| } |
| if (from.has_messagepermits()) { |
| set_messagepermits(from.messagepermits()); |
| } |
| } |
| mutable_unknown_fields()->append(from.unknown_fields()); |
| } |
| |
| void CommandFlow::CopyFrom(const CommandFlow& from) { |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool CommandFlow::IsInitialized() const { |
| if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; |
| |
| return true; |
| } |
| |
| void CommandFlow::Swap(CommandFlow* other) { |
| if (other != this) { |
| std::swap(consumer_id_, other->consumer_id_); |
| std::swap(messagepermits_, other->messagepermits_); |
| std::swap(_has_bits_[0], other->_has_bits_[0]); |
| _unknown_fields_.swap(other->_unknown_fields_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| } |
| |
| ::std::string CommandFlow::GetTypeName() const { |
| return "pulsar.proto.CommandFlow"; |
| } |
| |
| |
| // =================================================================== |
| |
| #ifndef _MSC_VER |
| const int CommandUnsubscribe::kConsumerIdFieldNumber; |
| const int CommandUnsubscribe::kRequestIdFieldNumber; |
| #endif // !_MSC_VER |
| |
| CommandUnsubscribe::CommandUnsubscribe() |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:pulsar.proto.CommandUnsubscribe) |
| } |
| |
| void CommandUnsubscribe::InitAsDefaultInstance() { |
| } |
| |
| CommandUnsubscribe::CommandUnsubscribe(const CommandUnsubscribe& from) |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:pulsar.proto.CommandUnsubscribe) |
| } |
| |
| void CommandUnsubscribe::SharedCtor() { |
| _cached_size_ = 0; |
| consumer_id_ = GOOGLE_ULONGLONG(0); |
| request_id_ = GOOGLE_ULONGLONG(0); |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| } |
| |
| CommandUnsubscribe::~CommandUnsubscribe() { |
| // @@protoc_insertion_point(destructor:pulsar.proto.CommandUnsubscribe) |
| SharedDtor(); |
| } |
| |
| void CommandUnsubscribe::SharedDtor() { |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| if (this != &default_instance()) { |
| #else |
| if (this != default_instance_) { |
| #endif |
| } |
| } |
| |
| void CommandUnsubscribe::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const CommandUnsubscribe& CommandUnsubscribe::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_; |
| } |
| |
| CommandUnsubscribe* CommandUnsubscribe::default_instance_ = NULL; |
| |
| CommandUnsubscribe* CommandUnsubscribe::New() const { |
| return new CommandUnsubscribe; |
| } |
| |
| void CommandUnsubscribe::Clear() { |
| #define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \ |
| &reinterpret_cast<CommandUnsubscribe*>(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) |
| |
| ZR_(consumer_id_, request_id_); |
| |
| #undef OFFSET_OF_FIELD_ |
| #undef ZR_ |
| |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| mutable_unknown_fields()->clear(); |
| } |
| |
| bool CommandUnsubscribe::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.CommandUnsubscribe) |
| 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 consumer_id = 1; |
| case 1: { |
| if (tag == 8) { |
| 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(16)) goto parse_request_id; |
| break; |
| } |
| |
| // required uint64 request_id = 2; |
| case 2: { |
| if (tag == 16) { |
| 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->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.CommandUnsubscribe) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:pulsar.proto.CommandUnsubscribe) |
| return false; |
| #undef DO_ |
| } |
| |
| void CommandUnsubscribe::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:pulsar.proto.CommandUnsubscribe) |
| // required uint64 consumer_id = 1; |
| if (has_consumer_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->consumer_id(), output); |
| } |
| |
| // required uint64 request_id = 2; |
| if (has_request_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->request_id(), output); |
| } |
| |
| output->WriteRaw(unknown_fields().data(), |
| unknown_fields().size()); |
| // @@protoc_insertion_point(serialize_end:pulsar.proto.CommandUnsubscribe) |
| } |
| |
| int CommandUnsubscribe::ByteSize() const { |
| int total_size = 0; |
| |
| if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| // required uint64 consumer_id = 1; |
| if (has_consumer_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->consumer_id()); |
| } |
| |
| // required uint64 request_id = 2; |
| if (has_request_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->request_id()); |
| } |
| |
| } |
| total_size += unknown_fields().size(); |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void CommandUnsubscribe::CheckTypeAndMergeFrom( |
| const ::google::protobuf::MessageLite& from) { |
| MergeFrom(*::google::protobuf::down_cast<const CommandUnsubscribe*>(&from)); |
| } |
| |
| void CommandUnsubscribe::MergeFrom(const CommandUnsubscribe& from) { |
| GOOGLE_CHECK_NE(&from, this); |
| if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| if (from.has_consumer_id()) { |
| set_consumer_id(from.consumer_id()); |
| } |
| if (from.has_request_id()) { |
| set_request_id(from.request_id()); |
| } |
| } |
| mutable_unknown_fields()->append(from.unknown_fields()); |
| } |
| |
| void CommandUnsubscribe::CopyFrom(const CommandUnsubscribe& from) { |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool CommandUnsubscribe::IsInitialized() const { |
| if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; |
| |
| return true; |
| } |
| |
| void CommandUnsubscribe::Swap(CommandUnsubscribe* other) { |
| if (other != this) { |
| std::swap(consumer_id_, other->consumer_id_); |
| std::swap(request_id_, other->request_id_); |
| std::swap(_has_bits_[0], other->_has_bits_[0]); |
| _unknown_fields_.swap(other->_unknown_fields_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| } |
| |
| ::std::string CommandUnsubscribe::GetTypeName() const { |
| return "pulsar.proto.CommandUnsubscribe"; |
| } |
| |
| |
| // =================================================================== |
| |
| #ifndef _MSC_VER |
| const int CommandCloseProducer::kProducerIdFieldNumber; |
| const int CommandCloseProducer::kRequestIdFieldNumber; |
| #endif // !_MSC_VER |
| |
| CommandCloseProducer::CommandCloseProducer() |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:pulsar.proto.CommandCloseProducer) |
| } |
| |
| void CommandCloseProducer::InitAsDefaultInstance() { |
| } |
| |
| CommandCloseProducer::CommandCloseProducer(const CommandCloseProducer& from) |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:pulsar.proto.CommandCloseProducer) |
| } |
| |
| void CommandCloseProducer::SharedCtor() { |
| _cached_size_ = 0; |
| producer_id_ = GOOGLE_ULONGLONG(0); |
| request_id_ = GOOGLE_ULONGLONG(0); |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| } |
| |
| CommandCloseProducer::~CommandCloseProducer() { |
| // @@protoc_insertion_point(destructor:pulsar.proto.CommandCloseProducer) |
| SharedDtor(); |
| } |
| |
| void CommandCloseProducer::SharedDtor() { |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| if (this != &default_instance()) { |
| #else |
| if (this != default_instance_) { |
| #endif |
| } |
| } |
| |
| void CommandCloseProducer::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const CommandCloseProducer& CommandCloseProducer::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_; |
| } |
| |
| CommandCloseProducer* CommandCloseProducer::default_instance_ = NULL; |
| |
| CommandCloseProducer* CommandCloseProducer::New() const { |
| return new CommandCloseProducer; |
| } |
| |
| void CommandCloseProducer::Clear() { |
| #define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \ |
| &reinterpret_cast<CommandCloseProducer*>(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) |
| |
| ZR_(producer_id_, request_id_); |
| |
| #undef OFFSET_OF_FIELD_ |
| #undef ZR_ |
| |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| mutable_unknown_fields()->clear(); |
| } |
| |
| bool CommandCloseProducer::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.CommandCloseProducer) |
| 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 producer_id = 1; |
| case 1: { |
| if (tag == 8) { |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( |
| input, &producer_id_))); |
| set_has_producer_id(); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(16)) goto parse_request_id; |
| break; |
| } |
| |
| // required uint64 request_id = 2; |
| case 2: { |
| if (tag == 16) { |
| 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->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.CommandCloseProducer) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:pulsar.proto.CommandCloseProducer) |
| return false; |
| #undef DO_ |
| } |
| |
| void CommandCloseProducer::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:pulsar.proto.CommandCloseProducer) |
| // required uint64 producer_id = 1; |
| if (has_producer_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->producer_id(), output); |
| } |
| |
| // required uint64 request_id = 2; |
| if (has_request_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->request_id(), output); |
| } |
| |
| output->WriteRaw(unknown_fields().data(), |
| unknown_fields().size()); |
| // @@protoc_insertion_point(serialize_end:pulsar.proto.CommandCloseProducer) |
| } |
| |
| int CommandCloseProducer::ByteSize() const { |
| int total_size = 0; |
| |
| if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| // required uint64 producer_id = 1; |
| if (has_producer_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->producer_id()); |
| } |
| |
| // required uint64 request_id = 2; |
| if (has_request_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->request_id()); |
| } |
| |
| } |
| total_size += unknown_fields().size(); |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void CommandCloseProducer::CheckTypeAndMergeFrom( |
| const ::google::protobuf::MessageLite& from) { |
| MergeFrom(*::google::protobuf::down_cast<const CommandCloseProducer*>(&from)); |
| } |
| |
| void CommandCloseProducer::MergeFrom(const CommandCloseProducer& from) { |
| GOOGLE_CHECK_NE(&from, this); |
| if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| if (from.has_producer_id()) { |
| set_producer_id(from.producer_id()); |
| } |
| if (from.has_request_id()) { |
| set_request_id(from.request_id()); |
| } |
| } |
| mutable_unknown_fields()->append(from.unknown_fields()); |
| } |
| |
| void CommandCloseProducer::CopyFrom(const CommandCloseProducer& from) { |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool CommandCloseProducer::IsInitialized() const { |
| if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; |
| |
| return true; |
| } |
| |
| void CommandCloseProducer::Swap(CommandCloseProducer* other) { |
| if (other != this) { |
| std::swap(producer_id_, other->producer_id_); |
| std::swap(request_id_, other->request_id_); |
| std::swap(_has_bits_[0], other->_has_bits_[0]); |
| _unknown_fields_.swap(other->_unknown_fields_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| } |
| |
| ::std::string CommandCloseProducer::GetTypeName() const { |
| return "pulsar.proto.CommandCloseProducer"; |
| } |
| |
| |
| // =================================================================== |
| |
| #ifndef _MSC_VER |
| const int CommandCloseConsumer::kConsumerIdFieldNumber; |
| const int CommandCloseConsumer::kRequestIdFieldNumber; |
| #endif // !_MSC_VER |
| |
| CommandCloseConsumer::CommandCloseConsumer() |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:pulsar.proto.CommandCloseConsumer) |
| } |
| |
| void CommandCloseConsumer::InitAsDefaultInstance() { |
| } |
| |
| CommandCloseConsumer::CommandCloseConsumer(const CommandCloseConsumer& from) |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:pulsar.proto.CommandCloseConsumer) |
| } |
| |
| void CommandCloseConsumer::SharedCtor() { |
| _cached_size_ = 0; |
| consumer_id_ = GOOGLE_ULONGLONG(0); |
| request_id_ = GOOGLE_ULONGLONG(0); |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| } |
| |
| CommandCloseConsumer::~CommandCloseConsumer() { |
| // @@protoc_insertion_point(destructor:pulsar.proto.CommandCloseConsumer) |
| SharedDtor(); |
| } |
| |
| void CommandCloseConsumer::SharedDtor() { |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| if (this != &default_instance()) { |
| #else |
| if (this != default_instance_) { |
| #endif |
| } |
| } |
| |
| void CommandCloseConsumer::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const CommandCloseConsumer& CommandCloseConsumer::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_; |
| } |
| |
| CommandCloseConsumer* CommandCloseConsumer::default_instance_ = NULL; |
| |
| CommandCloseConsumer* CommandCloseConsumer::New() const { |
| return new CommandCloseConsumer; |
| } |
| |
| void CommandCloseConsumer::Clear() { |
| #define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \ |
| &reinterpret_cast<CommandCloseConsumer*>(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) |
| |
| ZR_(consumer_id_, request_id_); |
| |
| #undef OFFSET_OF_FIELD_ |
| #undef ZR_ |
| |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| mutable_unknown_fields()->clear(); |
| } |
| |
| bool CommandCloseConsumer::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.CommandCloseConsumer) |
| 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 consumer_id = 1; |
| case 1: { |
| if (tag == 8) { |
| 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(16)) goto parse_request_id; |
| break; |
| } |
| |
| // required uint64 request_id = 2; |
| case 2: { |
| if (tag == 16) { |
| 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->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.CommandCloseConsumer) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:pulsar.proto.CommandCloseConsumer) |
| return false; |
| #undef DO_ |
| } |
| |
| void CommandCloseConsumer::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:pulsar.proto.CommandCloseConsumer) |
| // required uint64 consumer_id = 1; |
| if (has_consumer_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->consumer_id(), output); |
| } |
| |
| // required uint64 request_id = 2; |
| if (has_request_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->request_id(), output); |
| } |
| |
| output->WriteRaw(unknown_fields().data(), |
| unknown_fields().size()); |
| // @@protoc_insertion_point(serialize_end:pulsar.proto.CommandCloseConsumer) |
| } |
| |
| int CommandCloseConsumer::ByteSize() const { |
| int total_size = 0; |
| |
| if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| // required uint64 consumer_id = 1; |
| if (has_consumer_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->consumer_id()); |
| } |
| |
| // required uint64 request_id = 2; |
| if (has_request_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->request_id()); |
| } |
| |
| } |
| total_size += unknown_fields().size(); |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void CommandCloseConsumer::CheckTypeAndMergeFrom( |
| const ::google::protobuf::MessageLite& from) { |
| MergeFrom(*::google::protobuf::down_cast<const CommandCloseConsumer*>(&from)); |
| } |
| |
| void CommandCloseConsumer::MergeFrom(const CommandCloseConsumer& from) { |
| GOOGLE_CHECK_NE(&from, this); |
| if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| if (from.has_consumer_id()) { |
| set_consumer_id(from.consumer_id()); |
| } |
| if (from.has_request_id()) { |
| set_request_id(from.request_id()); |
| } |
| } |
| mutable_unknown_fields()->append(from.unknown_fields()); |
| } |
| |
| void CommandCloseConsumer::CopyFrom(const CommandCloseConsumer& from) { |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool CommandCloseConsumer::IsInitialized() const { |
| if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; |
| |
| return true; |
| } |
| |
| void CommandCloseConsumer::Swap(CommandCloseConsumer* other) { |
| if (other != this) { |
| std::swap(consumer_id_, other->consumer_id_); |
| std::swap(request_id_, other->request_id_); |
| std::swap(_has_bits_[0], other->_has_bits_[0]); |
| _unknown_fields_.swap(other->_unknown_fields_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| } |
| |
| ::std::string CommandCloseConsumer::GetTypeName() const { |
| return "pulsar.proto.CommandCloseConsumer"; |
| } |
| |
| |
| // =================================================================== |
| |
| #ifndef _MSC_VER |
| const int CommandRedeliverUnacknowledgedMessages::kConsumerIdFieldNumber; |
| const int CommandRedeliverUnacknowledgedMessages::kMessageIdsFieldNumber; |
| #endif // !_MSC_VER |
| |
| CommandRedeliverUnacknowledgedMessages::CommandRedeliverUnacknowledgedMessages() |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:pulsar.proto.CommandRedeliverUnacknowledgedMessages) |
| } |
| |
| void CommandRedeliverUnacknowledgedMessages::InitAsDefaultInstance() { |
| } |
| |
| CommandRedeliverUnacknowledgedMessages::CommandRedeliverUnacknowledgedMessages(const CommandRedeliverUnacknowledgedMessages& from) |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:pulsar.proto.CommandRedeliverUnacknowledgedMessages) |
| } |
| |
| void CommandRedeliverUnacknowledgedMessages::SharedCtor() { |
| _cached_size_ = 0; |
| consumer_id_ = GOOGLE_ULONGLONG(0); |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| } |
| |
| CommandRedeliverUnacknowledgedMessages::~CommandRedeliverUnacknowledgedMessages() { |
| // @@protoc_insertion_point(destructor:pulsar.proto.CommandRedeliverUnacknowledgedMessages) |
| SharedDtor(); |
| } |
| |
| void CommandRedeliverUnacknowledgedMessages::SharedDtor() { |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| if (this != &default_instance()) { |
| #else |
| if (this != default_instance_) { |
| #endif |
| } |
| } |
| |
| void CommandRedeliverUnacknowledgedMessages::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const CommandRedeliverUnacknowledgedMessages& CommandRedeliverUnacknowledgedMessages::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_; |
| } |
| |
| CommandRedeliverUnacknowledgedMessages* CommandRedeliverUnacknowledgedMessages::default_instance_ = NULL; |
| |
| CommandRedeliverUnacknowledgedMessages* CommandRedeliverUnacknowledgedMessages::New() const { |
| return new CommandRedeliverUnacknowledgedMessages; |
| } |
| |
| void CommandRedeliverUnacknowledgedMessages::Clear() { |
| consumer_id_ = GOOGLE_ULONGLONG(0); |
| message_ids_.Clear(); |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| mutable_unknown_fields()->clear(); |
| } |
| |
| bool CommandRedeliverUnacknowledgedMessages::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.CommandRedeliverUnacknowledgedMessages) |
| 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 consumer_id = 1; |
| case 1: { |
| if (tag == 8) { |
| 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(18)) goto parse_message_ids; |
| break; |
| } |
| |
| // repeated .pulsar.proto.MessageIdData message_ids = 2; |
| case 2: { |
| if (tag == 18) { |
| parse_message_ids: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, add_message_ids())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(18)) goto parse_message_ids; |
| 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.CommandRedeliverUnacknowledgedMessages) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:pulsar.proto.CommandRedeliverUnacknowledgedMessages) |
| return false; |
| #undef DO_ |
| } |
| |
| void CommandRedeliverUnacknowledgedMessages::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:pulsar.proto.CommandRedeliverUnacknowledgedMessages) |
| // required uint64 consumer_id = 1; |
| if (has_consumer_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->consumer_id(), output); |
| } |
| |
| // repeated .pulsar.proto.MessageIdData message_ids = 2; |
| for (int i = 0; i < this->message_ids_size(); i++) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 2, this->message_ids(i), output); |
| } |
| |
| output->WriteRaw(unknown_fields().data(), |
| unknown_fields().size()); |
| // @@protoc_insertion_point(serialize_end:pulsar.proto.CommandRedeliverUnacknowledgedMessages) |
| } |
| |
| int CommandRedeliverUnacknowledgedMessages::ByteSize() const { |
| int total_size = 0; |
| |
| if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| // required uint64 consumer_id = 1; |
| if (has_consumer_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->consumer_id()); |
| } |
| |
| } |
| // repeated .pulsar.proto.MessageIdData message_ids = 2; |
| total_size += 1 * this->message_ids_size(); |
| for (int i = 0; i < this->message_ids_size(); i++) { |
| total_size += |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->message_ids(i)); |
| } |
| |
| total_size += unknown_fields().size(); |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void CommandRedeliverUnacknowledgedMessages::CheckTypeAndMergeFrom( |
| const ::google::protobuf::MessageLite& from) { |
| MergeFrom(*::google::protobuf::down_cast<const CommandRedeliverUnacknowledgedMessages*>(&from)); |
| } |
| |
| void CommandRedeliverUnacknowledgedMessages::MergeFrom(const CommandRedeliverUnacknowledgedMessages& from) { |
| GOOGLE_CHECK_NE(&from, this); |
| message_ids_.MergeFrom(from.message_ids_); |
| if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| if (from.has_consumer_id()) { |
| set_consumer_id(from.consumer_id()); |
| } |
| } |
| mutable_unknown_fields()->append(from.unknown_fields()); |
| } |
| |
| void CommandRedeliverUnacknowledgedMessages::CopyFrom(const CommandRedeliverUnacknowledgedMessages& from) { |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool CommandRedeliverUnacknowledgedMessages::IsInitialized() const { |
| if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; |
| |
| if (!::google::protobuf::internal::AllAreInitialized(this->message_ids())) return false; |
| return true; |
| } |
| |
| void CommandRedeliverUnacknowledgedMessages::Swap(CommandRedeliverUnacknowledgedMessages* other) { |
| if (other != this) { |
| std::swap(consumer_id_, other->consumer_id_); |
| message_ids_.Swap(&other->message_ids_); |
| std::swap(_has_bits_[0], other->_has_bits_[0]); |
| _unknown_fields_.swap(other->_unknown_fields_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| } |
| |
| ::std::string CommandRedeliverUnacknowledgedMessages::GetTypeName() const { |
| return "pulsar.proto.CommandRedeliverUnacknowledgedMessages"; |
| } |
| |
| |
| // =================================================================== |
| |
| #ifndef _MSC_VER |
| const int CommandSuccess::kRequestIdFieldNumber; |
| #endif // !_MSC_VER |
| |
| CommandSuccess::CommandSuccess() |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:pulsar.proto.CommandSuccess) |
| } |
| |
| void CommandSuccess::InitAsDefaultInstance() { |
| } |
| |
| CommandSuccess::CommandSuccess(const CommandSuccess& from) |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:pulsar.proto.CommandSuccess) |
| } |
| |
| void CommandSuccess::SharedCtor() { |
| _cached_size_ = 0; |
| request_id_ = GOOGLE_ULONGLONG(0); |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| } |
| |
| CommandSuccess::~CommandSuccess() { |
| // @@protoc_insertion_point(destructor:pulsar.proto.CommandSuccess) |
| SharedDtor(); |
| } |
| |
| void CommandSuccess::SharedDtor() { |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| if (this != &default_instance()) { |
| #else |
| if (this != default_instance_) { |
| #endif |
| } |
| } |
| |
| void CommandSuccess::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const CommandSuccess& CommandSuccess::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_; |
| } |
| |
| CommandSuccess* CommandSuccess::default_instance_ = NULL; |
| |
| CommandSuccess* CommandSuccess::New() const { |
| return new CommandSuccess; |
| } |
| |
| void CommandSuccess::Clear() { |
| request_id_ = GOOGLE_ULONGLONG(0); |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| mutable_unknown_fields()->clear(); |
| } |
| |
| bool CommandSuccess::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.CommandSuccess) |
| 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 request_id = 1; |
| case 1: { |
| if (tag == 8) { |
| 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->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.CommandSuccess) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:pulsar.proto.CommandSuccess) |
| return false; |
| #undef DO_ |
| } |
| |
| void CommandSuccess::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:pulsar.proto.CommandSuccess) |
| // required uint64 request_id = 1; |
| if (has_request_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->request_id(), output); |
| } |
| |
| output->WriteRaw(unknown_fields().data(), |
| unknown_fields().size()); |
| // @@protoc_insertion_point(serialize_end:pulsar.proto.CommandSuccess) |
| } |
| |
| int CommandSuccess::ByteSize() const { |
| int total_size = 0; |
| |
| if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| // required uint64 request_id = 1; |
| if (has_request_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->request_id()); |
| } |
| |
| } |
| total_size += unknown_fields().size(); |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void CommandSuccess::CheckTypeAndMergeFrom( |
| const ::google::protobuf::MessageLite& from) { |
| MergeFrom(*::google::protobuf::down_cast<const CommandSuccess*>(&from)); |
| } |
| |
| void CommandSuccess::MergeFrom(const CommandSuccess& from) { |
| GOOGLE_CHECK_NE(&from, this); |
| if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| if (from.has_request_id()) { |
| set_request_id(from.request_id()); |
| } |
| } |
| mutable_unknown_fields()->append(from.unknown_fields()); |
| } |
| |
| void CommandSuccess::CopyFrom(const CommandSuccess& from) { |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool CommandSuccess::IsInitialized() const { |
| if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; |
| |
| return true; |
| } |
| |
| void CommandSuccess::Swap(CommandSuccess* other) { |
| if (other != this) { |
| std::swap(request_id_, other->request_id_); |
| std::swap(_has_bits_[0], other->_has_bits_[0]); |
| _unknown_fields_.swap(other->_unknown_fields_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| } |
| |
| ::std::string CommandSuccess::GetTypeName() const { |
| return "pulsar.proto.CommandSuccess"; |
| } |
| |
| |
| // =================================================================== |
| |
| #ifndef _MSC_VER |
| const int CommandProducerSuccess::kRequestIdFieldNumber; |
| const int CommandProducerSuccess::kProducerNameFieldNumber; |
| #endif // !_MSC_VER |
| |
| CommandProducerSuccess::CommandProducerSuccess() |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:pulsar.proto.CommandProducerSuccess) |
| } |
| |
| void CommandProducerSuccess::InitAsDefaultInstance() { |
| } |
| |
| CommandProducerSuccess::CommandProducerSuccess(const CommandProducerSuccess& from) |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:pulsar.proto.CommandProducerSuccess) |
| } |
| |
| void CommandProducerSuccess::SharedCtor() { |
| ::google::protobuf::internal::GetEmptyString(); |
| _cached_size_ = 0; |
| request_id_ = GOOGLE_ULONGLONG(0); |
| producer_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| } |
| |
| CommandProducerSuccess::~CommandProducerSuccess() { |
| // @@protoc_insertion_point(destructor:pulsar.proto.CommandProducerSuccess) |
| SharedDtor(); |
| } |
| |
| void CommandProducerSuccess::SharedDtor() { |
| if (producer_name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| delete producer_name_; |
| } |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| if (this != &default_instance()) { |
| #else |
| if (this != default_instance_) { |
| #endif |
| } |
| } |
| |
| void CommandProducerSuccess::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const CommandProducerSuccess& CommandProducerSuccess::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_; |
| } |
| |
| CommandProducerSuccess* CommandProducerSuccess::default_instance_ = NULL; |
| |
| CommandProducerSuccess* CommandProducerSuccess::New() const { |
| return new CommandProducerSuccess; |
| } |
| |
| void CommandProducerSuccess::Clear() { |
| if (_has_bits_[0 / 32] & 3) { |
| request_id_ = GOOGLE_ULONGLONG(0); |
| if (has_producer_name()) { |
| if (producer_name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| producer_name_->clear(); |
| } |
| } |
| } |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| mutable_unknown_fields()->clear(); |
| } |
| |
| bool CommandProducerSuccess::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.CommandProducerSuccess) |
| 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 request_id = 1; |
| case 1: { |
| if (tag == 8) { |
| 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(18)) goto parse_producer_name; |
| break; |
| } |
| |
| // required string producer_name = 2; |
| case 2: { |
| if (tag == 18) { |
| parse_producer_name: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| input, this->mutable_producer_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.CommandProducerSuccess) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:pulsar.proto.CommandProducerSuccess) |
| return false; |
| #undef DO_ |
| } |
| |
| void CommandProducerSuccess::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:pulsar.proto.CommandProducerSuccess) |
| // required uint64 request_id = 1; |
| if (has_request_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->request_id(), output); |
| } |
| |
| // required string producer_name = 2; |
| if (has_producer_name()) { |
| ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 2, this->producer_name(), output); |
| } |
| |
| output->WriteRaw(unknown_fields().data(), |
| unknown_fields().size()); |
| // @@protoc_insertion_point(serialize_end:pulsar.proto.CommandProducerSuccess) |
| } |
| |
| int CommandProducerSuccess::ByteSize() const { |
| int total_size = 0; |
| |
| if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| // required uint64 request_id = 1; |
| if (has_request_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->request_id()); |
| } |
| |
| // required string producer_name = 2; |
| if (has_producer_name()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::StringSize( |
| this->producer_name()); |
| } |
| |
| } |
| total_size += unknown_fields().size(); |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void CommandProducerSuccess::CheckTypeAndMergeFrom( |
| const ::google::protobuf::MessageLite& from) { |
| MergeFrom(*::google::protobuf::down_cast<const CommandProducerSuccess*>(&from)); |
| } |
| |
| void CommandProducerSuccess::MergeFrom(const CommandProducerSuccess& from) { |
| GOOGLE_CHECK_NE(&from, this); |
| if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| if (from.has_request_id()) { |
| set_request_id(from.request_id()); |
| } |
| if (from.has_producer_name()) { |
| set_producer_name(from.producer_name()); |
| } |
| } |
| mutable_unknown_fields()->append(from.unknown_fields()); |
| } |
| |
| void CommandProducerSuccess::CopyFrom(const CommandProducerSuccess& from) { |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool CommandProducerSuccess::IsInitialized() const { |
| if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; |
| |
| return true; |
| } |
| |
| void CommandProducerSuccess::Swap(CommandProducerSuccess* other) { |
| if (other != this) { |
| std::swap(request_id_, other->request_id_); |
| std::swap(producer_name_, other->producer_name_); |
| std::swap(_has_bits_[0], other->_has_bits_[0]); |
| _unknown_fields_.swap(other->_unknown_fields_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| } |
| |
| ::std::string CommandProducerSuccess::GetTypeName() const { |
| return "pulsar.proto.CommandProducerSuccess"; |
| } |
| |
| |
| // =================================================================== |
| |
| #ifndef _MSC_VER |
| const int CommandError::kRequestIdFieldNumber; |
| const int CommandError::kErrorFieldNumber; |
| const int CommandError::kMessageFieldNumber; |
| #endif // !_MSC_VER |
| |
| CommandError::CommandError() |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:pulsar.proto.CommandError) |
| } |
| |
| void CommandError::InitAsDefaultInstance() { |
| } |
| |
| CommandError::CommandError(const CommandError& from) |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:pulsar.proto.CommandError) |
| } |
| |
| void CommandError::SharedCtor() { |
| ::google::protobuf::internal::GetEmptyString(); |
| _cached_size_ = 0; |
| request_id_ = GOOGLE_ULONGLONG(0); |
| error_ = 0; |
| message_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| } |
| |
| CommandError::~CommandError() { |
| // @@protoc_insertion_point(destructor:pulsar.proto.CommandError) |
| SharedDtor(); |
| } |
| |
| void CommandError::SharedDtor() { |
| if (message_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| delete message_; |
| } |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| if (this != &default_instance()) { |
| #else |
| if (this != default_instance_) { |
| #endif |
| } |
| } |
| |
| void CommandError::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const CommandError& CommandError::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_; |
| } |
| |
| CommandError* CommandError::default_instance_ = NULL; |
| |
| CommandError* CommandError::New() const { |
| return new CommandError; |
| } |
| |
| void CommandError::Clear() { |
| if (_has_bits_[0 / 32] & 7) { |
| request_id_ = GOOGLE_ULONGLONG(0); |
| error_ = 0; |
| if (has_message()) { |
| if (message_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| message_->clear(); |
| } |
| } |
| } |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| mutable_unknown_fields()->clear(); |
| } |
| |
| bool CommandError::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.CommandError) |
| 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 request_id = 1; |
| case 1: { |
| if (tag == 8) { |
| 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(16)) goto parse_error; |
| break; |
| } |
| |
| // required .pulsar.proto.ServerError error = 2; |
| case 2: { |
| if (tag == 16) { |
| parse_error: |
| int value; |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| input, &value))); |
| if (::pulsar::proto::ServerError_IsValid(value)) { |
| set_error(static_cast< ::pulsar::proto::ServerError >(value)); |
| } else { |
| unknown_fields_stream.WriteVarint32(tag); |
| unknown_fields_stream.WriteVarint32(value); |
| } |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(26)) goto parse_message; |
| break; |
| } |
| |
| // required string message = 3; |
| case 3: { |
| if (tag == 26) { |
| parse_message: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| input, this->mutable_message())); |
| } 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.CommandError) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:pulsar.proto.CommandError) |
| return false; |
| #undef DO_ |
| } |
| |
| void CommandError::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:pulsar.proto.CommandError) |
| // required uint64 request_id = 1; |
| if (has_request_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->request_id(), output); |
| } |
| |
| // required .pulsar.proto.ServerError error = 2; |
| if (has_error()) { |
| ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 2, this->error(), output); |
| } |
| |
| // required string message = 3; |
| if (has_message()) { |
| ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 3, this->message(), output); |
| } |
| |
| output->WriteRaw(unknown_fields().data(), |
| unknown_fields().size()); |
| // @@protoc_insertion_point(serialize_end:pulsar.proto.CommandError) |
| } |
| |
| int CommandError::ByteSize() const { |
| int total_size = 0; |
| |
| if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| // required uint64 request_id = 1; |
| if (has_request_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->request_id()); |
| } |
| |
| // required .pulsar.proto.ServerError error = 2; |
| if (has_error()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::EnumSize(this->error()); |
| } |
| |
| // required string message = 3; |
| if (has_message()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::StringSize( |
| this->message()); |
| } |
| |
| } |
| total_size += unknown_fields().size(); |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void CommandError::CheckTypeAndMergeFrom( |
| const ::google::protobuf::MessageLite& from) { |
| MergeFrom(*::google::protobuf::down_cast<const CommandError*>(&from)); |
| } |
| |
| void CommandError::MergeFrom(const CommandError& from) { |
| GOOGLE_CHECK_NE(&from, this); |
| if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| if (from.has_request_id()) { |
| set_request_id(from.request_id()); |
| } |
| if (from.has_error()) { |
| set_error(from.error()); |
| } |
| if (from.has_message()) { |
| set_message(from.message()); |
| } |
| } |
| mutable_unknown_fields()->append(from.unknown_fields()); |
| } |
| |
| void CommandError::CopyFrom(const CommandError& from) { |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool CommandError::IsInitialized() const { |
| if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false; |
| |
| return true; |
| } |
| |
| void CommandError::Swap(CommandError* other) { |
| if (other != this) { |
| std::swap(request_id_, other->request_id_); |
| std::swap(error_, other->error_); |
| std::swap(message_, other->message_); |
| std::swap(_has_bits_[0], other->_has_bits_[0]); |
| _unknown_fields_.swap(other->_unknown_fields_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| } |
| |
| ::std::string CommandError::GetTypeName() const { |
| return "pulsar.proto.CommandError"; |
| } |
| |
| |
| // =================================================================== |
| |
| #ifndef _MSC_VER |
| #endif // !_MSC_VER |
| |
| CommandPing::CommandPing() |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:pulsar.proto.CommandPing) |
| } |
| |
| void CommandPing::InitAsDefaultInstance() { |
| } |
| |
| CommandPing::CommandPing(const CommandPing& from) |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:pulsar.proto.CommandPing) |
| } |
| |
| void CommandPing::SharedCtor() { |
| _cached_size_ = 0; |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| } |
| |
| CommandPing::~CommandPing() { |
| // @@protoc_insertion_point(destructor:pulsar.proto.CommandPing) |
| SharedDtor(); |
| } |
| |
| void CommandPing::SharedDtor() { |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| if (this != &default_instance()) { |
| #else |
| if (this != default_instance_) { |
| #endif |
| } |
| } |
| |
| void CommandPing::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const CommandPing& CommandPing::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_; |
| } |
| |
| CommandPing* CommandPing::default_instance_ = NULL; |
| |
| CommandPing* CommandPing::New() const { |
| return new CommandPing; |
| } |
| |
| void CommandPing::Clear() { |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| mutable_unknown_fields()->clear(); |
| } |
| |
| bool CommandPing::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.CommandPing) |
| for (;;) { |
| ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| tag = p.first; |
| if (!p.second) goto handle_unusual; |
| 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)); |
| } |
| success: |
| // @@protoc_insertion_point(parse_success:pulsar.proto.CommandPing) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:pulsar.proto.CommandPing) |
| return false; |
| #undef DO_ |
| } |
| |
| void CommandPing::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:pulsar.proto.CommandPing) |
| output->WriteRaw(unknown_fields().data(), |
| unknown_fields().size()); |
| // @@protoc_insertion_point(serialize_end:pulsar.proto.CommandPing) |
| } |
| |
| int CommandPing::ByteSize() const { |
| int total_size = 0; |
| |
| total_size += unknown_fields().size(); |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void CommandPing::CheckTypeAndMergeFrom( |
| const ::google::protobuf::MessageLite& from) { |
| MergeFrom(*::google::protobuf::down_cast<const CommandPing*>(&from)); |
| } |
| |
| void CommandPing::MergeFrom(const CommandPing& from) { |
| GOOGLE_CHECK_NE(&from, this); |
| mutable_unknown_fields()->append(from.unknown_fields()); |
| } |
| |
| void CommandPing::CopyFrom(const CommandPing& from) { |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool CommandPing::IsInitialized() const { |
| |
| return true; |
| } |
| |
| void CommandPing::Swap(CommandPing* other) { |
| if (other != this) { |
| _unknown_fields_.swap(other->_unknown_fields_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| } |
| |
| ::std::string CommandPing::GetTypeName() const { |
| return "pulsar.proto.CommandPing"; |
| } |
| |
| |
| // =================================================================== |
| |
| #ifndef _MSC_VER |
| #endif // !_MSC_VER |
| |
| CommandPong::CommandPong() |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:pulsar.proto.CommandPong) |
| } |
| |
| void CommandPong::InitAsDefaultInstance() { |
| } |
| |
| CommandPong::CommandPong(const CommandPong& from) |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:pulsar.proto.CommandPong) |
| } |
| |
| void CommandPong::SharedCtor() { |
| _cached_size_ = 0; |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| } |
| |
| CommandPong::~CommandPong() { |
| // @@protoc_insertion_point(destructor:pulsar.proto.CommandPong) |
| SharedDtor(); |
| } |
| |
| void CommandPong::SharedDtor() { |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| if (this != &default_instance()) { |
| #else |
| if (this != default_instance_) { |
| #endif |
| } |
| } |
| |
| void CommandPong::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const CommandPong& CommandPong::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_; |
| } |
| |
| CommandPong* CommandPong::default_instance_ = NULL; |
| |
| CommandPong* CommandPong::New() const { |
| return new CommandPong; |
| } |
| |
| void CommandPong::Clear() { |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| mutable_unknown_fields()->clear(); |
| } |
| |
| bool CommandPong::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.CommandPong) |
| for (;;) { |
| ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); |
| tag = p.first; |
| if (!p.second) goto handle_unusual; |
| 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)); |
| } |
| success: |
| // @@protoc_insertion_point(parse_success:pulsar.proto.CommandPong) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:pulsar.proto.CommandPong) |
| return false; |
| #undef DO_ |
| } |
| |
| void CommandPong::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:pulsar.proto.CommandPong) |
| output->WriteRaw(unknown_fields().data(), |
| unknown_fields().size()); |
| // @@protoc_insertion_point(serialize_end:pulsar.proto.CommandPong) |
| } |
| |
| int CommandPong::ByteSize() const { |
| int total_size = 0; |
| |
| total_size += unknown_fields().size(); |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void CommandPong::CheckTypeAndMergeFrom( |
| const ::google::protobuf::MessageLite& from) { |
| MergeFrom(*::google::protobuf::down_cast<const CommandPong*>(&from)); |
| } |
| |
| void CommandPong::MergeFrom(const CommandPong& from) { |
| GOOGLE_CHECK_NE(&from, this); |
| mutable_unknown_fields()->append(from.unknown_fields()); |
| } |
| |
| void CommandPong::CopyFrom(const CommandPong& from) { |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool CommandPong::IsInitialized() const { |
| |
| return true; |
| } |
| |
| void CommandPong::Swap(CommandPong* other) { |
| if (other != this) { |
| _unknown_fields_.swap(other->_unknown_fields_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| } |
| |
| ::std::string CommandPong::GetTypeName() const { |
| return "pulsar.proto.CommandPong"; |
| } |
| |
| |
| // =================================================================== |
| |
| #ifndef _MSC_VER |
| const int CommandConsumerStats::kRequestIdFieldNumber; |
| const int CommandConsumerStats::kConsumerIdFieldNumber; |
| #endif // !_MSC_VER |
| |
| CommandConsumerStats::CommandConsumerStats() |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:pulsar.proto.CommandConsumerStats) |
| } |
| |
| void CommandConsumerStats::InitAsDefaultInstance() { |
| } |
| |
| CommandConsumerStats::CommandConsumerStats(const CommandConsumerStats& from) |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:pulsar.proto.CommandConsumerStats) |
| } |
| |
| void CommandConsumerStats::SharedCtor() { |
| _cached_size_ = 0; |
| request_id_ = GOOGLE_ULONGLONG(0); |
| consumer_id_ = GOOGLE_ULONGLONG(0); |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| } |
| |
| CommandConsumerStats::~CommandConsumerStats() { |
| // @@protoc_insertion_point(destructor:pulsar.proto.CommandConsumerStats) |
| SharedDtor(); |
| } |
| |
| void CommandConsumerStats::SharedDtor() { |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| if (this != &default_instance()) { |
| #else |
| if (this != default_instance_) { |
| #endif |
| } |
| } |
| |
| void CommandConsumerStats::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const CommandConsumerStats& CommandConsumerStats::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_; |
| } |
| |
| CommandConsumerStats* CommandConsumerStats::default_instance_ = NULL; |
| |
| CommandConsumerStats* CommandConsumerStats::New() const { |
| return new CommandConsumerStats; |
| } |
| |
| void CommandConsumerStats::Clear() { |
| #define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \ |
| &reinterpret_cast<CommandConsumerStats*>(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) |
| |
| ZR_(request_id_, consumer_id_); |
| |
| #undef OFFSET_OF_FIELD_ |
| #undef ZR_ |
| |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| mutable_unknown_fields()->clear(); |
| } |
| |
| bool CommandConsumerStats::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.CommandConsumerStats) |
| 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 request_id = 1; |
| case 1: { |
| if (tag == 8) { |
| 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(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->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.CommandConsumerStats) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:pulsar.proto.CommandConsumerStats) |
| return false; |
| #undef DO_ |
| } |
| |
| void CommandConsumerStats::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:pulsar.proto.CommandConsumerStats) |
| // required uint64 request_id = 1; |
| if (has_request_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->request_id(), output); |
| } |
| |
| // required uint64 consumer_id = 4; |
| if (has_consumer_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->consumer_id(), output); |
| } |
| |
| output->WriteRaw(unknown_fields().data(), |
| unknown_fields().size()); |
| // @@protoc_insertion_point(serialize_end:pulsar.proto.CommandConsumerStats) |
| } |
| |
| int CommandConsumerStats::ByteSize() const { |
| int total_size = 0; |
| |
| if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| // required uint64 request_id = 1; |
| if (has_request_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->request_id()); |
| } |
| |
| // required uint64 consumer_id = 4; |
| if (has_consumer_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->consumer_id()); |
| } |
| |
| } |
| total_size += unknown_fields().size(); |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void CommandConsumerStats::CheckTypeAndMergeFrom( |
| const ::google::protobuf::MessageLite& from) { |
| MergeFrom(*::google::protobuf::down_cast<const CommandConsumerStats*>(&from)); |
| } |
| |
| void CommandConsumerStats::MergeFrom(const CommandConsumerStats& from) { |
| GOOGLE_CHECK_NE(&from, this); |
| if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| if (from.has_request_id()) { |
| set_request_id(from.request_id()); |
| } |
| if (from.has_consumer_id()) { |
| set_consumer_id(from.consumer_id()); |
| } |
| } |
| mutable_unknown_fields()->append(from.unknown_fields()); |
| } |
| |
| void CommandConsumerStats::CopyFrom(const CommandConsumerStats& from) { |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool CommandConsumerStats::IsInitialized() const { |
| if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; |
| |
| return true; |
| } |
| |
| void CommandConsumerStats::Swap(CommandConsumerStats* other) { |
| if (other != this) { |
| std::swap(request_id_, other->request_id_); |
| std::swap(consumer_id_, other->consumer_id_); |
| std::swap(_has_bits_[0], other->_has_bits_[0]); |
| _unknown_fields_.swap(other->_unknown_fields_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| } |
| |
| ::std::string CommandConsumerStats::GetTypeName() const { |
| return "pulsar.proto.CommandConsumerStats"; |
| } |
| |
| |
| // =================================================================== |
| |
| #ifndef _MSC_VER |
| const int CommandConsumerStatsResponse::kRequestIdFieldNumber; |
| const int CommandConsumerStatsResponse::kErrorCodeFieldNumber; |
| const int CommandConsumerStatsResponse::kErrorMessageFieldNumber; |
| const int CommandConsumerStatsResponse::kMsgRateOutFieldNumber; |
| const int CommandConsumerStatsResponse::kMsgThroughputOutFieldNumber; |
| const int CommandConsumerStatsResponse::kMsgRateRedeliverFieldNumber; |
| const int CommandConsumerStatsResponse::kConsumerNameFieldNumber; |
| const int CommandConsumerStatsResponse::kAvailablePermitsFieldNumber; |
| const int CommandConsumerStatsResponse::kUnackedMessagesFieldNumber; |
| const int CommandConsumerStatsResponse::kBlockedConsumerOnUnackedMsgsFieldNumber; |
| const int CommandConsumerStatsResponse::kAddressFieldNumber; |
| const int CommandConsumerStatsResponse::kConnectedSinceFieldNumber; |
| const int CommandConsumerStatsResponse::kTypeFieldNumber; |
| const int CommandConsumerStatsResponse::kMsgRateExpiredFieldNumber; |
| const int CommandConsumerStatsResponse::kMsgBacklogFieldNumber; |
| #endif // !_MSC_VER |
| |
| CommandConsumerStatsResponse::CommandConsumerStatsResponse() |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:pulsar.proto.CommandConsumerStatsResponse) |
| } |
| |
| void CommandConsumerStatsResponse::InitAsDefaultInstance() { |
| } |
| |
| CommandConsumerStatsResponse::CommandConsumerStatsResponse(const CommandConsumerStatsResponse& from) |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:pulsar.proto.CommandConsumerStatsResponse) |
| } |
| |
| void CommandConsumerStatsResponse::SharedCtor() { |
| ::google::protobuf::internal::GetEmptyString(); |
| _cached_size_ = 0; |
| request_id_ = GOOGLE_ULONGLONG(0); |
| error_code_ = 0; |
| error_message_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| msgrateout_ = 0; |
| msgthroughputout_ = 0; |
| msgrateredeliver_ = 0; |
| consumername_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| availablepermits_ = GOOGLE_ULONGLONG(0); |
| unackedmessages_ = GOOGLE_ULONGLONG(0); |
| blockedconsumeronunackedmsgs_ = false; |
| address_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| connectedsince_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| type_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| msgrateexpired_ = 0; |
| msgbacklog_ = GOOGLE_ULONGLONG(0); |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| } |
| |
| CommandConsumerStatsResponse::~CommandConsumerStatsResponse() { |
| // @@protoc_insertion_point(destructor:pulsar.proto.CommandConsumerStatsResponse) |
| SharedDtor(); |
| } |
| |
| void CommandConsumerStatsResponse::SharedDtor() { |
| if (error_message_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| delete error_message_; |
| } |
| if (consumername_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| delete consumername_; |
| } |
| if (address_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| delete address_; |
| } |
| if (connectedsince_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| delete connectedsince_; |
| } |
| if (type_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| delete type_; |
| } |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| if (this != &default_instance()) { |
| #else |
| if (this != default_instance_) { |
| #endif |
| } |
| } |
| |
| void CommandConsumerStatsResponse::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const CommandConsumerStatsResponse& CommandConsumerStatsResponse::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_; |
| } |
| |
| CommandConsumerStatsResponse* CommandConsumerStatsResponse::default_instance_ = NULL; |
| |
| CommandConsumerStatsResponse* CommandConsumerStatsResponse::New() const { |
| return new CommandConsumerStatsResponse; |
| } |
| |
| void CommandConsumerStatsResponse::Clear() { |
| #define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \ |
| &reinterpret_cast<CommandConsumerStatsResponse*>(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] & 255) { |
| ZR_(msgrateout_, error_code_); |
| request_id_ = GOOGLE_ULONGLONG(0); |
| if (has_error_message()) { |
| if (error_message_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| error_message_->clear(); |
| } |
| } |
| if (has_consumername()) { |
| if (consumername_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| consumername_->clear(); |
| } |
| } |
| availablepermits_ = GOOGLE_ULONGLONG(0); |
| } |
| if (_has_bits_[8 / 32] & 32512) { |
| ZR_(msgrateexpired_, msgbacklog_); |
| unackedmessages_ = GOOGLE_ULONGLONG(0); |
| blockedconsumeronunackedmsgs_ = false; |
| if (has_address()) { |
| if (address_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| address_->clear(); |
| } |
| } |
| if (has_connectedsince()) { |
| if (connectedsince_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| connectedsince_->clear(); |
| } |
| } |
| if (has_type()) { |
| if (type_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { |
| type_->clear(); |
| } |
| } |
| } |
| |
| #undef OFFSET_OF_FIELD_ |
| #undef ZR_ |
| |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| mutable_unknown_fields()->clear(); |
| } |
| |
| bool CommandConsumerStatsResponse::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.CommandConsumerStatsResponse) |
| 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 request_id = 1; |
| case 1: { |
| if (tag == 8) { |
| 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(16)) goto parse_error_code; |
| break; |
| } |
| |
| // optional .pulsar.proto.ServerError error_code = 2; |
| case 2: { |
| if (tag == 16) { |
| parse_error_code: |
| int value; |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| input, &value))); |
| if (::pulsar::proto::ServerError_IsValid(value)) { |
| set_error_code(static_cast< ::pulsar::proto::ServerError >(value)); |
| } else { |
| unknown_fields_stream.WriteVarint32(tag); |
| unknown_fields_stream.WriteVarint32(value); |
| } |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(26)) goto parse_error_message; |
| break; |
| } |
| |
| // optional string error_message = 3; |
| case 3: { |
| if (tag == 26) { |
| parse_error_message: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| input, this->mutable_error_message())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(33)) goto parse_msgRateOut; |
| break; |
| } |
| |
| // optional double msgRateOut = 4; |
| case 4: { |
| if (tag == 33) { |
| parse_msgRateOut: |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( |
| input, &msgrateout_))); |
| set_has_msgrateout(); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(41)) goto parse_msgThroughputOut; |
| break; |
| } |
| |
| // optional double msgThroughputOut = 5; |
| case 5: { |
| if (tag == 41) { |
| parse_msgThroughputOut: |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( |
| input, &msgthroughputout_))); |
| set_has_msgthroughputout(); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(49)) goto parse_msgRateRedeliver; |
| break; |
| } |
| |
| // optional double msgRateRedeliver = 6; |
| case 6: { |
| if (tag == 49) { |
| parse_msgRateRedeliver: |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( |
| input, &msgrateredeliver_))); |
| set_has_msgrateredeliver(); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(58)) goto parse_consumerName; |
| break; |
| } |
| |
| // optional string consumerName = 7; |
| case 7: { |
| if (tag == 58) { |
| parse_consumerName: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| input, this->mutable_consumername())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(64)) goto parse_availablePermits; |
| break; |
| } |
| |
| // optional uint64 availablePermits = 8; |
| case 8: { |
| if (tag == 64) { |
| parse_availablePermits: |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( |
| input, &availablepermits_))); |
| set_has_availablepermits(); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(72)) goto parse_unackedMessages; |
| break; |
| } |
| |
| // optional uint64 unackedMessages = 9; |
| case 9: { |
| if (tag == 72) { |
| parse_unackedMessages: |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( |
| input, &unackedmessages_))); |
| set_has_unackedmessages(); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(80)) goto parse_blockedConsumerOnUnackedMsgs; |
| break; |
| } |
| |
| // optional bool blockedConsumerOnUnackedMsgs = 10; |
| case 10: { |
| if (tag == 80) { |
| parse_blockedConsumerOnUnackedMsgs: |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| input, &blockedconsumeronunackedmsgs_))); |
| set_has_blockedconsumeronunackedmsgs(); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(90)) goto parse_address; |
| break; |
| } |
| |
| // optional string address = 11; |
| case 11: { |
| if (tag == 90) { |
| parse_address: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| input, this->mutable_address())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(98)) goto parse_connectedSince; |
| break; |
| } |
| |
| // optional string connectedSince = 12; |
| case 12: { |
| if (tag == 98) { |
| parse_connectedSince: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| input, this->mutable_connectedsince())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(106)) goto parse_type; |
| break; |
| } |
| |
| // optional string type = 13; |
| case 13: { |
| if (tag == 106) { |
| parse_type: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| input, this->mutable_type())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(113)) goto parse_msgRateExpired; |
| break; |
| } |
| |
| // optional double msgRateExpired = 14; |
| case 14: { |
| if (tag == 113) { |
| parse_msgRateExpired: |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( |
| input, &msgrateexpired_))); |
| set_has_msgrateexpired(); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(120)) goto parse_msgBacklog; |
| break; |
| } |
| |
| // optional uint64 msgBacklog = 15; |
| case 15: { |
| if (tag == 120) { |
| parse_msgBacklog: |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( |
| input, &msgbacklog_))); |
| set_has_msgbacklog(); |
| } 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.CommandConsumerStatsResponse) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:pulsar.proto.CommandConsumerStatsResponse) |
| return false; |
| #undef DO_ |
| } |
| |
| void CommandConsumerStatsResponse::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:pulsar.proto.CommandConsumerStatsResponse) |
| // required uint64 request_id = 1; |
| if (has_request_id()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->request_id(), output); |
| } |
| |
| // optional .pulsar.proto.ServerError error_code = 2; |
| if (has_error_code()) { |
| ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 2, this->error_code(), output); |
| } |
| |
| // optional string error_message = 3; |
| if (has_error_message()) { |
| ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 3, this->error_message(), output); |
| } |
| |
| // optional double msgRateOut = 4; |
| if (has_msgrateout()) { |
| ::google::protobuf::internal::WireFormatLite::WriteDouble(4, this->msgrateout(), output); |
| } |
| |
| // optional double msgThroughputOut = 5; |
| if (has_msgthroughputout()) { |
| ::google::protobuf::internal::WireFormatLite::WriteDouble(5, this->msgthroughputout(), output); |
| } |
| |
| // optional double msgRateRedeliver = 6; |
| if (has_msgrateredeliver()) { |
| ::google::protobuf::internal::WireFormatLite::WriteDouble(6, this->msgrateredeliver(), output); |
| } |
| |
| // optional string consumerName = 7; |
| if (has_consumername()) { |
| ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 7, this->consumername(), output); |
| } |
| |
| // optional uint64 availablePermits = 8; |
| if (has_availablepermits()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(8, this->availablepermits(), output); |
| } |
| |
| // optional uint64 unackedMessages = 9; |
| if (has_unackedmessages()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(9, this->unackedmessages(), output); |
| } |
| |
| // optional bool blockedConsumerOnUnackedMsgs = 10; |
| if (has_blockedconsumeronunackedmsgs()) { |
| ::google::protobuf::internal::WireFormatLite::WriteBool(10, this->blockedconsumeronunackedmsgs(), output); |
| } |
| |
| // optional string address = 11; |
| if (has_address()) { |
| ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 11, this->address(), output); |
| } |
| |
| // optional string connectedSince = 12; |
| if (has_connectedsince()) { |
| ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 12, this->connectedsince(), output); |
| } |
| |
| // optional string type = 13; |
| if (has_type()) { |
| ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 13, this->type(), output); |
| } |
| |
| // optional double msgRateExpired = 14; |
| if (has_msgrateexpired()) { |
| ::google::protobuf::internal::WireFormatLite::WriteDouble(14, this->msgrateexpired(), output); |
| } |
| |
| // optional uint64 msgBacklog = 15; |
| if (has_msgbacklog()) { |
| ::google::protobuf::internal::WireFormatLite::WriteUInt64(15, this->msgbacklog(), output); |
| } |
| |
| output->WriteRaw(unknown_fields().data(), |
| unknown_fields().size()); |
| // @@protoc_insertion_point(serialize_end:pulsar.proto.CommandConsumerStatsResponse) |
| } |
| |
| int CommandConsumerStatsResponse::ByteSize() const { |
| int total_size = 0; |
| |
| if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| // required uint64 request_id = 1; |
| if (has_request_id()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->request_id()); |
| } |
| |
| // optional .pulsar.proto.ServerError error_code = 2; |
| if (has_error_code()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::EnumSize(this->error_code()); |
| } |
| |
| // optional string error_message = 3; |
| if (has_error_message()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::StringSize( |
| this->error_message()); |
| } |
| |
| // optional double msgRateOut = 4; |
| if (has_msgrateout()) { |
| total_size += 1 + 8; |
| } |
| |
| // optional double msgThroughputOut = 5; |
| if (has_msgthroughputout()) { |
| total_size += 1 + 8; |
| } |
| |
| // optional double msgRateRedeliver = 6; |
| if (has_msgrateredeliver()) { |
| total_size += 1 + 8; |
| } |
| |
| // optional string consumerName = 7; |
| if (has_consumername()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::StringSize( |
| this->consumername()); |
| } |
| |
| // optional uint64 availablePermits = 8; |
| if (has_availablepermits()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->availablepermits()); |
| } |
| |
| } |
| if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) { |
| // optional uint64 unackedMessages = 9; |
| if (has_unackedmessages()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->unackedmessages()); |
| } |
| |
| // optional bool blockedConsumerOnUnackedMsgs = 10; |
| if (has_blockedconsumeronunackedmsgs()) { |
| total_size += 1 + 1; |
| } |
| |
| // optional string address = 11; |
| if (has_address()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::StringSize( |
| this->address()); |
| } |
| |
| // optional string connectedSince = 12; |
| if (has_connectedsince()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::StringSize( |
| this->connectedsince()); |
| } |
| |
| // optional string type = 13; |
| if (has_type()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::StringSize( |
| this->type()); |
| } |
| |
| // optional double msgRateExpired = 14; |
| if (has_msgrateexpired()) { |
| total_size += 1 + 8; |
| } |
| |
| // optional uint64 msgBacklog = 15; |
| if (has_msgbacklog()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::UInt64Size( |
| this->msgbacklog()); |
| } |
| |
| } |
| total_size += unknown_fields().size(); |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void CommandConsumerStatsResponse::CheckTypeAndMergeFrom( |
| const ::google::protobuf::MessageLite& from) { |
| MergeFrom(*::google::protobuf::down_cast<const CommandConsumerStatsResponse*>(&from)); |
| } |
| |
| void CommandConsumerStatsResponse::MergeFrom(const CommandConsumerStatsResponse& from) { |
| GOOGLE_CHECK_NE(&from, this); |
| if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| if (from.has_request_id()) { |
| set_request_id(from.request_id()); |
| } |
| if (from.has_error_code()) { |
| set_error_code(from.error_code()); |
| } |
| if (from.has_error_message()) { |
| set_error_message(from.error_message()); |
| } |
| if (from.has_msgrateout()) { |
| set_msgrateout(from.msgrateout()); |
| } |
| if (from.has_msgthroughputout()) { |
| set_msgthroughputout(from.msgthroughputout()); |
| } |
| if (from.has_msgrateredeliver()) { |
| set_msgrateredeliver(from.msgrateredeliver()); |
| } |
| if (from.has_consumername()) { |
| set_consumername(from.consumername()); |
| } |
| if (from.has_availablepermits()) { |
| set_availablepermits(from.availablepermits()); |
| } |
| } |
| if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) { |
| if (from.has_unackedmessages()) { |
| set_unackedmessages(from.unackedmessages()); |
| } |
| if (from.has_blockedconsumeronunackedmsgs()) { |
| set_blockedconsumeronunackedmsgs(from.blockedconsumeronunackedmsgs()); |
| } |
| if (from.has_address()) { |
| set_address(from.address()); |
| } |
| if (from.has_connectedsince()) { |
| set_connectedsince(from.connectedsince()); |
| } |
| if (from.has_type()) { |
| set_type(from.type()); |
| } |
| if (from.has_msgrateexpired()) { |
| set_msgrateexpired(from.msgrateexpired()); |
| } |
| if (from.has_msgbacklog()) { |
| set_msgbacklog(from.msgbacklog()); |
| } |
| } |
| mutable_unknown_fields()->append(from.unknown_fields()); |
| } |
| |
| void CommandConsumerStatsResponse::CopyFrom(const CommandConsumerStatsResponse& from) { |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool CommandConsumerStatsResponse::IsInitialized() const { |
| if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; |
| |
| return true; |
| } |
| |
| void CommandConsumerStatsResponse::Swap(CommandConsumerStatsResponse* other) { |
| if (other != this) { |
| std::swap(request_id_, other->request_id_); |
| std::swap(error_code_, other->error_code_); |
| std::swap(error_message_, other->error_message_); |
| std::swap(msgrateout_, other->msgrateout_); |
| std::swap(msgthroughputout_, other->msgthroughputout_); |
| std::swap(msgrateredeliver_, other->msgrateredeliver_); |
| std::swap(consumername_, other->consumername_); |
| std::swap(availablepermits_, other->availablepermits_); |
| std::swap(unackedmessages_, other->unackedmessages_); |
| std::swap(blockedconsumeronunackedmsgs_, other->blockedconsumeronunackedmsgs_); |
| std::swap(address_, other->address_); |
| std::swap(connectedsince_, other->connectedsince_); |
| std::swap(type_, other->type_); |
| std::swap(msgrateexpired_, other->msgrateexpired_); |
| std::swap(msgbacklog_, other->msgbacklog_); |
| std::swap(_has_bits_[0], other->_has_bits_[0]); |
| _unknown_fields_.swap(other->_unknown_fields_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| } |
| |
| ::std::string CommandConsumerStatsResponse::GetTypeName() const { |
| return "pulsar.proto.CommandConsumerStatsResponse"; |
| } |
| |
| |
| // =================================================================== |
| |
| bool BaseCommand_Type_IsValid(int value) { |
| switch(value) { |
| case 2: |
| case 3: |
| case 4: |
| case 5: |
| case 6: |
| case 7: |
| case 8: |
| case 9: |
| case 10: |
| case 11: |
| case 12: |
| case 13: |
| case 14: |
| case 15: |
| case 16: |
| case 17: |
| case 18: |
| case 19: |
| case 20: |
| case 21: |
| case 22: |
| case 23: |
| case 24: |
| case 25: |
| case 26: |
| return true; |
| default: |
| return false; |
| } |
| } |
| |
| #ifndef _MSC_VER |
| const BaseCommand_Type BaseCommand::CONNECT; |
| const BaseCommand_Type BaseCommand::CONNECTED; |
| const BaseCommand_Type BaseCommand::SUBSCRIBE; |
| const BaseCommand_Type BaseCommand::PRODUCER; |
| const BaseCommand_Type BaseCommand::SEND; |
| const BaseCommand_Type BaseCommand::SEND_RECEIPT; |
| const BaseCommand_Type BaseCommand::SEND_ERROR; |
| const BaseCommand_Type BaseCommand::MESSAGE; |
| const BaseCommand_Type BaseCommand::ACK; |
| const BaseCommand_Type BaseCommand::FLOW; |
| const BaseCommand_Type BaseCommand::UNSUBSCRIBE; |
| const BaseCommand_Type BaseCommand::SUCCESS; |
| const BaseCommand_Type BaseCommand::ERROR; |
| const BaseCommand_Type BaseCommand::CLOSE_PRODUCER; |
| const BaseCommand_Type BaseCommand::CLOSE_CONSUMER; |
| const BaseCommand_Type BaseCommand::PRODUCER_SUCCESS; |
| const BaseCommand_Type BaseCommand::PING; |
| const BaseCommand_Type BaseCommand::PONG; |
| const BaseCommand_Type BaseCommand::REDELIVER_UNACKNOWLEDGED_MESSAGES; |
| const BaseCommand_Type BaseCommand::PARTITIONED_METADATA; |
| const BaseCommand_Type BaseCommand::PARTITIONED_METADATA_RESPONSE; |
| const BaseCommand_Type BaseCommand::LOOKUP; |
| const BaseCommand_Type BaseCommand::LOOKUP_RESPONSE; |
| const BaseCommand_Type BaseCommand::CONSUMER_STATS; |
| const BaseCommand_Type BaseCommand::CONSUMER_STATS_RESPONSE; |
| const BaseCommand_Type BaseCommand::Type_MIN; |
| const BaseCommand_Type BaseCommand::Type_MAX; |
| const int BaseCommand::Type_ARRAYSIZE; |
| #endif // _MSC_VER |
| #ifndef _MSC_VER |
| const int BaseCommand::kTypeFieldNumber; |
| const int BaseCommand::kConnectFieldNumber; |
| const int BaseCommand::kConnectedFieldNumber; |
| const int BaseCommand::kSubscribeFieldNumber; |
| const int BaseCommand::kProducerFieldNumber; |
| const int BaseCommand::kSendFieldNumber; |
| const int BaseCommand::kSendReceiptFieldNumber; |
| const int BaseCommand::kSendErrorFieldNumber; |
| const int BaseCommand::kMessageFieldNumber; |
| const int BaseCommand::kAckFieldNumber; |
| const int BaseCommand::kFlowFieldNumber; |
| const int BaseCommand::kUnsubscribeFieldNumber; |
| const int BaseCommand::kSuccessFieldNumber; |
| const int BaseCommand::kErrorFieldNumber; |
| const int BaseCommand::kCloseProducerFieldNumber; |
| const int BaseCommand::kCloseConsumerFieldNumber; |
| const int BaseCommand::kProducerSuccessFieldNumber; |
| const int BaseCommand::kPingFieldNumber; |
| const int BaseCommand::kPongFieldNumber; |
| const int BaseCommand::kRedeliverUnacknowledgedMessagesFieldNumber; |
| const int BaseCommand::kPartitionMetadataFieldNumber; |
| const int BaseCommand::kPartitionMetadataResponseFieldNumber; |
| const int BaseCommand::kLookupTopicFieldNumber; |
| const int BaseCommand::kLookupTopicResponseFieldNumber; |
| const int BaseCommand::kConsumerStatsFieldNumber; |
| const int BaseCommand::kConsumerStatsResponseFieldNumber; |
| #endif // !_MSC_VER |
| |
| BaseCommand::BaseCommand() |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:pulsar.proto.BaseCommand) |
| } |
| |
| void BaseCommand::InitAsDefaultInstance() { |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| connect_ = const_cast< ::pulsar::proto::CommandConnect*>( |
| ::pulsar::proto::CommandConnect::internal_default_instance()); |
| #else |
| connect_ = const_cast< ::pulsar::proto::CommandConnect*>(&::pulsar::proto::CommandConnect::default_instance()); |
| #endif |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| connected_ = const_cast< ::pulsar::proto::CommandConnected*>( |
| ::pulsar::proto::CommandConnected::internal_default_instance()); |
| #else |
| connected_ = const_cast< ::pulsar::proto::CommandConnected*>(&::pulsar::proto::CommandConnected::default_instance()); |
| #endif |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| subscribe_ = const_cast< ::pulsar::proto::CommandSubscribe*>( |
| ::pulsar::proto::CommandSubscribe::internal_default_instance()); |
| #else |
| subscribe_ = const_cast< ::pulsar::proto::CommandSubscribe*>(&::pulsar::proto::CommandSubscribe::default_instance()); |
| #endif |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| producer_ = const_cast< ::pulsar::proto::CommandProducer*>( |
| ::pulsar::proto::CommandProducer::internal_default_instance()); |
| #else |
| producer_ = const_cast< ::pulsar::proto::CommandProducer*>(&::pulsar::proto::CommandProducer::default_instance()); |
| #endif |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| send_ = const_cast< ::pulsar::proto::CommandSend*>( |
| ::pulsar::proto::CommandSend::internal_default_instance()); |
| #else |
| send_ = const_cast< ::pulsar::proto::CommandSend*>(&::pulsar::proto::CommandSend::default_instance()); |
| #endif |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| send_receipt_ = const_cast< ::pulsar::proto::CommandSendReceipt*>( |
| ::pulsar::proto::CommandSendReceipt::internal_default_instance()); |
| #else |
| send_receipt_ = const_cast< ::pulsar::proto::CommandSendReceipt*>(&::pulsar::proto::CommandSendReceipt::default_instance()); |
| #endif |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| send_error_ = const_cast< ::pulsar::proto::CommandSendError*>( |
| ::pulsar::proto::CommandSendError::internal_default_instance()); |
| #else |
| send_error_ = const_cast< ::pulsar::proto::CommandSendError*>(&::pulsar::proto::CommandSendError::default_instance()); |
| #endif |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| message_ = const_cast< ::pulsar::proto::CommandMessage*>( |
| ::pulsar::proto::CommandMessage::internal_default_instance()); |
| #else |
| message_ = const_cast< ::pulsar::proto::CommandMessage*>(&::pulsar::proto::CommandMessage::default_instance()); |
| #endif |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| ack_ = const_cast< ::pulsar::proto::CommandAck*>( |
| ::pulsar::proto::CommandAck::internal_default_instance()); |
| #else |
| ack_ = const_cast< ::pulsar::proto::CommandAck*>(&::pulsar::proto::CommandAck::default_instance()); |
| #endif |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| flow_ = const_cast< ::pulsar::proto::CommandFlow*>( |
| ::pulsar::proto::CommandFlow::internal_default_instance()); |
| #else |
| flow_ = const_cast< ::pulsar::proto::CommandFlow*>(&::pulsar::proto::CommandFlow::default_instance()); |
| #endif |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| unsubscribe_ = const_cast< ::pulsar::proto::CommandUnsubscribe*>( |
| ::pulsar::proto::CommandUnsubscribe::internal_default_instance()); |
| #else |
| unsubscribe_ = const_cast< ::pulsar::proto::CommandUnsubscribe*>(&::pulsar::proto::CommandUnsubscribe::default_instance()); |
| #endif |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| success_ = const_cast< ::pulsar::proto::CommandSuccess*>( |
| ::pulsar::proto::CommandSuccess::internal_default_instance()); |
| #else |
| success_ = const_cast< ::pulsar::proto::CommandSuccess*>(&::pulsar::proto::CommandSuccess::default_instance()); |
| #endif |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| error_ = const_cast< ::pulsar::proto::CommandError*>( |
| ::pulsar::proto::CommandError::internal_default_instance()); |
| #else |
| error_ = const_cast< ::pulsar::proto::CommandError*>(&::pulsar::proto::CommandError::default_instance()); |
| #endif |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| close_producer_ = const_cast< ::pulsar::proto::CommandCloseProducer*>( |
| ::pulsar::proto::CommandCloseProducer::internal_default_instance()); |
| #else |
| close_producer_ = const_cast< ::pulsar::proto::CommandCloseProducer*>(&::pulsar::proto::CommandCloseProducer::default_instance()); |
| #endif |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| close_consumer_ = const_cast< ::pulsar::proto::CommandCloseConsumer*>( |
| ::pulsar::proto::CommandCloseConsumer::internal_default_instance()); |
| #else |
| close_consumer_ = const_cast< ::pulsar::proto::CommandCloseConsumer*>(&::pulsar::proto::CommandCloseConsumer::default_instance()); |
| #endif |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| producer_success_ = const_cast< ::pulsar::proto::CommandProducerSuccess*>( |
| ::pulsar::proto::CommandProducerSuccess::internal_default_instance()); |
| #else |
| producer_success_ = const_cast< ::pulsar::proto::CommandProducerSuccess*>(&::pulsar::proto::CommandProducerSuccess::default_instance()); |
| #endif |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| ping_ = const_cast< ::pulsar::proto::CommandPing*>( |
| ::pulsar::proto::CommandPing::internal_default_instance()); |
| #else |
| ping_ = const_cast< ::pulsar::proto::CommandPing*>(&::pulsar::proto::CommandPing::default_instance()); |
| #endif |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| pong_ = const_cast< ::pulsar::proto::CommandPong*>( |
| ::pulsar::proto::CommandPong::internal_default_instance()); |
| #else |
| pong_ = const_cast< ::pulsar::proto::CommandPong*>(&::pulsar::proto::CommandPong::default_instance()); |
| #endif |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| redeliverunacknowledgedmessages_ = const_cast< ::pulsar::proto::CommandRedeliverUnacknowledgedMessages*>( |
| ::pulsar::proto::CommandRedeliverUnacknowledgedMessages::internal_default_instance()); |
| #else |
| redeliverunacknowledgedmessages_ = const_cast< ::pulsar::proto::CommandRedeliverUnacknowledgedMessages*>(&::pulsar::proto::CommandRedeliverUnacknowledgedMessages::default_instance()); |
| #endif |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| partitionmetadata_ = const_cast< ::pulsar::proto::CommandPartitionedTopicMetadata*>( |
| ::pulsar::proto::CommandPartitionedTopicMetadata::internal_default_instance()); |
| #else |
| partitionmetadata_ = const_cast< ::pulsar::proto::CommandPartitionedTopicMetadata*>(&::pulsar::proto::CommandPartitionedTopicMetadata::default_instance()); |
| #endif |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| partitionmetadataresponse_ = const_cast< ::pulsar::proto::CommandPartitionedTopicMetadataResponse*>( |
| ::pulsar::proto::CommandPartitionedTopicMetadataResponse::internal_default_instance()); |
| #else |
| partitionmetadataresponse_ = const_cast< ::pulsar::proto::CommandPartitionedTopicMetadataResponse*>(&::pulsar::proto::CommandPartitionedTopicMetadataResponse::default_instance()); |
| #endif |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| lookuptopic_ = const_cast< ::pulsar::proto::CommandLookupTopic*>( |
| ::pulsar::proto::CommandLookupTopic::internal_default_instance()); |
| #else |
| lookuptopic_ = const_cast< ::pulsar::proto::CommandLookupTopic*>(&::pulsar::proto::CommandLookupTopic::default_instance()); |
| #endif |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| lookuptopicresponse_ = const_cast< ::pulsar::proto::CommandLookupTopicResponse*>( |
| ::pulsar::proto::CommandLookupTopicResponse::internal_default_instance()); |
| #else |
| lookuptopicresponse_ = const_cast< ::pulsar::proto::CommandLookupTopicResponse*>(&::pulsar::proto::CommandLookupTopicResponse::default_instance()); |
| #endif |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| consumerstats_ = const_cast< ::pulsar::proto::CommandConsumerStats*>( |
| ::pulsar::proto::CommandConsumerStats::internal_default_instance()); |
| #else |
| consumerstats_ = const_cast< ::pulsar::proto::CommandConsumerStats*>(&::pulsar::proto::CommandConsumerStats::default_instance()); |
| #endif |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| consumerstatsresponse_ = const_cast< ::pulsar::proto::CommandConsumerStatsResponse*>( |
| ::pulsar::proto::CommandConsumerStatsResponse::internal_default_instance()); |
| #else |
| consumerstatsresponse_ = const_cast< ::pulsar::proto::CommandConsumerStatsResponse*>(&::pulsar::proto::CommandConsumerStatsResponse::default_instance()); |
| #endif |
| } |
| |
| BaseCommand::BaseCommand(const BaseCommand& from) |
| : ::google::protobuf::MessageLite() { |
| SharedCtor(); |
| MergeFrom(from); |
| // @@protoc_insertion_point(copy_constructor:pulsar.proto.BaseCommand) |
| } |
| |
| void BaseCommand::SharedCtor() { |
| _cached_size_ = 0; |
| type_ = 2; |
| connect_ = NULL; |
| connected_ = NULL; |
| subscribe_ = NULL; |
| producer_ = NULL; |
| send_ = NULL; |
| send_receipt_ = NULL; |
| send_error_ = NULL; |
| message_ = NULL; |
| ack_ = NULL; |
| flow_ = NULL; |
| unsubscribe_ = NULL; |
| success_ = NULL; |
| error_ = NULL; |
| close_producer_ = NULL; |
| close_consumer_ = NULL; |
| producer_success_ = NULL; |
| ping_ = NULL; |
| pong_ = NULL; |
| redeliverunacknowledgedmessages_ = NULL; |
| partitionmetadata_ = NULL; |
| partitionmetadataresponse_ = NULL; |
| lookuptopic_ = NULL; |
| lookuptopicresponse_ = NULL; |
| consumerstats_ = NULL; |
| consumerstatsresponse_ = NULL; |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| } |
| |
| BaseCommand::~BaseCommand() { |
| // @@protoc_insertion_point(destructor:pulsar.proto.BaseCommand) |
| SharedDtor(); |
| } |
| |
| void BaseCommand::SharedDtor() { |
| #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER |
| if (this != &default_instance()) { |
| #else |
| if (this != default_instance_) { |
| #endif |
| delete connect_; |
| delete connected_; |
| delete subscribe_; |
| delete producer_; |
| delete send_; |
| delete send_receipt_; |
| delete send_error_; |
| delete message_; |
| delete ack_; |
| delete flow_; |
| delete unsubscribe_; |
| delete success_; |
| delete error_; |
| delete close_producer_; |
| delete close_consumer_; |
| delete producer_success_; |
| delete ping_; |
| delete pong_; |
| delete redeliverunacknowledgedmessages_; |
| delete partitionmetadata_; |
| delete partitionmetadataresponse_; |
| delete lookuptopic_; |
| delete lookuptopicresponse_; |
| delete consumerstats_; |
| delete consumerstatsresponse_; |
| } |
| } |
| |
| void BaseCommand::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const BaseCommand& BaseCommand::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_; |
| } |
| |
| BaseCommand* BaseCommand::default_instance_ = NULL; |
| |
| BaseCommand* BaseCommand::New() const { |
| return new BaseCommand; |
| } |
| |
| void BaseCommand::Clear() { |
| if (_has_bits_[0 / 32] & 255) { |
| type_ = 2; |
| if (has_connect()) { |
| if (connect_ != NULL) connect_->::pulsar::proto::CommandConnect::Clear(); |
| } |
| if (has_connected()) { |
| if (connected_ != NULL) connected_->::pulsar::proto::CommandConnected::Clear(); |
| } |
| if (has_subscribe()) { |
| if (subscribe_ != NULL) subscribe_->::pulsar::proto::CommandSubscribe::Clear(); |
| } |
| if (has_producer()) { |
| if (producer_ != NULL) producer_->::pulsar::proto::CommandProducer::Clear(); |
| } |
| if (has_send()) { |
| if (send_ != NULL) send_->::pulsar::proto::CommandSend::Clear(); |
| } |
| if (has_send_receipt()) { |
| if (send_receipt_ != NULL) send_receipt_->::pulsar::proto::CommandSendReceipt::Clear(); |
| } |
| if (has_send_error()) { |
| if (send_error_ != NULL) send_error_->::pulsar::proto::CommandSendError::Clear(); |
| } |
| } |
| if (_has_bits_[8 / 32] & 65280) { |
| if (has_message()) { |
| if (message_ != NULL) message_->::pulsar::proto::CommandMessage::Clear(); |
| } |
| if (has_ack()) { |
| if (ack_ != NULL) ack_->::pulsar::proto::CommandAck::Clear(); |
| } |
| if (has_flow()) { |
| if (flow_ != NULL) flow_->::pulsar::proto::CommandFlow::Clear(); |
| } |
| if (has_unsubscribe()) { |
| if (unsubscribe_ != NULL) unsubscribe_->::pulsar::proto::CommandUnsubscribe::Clear(); |
| } |
| if (has_success()) { |
| if (success_ != NULL) success_->::pulsar::proto::CommandSuccess::Clear(); |
| } |
| if (has_error()) { |
| if (error_ != NULL) error_->::pulsar::proto::CommandError::Clear(); |
| } |
| if (has_close_producer()) { |
| if (close_producer_ != NULL) close_producer_->::pulsar::proto::CommandCloseProducer::Clear(); |
| } |
| if (has_close_consumer()) { |
| if (close_consumer_ != NULL) close_consumer_->::pulsar::proto::CommandCloseConsumer::Clear(); |
| } |
| } |
| if (_has_bits_[16 / 32] & 16711680) { |
| if (has_producer_success()) { |
| if (producer_success_ != NULL) producer_success_->::pulsar::proto::CommandProducerSuccess::Clear(); |
| } |
| if (has_ping()) { |
| if (ping_ != NULL) ping_->::pulsar::proto::CommandPing::Clear(); |
| } |
| if (has_pong()) { |
| if (pong_ != NULL) pong_->::pulsar::proto::CommandPong::Clear(); |
| } |
| if (has_redeliverunacknowledgedmessages()) { |
| if (redeliverunacknowledgedmessages_ != NULL) redeliverunacknowledgedmessages_->::pulsar::proto::CommandRedeliverUnacknowledgedMessages::Clear(); |
| } |
| if (has_partitionmetadata()) { |
| if (partitionmetadata_ != NULL) partitionmetadata_->::pulsar::proto::CommandPartitionedTopicMetadata::Clear(); |
| } |
| if (has_partitionmetadataresponse()) { |
| if (partitionmetadataresponse_ != NULL) partitionmetadataresponse_->::pulsar::proto::CommandPartitionedTopicMetadataResponse::Clear(); |
| } |
| if (has_lookuptopic()) { |
| if (lookuptopic_ != NULL) lookuptopic_->::pulsar::proto::CommandLookupTopic::Clear(); |
| } |
| if (has_lookuptopicresponse()) { |
| if (lookuptopicresponse_ != NULL) lookuptopicresponse_->::pulsar::proto::CommandLookupTopicResponse::Clear(); |
| } |
| } |
| if (_has_bits_[24 / 32] & 50331648) { |
| if (has_consumerstats()) { |
| if (consumerstats_ != NULL) consumerstats_->::pulsar::proto::CommandConsumerStats::Clear(); |
| } |
| if (has_consumerstatsresponse()) { |
| if (consumerstatsresponse_ != NULL) consumerstatsresponse_->::pulsar::proto::CommandConsumerStatsResponse::Clear(); |
| } |
| } |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| mutable_unknown_fields()->clear(); |
| } |
| |
| bool BaseCommand::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.BaseCommand) |
| for (;;) { |
| ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383); |
| tag = p.first; |
| if (!p.second) goto handle_unusual; |
| switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| // required .pulsar.proto.BaseCommand.Type type = 1; |
| case 1: { |
| if (tag == 8) { |
| int value; |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| input, &value))); |
| if (::pulsar::proto::BaseCommand_Type_IsValid(value)) { |
| set_type(static_cast< ::pulsar::proto::BaseCommand_Type >(value)); |
| } else { |
| unknown_fields_stream.WriteVarint32(tag); |
| unknown_fields_stream.WriteVarint32(value); |
| } |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(18)) goto parse_connect; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandConnect connect = 2; |
| case 2: { |
| if (tag == 18) { |
| parse_connect: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_connect())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(26)) goto parse_connected; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandConnected connected = 3; |
| case 3: { |
| if (tag == 26) { |
| parse_connected: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_connected())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(34)) goto parse_subscribe; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandSubscribe subscribe = 4; |
| case 4: { |
| if (tag == 34) { |
| parse_subscribe: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_subscribe())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(42)) goto parse_producer; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandProducer producer = 5; |
| case 5: { |
| if (tag == 42) { |
| parse_producer: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_producer())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(50)) goto parse_send; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandSend send = 6; |
| case 6: { |
| if (tag == 50) { |
| parse_send: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_send())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(58)) goto parse_send_receipt; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandSendReceipt send_receipt = 7; |
| case 7: { |
| if (tag == 58) { |
| parse_send_receipt: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_send_receipt())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(66)) goto parse_send_error; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandSendError send_error = 8; |
| case 8: { |
| if (tag == 66) { |
| parse_send_error: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_send_error())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(74)) goto parse_message; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandMessage message = 9; |
| case 9: { |
| if (tag == 74) { |
| parse_message: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_message())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(82)) goto parse_ack; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandAck ack = 10; |
| case 10: { |
| if (tag == 82) { |
| parse_ack: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_ack())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(90)) goto parse_flow; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandFlow flow = 11; |
| case 11: { |
| if (tag == 90) { |
| parse_flow: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_flow())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(98)) goto parse_unsubscribe; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandUnsubscribe unsubscribe = 12; |
| case 12: { |
| if (tag == 98) { |
| parse_unsubscribe: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_unsubscribe())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(106)) goto parse_success; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandSuccess success = 13; |
| case 13: { |
| if (tag == 106) { |
| parse_success: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_success())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(114)) goto parse_error; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandError error = 14; |
| case 14: { |
| if (tag == 114) { |
| parse_error: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_error())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(122)) goto parse_close_producer; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandCloseProducer close_producer = 15; |
| case 15: { |
| if (tag == 122) { |
| parse_close_producer: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_close_producer())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(130)) goto parse_close_consumer; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandCloseConsumer close_consumer = 16; |
| case 16: { |
| if (tag == 130) { |
| parse_close_consumer: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_close_consumer())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(138)) goto parse_producer_success; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandProducerSuccess producer_success = 17; |
| case 17: { |
| if (tag == 138) { |
| parse_producer_success: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_producer_success())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(146)) goto parse_ping; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandPing ping = 18; |
| case 18: { |
| if (tag == 146) { |
| parse_ping: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_ping())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(154)) goto parse_pong; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandPong pong = 19; |
| case 19: { |
| if (tag == 154) { |
| parse_pong: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_pong())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(162)) goto parse_redeliverUnacknowledgedMessages; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandRedeliverUnacknowledgedMessages redeliverUnacknowledgedMessages = 20; |
| case 20: { |
| if (tag == 162) { |
| parse_redeliverUnacknowledgedMessages: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_redeliverunacknowledgedmessages())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(170)) goto parse_partitionMetadata; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandPartitionedTopicMetadata partitionMetadata = 21; |
| case 21: { |
| if (tag == 170) { |
| parse_partitionMetadata: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_partitionmetadata())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(178)) goto parse_partitionMetadataResponse; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandPartitionedTopicMetadataResponse partitionMetadataResponse = 22; |
| case 22: { |
| if (tag == 178) { |
| parse_partitionMetadataResponse: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_partitionmetadataresponse())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(186)) goto parse_lookupTopic; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandLookupTopic lookupTopic = 23; |
| case 23: { |
| if (tag == 186) { |
| parse_lookupTopic: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_lookuptopic())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(194)) goto parse_lookupTopicResponse; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandLookupTopicResponse lookupTopicResponse = 24; |
| case 24: { |
| if (tag == 194) { |
| parse_lookupTopicResponse: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_lookuptopicresponse())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(202)) goto parse_consumerStats; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandConsumerStats consumerStats = 25; |
| case 25: { |
| if (tag == 202) { |
| parse_consumerStats: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_consumerstats())); |
| } else { |
| goto handle_unusual; |
| } |
| if (input->ExpectTag(210)) goto parse_consumerStatsResponse; |
| break; |
| } |
| |
| // optional .pulsar.proto.CommandConsumerStatsResponse consumerStatsResponse = 26; |
| case 26: { |
| if (tag == 210) { |
| parse_consumerStatsResponse: |
| DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
| input, mutable_consumerstatsresponse())); |
| } 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.BaseCommand) |
| return true; |
| failure: |
| // @@protoc_insertion_point(parse_failure:pulsar.proto.BaseCommand) |
| return false; |
| #undef DO_ |
| } |
| |
| void BaseCommand::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // @@protoc_insertion_point(serialize_start:pulsar.proto.BaseCommand) |
| // required .pulsar.proto.BaseCommand.Type type = 1; |
| if (has_type()) { |
| ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 1, this->type(), output); |
| } |
| |
| // optional .pulsar.proto.CommandConnect connect = 2; |
| if (has_connect()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 2, this->connect(), output); |
| } |
| |
| // optional .pulsar.proto.CommandConnected connected = 3; |
| if (has_connected()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 3, this->connected(), output); |
| } |
| |
| // optional .pulsar.proto.CommandSubscribe subscribe = 4; |
| if (has_subscribe()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 4, this->subscribe(), output); |
| } |
| |
| // optional .pulsar.proto.CommandProducer producer = 5; |
| if (has_producer()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 5, this->producer(), output); |
| } |
| |
| // optional .pulsar.proto.CommandSend send = 6; |
| if (has_send()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 6, this->send(), output); |
| } |
| |
| // optional .pulsar.proto.CommandSendReceipt send_receipt = 7; |
| if (has_send_receipt()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 7, this->send_receipt(), output); |
| } |
| |
| // optional .pulsar.proto.CommandSendError send_error = 8; |
| if (has_send_error()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 8, this->send_error(), output); |
| } |
| |
| // optional .pulsar.proto.CommandMessage message = 9; |
| if (has_message()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 9, this->message(), output); |
| } |
| |
| // optional .pulsar.proto.CommandAck ack = 10; |
| if (has_ack()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 10, this->ack(), output); |
| } |
| |
| // optional .pulsar.proto.CommandFlow flow = 11; |
| if (has_flow()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 11, this->flow(), output); |
| } |
| |
| // optional .pulsar.proto.CommandUnsubscribe unsubscribe = 12; |
| if (has_unsubscribe()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 12, this->unsubscribe(), output); |
| } |
| |
| // optional .pulsar.proto.CommandSuccess success = 13; |
| if (has_success()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 13, this->success(), output); |
| } |
| |
| // optional .pulsar.proto.CommandError error = 14; |
| if (has_error()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 14, this->error(), output); |
| } |
| |
| // optional .pulsar.proto.CommandCloseProducer close_producer = 15; |
| if (has_close_producer()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 15, this->close_producer(), output); |
| } |
| |
| // optional .pulsar.proto.CommandCloseConsumer close_consumer = 16; |
| if (has_close_consumer()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 16, this->close_consumer(), output); |
| } |
| |
| // optional .pulsar.proto.CommandProducerSuccess producer_success = 17; |
| if (has_producer_success()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 17, this->producer_success(), output); |
| } |
| |
| // optional .pulsar.proto.CommandPing ping = 18; |
| if (has_ping()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 18, this->ping(), output); |
| } |
| |
| // optional .pulsar.proto.CommandPong pong = 19; |
| if (has_pong()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 19, this->pong(), output); |
| } |
| |
| // optional .pulsar.proto.CommandRedeliverUnacknowledgedMessages redeliverUnacknowledgedMessages = 20; |
| if (has_redeliverunacknowledgedmessages()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 20, this->redeliverunacknowledgedmessages(), output); |
| } |
| |
| // optional .pulsar.proto.CommandPartitionedTopicMetadata partitionMetadata = 21; |
| if (has_partitionmetadata()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 21, this->partitionmetadata(), output); |
| } |
| |
| // optional .pulsar.proto.CommandPartitionedTopicMetadataResponse partitionMetadataResponse = 22; |
| if (has_partitionmetadataresponse()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 22, this->partitionmetadataresponse(), output); |
| } |
| |
| // optional .pulsar.proto.CommandLookupTopic lookupTopic = 23; |
| if (has_lookuptopic()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 23, this->lookuptopic(), output); |
| } |
| |
| // optional .pulsar.proto.CommandLookupTopicResponse lookupTopicResponse = 24; |
| if (has_lookuptopicresponse()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 24, this->lookuptopicresponse(), output); |
| } |
| |
| // optional .pulsar.proto.CommandConsumerStats consumerStats = 25; |
| if (has_consumerstats()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 25, this->consumerstats(), output); |
| } |
| |
| // optional .pulsar.proto.CommandConsumerStatsResponse consumerStatsResponse = 26; |
| if (has_consumerstatsresponse()) { |
| ::google::protobuf::internal::WireFormatLite::WriteMessage( |
| 26, this->consumerstatsresponse(), output); |
| } |
| |
| output->WriteRaw(unknown_fields().data(), |
| unknown_fields().size()); |
| // @@protoc_insertion_point(serialize_end:pulsar.proto.BaseCommand) |
| } |
| |
| int BaseCommand::ByteSize() const { |
| int total_size = 0; |
| |
| if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| // required .pulsar.proto.BaseCommand.Type type = 1; |
| if (has_type()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); |
| } |
| |
| // optional .pulsar.proto.CommandConnect connect = 2; |
| if (has_connect()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->connect()); |
| } |
| |
| // optional .pulsar.proto.CommandConnected connected = 3; |
| if (has_connected()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->connected()); |
| } |
| |
| // optional .pulsar.proto.CommandSubscribe subscribe = 4; |
| if (has_subscribe()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->subscribe()); |
| } |
| |
| // optional .pulsar.proto.CommandProducer producer = 5; |
| if (has_producer()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->producer()); |
| } |
| |
| // optional .pulsar.proto.CommandSend send = 6; |
| if (has_send()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->send()); |
| } |
| |
| // optional .pulsar.proto.CommandSendReceipt send_receipt = 7; |
| if (has_send_receipt()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->send_receipt()); |
| } |
| |
| // optional .pulsar.proto.CommandSendError send_error = 8; |
| if (has_send_error()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->send_error()); |
| } |
| |
| } |
| if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) { |
| // optional .pulsar.proto.CommandMessage message = 9; |
| if (has_message()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->message()); |
| } |
| |
| // optional .pulsar.proto.CommandAck ack = 10; |
| if (has_ack()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->ack()); |
| } |
| |
| // optional .pulsar.proto.CommandFlow flow = 11; |
| if (has_flow()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->flow()); |
| } |
| |
| // optional .pulsar.proto.CommandUnsubscribe unsubscribe = 12; |
| if (has_unsubscribe()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->unsubscribe()); |
| } |
| |
| // optional .pulsar.proto.CommandSuccess success = 13; |
| if (has_success()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->success()); |
| } |
| |
| // optional .pulsar.proto.CommandError error = 14; |
| if (has_error()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->error()); |
| } |
| |
| // optional .pulsar.proto.CommandCloseProducer close_producer = 15; |
| if (has_close_producer()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->close_producer()); |
| } |
| |
| // optional .pulsar.proto.CommandCloseConsumer close_consumer = 16; |
| if (has_close_consumer()) { |
| total_size += 2 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->close_consumer()); |
| } |
| |
| } |
| if (_has_bits_[16 / 32] & (0xffu << (16 % 32))) { |
| // optional .pulsar.proto.CommandProducerSuccess producer_success = 17; |
| if (has_producer_success()) { |
| total_size += 2 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->producer_success()); |
| } |
| |
| // optional .pulsar.proto.CommandPing ping = 18; |
| if (has_ping()) { |
| total_size += 2 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->ping()); |
| } |
| |
| // optional .pulsar.proto.CommandPong pong = 19; |
| if (has_pong()) { |
| total_size += 2 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->pong()); |
| } |
| |
| // optional .pulsar.proto.CommandRedeliverUnacknowledgedMessages redeliverUnacknowledgedMessages = 20; |
| if (has_redeliverunacknowledgedmessages()) { |
| total_size += 2 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->redeliverunacknowledgedmessages()); |
| } |
| |
| // optional .pulsar.proto.CommandPartitionedTopicMetadata partitionMetadata = 21; |
| if (has_partitionmetadata()) { |
| total_size += 2 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->partitionmetadata()); |
| } |
| |
| // optional .pulsar.proto.CommandPartitionedTopicMetadataResponse partitionMetadataResponse = 22; |
| if (has_partitionmetadataresponse()) { |
| total_size += 2 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->partitionmetadataresponse()); |
| } |
| |
| // optional .pulsar.proto.CommandLookupTopic lookupTopic = 23; |
| if (has_lookuptopic()) { |
| total_size += 2 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->lookuptopic()); |
| } |
| |
| // optional .pulsar.proto.CommandLookupTopicResponse lookupTopicResponse = 24; |
| if (has_lookuptopicresponse()) { |
| total_size += 2 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->lookuptopicresponse()); |
| } |
| |
| } |
| if (_has_bits_[24 / 32] & (0xffu << (24 % 32))) { |
| // optional .pulsar.proto.CommandConsumerStats consumerStats = 25; |
| if (has_consumerstats()) { |
| total_size += 2 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->consumerstats()); |
| } |
| |
| // optional .pulsar.proto.CommandConsumerStatsResponse consumerStatsResponse = 26; |
| if (has_consumerstatsresponse()) { |
| total_size += 2 + |
| ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( |
| this->consumerstatsresponse()); |
| } |
| |
| } |
| total_size += unknown_fields().size(); |
| |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void BaseCommand::CheckTypeAndMergeFrom( |
| const ::google::protobuf::MessageLite& from) { |
| MergeFrom(*::google::protobuf::down_cast<const BaseCommand*>(&from)); |
| } |
| |
| void BaseCommand::MergeFrom(const BaseCommand& from) { |
| GOOGLE_CHECK_NE(&from, this); |
| if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| if (from.has_type()) { |
| set_type(from.type()); |
| } |
| if (from.has_connect()) { |
| mutable_connect()->::pulsar::proto::CommandConnect::MergeFrom(from.connect()); |
| } |
| if (from.has_connected()) { |
| mutable_connected()->::pulsar::proto::CommandConnected::MergeFrom(from.connected()); |
| } |
| if (from.has_subscribe()) { |
| mutable_subscribe()->::pulsar::proto::CommandSubscribe::MergeFrom(from.subscribe()); |
| } |
| if (from.has_producer()) { |
| mutable_producer()->::pulsar::proto::CommandProducer::MergeFrom(from.producer()); |
| } |
| if (from.has_send()) { |
| mutable_send()->::pulsar::proto::CommandSend::MergeFrom(from.send()); |
| } |
| if (from.has_send_receipt()) { |
| mutable_send_receipt()->::pulsar::proto::CommandSendReceipt::MergeFrom(from.send_receipt()); |
| } |
| if (from.has_send_error()) { |
| mutable_send_error()->::pulsar::proto::CommandSendError::MergeFrom(from.send_error()); |
| } |
| } |
| if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) { |
| if (from.has_message()) { |
| mutable_message()->::pulsar::proto::CommandMessage::MergeFrom(from.message()); |
| } |
| if (from.has_ack()) { |
| mutable_ack()->::pulsar::proto::CommandAck::MergeFrom(from.ack()); |
| } |
| if (from.has_flow()) { |
| mutable_flow()->::pulsar::proto::CommandFlow::MergeFrom(from.flow()); |
| } |
| if (from.has_unsubscribe()) { |
| mutable_unsubscribe()->::pulsar::proto::CommandUnsubscribe::MergeFrom(from.unsubscribe()); |
| } |
| if (from.has_success()) { |
| mutable_success()->::pulsar::proto::CommandSuccess::MergeFrom(from.success()); |
| } |
| if (from.has_error()) { |
| mutable_error()->::pulsar::proto::CommandError::MergeFrom(from.error()); |
| } |
| if (from.has_close_producer()) { |
| mutable_close_producer()->::pulsar::proto::CommandCloseProducer::MergeFrom(from.close_producer()); |
| } |
| if (from.has_close_consumer()) { |
| mutable_close_consumer()->::pulsar::proto::CommandCloseConsumer::MergeFrom(from.close_consumer()); |
| } |
| } |
| if (from._has_bits_[16 / 32] & (0xffu << (16 % 32))) { |
| if (from.has_producer_success()) { |
| mutable_producer_success()->::pulsar::proto::CommandProducerSuccess::MergeFrom(from.producer_success()); |
| } |
| if (from.has_ping()) { |
| mutable_ping()->::pulsar::proto::CommandPing::MergeFrom(from.ping()); |
| } |
| if (from.has_pong()) { |
| mutable_pong()->::pulsar::proto::CommandPong::MergeFrom(from.pong()); |
| } |
| if (from.has_redeliverunacknowledgedmessages()) { |
| mutable_redeliverunacknowledgedmessages()->::pulsar::proto::CommandRedeliverUnacknowledgedMessages::MergeFrom(from.redeliverunacknowledgedmessages()); |
| } |
| if (from.has_partitionmetadata()) { |
| mutable_partitionmetadata()->::pulsar::proto::CommandPartitionedTopicMetadata::MergeFrom(from.partitionmetadata()); |
| } |
| if (from.has_partitionmetadataresponse()) { |
| mutable_partitionmetadataresponse()->::pulsar::proto::CommandPartitionedTopicMetadataResponse::MergeFrom(from.partitionmetadataresponse()); |
| } |
| if (from.has_lookuptopic()) { |
| mutable_lookuptopic()->::pulsar::proto::CommandLookupTopic::MergeFrom(from.lookuptopic()); |
| } |
| if (from.has_lookuptopicresponse()) { |
| mutable_lookuptopicresponse()->::pulsar::proto::CommandLookupTopicResponse::MergeFrom(from.lookuptopicresponse()); |
| } |
| } |
| if (from._has_bits_[24 / 32] & (0xffu << (24 % 32))) { |
| if (from.has_consumerstats()) { |
| mutable_consumerstats()->::pulsar::proto::CommandConsumerStats::MergeFrom(from.consumerstats()); |
| } |
| if (from.has_consumerstatsresponse()) { |
| mutable_consumerstatsresponse()->::pulsar::proto::CommandConsumerStatsResponse::MergeFrom(from.consumerstatsresponse()); |
| } |
| } |
| mutable_unknown_fields()->append(from.unknown_fields()); |
| } |
| |
| void BaseCommand::CopyFrom(const BaseCommand& from) { |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool BaseCommand::IsInitialized() const { |
| if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; |
| |
| if (has_connect()) { |
| if (!this->connect().IsInitialized()) return false; |
| } |
| if (has_connected()) { |
| if (!this->connected().IsInitialized()) return false; |
| } |
| if (has_subscribe()) { |
| if (!this->subscribe().IsInitialized()) return false; |
| } |
| if (has_producer()) { |
| if (!this->producer().IsInitialized()) return false; |
| } |
| if (has_send()) { |
| if (!this->send().IsInitialized()) return false; |
| } |
| if (has_send_receipt()) { |
| if (!this->send_receipt().IsInitialized()) return false; |
| } |
| if (has_send_error()) { |
| if (!this->send_error().IsInitialized()) return false; |
| } |
| if (has_message()) { |
| if (!this->message().IsInitialized()) return false; |
| } |
| if (has_ack()) { |
| if (!this->ack().IsInitialized()) return false; |
| } |
| if (has_flow()) { |
| if (!this->flow().IsInitialized()) return false; |
| } |
| if (has_unsubscribe()) { |
| if (!this->unsubscribe().IsInitialized()) return false; |
| } |
| if (has_success()) { |
| if (!this->success().IsInitialized()) return false; |
| } |
| if (has_error()) { |
| if (!this->error().IsInitialized()) return false; |
| } |
| if (has_close_producer()) { |
| if (!this->close_producer().IsInitialized()) return false; |
| } |
| if (has_close_consumer()) { |
| if (!this->close_consumer().IsInitialized()) return false; |
| } |
| if (has_producer_success()) { |
| if (!this->producer_success().IsInitialized()) return false; |
| } |
| if (has_redeliverunacknowledgedmessages()) { |
| if (!this->redeliverunacknowledgedmessages().IsInitialized()) return false; |
| } |
| if (has_partitionmetadata()) { |
| if (!this->partitionmetadata().IsInitialized()) return false; |
| } |
| if (has_partitionmetadataresponse()) { |
| if (!this->partitionmetadataresponse().IsInitialized()) return false; |
| } |
| if (has_lookuptopic()) { |
| if (!this->lookuptopic().IsInitialized()) return false; |
| } |
| if (has_lookuptopicresponse()) { |
| if (!this->lookuptopicresponse().IsInitialized()) return false; |
| } |
| if (has_consumerstats()) { |
| if (!this->consumerstats().IsInitialized()) return false; |
| } |
| if (has_consumerstatsresponse()) { |
| if (!this->consumerstatsresponse().IsInitialized()) return false; |
| } |
| return true; |
| } |
| |
| void BaseCommand::Swap(BaseCommand* other) { |
| if (other != this) { |
| std::swap(type_, other->type_); |
| std::swap(connect_, other->connect_); |
| std::swap(connected_, other->connected_); |
| std::swap(subscribe_, other->subscribe_); |
| std::swap(producer_, other->producer_); |
| std::swap(send_, other->send_); |
| std::swap(send_receipt_, other->send_receipt_); |
| std::swap(send_error_, other->send_error_); |
| std::swap(message_, other->message_); |
| std::swap(ack_, other->ack_); |
| std::swap(flow_, other->flow_); |
| std::swap(unsubscribe_, other->unsubscribe_); |
| std::swap(success_, other->success_); |
| std::swap(error_, other->error_); |
| std::swap(close_producer_, other->close_producer_); |
| std::swap(close_consumer_, other->close_consumer_); |
| std::swap(producer_success_, other->producer_success_); |
| std::swap(ping_, other->ping_); |
| std::swap(pong_, other->pong_); |
| std::swap(redeliverunacknowledgedmessages_, other->redeliverunacknowledgedmessages_); |
| std::swap(partitionmetadata_, other->partitionmetadata_); |
| std::swap(partitionmetadataresponse_, other->partitionmetadataresponse_); |
| std::swap(lookuptopic_, other->lookuptopic_); |
| std::swap(lookuptopicresponse_, other->lookuptopicresponse_); |
| std::swap(consumerstats_, other->consumerstats_); |
| std::swap(consumerstatsresponse_, other->consumerstatsresponse_); |
| std::swap(_has_bits_[0], other->_has_bits_[0]); |
| _unknown_fields_.swap(other->_unknown_fields_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| } |
| |
| ::std::string BaseCommand::GetTypeName() const { |
| return "pulsar.proto.BaseCommand"; |
| } |
| |
| |
| // @@protoc_insertion_point(namespace_scope) |
| |
| } // namespace proto |
| } // namespace pulsar |
| |
| // @@protoc_insertion_point(global_scope) |