From bec16e50c9322758111f73e42fb5d377c7235e05 Mon Sep 17 00:00:00 2001 From: JeremyHi Date: Mon, 17 Jul 2023 11:55:51 +0800 Subject: [PATCH] feat: add status for reponse header (#65) --- c++/greptime/v1/common.pb.cc | 598 +++++- c++/greptime/v1/common.pb.h | 630 ++++-- go/greptime/v1/common.pb.go | 358 ++-- java/src/main/java/io/greptime/v1/Common.java | 1774 ++++++++++++----- proto/greptime/v1/common.proto | 12 +- 5 files changed, 2565 insertions(+), 807 deletions(-) diff --git a/c++/greptime/v1/common.pb.cc b/c++/greptime/v1/common.pb.cc index 9475085..abb18d0 100644 --- a/c++/greptime/v1/common.pb.cc +++ b/c++/greptime/v1/common.pb.cc @@ -22,17 +22,6 @@ namespace _pbi = _pb::internal; namespace greptime { namespace v1 { -PROTOBUF_CONSTEXPR ResponseHeader::ResponseHeader( - ::_pbi::ConstantInitialized) {} -struct ResponseHeaderDefaultTypeInternal { - PROTOBUF_CONSTEXPR ResponseHeaderDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~ResponseHeaderDefaultTypeInternal() {} - union { - ResponseHeader _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ResponseHeaderDefaultTypeInternal _ResponseHeader_default_instance_; PROTOBUF_CONSTEXPR RequestHeader::RequestHeader( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_._has_bits_)*/{} @@ -52,6 +41,33 @@ struct RequestHeaderDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RequestHeaderDefaultTypeInternal _RequestHeader_default_instance_; +PROTOBUF_CONSTEXPR ResponseHeader::ResponseHeader( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.status_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ResponseHeaderDefaultTypeInternal { + PROTOBUF_CONSTEXPR ResponseHeaderDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ResponseHeaderDefaultTypeInternal() {} + union { + ResponseHeader _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ResponseHeaderDefaultTypeInternal _ResponseHeader_default_instance_; +PROTOBUF_CONSTEXPR Status::Status( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.err_msg_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.status_code_)*/0u + , /*decltype(_impl_._cached_size_)*/{}} {} +struct StatusDefaultTypeInternal { + PROTOBUF_CONSTEXPR StatusDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~StatusDefaultTypeInternal() {} + union { + Status _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StatusDefaultTypeInternal _Status_default_instance_; PROTOBUF_CONSTEXPR AuthHeader::AuthHeader( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.auth_scheme_)*/{} @@ -121,17 +137,11 @@ struct FlightMetadataDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FlightMetadataDefaultTypeInternal _FlightMetadata_default_instance_; } // namespace v1 } // namespace greptime -static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fcommon_2eproto[7]; +static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fcommon_2eproto[8]; static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_greptime_2fv1_2fcommon_2eproto = nullptr; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2fcommon_2eproto = nullptr; const uint32_t TableStruct_greptime_2fv1_2fcommon_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::greptime::v1::ResponseHeader, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::greptime::v1::RequestHeader, _impl_._has_bits_), PROTOBUF_FIELD_OFFSET(::greptime::v1::RequestHeader, _internal_metadata_), ~0u, // no _extensions_ @@ -151,6 +161,21 @@ const uint32_t TableStruct_greptime_2fv1_2fcommon_2eproto::offsets[] PROTOBUF_SE 0, 1, ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::ResponseHeader, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::ResponseHeader, _impl_.status_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::Status, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::Status, _impl_.status_code_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::Status, _impl_.err_msg_), + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::AuthHeader, _internal_metadata_), ~0u, // no _extensions_ PROTOBUF_FIELD_OFFSET(::greptime::v1::AuthHeader, _impl_._oneof_case_[0]), @@ -190,18 +215,20 @@ const uint32_t TableStruct_greptime_2fv1_2fcommon_2eproto::offsets[] PROTOBUF_SE PROTOBUF_FIELD_OFFSET(::greptime::v1::FlightMetadata, _impl_.affected_rows_), }; static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, -1, sizeof(::greptime::v1::ResponseHeader)}, - { 6, 18, -1, sizeof(::greptime::v1::RequestHeader)}, - { 24, -1, -1, sizeof(::greptime::v1::AuthHeader)}, - { 33, -1, -1, sizeof(::greptime::v1::Basic)}, - { 41, -1, -1, sizeof(::greptime::v1::Token)}, - { 48, -1, -1, sizeof(::greptime::v1::AffectedRows)}, - { 55, -1, -1, sizeof(::greptime::v1::FlightMetadata)}, + { 0, 12, -1, sizeof(::greptime::v1::RequestHeader)}, + { 18, -1, -1, sizeof(::greptime::v1::ResponseHeader)}, + { 25, -1, -1, sizeof(::greptime::v1::Status)}, + { 33, -1, -1, sizeof(::greptime::v1::AuthHeader)}, + { 42, -1, -1, sizeof(::greptime::v1::Basic)}, + { 50, -1, -1, sizeof(::greptime::v1::Token)}, + { 57, -1, -1, sizeof(::greptime::v1::AffectedRows)}, + { 64, -1, -1, sizeof(::greptime::v1::FlightMetadata)}, }; static const ::_pb::Message* const file_default_instances[] = { - &::greptime::v1::_ResponseHeader_default_instance_._instance, &::greptime::v1::_RequestHeader_default_instance_._instance, + &::greptime::v1::_ResponseHeader_default_instance_._instance, + &::greptime::v1::_Status_default_instance_._instance, &::greptime::v1::_AuthHeader_default_instance_._instance, &::greptime::v1::_Basic_default_instance_._instance, &::greptime::v1::_Token_default_instance_._instance, @@ -211,27 +238,29 @@ static const ::_pb::Message* const file_default_instances[] = { const char descriptor_table_protodef_greptime_2fv1_2fcommon_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n\030greptime/v1/common.proto\022\013greptime.v1\"" - "\020\n\016ResponseHeader\"\266\001\n\rRequestHeader\022\017\n\007c" - "atalog\030\001 \001(\t\022\016\n\006schema\030\002 \001(\t\022.\n\rauthoriz" - "ation\030\003 \001(\0132\027.greptime.v1.AuthHeader\022\016\n\006" - "dbname\030\004 \001(\t\022\025\n\010trace_id\030\005 \001(\004H\000\210\001\001\022\024\n\007s" - "pan_id\030\006 \001(\004H\001\210\001\001B\013\n\t_trace_idB\n\n\010_span_" - "id\"e\n\nAuthHeader\022#\n\005basic\030\001 \001(\0132\022.grepti" - "me.v1.BasicH\000\022#\n\005token\030\002 \001(\0132\022.greptime." - "v1.TokenH\000B\r\n\013auth_scheme\"+\n\005Basic\022\020\n\010us" - "ername\030\001 \001(\t\022\020\n\010password\030\002 \001(\t\"\026\n\005Token\022" - "\r\n\005token\030\001 \001(\t\"\035\n\014AffectedRows\022\r\n\005value\030" - "\001 \001(\r\"B\n\016FlightMetadata\0220\n\raffected_rows" - "\030\001 \001(\0132\031.greptime.v1.AffectedRowsBO\n\016io." - "greptime.v1B\006CommonZ5github.com/Greptime" - "Team/greptime-proto/go/greptime/v1b\006prot" - "o3" + "\266\001\n\rRequestHeader\022\017\n\007catalog\030\001 \001(\t\022\016\n\006sc" + "hema\030\002 \001(\t\022.\n\rauthorization\030\003 \001(\0132\027.grep" + "time.v1.AuthHeader\022\016\n\006dbname\030\004 \001(\t\022\025\n\010tr" + "ace_id\030\005 \001(\004H\000\210\001\001\022\024\n\007span_id\030\006 \001(\004H\001\210\001\001B" + "\013\n\t_trace_idB\n\n\010_span_id\"5\n\016ResponseHead" + "er\022#\n\006status\030\001 \001(\0132\023.greptime.v1.Status\"" + ".\n\006Status\022\023\n\013status_code\030\001 \001(\r\022\017\n\007err_ms" + "g\030\002 \001(\t\"e\n\nAuthHeader\022#\n\005basic\030\001 \001(\0132\022.g" + "reptime.v1.BasicH\000\022#\n\005token\030\002 \001(\0132\022.grep" + "time.v1.TokenH\000B\r\n\013auth_scheme\"+\n\005Basic\022" + "\020\n\010username\030\001 \001(\t\022\020\n\010password\030\002 \001(\t\"\026\n\005T" + "oken\022\r\n\005token\030\001 \001(\t\"\035\n\014AffectedRows\022\r\n\005v" + "alue\030\001 \001(\r\"B\n\016FlightMetadata\0220\n\raffected" + "_rows\030\001 \001(\0132\031.greptime.v1.AffectedRowsBO" + "\n\016io.greptime.v1B\006CommonZ5github.com/Gre" + "ptimeTeam/greptime-proto/go/greptime/v1b" + "\006proto3" ; static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fcommon_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fcommon_2eproto = { - false, false, 602, descriptor_table_protodef_greptime_2fv1_2fcommon_2eproto, + false, false, 687, descriptor_table_protodef_greptime_2fv1_2fcommon_2eproto, "greptime/v1/common.proto", - &descriptor_table_greptime_2fv1_2fcommon_2eproto_once, nullptr, 0, 7, + &descriptor_table_greptime_2fv1_2fcommon_2eproto_once, nullptr, 0, 8, schemas, file_default_instances, TableStruct_greptime_2fv1_2fcommon_2eproto::offsets, file_level_metadata_greptime_2fv1_2fcommon_2eproto, file_level_enum_descriptors_greptime_2fv1_2fcommon_2eproto, file_level_service_descriptors_greptime_2fv1_2fcommon_2eproto, @@ -247,46 +276,6 @@ namespace v1 { // =================================================================== -class ResponseHeader::_Internal { - public: -}; - -ResponseHeader::ResponseHeader(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase(arena, is_message_owned) { - // @@protoc_insertion_point(arena_constructor:greptime.v1.ResponseHeader) -} -ResponseHeader::ResponseHeader(const ResponseHeader& from) - : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase() { - ResponseHeader* const _this = this; (void)_this; - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - // @@protoc_insertion_point(copy_constructor:greptime.v1.ResponseHeader) -} - - - - - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ResponseHeader::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl, - ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl, -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ResponseHeader::GetClassData() const { return &_class_data_; } - - - - - - - -::PROTOBUF_NAMESPACE_ID::Metadata ResponseHeader::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_greptime_2fv1_2fcommon_2eproto_getter, &descriptor_table_greptime_2fv1_2fcommon_2eproto_once, - file_level_metadata_greptime_2fv1_2fcommon_2eproto[0]); -} - -// =================================================================== - class RequestHeader::_Internal { public: using HasBits = decltype(std::declval()._impl_._has_bits_); @@ -709,6 +698,199 @@ void RequestHeader::InternalSwap(RequestHeader* other) { } ::PROTOBUF_NAMESPACE_ID::Metadata RequestHeader::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_greptime_2fv1_2fcommon_2eproto_getter, &descriptor_table_greptime_2fv1_2fcommon_2eproto_once, + file_level_metadata_greptime_2fv1_2fcommon_2eproto[0]); +} + +// =================================================================== + +class ResponseHeader::_Internal { + public: + static const ::greptime::v1::Status& status(const ResponseHeader* msg); +}; + +const ::greptime::v1::Status& +ResponseHeader::_Internal::status(const ResponseHeader* msg) { + return *msg->_impl_.status_; +} +ResponseHeader::ResponseHeader(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:greptime.v1.ResponseHeader) +} +ResponseHeader::ResponseHeader(const ResponseHeader& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + ResponseHeader* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.status_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_status()) { + _this->_impl_.status_ = new ::greptime::v1::Status(*from._impl_.status_); + } + // @@protoc_insertion_point(copy_constructor:greptime.v1.ResponseHeader) +} + +inline void ResponseHeader::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.status_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +ResponseHeader::~ResponseHeader() { + // @@protoc_insertion_point(destructor:greptime.v1.ResponseHeader) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ResponseHeader::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete _impl_.status_; +} + +void ResponseHeader::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ResponseHeader::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.ResponseHeader) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && _impl_.status_ != nullptr) { + delete _impl_.status_; + } + _impl_.status_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ResponseHeader::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .greptime.v1.Status status = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_status(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ResponseHeader::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.ResponseHeader) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .greptime.v1.Status status = 1; + if (this->_internal_has_status()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::status(this), + _Internal::status(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:greptime.v1.ResponseHeader) + return target; +} + +size_t ResponseHeader::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.ResponseHeader) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .greptime.v1.Status status = 1; + if (this->_internal_has_status()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.status_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ResponseHeader::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + ResponseHeader::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ResponseHeader::GetClassData() const { return &_class_data_; } + + +void ResponseHeader::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.ResponseHeader) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_status()) { + _this->_internal_mutable_status()->::greptime::v1::Status::MergeFrom( + from._internal_status()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ResponseHeader::CopyFrom(const ResponseHeader& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.ResponseHeader) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ResponseHeader::IsInitialized() const { + return true; +} + +void ResponseHeader::InternalSwap(ResponseHeader* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.status_, other->_impl_.status_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ResponseHeader::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fcommon_2eproto_getter, &descriptor_table_greptime_2fv1_2fcommon_2eproto_once, file_level_metadata_greptime_2fv1_2fcommon_2eproto[1]); @@ -716,6 +898,236 @@ void RequestHeader::InternalSwap(RequestHeader* other) { // =================================================================== +class Status::_Internal { + public: +}; + +Status::Status(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:greptime.v1.Status) +} +Status::Status(const Status& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + Status* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.err_msg_){} + , decltype(_impl_.status_code_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.err_msg_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.err_msg_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_err_msg().empty()) { + _this->_impl_.err_msg_.Set(from._internal_err_msg(), + _this->GetArenaForAllocation()); + } + _this->_impl_.status_code_ = from._impl_.status_code_; + // @@protoc_insertion_point(copy_constructor:greptime.v1.Status) +} + +inline void Status::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.err_msg_){} + , decltype(_impl_.status_code_){0u} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.err_msg_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.err_msg_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +Status::~Status() { + // @@protoc_insertion_point(destructor:greptime.v1.Status) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void Status::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.err_msg_.Destroy(); +} + +void Status::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void Status::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.Status) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.err_msg_.ClearToEmpty(); + _impl_.status_code_ = 0u; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Status::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // uint32 status_code = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _impl_.status_code_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string err_msg = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_err_msg(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.Status.err_msg")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Status::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.Status) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint32 status_code = 1; + if (this->_internal_status_code() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_status_code(), target); + } + + // string err_msg = 2; + if (!this->_internal_err_msg().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_err_msg().data(), static_cast(this->_internal_err_msg().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "greptime.v1.Status.err_msg"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_err_msg(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:greptime.v1.Status) + return target; +} + +size_t Status::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.Status) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string err_msg = 2; + if (!this->_internal_err_msg().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_err_msg()); + } + + // uint32 status_code = 1; + if (this->_internal_status_code() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_status_code()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Status::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + Status::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Status::GetClassData() const { return &_class_data_; } + + +void Status::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.Status) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_err_msg().empty()) { + _this->_internal_set_err_msg(from._internal_err_msg()); + } + if (from._internal_status_code() != 0) { + _this->_internal_set_status_code(from._internal_status_code()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void Status::CopyFrom(const Status& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.Status) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Status::IsInitialized() const { + return true; +} + +void Status::InternalSwap(Status* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.err_msg_, lhs_arena, + &other->_impl_.err_msg_, rhs_arena + ); + swap(_impl_.status_code_, other->_impl_.status_code_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Status::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_greptime_2fv1_2fcommon_2eproto_getter, &descriptor_table_greptime_2fv1_2fcommon_2eproto_once, + file_level_metadata_greptime_2fv1_2fcommon_2eproto[2]); +} + +// =================================================================== + class AuthHeader::_Internal { public: static const ::greptime::v1::Basic& basic(const AuthHeader* msg); @@ -1016,7 +1428,7 @@ void AuthHeader::InternalSwap(AuthHeader* other) { ::PROTOBUF_NAMESPACE_ID::Metadata AuthHeader::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fcommon_2eproto_getter, &descriptor_table_greptime_2fv1_2fcommon_2eproto_once, - file_level_metadata_greptime_2fv1_2fcommon_2eproto[2]); + file_level_metadata_greptime_2fv1_2fcommon_2eproto[3]); } // =================================================================== @@ -1269,7 +1681,7 @@ void Basic::InternalSwap(Basic* other) { ::PROTOBUF_NAMESPACE_ID::Metadata Basic::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fcommon_2eproto_getter, &descriptor_table_greptime_2fv1_2fcommon_2eproto_once, - file_level_metadata_greptime_2fv1_2fcommon_2eproto[3]); + file_level_metadata_greptime_2fv1_2fcommon_2eproto[4]); } // =================================================================== @@ -1472,7 +1884,7 @@ void Token::InternalSwap(Token* other) { ::PROTOBUF_NAMESPACE_ID::Metadata Token::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fcommon_2eproto_getter, &descriptor_table_greptime_2fv1_2fcommon_2eproto_once, - file_level_metadata_greptime_2fv1_2fcommon_2eproto[4]); + file_level_metadata_greptime_2fv1_2fcommon_2eproto[5]); } // =================================================================== @@ -1650,7 +2062,7 @@ void AffectedRows::InternalSwap(AffectedRows* other) { ::PROTOBUF_NAMESPACE_ID::Metadata AffectedRows::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fcommon_2eproto_getter, &descriptor_table_greptime_2fv1_2fcommon_2eproto_once, - file_level_metadata_greptime_2fv1_2fcommon_2eproto[5]); + file_level_metadata_greptime_2fv1_2fcommon_2eproto[6]); } // =================================================================== @@ -1843,20 +2255,24 @@ void FlightMetadata::InternalSwap(FlightMetadata* other) { ::PROTOBUF_NAMESPACE_ID::Metadata FlightMetadata::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fcommon_2eproto_getter, &descriptor_table_greptime_2fv1_2fcommon_2eproto_once, - file_level_metadata_greptime_2fv1_2fcommon_2eproto[6]); + file_level_metadata_greptime_2fv1_2fcommon_2eproto[7]); } // @@protoc_insertion_point(namespace_scope) } // namespace v1 } // namespace greptime PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::greptime::v1::RequestHeader* +Arena::CreateMaybeMessage< ::greptime::v1::RequestHeader >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::RequestHeader >(arena); +} template<> PROTOBUF_NOINLINE ::greptime::v1::ResponseHeader* Arena::CreateMaybeMessage< ::greptime::v1::ResponseHeader >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::ResponseHeader >(arena); } -template<> PROTOBUF_NOINLINE ::greptime::v1::RequestHeader* -Arena::CreateMaybeMessage< ::greptime::v1::RequestHeader >(Arena* arena) { - return Arena::CreateMessageInternal< ::greptime::v1::RequestHeader >(arena); +template<> PROTOBUF_NOINLINE ::greptime::v1::Status* +Arena::CreateMaybeMessage< ::greptime::v1::Status >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::Status >(arena); } template<> PROTOBUF_NOINLINE ::greptime::v1::AuthHeader* Arena::CreateMaybeMessage< ::greptime::v1::AuthHeader >(Arena* arena) { diff --git a/c++/greptime/v1/common.pb.h b/c++/greptime/v1/common.pb.h index 995991a..23270fc 100644 --- a/c++/greptime/v1/common.pb.h +++ b/c++/greptime/v1/common.pb.h @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -65,6 +64,9 @@ extern RequestHeaderDefaultTypeInternal _RequestHeader_default_instance_; class ResponseHeader; struct ResponseHeaderDefaultTypeInternal; extern ResponseHeaderDefaultTypeInternal _ResponseHeader_default_instance_; +class Status; +struct StatusDefaultTypeInternal; +extern StatusDefaultTypeInternal _Status_default_instance_; class Token; struct TokenDefaultTypeInternal; extern TokenDefaultTypeInternal _Token_default_instance_; @@ -77,6 +79,7 @@ template<> ::greptime::v1::Basic* Arena::CreateMaybeMessage<::greptime::v1::Basi template<> ::greptime::v1::FlightMetadata* Arena::CreateMaybeMessage<::greptime::v1::FlightMetadata>(Arena*); template<> ::greptime::v1::RequestHeader* Arena::CreateMaybeMessage<::greptime::v1::RequestHeader>(Arena*); template<> ::greptime::v1::ResponseHeader* Arena::CreateMaybeMessage<::greptime::v1::ResponseHeader>(Arena*); +template<> ::greptime::v1::Status* Arena::CreateMaybeMessage<::greptime::v1::Status>(Arena*); template<> ::greptime::v1::Token* Arena::CreateMaybeMessage<::greptime::v1::Token>(Arena*); PROTOBUF_NAMESPACE_CLOSE namespace greptime { @@ -84,124 +87,6 @@ namespace v1 { // =================================================================== -class ResponseHeader final : - public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:greptime.v1.ResponseHeader) */ { - public: - inline ResponseHeader() : ResponseHeader(nullptr) {} - explicit PROTOBUF_CONSTEXPR ResponseHeader(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - ResponseHeader(const ResponseHeader& from); - ResponseHeader(ResponseHeader&& from) noexcept - : ResponseHeader() { - *this = ::std::move(from); - } - - inline ResponseHeader& operator=(const ResponseHeader& from) { - CopyFrom(from); - return *this; - } - inline ResponseHeader& operator=(ResponseHeader&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const ResponseHeader& default_instance() { - return *internal_default_instance(); - } - static inline const ResponseHeader* internal_default_instance() { - return reinterpret_cast( - &_ResponseHeader_default_instance_); - } - static constexpr int kIndexInFileMessages = - 0; - - friend void swap(ResponseHeader& a, ResponseHeader& b) { - a.Swap(&b); - } - inline void Swap(ResponseHeader* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(ResponseHeader* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - ResponseHeader* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; - inline void CopyFrom(const ResponseHeader& from) { - ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(*this, from); - } - using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; - void MergeFrom(const ResponseHeader& from) { - ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(*this, from); - } - public: - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "greptime.v1.ResponseHeader"; - } - protected: - explicit ResponseHeader(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // @@protoc_insertion_point(class_scope:greptime.v1.ResponseHeader) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - }; - friend struct ::TableStruct_greptime_2fv1_2fcommon_2eproto; -}; -// ------------------------------------------------------------------- - class RequestHeader final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.RequestHeader) */ { public: @@ -250,7 +135,7 @@ class RequestHeader final : &_RequestHeader_default_instance_); } static constexpr int kIndexInFileMessages = - 1; + 0; friend void swap(RequestHeader& a, RequestHeader& b) { a.Swap(&b); @@ -438,6 +323,327 @@ class RequestHeader final : }; // ------------------------------------------------------------------- +class ResponseHeader final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.ResponseHeader) */ { + public: + inline ResponseHeader() : ResponseHeader(nullptr) {} + ~ResponseHeader() override; + explicit PROTOBUF_CONSTEXPR ResponseHeader(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ResponseHeader(const ResponseHeader& from); + ResponseHeader(ResponseHeader&& from) noexcept + : ResponseHeader() { + *this = ::std::move(from); + } + + inline ResponseHeader& operator=(const ResponseHeader& from) { + CopyFrom(from); + return *this; + } + inline ResponseHeader& operator=(ResponseHeader&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ResponseHeader& default_instance() { + return *internal_default_instance(); + } + static inline const ResponseHeader* internal_default_instance() { + return reinterpret_cast( + &_ResponseHeader_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(ResponseHeader& a, ResponseHeader& b) { + a.Swap(&b); + } + inline void Swap(ResponseHeader* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ResponseHeader* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ResponseHeader* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ResponseHeader& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ResponseHeader& from) { + ResponseHeader::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ResponseHeader* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "greptime.v1.ResponseHeader"; + } + protected: + explicit ResponseHeader(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kStatusFieldNumber = 1, + }; + // .greptime.v1.Status status = 1; + bool has_status() const; + private: + bool _internal_has_status() const; + public: + void clear_status(); + const ::greptime::v1::Status& status() const; + PROTOBUF_NODISCARD ::greptime::v1::Status* release_status(); + ::greptime::v1::Status* mutable_status(); + void set_allocated_status(::greptime::v1::Status* status); + private: + const ::greptime::v1::Status& _internal_status() const; + ::greptime::v1::Status* _internal_mutable_status(); + public: + void unsafe_arena_set_allocated_status( + ::greptime::v1::Status* status); + ::greptime::v1::Status* unsafe_arena_release_status(); + + // @@protoc_insertion_point(class_scope:greptime.v1.ResponseHeader) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::greptime::v1::Status* status_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_greptime_2fv1_2fcommon_2eproto; +}; +// ------------------------------------------------------------------- + +class Status final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.Status) */ { + public: + inline Status() : Status(nullptr) {} + ~Status() override; + explicit PROTOBUF_CONSTEXPR Status(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Status(const Status& from); + Status(Status&& from) noexcept + : Status() { + *this = ::std::move(from); + } + + inline Status& operator=(const Status& from) { + CopyFrom(from); + return *this; + } + inline Status& operator=(Status&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Status& default_instance() { + return *internal_default_instance(); + } + static inline const Status* internal_default_instance() { + return reinterpret_cast( + &_Status_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(Status& a, Status& b) { + a.Swap(&b); + } + inline void Swap(Status* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Status* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Status* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const Status& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const Status& from) { + Status::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Status* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "greptime.v1.Status"; + } + protected: + explicit Status(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kErrMsgFieldNumber = 2, + kStatusCodeFieldNumber = 1, + }; + // string err_msg = 2; + void clear_err_msg(); + const std::string& err_msg() const; + template + void set_err_msg(ArgT0&& arg0, ArgT... args); + std::string* mutable_err_msg(); + PROTOBUF_NODISCARD std::string* release_err_msg(); + void set_allocated_err_msg(std::string* err_msg); + private: + const std::string& _internal_err_msg() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_err_msg(const std::string& value); + std::string* _internal_mutable_err_msg(); + public: + + // uint32 status_code = 1; + void clear_status_code(); + uint32_t status_code() const; + void set_status_code(uint32_t value); + private: + uint32_t _internal_status_code() const; + void _internal_set_status_code(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:greptime.v1.Status) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr err_msg_; + uint32_t status_code_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_greptime_2fv1_2fcommon_2eproto; +}; +// ------------------------------------------------------------------- + class AuthHeader final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.AuthHeader) */ { public: @@ -492,7 +698,7 @@ class AuthHeader final : &_AuthHeader_default_instance_); } static constexpr int kIndexInFileMessages = - 2; + 3; friend void swap(AuthHeader& a, AuthHeader& b) { a.Swap(&b); @@ -682,7 +888,7 @@ class Basic final : &_Basic_default_instance_); } static constexpr int kIndexInFileMessages = - 3; + 4; friend void swap(Basic& a, Basic& b) { a.Swap(&b); @@ -851,7 +1057,7 @@ class Token final : &_Token_default_instance_); } static constexpr int kIndexInFileMessages = - 4; + 5; friend void swap(Token& a, Token& b) { a.Swap(&b); @@ -1004,7 +1210,7 @@ class AffectedRows final : &_AffectedRows_default_instance_); } static constexpr int kIndexInFileMessages = - 5; + 6; friend void swap(AffectedRows& a, AffectedRows& b) { a.Swap(&b); @@ -1152,7 +1358,7 @@ class FlightMetadata final : &_FlightMetadata_default_instance_); } static constexpr int kIndexInFileMessages = - 6; + 7; friend void swap(FlightMetadata& a, FlightMetadata& b) { a.Swap(&b); @@ -1268,10 +1474,6 @@ class FlightMetadata final : #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif // __GNUC__ -// ResponseHeader - -// ------------------------------------------------------------------- - // RequestHeader // string catalog = 1; @@ -1572,6 +1774,174 @@ inline void RequestHeader::set_span_id(uint64_t value) { // ------------------------------------------------------------------- +// ResponseHeader + +// .greptime.v1.Status status = 1; +inline bool ResponseHeader::_internal_has_status() const { + return this != internal_default_instance() && _impl_.status_ != nullptr; +} +inline bool ResponseHeader::has_status() const { + return _internal_has_status(); +} +inline void ResponseHeader::clear_status() { + if (GetArenaForAllocation() == nullptr && _impl_.status_ != nullptr) { + delete _impl_.status_; + } + _impl_.status_ = nullptr; +} +inline const ::greptime::v1::Status& ResponseHeader::_internal_status() const { + const ::greptime::v1::Status* p = _impl_.status_; + return p != nullptr ? *p : reinterpret_cast( + ::greptime::v1::_Status_default_instance_); +} +inline const ::greptime::v1::Status& ResponseHeader::status() const { + // @@protoc_insertion_point(field_get:greptime.v1.ResponseHeader.status) + return _internal_status(); +} +inline void ResponseHeader::unsafe_arena_set_allocated_status( + ::greptime::v1::Status* status) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.status_); + } + _impl_.status_ = status; + if (status) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.ResponseHeader.status) +} +inline ::greptime::v1::Status* ResponseHeader::release_status() { + + ::greptime::v1::Status* temp = _impl_.status_; + _impl_.status_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::greptime::v1::Status* ResponseHeader::unsafe_arena_release_status() { + // @@protoc_insertion_point(field_release:greptime.v1.ResponseHeader.status) + + ::greptime::v1::Status* temp = _impl_.status_; + _impl_.status_ = nullptr; + return temp; +} +inline ::greptime::v1::Status* ResponseHeader::_internal_mutable_status() { + + if (_impl_.status_ == nullptr) { + auto* p = CreateMaybeMessage<::greptime::v1::Status>(GetArenaForAllocation()); + _impl_.status_ = p; + } + return _impl_.status_; +} +inline ::greptime::v1::Status* ResponseHeader::mutable_status() { + ::greptime::v1::Status* _msg = _internal_mutable_status(); + // @@protoc_insertion_point(field_mutable:greptime.v1.ResponseHeader.status) + return _msg; +} +inline void ResponseHeader::set_allocated_status(::greptime::v1::Status* status) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.status_; + } + if (status) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(status); + if (message_arena != submessage_arena) { + status = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, status, submessage_arena); + } + + } else { + + } + _impl_.status_ = status; + // @@protoc_insertion_point(field_set_allocated:greptime.v1.ResponseHeader.status) +} + +// ------------------------------------------------------------------- + +// Status + +// uint32 status_code = 1; +inline void Status::clear_status_code() { + _impl_.status_code_ = 0u; +} +inline uint32_t Status::_internal_status_code() const { + return _impl_.status_code_; +} +inline uint32_t Status::status_code() const { + // @@protoc_insertion_point(field_get:greptime.v1.Status.status_code) + return _internal_status_code(); +} +inline void Status::_internal_set_status_code(uint32_t value) { + + _impl_.status_code_ = value; +} +inline void Status::set_status_code(uint32_t value) { + _internal_set_status_code(value); + // @@protoc_insertion_point(field_set:greptime.v1.Status.status_code) +} + +// string err_msg = 2; +inline void Status::clear_err_msg() { + _impl_.err_msg_.ClearToEmpty(); +} +inline const std::string& Status::err_msg() const { + // @@protoc_insertion_point(field_get:greptime.v1.Status.err_msg) + return _internal_err_msg(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Status::set_err_msg(ArgT0&& arg0, ArgT... args) { + + _impl_.err_msg_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:greptime.v1.Status.err_msg) +} +inline std::string* Status::mutable_err_msg() { + std::string* _s = _internal_mutable_err_msg(); + // @@protoc_insertion_point(field_mutable:greptime.v1.Status.err_msg) + return _s; +} +inline const std::string& Status::_internal_err_msg() const { + return _impl_.err_msg_.Get(); +} +inline void Status::_internal_set_err_msg(const std::string& value) { + + _impl_.err_msg_.Set(value, GetArenaForAllocation()); +} +inline std::string* Status::_internal_mutable_err_msg() { + + return _impl_.err_msg_.Mutable(GetArenaForAllocation()); +} +inline std::string* Status::release_err_msg() { + // @@protoc_insertion_point(field_release:greptime.v1.Status.err_msg) + return _impl_.err_msg_.Release(); +} +inline void Status::set_allocated_err_msg(std::string* err_msg) { + if (err_msg != nullptr) { + + } else { + + } + _impl_.err_msg_.SetAllocated(err_msg, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.err_msg_.IsDefault()) { + _impl_.err_msg_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:greptime.v1.Status.err_msg) +} + +// ------------------------------------------------------------------- + // AuthHeader // .greptime.v1.Basic basic = 1; @@ -2022,6 +2392,8 @@ inline void FlightMetadata::set_allocated_affected_rows(::greptime::v1::Affected // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) diff --git a/go/greptime/v1/common.pb.go b/go/greptime/v1/common.pb.go index 888a4a4..4ac4b30 100644 --- a/go/greptime/v1/common.pb.go +++ b/go/greptime/v1/common.pb.go @@ -34,44 +34,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type ResponseHeader struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ResponseHeader) Reset() { - *x = ResponseHeader{} - if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResponseHeader) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResponseHeader) ProtoMessage() {} - -func (x *ResponseHeader) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResponseHeader.ProtoReflect.Descriptor instead. -func (*ResponseHeader) Descriptor() ([]byte, []int) { - return file_greptime_v1_common_proto_rawDescGZIP(), []int{0} -} - type RequestHeader struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -94,7 +56,7 @@ type RequestHeader struct { func (x *RequestHeader) Reset() { *x = RequestHeader{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_common_proto_msgTypes[1] + mi := &file_greptime_v1_common_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -107,7 +69,7 @@ func (x *RequestHeader) String() string { func (*RequestHeader) ProtoMessage() {} func (x *RequestHeader) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_common_proto_msgTypes[1] + mi := &file_greptime_v1_common_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -120,7 +82,7 @@ func (x *RequestHeader) ProtoReflect() protoreflect.Message { // Deprecated: Use RequestHeader.ProtoReflect.Descriptor instead. func (*RequestHeader) Descriptor() ([]byte, []int) { - return file_greptime_v1_common_proto_rawDescGZIP(), []int{1} + return file_greptime_v1_common_proto_rawDescGZIP(), []int{0} } func (x *RequestHeader) GetCatalog() string { @@ -165,6 +127,109 @@ func (x *RequestHeader) GetSpanId() uint64 { return 0 } +type ResponseHeader struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *ResponseHeader) Reset() { + *x = ResponseHeader{} + if protoimpl.UnsafeEnabled { + mi := &file_greptime_v1_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResponseHeader) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResponseHeader) ProtoMessage() {} + +func (x *ResponseHeader) ProtoReflect() protoreflect.Message { + mi := &file_greptime_v1_common_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResponseHeader.ProtoReflect.Descriptor instead. +func (*ResponseHeader) Descriptor() ([]byte, []int) { + return file_greptime_v1_common_proto_rawDescGZIP(), []int{1} +} + +func (x *ResponseHeader) GetStatus() *Status { + if x != nil { + return x.Status + } + return nil +} + +type Status struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Corresponding to the `StatusCode` definition of GreptimeDB + StatusCode uint32 `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"` +} + +func (x *Status) Reset() { + *x = Status{} + if protoimpl.UnsafeEnabled { + mi := &file_greptime_v1_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Status) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Status) ProtoMessage() {} + +func (x *Status) ProtoReflect() protoreflect.Message { + mi := &file_greptime_v1_common_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Status.ProtoReflect.Descriptor instead. +func (*Status) Descriptor() ([]byte, []int) { + return file_greptime_v1_common_proto_rawDescGZIP(), []int{2} +} + +func (x *Status) GetStatusCode() uint32 { + if x != nil { + return x.StatusCode + } + return 0 +} + +func (x *Status) GetErrMsg() string { + if x != nil { + return x.ErrMsg + } + return "" +} + type AuthHeader struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -180,7 +245,7 @@ type AuthHeader struct { func (x *AuthHeader) Reset() { *x = AuthHeader{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_common_proto_msgTypes[2] + mi := &file_greptime_v1_common_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -193,7 +258,7 @@ func (x *AuthHeader) String() string { func (*AuthHeader) ProtoMessage() {} func (x *AuthHeader) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_common_proto_msgTypes[2] + mi := &file_greptime_v1_common_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -206,7 +271,7 @@ func (x *AuthHeader) ProtoReflect() protoreflect.Message { // Deprecated: Use AuthHeader.ProtoReflect.Descriptor instead. func (*AuthHeader) Descriptor() ([]byte, []int) { - return file_greptime_v1_common_proto_rawDescGZIP(), []int{2} + return file_greptime_v1_common_proto_rawDescGZIP(), []int{3} } func (m *AuthHeader) GetAuthScheme() isAuthHeader_AuthScheme { @@ -258,7 +323,7 @@ type Basic struct { func (x *Basic) Reset() { *x = Basic{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_common_proto_msgTypes[3] + mi := &file_greptime_v1_common_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -271,7 +336,7 @@ func (x *Basic) String() string { func (*Basic) ProtoMessage() {} func (x *Basic) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_common_proto_msgTypes[3] + mi := &file_greptime_v1_common_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -284,7 +349,7 @@ func (x *Basic) ProtoReflect() protoreflect.Message { // Deprecated: Use Basic.ProtoReflect.Descriptor instead. func (*Basic) Descriptor() ([]byte, []int) { - return file_greptime_v1_common_proto_rawDescGZIP(), []int{3} + return file_greptime_v1_common_proto_rawDescGZIP(), []int{4} } func (x *Basic) GetUsername() string { @@ -312,7 +377,7 @@ type Token struct { func (x *Token) Reset() { *x = Token{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_common_proto_msgTypes[4] + mi := &file_greptime_v1_common_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -325,7 +390,7 @@ func (x *Token) String() string { func (*Token) ProtoMessage() {} func (x *Token) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_common_proto_msgTypes[4] + mi := &file_greptime_v1_common_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -338,7 +403,7 @@ func (x *Token) ProtoReflect() protoreflect.Message { // Deprecated: Use Token.ProtoReflect.Descriptor instead. func (*Token) Descriptor() ([]byte, []int) { - return file_greptime_v1_common_proto_rawDescGZIP(), []int{4} + return file_greptime_v1_common_proto_rawDescGZIP(), []int{5} } func (x *Token) GetToken() string { @@ -359,7 +424,7 @@ type AffectedRows struct { func (x *AffectedRows) Reset() { *x = AffectedRows{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_common_proto_msgTypes[5] + mi := &file_greptime_v1_common_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -372,7 +437,7 @@ func (x *AffectedRows) String() string { func (*AffectedRows) ProtoMessage() {} func (x *AffectedRows) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_common_proto_msgTypes[5] + mi := &file_greptime_v1_common_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -385,7 +450,7 @@ func (x *AffectedRows) ProtoReflect() protoreflect.Message { // Deprecated: Use AffectedRows.ProtoReflect.Descriptor instead. func (*AffectedRows) Descriptor() ([]byte, []int) { - return file_greptime_v1_common_proto_rawDescGZIP(), []int{5} + return file_greptime_v1_common_proto_rawDescGZIP(), []int{6} } func (x *AffectedRows) GetValue() uint32 { @@ -406,7 +471,7 @@ type FlightMetadata struct { func (x *FlightMetadata) Reset() { *x = FlightMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_common_proto_msgTypes[6] + mi := &file_greptime_v1_common_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -419,7 +484,7 @@ func (x *FlightMetadata) String() string { func (*FlightMetadata) ProtoMessage() {} func (x *FlightMetadata) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_common_proto_msgTypes[6] + mi := &file_greptime_v1_common_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -432,7 +497,7 @@ func (x *FlightMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use FlightMetadata.ProtoReflect.Descriptor instead. func (*FlightMetadata) Descriptor() ([]byte, []int) { - return file_greptime_v1_common_proto_rawDescGZIP(), []int{6} + return file_greptime_v1_common_proto_rawDescGZIP(), []int{7} } func (x *FlightMetadata) GetAffectedRows() *AffectedRows { @@ -447,50 +512,57 @@ var File_greptime_v1_common_proto protoreflect.FileDescriptor var file_greptime_v1_common_proto_rawDesc = []byte{ 0x0a, 0x18, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x67, 0x72, 0x65, 0x70, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x22, 0x10, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0xef, 0x01, 0x0a, 0x0d, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x63, - 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x61, - 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x3d, 0x0a, - 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0d, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, - 0x64, 0x62, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x62, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, - 0x64, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x06, 0x73, 0x70, 0x61, 0x6e, 0x49, 0x64, 0x88, - 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x42, - 0x0a, 0x0a, 0x08, 0x5f, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0x73, 0x0a, 0x0a, 0x41, - 0x75, 0x74, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x05, 0x62, 0x61, 0x73, - 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, - 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x69, 0x63, 0x48, 0x00, 0x52, 0x05, - 0x62, 0x61, 0x73, 0x69, 0x63, 0x12, 0x2a, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x48, 0x00, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, - 0x22, 0x3f, 0x0a, 0x05, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, - 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, - 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, - 0x64, 0x22, 0x1d, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x22, 0x24, 0x0a, 0x0c, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x77, 0x73, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x50, 0x0a, 0x0e, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3e, 0x0a, 0x0d, 0x61, 0x66, 0x66, 0x65, - 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x66, - 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x77, 0x73, 0x52, 0x0c, 0x61, 0x66, 0x66, 0x65, - 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x77, 0x73, 0x42, 0x4f, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, - 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x06, 0x43, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, - 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, - 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, - 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x22, 0xef, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x3d, 0x0a, 0x0d, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x75, 0x74, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0d, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x62, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x62, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x88, + 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x06, 0x73, 0x70, 0x61, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01, + 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x42, 0x0a, 0x0a, + 0x08, 0x5f, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0x3d, 0x0a, 0x0e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x72, + 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x42, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, + 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x73, 0x0a, 0x0a, + 0x41, 0x75, 0x74, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x05, 0x62, 0x61, + 0x73, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x65, 0x70, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x69, 0x63, 0x48, 0x00, 0x52, + 0x05, 0x62, 0x61, 0x73, 0x69, 0x63, 0x12, 0x2a, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x48, 0x00, 0x52, 0x05, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x65, 0x22, 0x3f, 0x0a, 0x05, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, + 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, + 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, + 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, + 0x72, 0x64, 0x22, 0x1d, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0x24, 0x0a, 0x0c, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x77, + 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x50, 0x0a, 0x0e, 0x46, 0x6c, 0x69, 0x67, 0x68, + 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3e, 0x0a, 0x0d, 0x61, 0x66, 0x66, + 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x77, 0x73, 0x52, 0x0c, 0x61, 0x66, 0x66, + 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x77, 0x73, 0x42, 0x4f, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, + 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x06, 0x43, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, + 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, + 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -505,26 +577,28 @@ func file_greptime_v1_common_proto_rawDescGZIP() []byte { return file_greptime_v1_common_proto_rawDescData } -var file_greptime_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_greptime_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_greptime_v1_common_proto_goTypes = []interface{}{ - (*ResponseHeader)(nil), // 0: greptime.v1.ResponseHeader - (*RequestHeader)(nil), // 1: greptime.v1.RequestHeader - (*AuthHeader)(nil), // 2: greptime.v1.AuthHeader - (*Basic)(nil), // 3: greptime.v1.Basic - (*Token)(nil), // 4: greptime.v1.Token - (*AffectedRows)(nil), // 5: greptime.v1.AffectedRows - (*FlightMetadata)(nil), // 6: greptime.v1.FlightMetadata + (*RequestHeader)(nil), // 0: greptime.v1.RequestHeader + (*ResponseHeader)(nil), // 1: greptime.v1.ResponseHeader + (*Status)(nil), // 2: greptime.v1.Status + (*AuthHeader)(nil), // 3: greptime.v1.AuthHeader + (*Basic)(nil), // 4: greptime.v1.Basic + (*Token)(nil), // 5: greptime.v1.Token + (*AffectedRows)(nil), // 6: greptime.v1.AffectedRows + (*FlightMetadata)(nil), // 7: greptime.v1.FlightMetadata } var file_greptime_v1_common_proto_depIdxs = []int32{ - 2, // 0: greptime.v1.RequestHeader.authorization:type_name -> greptime.v1.AuthHeader - 3, // 1: greptime.v1.AuthHeader.basic:type_name -> greptime.v1.Basic - 4, // 2: greptime.v1.AuthHeader.token:type_name -> greptime.v1.Token - 5, // 3: greptime.v1.FlightMetadata.affected_rows:type_name -> greptime.v1.AffectedRows - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 3, // 0: greptime.v1.RequestHeader.authorization:type_name -> greptime.v1.AuthHeader + 2, // 1: greptime.v1.ResponseHeader.status:type_name -> greptime.v1.Status + 4, // 2: greptime.v1.AuthHeader.basic:type_name -> greptime.v1.Basic + 5, // 3: greptime.v1.AuthHeader.token:type_name -> greptime.v1.Token + 6, // 4: greptime.v1.FlightMetadata.affected_rows:type_name -> greptime.v1.AffectedRows + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_greptime_v1_common_proto_init() } @@ -534,18 +608,6 @@ func file_greptime_v1_common_proto_init() { } if !protoimpl.UnsafeEnabled { file_greptime_v1_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseHeader); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_greptime_v1_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RequestHeader); i { case 0: return &v.state @@ -557,8 +619,20 @@ func file_greptime_v1_common_proto_init() { return nil } } + file_greptime_v1_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResponseHeader); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } file_greptime_v1_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthHeader); i { + switch v := v.(*Status); i { case 0: return &v.state case 1: @@ -570,7 +644,7 @@ func file_greptime_v1_common_proto_init() { } } file_greptime_v1_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Basic); i { + switch v := v.(*AuthHeader); i { case 0: return &v.state case 1: @@ -582,7 +656,7 @@ func file_greptime_v1_common_proto_init() { } } file_greptime_v1_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Token); i { + switch v := v.(*Basic); i { case 0: return &v.state case 1: @@ -594,7 +668,7 @@ func file_greptime_v1_common_proto_init() { } } file_greptime_v1_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AffectedRows); i { + switch v := v.(*Token); i { case 0: return &v.state case 1: @@ -606,6 +680,18 @@ func file_greptime_v1_common_proto_init() { } } file_greptime_v1_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AffectedRows); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_greptime_v1_common_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FlightMetadata); i { case 0: return &v.state @@ -618,8 +704,8 @@ func file_greptime_v1_common_proto_init() { } } } - file_greptime_v1_common_proto_msgTypes[1].OneofWrappers = []interface{}{} - file_greptime_v1_common_proto_msgTypes[2].OneofWrappers = []interface{}{ + file_greptime_v1_common_proto_msgTypes[0].OneofWrappers = []interface{}{} + file_greptime_v1_common_proto_msgTypes[3].OneofWrappers = []interface{}{ (*AuthHeader_Basic)(nil), (*AuthHeader_Token)(nil), } @@ -629,7 +715,7 @@ func file_greptime_v1_common_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_greptime_v1_common_proto_rawDesc, NumEnums: 0, - NumMessages: 7, + NumMessages: 8, NumExtensions: 0, NumServices: 0, }, diff --git a/java/src/main/java/io/greptime/v1/Common.java b/java/src/main/java/io/greptime/v1/Common.java index 738333b..55109cc 100644 --- a/java/src/main/java/io/greptime/v1/Common.java +++ b/java/src/main/java/io/greptime/v1/Common.java @@ -14,426 +14,6 @@ public final class Common { registerAllExtensions( (com.google.protobuf.ExtensionRegistryLite) registry); } - public interface ResponseHeaderOrBuilder extends - // @@protoc_insertion_point(interface_extends:greptime.v1.ResponseHeader) - com.google.protobuf.MessageOrBuilder { - } - /** - * Protobuf type {@code greptime.v1.ResponseHeader} - */ - public static final class ResponseHeader extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:greptime.v1.ResponseHeader) - ResponseHeaderOrBuilder { - private static final long serialVersionUID = 0L; - // Use ResponseHeader.newBuilder() to construct. - private ResponseHeader(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ResponseHeader() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ResponseHeader(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ResponseHeader( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.greptime.v1.Common.internal_static_greptime_v1_ResponseHeader_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.greptime.v1.Common.internal_static_greptime_v1_ResponseHeader_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.greptime.v1.Common.ResponseHeader.class, io.greptime.v1.Common.ResponseHeader.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.greptime.v1.Common.ResponseHeader)) { - return super.equals(obj); - } - io.greptime.v1.Common.ResponseHeader other = (io.greptime.v1.Common.ResponseHeader) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.greptime.v1.Common.ResponseHeader parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.greptime.v1.Common.ResponseHeader parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.greptime.v1.Common.ResponseHeader parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.greptime.v1.Common.ResponseHeader parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.greptime.v1.Common.ResponseHeader parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.greptime.v1.Common.ResponseHeader parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.greptime.v1.Common.ResponseHeader parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.greptime.v1.Common.ResponseHeader parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.greptime.v1.Common.ResponseHeader parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.greptime.v1.Common.ResponseHeader parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.greptime.v1.Common.ResponseHeader parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.greptime.v1.Common.ResponseHeader parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.greptime.v1.Common.ResponseHeader prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code greptime.v1.ResponseHeader} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:greptime.v1.ResponseHeader) - io.greptime.v1.Common.ResponseHeaderOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.greptime.v1.Common.internal_static_greptime_v1_ResponseHeader_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.greptime.v1.Common.internal_static_greptime_v1_ResponseHeader_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.greptime.v1.Common.ResponseHeader.class, io.greptime.v1.Common.ResponseHeader.Builder.class); - } - - // Construct using io.greptime.v1.Common.ResponseHeader.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.greptime.v1.Common.internal_static_greptime_v1_ResponseHeader_descriptor; - } - - @java.lang.Override - public io.greptime.v1.Common.ResponseHeader getDefaultInstanceForType() { - return io.greptime.v1.Common.ResponseHeader.getDefaultInstance(); - } - - @java.lang.Override - public io.greptime.v1.Common.ResponseHeader build() { - io.greptime.v1.Common.ResponseHeader result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.greptime.v1.Common.ResponseHeader buildPartial() { - io.greptime.v1.Common.ResponseHeader result = new io.greptime.v1.Common.ResponseHeader(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.greptime.v1.Common.ResponseHeader) { - return mergeFrom((io.greptime.v1.Common.ResponseHeader)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.greptime.v1.Common.ResponseHeader other) { - if (other == io.greptime.v1.Common.ResponseHeader.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - io.greptime.v1.Common.ResponseHeader parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.greptime.v1.Common.ResponseHeader) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:greptime.v1.ResponseHeader) - } - - // @@protoc_insertion_point(class_scope:greptime.v1.ResponseHeader) - private static final io.greptime.v1.Common.ResponseHeader DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.greptime.v1.Common.ResponseHeader(); - } - - public static io.greptime.v1.Common.ResponseHeader getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ResponseHeader parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ResponseHeader(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.greptime.v1.Common.ResponseHeader getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - public interface RequestHeaderOrBuilder extends // @@protoc_insertion_point(interface_extends:greptime.v1.RequestHeader) com.google.protobuf.MessageOrBuilder { @@ -1945,6 +1525,1289 @@ public final class Common { } + public interface ResponseHeaderOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.ResponseHeader) + com.google.protobuf.MessageOrBuilder { + + /** + * .greptime.v1.Status status = 1; + * @return Whether the status field is set. + */ + boolean hasStatus(); + /** + * .greptime.v1.Status status = 1; + * @return The status. + */ + io.greptime.v1.Common.Status getStatus(); + /** + * .greptime.v1.Status status = 1; + */ + io.greptime.v1.Common.StatusOrBuilder getStatusOrBuilder(); + } + /** + * Protobuf type {@code greptime.v1.ResponseHeader} + */ + public static final class ResponseHeader extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.ResponseHeader) + ResponseHeaderOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResponseHeader.newBuilder() to construct. + private ResponseHeader(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ResponseHeader() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ResponseHeader(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ResponseHeader( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.greptime.v1.Common.Status.Builder subBuilder = null; + if (status_ != null) { + subBuilder = status_.toBuilder(); + } + status_ = input.readMessage(io.greptime.v1.Common.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(status_); + status_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.Common.internal_static_greptime_v1_ResponseHeader_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.Common.internal_static_greptime_v1_ResponseHeader_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.Common.ResponseHeader.class, io.greptime.v1.Common.ResponseHeader.Builder.class); + } + + public static final int STATUS_FIELD_NUMBER = 1; + private io.greptime.v1.Common.Status status_; + /** + * .greptime.v1.Status status = 1; + * @return Whether the status field is set. + */ + @java.lang.Override + public boolean hasStatus() { + return status_ != null; + } + /** + * .greptime.v1.Status status = 1; + * @return The status. + */ + @java.lang.Override + public io.greptime.v1.Common.Status getStatus() { + return status_ == null ? io.greptime.v1.Common.Status.getDefaultInstance() : status_; + } + /** + * .greptime.v1.Status status = 1; + */ + @java.lang.Override + public io.greptime.v1.Common.StatusOrBuilder getStatusOrBuilder() { + return getStatus(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (status_ != null) { + output.writeMessage(1, getStatus()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (status_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getStatus()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.greptime.v1.Common.ResponseHeader)) { + return super.equals(obj); + } + io.greptime.v1.Common.ResponseHeader other = (io.greptime.v1.Common.ResponseHeader) obj; + + if (hasStatus() != other.hasStatus()) return false; + if (hasStatus()) { + if (!getStatus() + .equals(other.getStatus())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStatus()) { + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.greptime.v1.Common.ResponseHeader parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.Common.ResponseHeader parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.Common.ResponseHeader parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.Common.ResponseHeader parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.Common.ResponseHeader parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.Common.ResponseHeader parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.Common.ResponseHeader parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.Common.ResponseHeader parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.greptime.v1.Common.ResponseHeader parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.greptime.v1.Common.ResponseHeader parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.greptime.v1.Common.ResponseHeader parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.Common.ResponseHeader parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.greptime.v1.Common.ResponseHeader prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code greptime.v1.ResponseHeader} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.ResponseHeader) + io.greptime.v1.Common.ResponseHeaderOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.Common.internal_static_greptime_v1_ResponseHeader_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.Common.internal_static_greptime_v1_ResponseHeader_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.Common.ResponseHeader.class, io.greptime.v1.Common.ResponseHeader.Builder.class); + } + + // Construct using io.greptime.v1.Common.ResponseHeader.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (statusBuilder_ == null) { + status_ = null; + } else { + status_ = null; + statusBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.greptime.v1.Common.internal_static_greptime_v1_ResponseHeader_descriptor; + } + + @java.lang.Override + public io.greptime.v1.Common.ResponseHeader getDefaultInstanceForType() { + return io.greptime.v1.Common.ResponseHeader.getDefaultInstance(); + } + + @java.lang.Override + public io.greptime.v1.Common.ResponseHeader build() { + io.greptime.v1.Common.ResponseHeader result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.greptime.v1.Common.ResponseHeader buildPartial() { + io.greptime.v1.Common.ResponseHeader result = new io.greptime.v1.Common.ResponseHeader(this); + if (statusBuilder_ == null) { + result.status_ = status_; + } else { + result.status_ = statusBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.greptime.v1.Common.ResponseHeader) { + return mergeFrom((io.greptime.v1.Common.ResponseHeader)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.greptime.v1.Common.ResponseHeader other) { + if (other == io.greptime.v1.Common.ResponseHeader.getDefaultInstance()) return this; + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.greptime.v1.Common.ResponseHeader parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.Common.ResponseHeader) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private io.greptime.v1.Common.Status status_; + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Common.Status, io.greptime.v1.Common.Status.Builder, io.greptime.v1.Common.StatusOrBuilder> statusBuilder_; + /** + * .greptime.v1.Status status = 1; + * @return Whether the status field is set. + */ + public boolean hasStatus() { + return statusBuilder_ != null || status_ != null; + } + /** + * .greptime.v1.Status status = 1; + * @return The status. + */ + public io.greptime.v1.Common.Status getStatus() { + if (statusBuilder_ == null) { + return status_ == null ? io.greptime.v1.Common.Status.getDefaultInstance() : status_; + } else { + return statusBuilder_.getMessage(); + } + } + /** + * .greptime.v1.Status status = 1; + */ + public Builder setStatus(io.greptime.v1.Common.Status value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + onChanged(); + } else { + statusBuilder_.setMessage(value); + } + + return this; + } + /** + * .greptime.v1.Status status = 1; + */ + public Builder setStatus( + io.greptime.v1.Common.Status.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + onChanged(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .greptime.v1.Status status = 1; + */ + public Builder mergeStatus(io.greptime.v1.Common.Status value) { + if (statusBuilder_ == null) { + if (status_ != null) { + status_ = + io.greptime.v1.Common.Status.newBuilder(status_).mergeFrom(value).buildPartial(); + } else { + status_ = value; + } + onChanged(); + } else { + statusBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .greptime.v1.Status status = 1; + */ + public Builder clearStatus() { + if (statusBuilder_ == null) { + status_ = null; + onChanged(); + } else { + status_ = null; + statusBuilder_ = null; + } + + return this; + } + /** + * .greptime.v1.Status status = 1; + */ + public io.greptime.v1.Common.Status.Builder getStatusBuilder() { + + onChanged(); + return getStatusFieldBuilder().getBuilder(); + } + /** + * .greptime.v1.Status status = 1; + */ + public io.greptime.v1.Common.StatusOrBuilder getStatusOrBuilder() { + if (statusBuilder_ != null) { + return statusBuilder_.getMessageOrBuilder(); + } else { + return status_ == null ? + io.greptime.v1.Common.Status.getDefaultInstance() : status_; + } + } + /** + * .greptime.v1.Status status = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Common.Status, io.greptime.v1.Common.Status.Builder, io.greptime.v1.Common.StatusOrBuilder> + getStatusFieldBuilder() { + if (statusBuilder_ == null) { + statusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Common.Status, io.greptime.v1.Common.Status.Builder, io.greptime.v1.Common.StatusOrBuilder>( + getStatus(), + getParentForChildren(), + isClean()); + status_ = null; + } + return statusBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:greptime.v1.ResponseHeader) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.ResponseHeader) + private static final io.greptime.v1.Common.ResponseHeader DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.greptime.v1.Common.ResponseHeader(); + } + + public static io.greptime.v1.Common.ResponseHeader getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResponseHeader parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ResponseHeader(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.greptime.v1.Common.ResponseHeader getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface StatusOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.Status) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Corresponding to the `StatusCode` definition of GreptimeDB
+     * 
+ * + * uint32 status_code = 1; + * @return The statusCode. + */ + int getStatusCode(); + + /** + * string err_msg = 2; + * @return The errMsg. + */ + java.lang.String getErrMsg(); + /** + * string err_msg = 2; + * @return The bytes for errMsg. + */ + com.google.protobuf.ByteString + getErrMsgBytes(); + } + /** + * Protobuf type {@code greptime.v1.Status} + */ + public static final class Status extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.Status) + StatusOrBuilder { + private static final long serialVersionUID = 0L; + // Use Status.newBuilder() to construct. + private Status(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Status() { + errMsg_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Status(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Status( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + statusCode_ = input.readUInt32(); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + errMsg_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.Common.internal_static_greptime_v1_Status_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.Common.internal_static_greptime_v1_Status_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.Common.Status.class, io.greptime.v1.Common.Status.Builder.class); + } + + public static final int STATUS_CODE_FIELD_NUMBER = 1; + private int statusCode_; + /** + *
+     * Corresponding to the `StatusCode` definition of GreptimeDB
+     * 
+ * + * uint32 status_code = 1; + * @return The statusCode. + */ + @java.lang.Override + public int getStatusCode() { + return statusCode_; + } + + public static final int ERR_MSG_FIELD_NUMBER = 2; + private volatile java.lang.Object errMsg_; + /** + * string err_msg = 2; + * @return The errMsg. + */ + @java.lang.Override + public java.lang.String getErrMsg() { + java.lang.Object ref = errMsg_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + errMsg_ = s; + return s; + } + } + /** + * string err_msg = 2; + * @return The bytes for errMsg. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getErrMsgBytes() { + java.lang.Object ref = errMsg_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + errMsg_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (statusCode_ != 0) { + output.writeUInt32(1, statusCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errMsg_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, errMsg_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (statusCode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, statusCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errMsg_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, errMsg_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.greptime.v1.Common.Status)) { + return super.equals(obj); + } + io.greptime.v1.Common.Status other = (io.greptime.v1.Common.Status) obj; + + if (getStatusCode() + != other.getStatusCode()) return false; + if (!getErrMsg() + .equals(other.getErrMsg())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STATUS_CODE_FIELD_NUMBER; + hash = (53 * hash) + getStatusCode(); + hash = (37 * hash) + ERR_MSG_FIELD_NUMBER; + hash = (53 * hash) + getErrMsg().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.greptime.v1.Common.Status parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.Common.Status parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.Common.Status parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.Common.Status parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.Common.Status parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.Common.Status parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.Common.Status parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.Common.Status parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.greptime.v1.Common.Status parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.greptime.v1.Common.Status parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.greptime.v1.Common.Status parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.Common.Status parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.greptime.v1.Common.Status prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code greptime.v1.Status} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.Status) + io.greptime.v1.Common.StatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.Common.internal_static_greptime_v1_Status_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.Common.internal_static_greptime_v1_Status_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.Common.Status.class, io.greptime.v1.Common.Status.Builder.class); + } + + // Construct using io.greptime.v1.Common.Status.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + statusCode_ = 0; + + errMsg_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.greptime.v1.Common.internal_static_greptime_v1_Status_descriptor; + } + + @java.lang.Override + public io.greptime.v1.Common.Status getDefaultInstanceForType() { + return io.greptime.v1.Common.Status.getDefaultInstance(); + } + + @java.lang.Override + public io.greptime.v1.Common.Status build() { + io.greptime.v1.Common.Status result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.greptime.v1.Common.Status buildPartial() { + io.greptime.v1.Common.Status result = new io.greptime.v1.Common.Status(this); + result.statusCode_ = statusCode_; + result.errMsg_ = errMsg_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.greptime.v1.Common.Status) { + return mergeFrom((io.greptime.v1.Common.Status)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.greptime.v1.Common.Status other) { + if (other == io.greptime.v1.Common.Status.getDefaultInstance()) return this; + if (other.getStatusCode() != 0) { + setStatusCode(other.getStatusCode()); + } + if (!other.getErrMsg().isEmpty()) { + errMsg_ = other.errMsg_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.greptime.v1.Common.Status parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.Common.Status) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int statusCode_ ; + /** + *
+       * Corresponding to the `StatusCode` definition of GreptimeDB
+       * 
+ * + * uint32 status_code = 1; + * @return The statusCode. + */ + @java.lang.Override + public int getStatusCode() { + return statusCode_; + } + /** + *
+       * Corresponding to the `StatusCode` definition of GreptimeDB
+       * 
+ * + * uint32 status_code = 1; + * @param value The statusCode to set. + * @return This builder for chaining. + */ + public Builder setStatusCode(int value) { + + statusCode_ = value; + onChanged(); + return this; + } + /** + *
+       * Corresponding to the `StatusCode` definition of GreptimeDB
+       * 
+ * + * uint32 status_code = 1; + * @return This builder for chaining. + */ + public Builder clearStatusCode() { + + statusCode_ = 0; + onChanged(); + return this; + } + + private java.lang.Object errMsg_ = ""; + /** + * string err_msg = 2; + * @return The errMsg. + */ + public java.lang.String getErrMsg() { + java.lang.Object ref = errMsg_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + errMsg_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string err_msg = 2; + * @return The bytes for errMsg. + */ + public com.google.protobuf.ByteString + getErrMsgBytes() { + java.lang.Object ref = errMsg_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + errMsg_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string err_msg = 2; + * @param value The errMsg to set. + * @return This builder for chaining. + */ + public Builder setErrMsg( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + errMsg_ = value; + onChanged(); + return this; + } + /** + * string err_msg = 2; + * @return This builder for chaining. + */ + public Builder clearErrMsg() { + + errMsg_ = getDefaultInstance().getErrMsg(); + onChanged(); + return this; + } + /** + * string err_msg = 2; + * @param value The bytes for errMsg to set. + * @return This builder for chaining. + */ + public Builder setErrMsgBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + errMsg_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:greptime.v1.Status) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.Status) + private static final io.greptime.v1.Common.Status DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.greptime.v1.Common.Status(); + } + + public static io.greptime.v1.Common.Status getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Status parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Status(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.greptime.v1.Common.Status getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + public interface AuthHeaderOrBuilder extends // @@protoc_insertion_point(interface_extends:greptime.v1.AuthHeader) com.google.protobuf.MessageOrBuilder { @@ -5299,16 +6162,21 @@ public final class Common { } + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_RequestHeader_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_RequestHeader_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_greptime_v1_ResponseHeader_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_greptime_v1_ResponseHeader_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_greptime_v1_RequestHeader_descriptor; + internal_static_greptime_v1_Status_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_greptime_v1_RequestHeader_fieldAccessorTable; + internal_static_greptime_v1_Status_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_greptime_v1_AuthHeader_descriptor; private static final @@ -5344,64 +6212,72 @@ public final class Common { static { java.lang.String[] descriptorData = { "\n\030greptime/v1/common.proto\022\013greptime.v1\"" + - "\020\n\016ResponseHeader\"\266\001\n\rRequestHeader\022\017\n\007c" + - "atalog\030\001 \001(\t\022\016\n\006schema\030\002 \001(\t\022.\n\rauthoriz" + - "ation\030\003 \001(\0132\027.greptime.v1.AuthHeader\022\016\n\006" + - "dbname\030\004 \001(\t\022\025\n\010trace_id\030\005 \001(\004H\000\210\001\001\022\024\n\007s" + - "pan_id\030\006 \001(\004H\001\210\001\001B\013\n\t_trace_idB\n\n\010_span_" + - "id\"e\n\nAuthHeader\022#\n\005basic\030\001 \001(\0132\022.grepti" + - "me.v1.BasicH\000\022#\n\005token\030\002 \001(\0132\022.greptime." + - "v1.TokenH\000B\r\n\013auth_scheme\"+\n\005Basic\022\020\n\010us" + - "ername\030\001 \001(\t\022\020\n\010password\030\002 \001(\t\"\026\n\005Token\022" + - "\r\n\005token\030\001 \001(\t\"\035\n\014AffectedRows\022\r\n\005value\030" + - "\001 \001(\r\"B\n\016FlightMetadata\0220\n\raffected_rows" + - "\030\001 \001(\0132\031.greptime.v1.AffectedRowsBO\n\016io." + - "greptime.v1B\006CommonZ5github.com/Greptime" + - "Team/greptime-proto/go/greptime/v1b\006prot" + - "o3" + "\266\001\n\rRequestHeader\022\017\n\007catalog\030\001 \001(\t\022\016\n\006sc" + + "hema\030\002 \001(\t\022.\n\rauthorization\030\003 \001(\0132\027.grep" + + "time.v1.AuthHeader\022\016\n\006dbname\030\004 \001(\t\022\025\n\010tr" + + "ace_id\030\005 \001(\004H\000\210\001\001\022\024\n\007span_id\030\006 \001(\004H\001\210\001\001B" + + "\013\n\t_trace_idB\n\n\010_span_id\"5\n\016ResponseHead" + + "er\022#\n\006status\030\001 \001(\0132\023.greptime.v1.Status\"" + + ".\n\006Status\022\023\n\013status_code\030\001 \001(\r\022\017\n\007err_ms" + + "g\030\002 \001(\t\"e\n\nAuthHeader\022#\n\005basic\030\001 \001(\0132\022.g" + + "reptime.v1.BasicH\000\022#\n\005token\030\002 \001(\0132\022.grep" + + "time.v1.TokenH\000B\r\n\013auth_scheme\"+\n\005Basic\022" + + "\020\n\010username\030\001 \001(\t\022\020\n\010password\030\002 \001(\t\"\026\n\005T" + + "oken\022\r\n\005token\030\001 \001(\t\"\035\n\014AffectedRows\022\r\n\005v" + + "alue\030\001 \001(\r\"B\n\016FlightMetadata\0220\n\raffected" + + "_rows\030\001 \001(\0132\031.greptime.v1.AffectedRowsBO" + + "\n\016io.greptime.v1B\006CommonZ5github.com/Gre" + + "ptimeTeam/greptime-proto/go/greptime/v1b" + + "\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { }); - internal_static_greptime_v1_ResponseHeader_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_greptime_v1_ResponseHeader_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_greptime_v1_ResponseHeader_descriptor, - new java.lang.String[] { }); internal_static_greptime_v1_RequestHeader_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageTypes().get(0); internal_static_greptime_v1_RequestHeader_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_RequestHeader_descriptor, new java.lang.String[] { "Catalog", "Schema", "Authorization", "Dbname", "TraceId", "SpanId", "TraceId", "SpanId", }); - internal_static_greptime_v1_AuthHeader_descriptor = + internal_static_greptime_v1_ResponseHeader_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_greptime_v1_ResponseHeader_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_greptime_v1_ResponseHeader_descriptor, + new java.lang.String[] { "Status", }); + internal_static_greptime_v1_Status_descriptor = getDescriptor().getMessageTypes().get(2); + internal_static_greptime_v1_Status_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_greptime_v1_Status_descriptor, + new java.lang.String[] { "StatusCode", "ErrMsg", }); + internal_static_greptime_v1_AuthHeader_descriptor = + getDescriptor().getMessageTypes().get(3); internal_static_greptime_v1_AuthHeader_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_AuthHeader_descriptor, new java.lang.String[] { "Basic", "Token", "AuthScheme", }); internal_static_greptime_v1_Basic_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(4); internal_static_greptime_v1_Basic_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_Basic_descriptor, new java.lang.String[] { "Username", "Password", }); internal_static_greptime_v1_Token_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(5); internal_static_greptime_v1_Token_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_Token_descriptor, new java.lang.String[] { "Token", }); internal_static_greptime_v1_AffectedRows_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(6); internal_static_greptime_v1_AffectedRows_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_AffectedRows_descriptor, new java.lang.String[] { "Value", }); internal_static_greptime_v1_FlightMetadata_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(7); internal_static_greptime_v1_FlightMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_FlightMetadata_descriptor, diff --git a/proto/greptime/v1/common.proto b/proto/greptime/v1/common.proto index 02ae87b..bcefcbf 100644 --- a/proto/greptime/v1/common.proto +++ b/proto/greptime/v1/common.proto @@ -20,8 +20,6 @@ option java_package = "io.greptime.v1"; option java_outer_classname = "Common"; option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1"; -message ResponseHeader {} - message RequestHeader { // The `catalog` that is selected to be used in this request. string catalog = 1; @@ -37,6 +35,16 @@ message RequestHeader { optional uint64 span_id = 6; } +message ResponseHeader { + Status status = 1; +} + +message Status { + // Corresponding to the `StatusCode` definition of GreptimeDB + uint32 status_code = 1; + string err_msg = 2; +} + message AuthHeader { oneof auth_scheme { Basic basic = 1;