From 5f6119ac7952878d39dcde0343c4bf828d18ffc8 Mon Sep 17 00:00:00 2001 From: "Lei, HUANG" <6406592+v0y4g3r@users.noreply.github.com> Date: Thu, 12 Jun 2025 10:45:14 +0800 Subject: [PATCH] feat: frontend server (#242) * feat/frontend-server ### Add Frontend Service Protocol Buffers - Introduced a new Protocol Buffers file `server.proto` in `proto/greptime/v1/frontend/`. - Defined the `Frontend` service with an RPC method `ListProcess`. - Added message definitions for `ListProcessRequest`, `ListProcessResponse`, and `ProcessInfo`. - Included fields for process ID, catalog, schema, query, start timestamp, and client information in `ProcessInfo`. Signed-off-by: Lei, HUANG * feat/frontend-server: ### Update `server.proto` in `greptime/v1/frontend` - Added a newline at the end of the `ProcessInfo` message definition in `server.proto`. Signed-off-by: Lei, HUANG * feat/frontend-server: Add new proto file to build script - Updated `build.rs` to include `proto/greptime/v1/frontend/server.proto` in the build process. Signed-off-by: Lei, HUANG * add frontend mod Signed-off-by: Lei, HUANG * feat/frontend-server: **Add Frontend Info to ProcessInfo** - Updated `server.proto` to include a new field `frontend` in the `ProcessInfo` message, providing additional frontend information for processes. Signed-off-by: Lei, HUANG * feat/frontend-server: Update `server.proto` to modify data types and field names - Changed the data type of `id` from `uint64` to `string` in `ProcessInfo`. - Renamed field `schema` to `schemas` in `ProcessInfo`. Signed-off-by: Lei, HUANG * - Signed-off-by: Lei, HUANG * add catalog to ListProcessRequest --------- Signed-off-by: Lei, HUANG --- build.rs | 1 + c++/greptime/v1/frontend/server.grpc.pb.cc | 90 + c++/greptime/v1/frontend/server.grpc.pb.h | 262 ++ c++/greptime/v1/frontend/server.pb.cc | 1014 ++++++ c++/greptime/v1/frontend/server.pb.h | 1071 ++++++ .../java/io/greptime/v1/frontend/Server.java | 3080 +++++++++++++++++ proto/greptime/v1/frontend/server.proto | 51 + src/v1.rs | 1 + src/v1/frontend.rs | 15 + 9 files changed, 5585 insertions(+) create mode 100644 c++/greptime/v1/frontend/server.grpc.pb.cc create mode 100644 c++/greptime/v1/frontend/server.grpc.pb.h create mode 100644 c++/greptime/v1/frontend/server.pb.cc create mode 100644 c++/greptime/v1/frontend/server.pb.h create mode 100644 java/src/main/java/io/greptime/v1/frontend/Server.java create mode 100644 proto/greptime/v1/frontend/server.proto create mode 100644 src/v1/frontend.rs diff --git a/build.rs b/build.rs index 374c996..131fce1 100644 --- a/build.rs +++ b/build.rs @@ -67,6 +67,7 @@ fn main() { "proto/greptime/v1/meta/procedure.proto", "proto/greptime/v1/region/server.proto", "proto/greptime/v1/flow/server.proto", + "proto/greptime/v1/frontend/server.proto", "proto/greptime/v1/index/bloom_filter.proto", "proto/greptime/v1/index/inverted_index.proto", "proto/prometheus/remote/remote.proto", diff --git a/c++/greptime/v1/frontend/server.grpc.pb.cc b/c++/greptime/v1/frontend/server.grpc.pb.cc new file mode 100644 index 0000000..84e90b7 --- /dev/null +++ b/c++/greptime/v1/frontend/server.grpc.pb.cc @@ -0,0 +1,90 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: greptime/v1/frontend/server.proto + +#include "greptime/v1/frontend/server.pb.h" +#include "greptime/v1/frontend/server.grpc.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace greptime { +namespace v1 { +namespace frontend { + +static const char* Frontend_method_names[] = { + "/greptime.v1.frontend.Frontend/ListProcess", +}; + +std::unique_ptr< Frontend::Stub> Frontend::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< Frontend::Stub> stub(new Frontend::Stub(channel, options)); + return stub; +} + +Frontend::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) + : channel_(channel), rpcmethod_ListProcess_(Frontend_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::Status Frontend::Stub::ListProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest& request, ::greptime::v1::frontend::ListProcessResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::greptime::v1::frontend::ListProcessRequest, ::greptime::v1::frontend::ListProcessResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_ListProcess_, context, request, response); +} + +void Frontend::Stub::async::ListProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest* request, ::greptime::v1::frontend::ListProcessResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::greptime::v1::frontend::ListProcessRequest, ::greptime::v1::frontend::ListProcessResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ListProcess_, context, request, response, std::move(f)); +} + +void Frontend::Stub::async::ListProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest* request, ::greptime::v1::frontend::ListProcessResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ListProcess_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::greptime::v1::frontend::ListProcessResponse>* Frontend::Stub::PrepareAsyncListProcessRaw(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::greptime::v1::frontend::ListProcessResponse, ::greptime::v1::frontend::ListProcessRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_ListProcess_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::greptime::v1::frontend::ListProcessResponse>* Frontend::Stub::AsyncListProcessRaw(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncListProcessRaw(context, request, cq); + result->StartCall(); + return result; +} + +Frontend::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + Frontend_method_names[0], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< Frontend::Service, ::greptime::v1::frontend::ListProcessRequest, ::greptime::v1::frontend::ListProcessResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](Frontend::Service* service, + ::grpc::ServerContext* ctx, + const ::greptime::v1::frontend::ListProcessRequest* req, + ::greptime::v1::frontend::ListProcessResponse* resp) { + return service->ListProcess(ctx, req, resp); + }, this))); +} + +Frontend::Service::~Service() { +} + +::grpc::Status Frontend::Service::ListProcess(::grpc::ServerContext* context, const ::greptime::v1::frontend::ListProcessRequest* request, ::greptime::v1::frontend::ListProcessResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +} // namespace greptime +} // namespace v1 +} // namespace frontend + diff --git a/c++/greptime/v1/frontend/server.grpc.pb.h b/c++/greptime/v1/frontend/server.grpc.pb.h new file mode 100644 index 0000000..eca7401 --- /dev/null +++ b/c++/greptime/v1/frontend/server.grpc.pb.h @@ -0,0 +1,262 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: greptime/v1/frontend/server.proto +// Original file comments: +// Copyright 2023 Greptime Team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#ifndef GRPC_greptime_2fv1_2ffrontend_2fserver_2eproto__INCLUDED +#define GRPC_greptime_2fv1_2ffrontend_2fserver_2eproto__INCLUDED + +#include "greptime/v1/frontend/server.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace greptime { +namespace v1 { +namespace frontend { + +class Frontend final { + public: + static constexpr char const* service_full_name() { + return "greptime.v1.frontend.Frontend"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + // List all running processes on frontend. + virtual ::grpc::Status ListProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest& request, ::greptime::v1::frontend::ListProcessResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::frontend::ListProcessResponse>> AsyncListProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::frontend::ListProcessResponse>>(AsyncListProcessRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::frontend::ListProcessResponse>> PrepareAsyncListProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::frontend::ListProcessResponse>>(PrepareAsyncListProcessRaw(context, request, cq)); + } + class async_interface { + public: + virtual ~async_interface() {} + // List all running processes on frontend. + virtual void ListProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest* request, ::greptime::v1::frontend::ListProcessResponse* response, std::function) = 0; + virtual void ListProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest* request, ::greptime::v1::frontend::ListProcessResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + }; + typedef class async_interface experimental_async_interface; + virtual class async_interface* async() { return nullptr; } + class async_interface* experimental_async() { return async(); } + private: + virtual ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::frontend::ListProcessResponse>* AsyncListProcessRaw(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::frontend::ListProcessResponse>* PrepareAsyncListProcessRaw(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + ::grpc::Status ListProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest& request, ::greptime::v1::frontend::ListProcessResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::frontend::ListProcessResponse>> AsyncListProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::frontend::ListProcessResponse>>(AsyncListProcessRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::frontend::ListProcessResponse>> PrepareAsyncListProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::frontend::ListProcessResponse>>(PrepareAsyncListProcessRaw(context, request, cq)); + } + class async final : + public StubInterface::async_interface { + public: + void ListProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest* request, ::greptime::v1::frontend::ListProcessResponse* response, std::function) override; + void ListProcess(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest* request, ::greptime::v1::frontend::ListProcessResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + private: + friend class Stub; + explicit async(Stub* stub): stub_(stub) { } + Stub* stub() { return stub_; } + Stub* stub_; + }; + class async* async() override { return &async_stub_; } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + class async async_stub_{this}; + ::grpc::ClientAsyncResponseReader< ::greptime::v1::frontend::ListProcessResponse>* AsyncListProcessRaw(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::greptime::v1::frontend::ListProcessResponse>* PrepareAsyncListProcessRaw(::grpc::ClientContext* context, const ::greptime::v1::frontend::ListProcessRequest& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_ListProcess_; + }; + static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + + class Service : public ::grpc::Service { + public: + Service(); + virtual ~Service(); + // List all running processes on frontend. + virtual ::grpc::Status ListProcess(::grpc::ServerContext* context, const ::greptime::v1::frontend::ListProcessRequest* request, ::greptime::v1::frontend::ListProcessResponse* response); + }; + template + class WithAsyncMethod_ListProcess : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_ListProcess() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_ListProcess() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ListProcess(::grpc::ServerContext* /*context*/, const ::greptime::v1::frontend::ListProcessRequest* /*request*/, ::greptime::v1::frontend::ListProcessResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestListProcess(::grpc::ServerContext* context, ::greptime::v1::frontend::ListProcessRequest* request, ::grpc::ServerAsyncResponseWriter< ::greptime::v1::frontend::ListProcessResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); + } + }; + typedef WithAsyncMethod_ListProcess AsyncService; + template + class WithCallbackMethod_ListProcess : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_ListProcess() { + ::grpc::Service::MarkMethodCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::greptime::v1::frontend::ListProcessRequest, ::greptime::v1::frontend::ListProcessResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::greptime::v1::frontend::ListProcessRequest* request, ::greptime::v1::frontend::ListProcessResponse* response) { return this->ListProcess(context, request, response); }));} + void SetMessageAllocatorFor_ListProcess( + ::grpc::MessageAllocator< ::greptime::v1::frontend::ListProcessRequest, ::greptime::v1::frontend::ListProcessResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0); + static_cast<::grpc::internal::CallbackUnaryHandler< ::greptime::v1::frontend::ListProcessRequest, ::greptime::v1::frontend::ListProcessResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_ListProcess() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ListProcess(::grpc::ServerContext* /*context*/, const ::greptime::v1::frontend::ListProcessRequest* /*request*/, ::greptime::v1::frontend::ListProcessResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* ListProcess( + ::grpc::CallbackServerContext* /*context*/, const ::greptime::v1::frontend::ListProcessRequest* /*request*/, ::greptime::v1::frontend::ListProcessResponse* /*response*/) { return nullptr; } + }; + typedef WithCallbackMethod_ListProcess CallbackService; + typedef CallbackService ExperimentalCallbackService; + template + class WithGenericMethod_ListProcess : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_ListProcess() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_ListProcess() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ListProcess(::grpc::ServerContext* /*context*/, const ::greptime::v1::frontend::ListProcessRequest* /*request*/, ::greptime::v1::frontend::ListProcessResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_ListProcess : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_ListProcess() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_ListProcess() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ListProcess(::grpc::ServerContext* /*context*/, const ::greptime::v1::frontend::ListProcessRequest* /*request*/, ::greptime::v1::frontend::ListProcessResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestListProcess(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawCallbackMethod_ListProcess : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_ListProcess() { + ::grpc::Service::MarkMethodRawCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->ListProcess(context, request, response); })); + } + ~WithRawCallbackMethod_ListProcess() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ListProcess(::grpc::ServerContext* /*context*/, const ::greptime::v1::frontend::ListProcessRequest* /*request*/, ::greptime::v1::frontend::ListProcessResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* ListProcess( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithStreamedUnaryMethod_ListProcess : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_ListProcess() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::StreamedUnaryHandler< + ::greptime::v1::frontend::ListProcessRequest, ::greptime::v1::frontend::ListProcessResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::greptime::v1::frontend::ListProcessRequest, ::greptime::v1::frontend::ListProcessResponse>* streamer) { + return this->StreamedListProcess(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_ListProcess() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status ListProcess(::grpc::ServerContext* /*context*/, const ::greptime::v1::frontend::ListProcessRequest* /*request*/, ::greptime::v1::frontend::ListProcessResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedListProcess(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::greptime::v1::frontend::ListProcessRequest,::greptime::v1::frontend::ListProcessResponse>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_ListProcess StreamedUnaryService; + typedef Service SplitStreamedService; + typedef WithStreamedUnaryMethod_ListProcess StreamedService; +}; + +} // namespace frontend +} // namespace v1 +} // namespace greptime + + +#endif // GRPC_greptime_2fv1_2ffrontend_2fserver_2eproto__INCLUDED diff --git a/c++/greptime/v1/frontend/server.pb.cc b/c++/greptime/v1/frontend/server.pb.cc new file mode 100644 index 0000000..f91215e --- /dev/null +++ b/c++/greptime/v1/frontend/server.pb.cc @@ -0,0 +1,1014 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: greptime/v1/frontend/server.proto + +#include "greptime/v1/frontend/server.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG + +namespace _pb = ::PROTOBUF_NAMESPACE_ID; +namespace _pbi = _pb::internal; + +namespace greptime { +namespace v1 { +namespace frontend { +PROTOBUF_CONSTEXPR ListProcessRequest::ListProcessRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.catalog_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ListProcessRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR ListProcessRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ListProcessRequestDefaultTypeInternal() {} + union { + ListProcessRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ListProcessRequestDefaultTypeInternal _ListProcessRequest_default_instance_; +PROTOBUF_CONSTEXPR ListProcessResponse::ListProcessResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.processes_)*/{} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ListProcessResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR ListProcessResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ListProcessResponseDefaultTypeInternal() {} + union { + ListProcessResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ListProcessResponseDefaultTypeInternal _ListProcessResponse_default_instance_; +PROTOBUF_CONSTEXPR ProcessInfo::ProcessInfo( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.schemas_)*/{} + , /*decltype(_impl_.catalog_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.query_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.client_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.frontend_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.id_)*/uint64_t{0u} + , /*decltype(_impl_.start_timestamp_)*/int64_t{0} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ProcessInfoDefaultTypeInternal { + PROTOBUF_CONSTEXPR ProcessInfoDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ProcessInfoDefaultTypeInternal() {} + union { + ProcessInfo _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ProcessInfoDefaultTypeInternal _ProcessInfo_default_instance_; +} // namespace frontend +} // namespace v1 +} // namespace greptime +static ::_pb::Metadata file_level_metadata_greptime_2fv1_2ffrontend_2fserver_2eproto[3]; +static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_greptime_2fv1_2ffrontend_2fserver_2eproto = nullptr; +static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2ffrontend_2fserver_2eproto = nullptr; + +const uint32_t TableStruct_greptime_2fv1_2ffrontend_2fserver_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::frontend::ListProcessRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::frontend::ListProcessRequest, _impl_.catalog_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::frontend::ListProcessResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::frontend::ListProcessResponse, _impl_.processes_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::frontend::ProcessInfo, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::frontend::ProcessInfo, _impl_.id_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::frontend::ProcessInfo, _impl_.catalog_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::frontend::ProcessInfo, _impl_.schemas_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::frontend::ProcessInfo, _impl_.query_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::frontend::ProcessInfo, _impl_.start_timestamp_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::frontend::ProcessInfo, _impl_.client_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::frontend::ProcessInfo, _impl_.frontend_), +}; +static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, -1, sizeof(::greptime::v1::frontend::ListProcessRequest)}, + { 7, -1, -1, sizeof(::greptime::v1::frontend::ListProcessResponse)}, + { 14, -1, -1, sizeof(::greptime::v1::frontend::ProcessInfo)}, +}; + +static const ::_pb::Message* const file_default_instances[] = { + &::greptime::v1::frontend::_ListProcessRequest_default_instance_._instance, + &::greptime::v1::frontend::_ListProcessResponse_default_instance_._instance, + &::greptime::v1::frontend::_ProcessInfo_default_instance_._instance, +}; + +const char descriptor_table_protodef_greptime_2fv1_2ffrontend_2fserver_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n!greptime/v1/frontend/server.proto\022\024gre" + "ptime.v1.frontend\"%\n\022ListProcessRequest\022" + "\017\n\007catalog\030\001 \001(\t\"K\n\023ListProcessResponse\022" + "4\n\tprocesses\030\001 \003(\0132!.greptime.v1.fronten" + "d.ProcessInfo\"\205\001\n\013ProcessInfo\022\n\n\002id\030\001 \001(" + "\004\022\017\n\007catalog\030\002 \001(\t\022\017\n\007schemas\030\003 \003(\t\022\r\n\005q" + "uery\030\004 \001(\t\022\027\n\017start_timestamp\030\005 \001(\003\022\016\n\006c" + "lient\030\006 \001(\t\022\020\n\010frontend\030\007 \001(\t2n\n\010Fronten" + "d\022b\n\013ListProcess\022(.greptime.v1.frontend." + "ListProcessRequest\032).greptime.v1.fronten" + "d.ListProcessResponseBa\n\027io.greptime.v1." + "frontendB\006ServerZ>github.com/GreptimeTea" + "m/greptime-proto/go/greptime/v1/frontend" + "b\006proto3" + ; +static ::_pbi::once_flag descriptor_table_greptime_2fv1_2ffrontend_2fserver_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2ffrontend_2fserver_2eproto = { + false, false, 528, descriptor_table_protodef_greptime_2fv1_2ffrontend_2fserver_2eproto, + "greptime/v1/frontend/server.proto", + &descriptor_table_greptime_2fv1_2ffrontend_2fserver_2eproto_once, nullptr, 0, 3, + schemas, file_default_instances, TableStruct_greptime_2fv1_2ffrontend_2fserver_2eproto::offsets, + file_level_metadata_greptime_2fv1_2ffrontend_2fserver_2eproto, file_level_enum_descriptors_greptime_2fv1_2ffrontend_2fserver_2eproto, + file_level_service_descriptors_greptime_2fv1_2ffrontend_2fserver_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_greptime_2fv1_2ffrontend_2fserver_2eproto_getter() { + return &descriptor_table_greptime_2fv1_2ffrontend_2fserver_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_greptime_2fv1_2ffrontend_2fserver_2eproto(&descriptor_table_greptime_2fv1_2ffrontend_2fserver_2eproto); +namespace greptime { +namespace v1 { +namespace frontend { + +// =================================================================== + +class ListProcessRequest::_Internal { + public: +}; + +ListProcessRequest::ListProcessRequest(::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.frontend.ListProcessRequest) +} +ListProcessRequest::ListProcessRequest(const ListProcessRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + ListProcessRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.catalog_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.catalog_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.catalog_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_catalog().empty()) { + _this->_impl_.catalog_.Set(from._internal_catalog(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:greptime.v1.frontend.ListProcessRequest) +} + +inline void ListProcessRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.catalog_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.catalog_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.catalog_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +ListProcessRequest::~ListProcessRequest() { + // @@protoc_insertion_point(destructor:greptime.v1.frontend.ListProcessRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ListProcessRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.catalog_.Destroy(); +} + +void ListProcessRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ListProcessRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.frontend.ListProcessRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.catalog_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ListProcessRequest::_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) { + // string catalog = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_catalog(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.frontend.ListProcessRequest.catalog")); + } 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* ListProcessRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.frontend.ListProcessRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string catalog = 1; + if (!this->_internal_catalog().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_catalog().data(), static_cast(this->_internal_catalog().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "greptime.v1.frontend.ListProcessRequest.catalog"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_catalog(), 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.frontend.ListProcessRequest) + return target; +} + +size_t ListProcessRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.frontend.ListProcessRequest) + 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 catalog = 1; + if (!this->_internal_catalog().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_catalog()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ListProcessRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + ListProcessRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ListProcessRequest::GetClassData() const { return &_class_data_; } + + +void ListProcessRequest::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.frontend.ListProcessRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_catalog().empty()) { + _this->_internal_set_catalog(from._internal_catalog()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ListProcessRequest::CopyFrom(const ListProcessRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.frontend.ListProcessRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ListProcessRequest::IsInitialized() const { + return true; +} + +void ListProcessRequest::InternalSwap(ListProcessRequest* 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_.catalog_, lhs_arena, + &other->_impl_.catalog_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ListProcessRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_greptime_2fv1_2ffrontend_2fserver_2eproto_getter, &descriptor_table_greptime_2fv1_2ffrontend_2fserver_2eproto_once, + file_level_metadata_greptime_2fv1_2ffrontend_2fserver_2eproto[0]); +} + +// =================================================================== + +class ListProcessResponse::_Internal { + public: +}; + +ListProcessResponse::ListProcessResponse(::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.frontend.ListProcessResponse) +} +ListProcessResponse::ListProcessResponse(const ListProcessResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + ListProcessResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.processes_){from._impl_.processes_} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:greptime.v1.frontend.ListProcessResponse) +} + +inline void ListProcessResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.processes_){arena} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +ListProcessResponse::~ListProcessResponse() { + // @@protoc_insertion_point(destructor:greptime.v1.frontend.ListProcessResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ListProcessResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.processes_.~RepeatedPtrField(); +} + +void ListProcessResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ListProcessResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.frontend.ListProcessResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.processes_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ListProcessResponse::_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) { + // repeated .greptime.v1.frontend.ProcessInfo processes = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_processes(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(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* ListProcessResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.frontend.ListProcessResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .greptime.v1.frontend.ProcessInfo processes = 1; + for (unsigned i = 0, + n = static_cast(this->_internal_processes_size()); i < n; i++) { + const auto& repfield = this->_internal_processes(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, repfield, repfield.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.frontend.ListProcessResponse) + return target; +} + +size_t ListProcessResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.frontend.ListProcessResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .greptime.v1.frontend.ProcessInfo processes = 1; + total_size += 1UL * this->_internal_processes_size(); + for (const auto& msg : this->_impl_.processes_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ListProcessResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + ListProcessResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ListProcessResponse::GetClassData() const { return &_class_data_; } + + +void ListProcessResponse::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.frontend.ListProcessResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.processes_.MergeFrom(from._impl_.processes_); + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ListProcessResponse::CopyFrom(const ListProcessResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.frontend.ListProcessResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ListProcessResponse::IsInitialized() const { + return true; +} + +void ListProcessResponse::InternalSwap(ListProcessResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.processes_.InternalSwap(&other->_impl_.processes_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ListProcessResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_greptime_2fv1_2ffrontend_2fserver_2eproto_getter, &descriptor_table_greptime_2fv1_2ffrontend_2fserver_2eproto_once, + file_level_metadata_greptime_2fv1_2ffrontend_2fserver_2eproto[1]); +} + +// =================================================================== + +class ProcessInfo::_Internal { + public: +}; + +ProcessInfo::ProcessInfo(::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.frontend.ProcessInfo) +} +ProcessInfo::ProcessInfo(const ProcessInfo& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + ProcessInfo* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.schemas_){from._impl_.schemas_} + , decltype(_impl_.catalog_){} + , decltype(_impl_.query_){} + , decltype(_impl_.client_){} + , decltype(_impl_.frontend_){} + , decltype(_impl_.id_){} + , decltype(_impl_.start_timestamp_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.catalog_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.catalog_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_catalog().empty()) { + _this->_impl_.catalog_.Set(from._internal_catalog(), + _this->GetArenaForAllocation()); + } + _impl_.query_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.query_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_query().empty()) { + _this->_impl_.query_.Set(from._internal_query(), + _this->GetArenaForAllocation()); + } + _impl_.client_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.client_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_client().empty()) { + _this->_impl_.client_.Set(from._internal_client(), + _this->GetArenaForAllocation()); + } + _impl_.frontend_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.frontend_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_frontend().empty()) { + _this->_impl_.frontend_.Set(from._internal_frontend(), + _this->GetArenaForAllocation()); + } + ::memcpy(&_impl_.id_, &from._impl_.id_, + static_cast(reinterpret_cast(&_impl_.start_timestamp_) - + reinterpret_cast(&_impl_.id_)) + sizeof(_impl_.start_timestamp_)); + // @@protoc_insertion_point(copy_constructor:greptime.v1.frontend.ProcessInfo) +} + +inline void ProcessInfo::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.schemas_){arena} + , decltype(_impl_.catalog_){} + , decltype(_impl_.query_){} + , decltype(_impl_.client_){} + , decltype(_impl_.frontend_){} + , decltype(_impl_.id_){uint64_t{0u}} + , decltype(_impl_.start_timestamp_){int64_t{0}} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.catalog_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.catalog_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.query_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.query_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.client_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.client_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.frontend_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.frontend_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +ProcessInfo::~ProcessInfo() { + // @@protoc_insertion_point(destructor:greptime.v1.frontend.ProcessInfo) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ProcessInfo::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.schemas_.~RepeatedPtrField(); + _impl_.catalog_.Destroy(); + _impl_.query_.Destroy(); + _impl_.client_.Destroy(); + _impl_.frontend_.Destroy(); +} + +void ProcessInfo::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ProcessInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.frontend.ProcessInfo) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.schemas_.Clear(); + _impl_.catalog_.ClearToEmpty(); + _impl_.query_.ClearToEmpty(); + _impl_.client_.ClearToEmpty(); + _impl_.frontend_.ClearToEmpty(); + ::memset(&_impl_.id_, 0, static_cast( + reinterpret_cast(&_impl_.start_timestamp_) - + reinterpret_cast(&_impl_.id_)) + sizeof(_impl_.start_timestamp_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ProcessInfo::_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) { + // uint64 id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string catalog = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_catalog(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.frontend.ProcessInfo.catalog")); + } else + goto handle_unusual; + continue; + // repeated string schemas = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_schemas(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.frontend.ProcessInfo.schemas")); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); + } else + goto handle_unusual; + continue; + // string query = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + auto str = _internal_mutable_query(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.frontend.ProcessInfo.query")); + } else + goto handle_unusual; + continue; + // int64 start_timestamp = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { + _impl_.start_timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string client = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { + auto str = _internal_mutable_client(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.frontend.ProcessInfo.client")); + } else + goto handle_unusual; + continue; + // string frontend = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { + auto str = _internal_mutable_frontend(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.frontend.ProcessInfo.frontend")); + } 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* ProcessInfo::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.frontend.ProcessInfo) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint64 id = 1; + if (this->_internal_id() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_id(), target); + } + + // string catalog = 2; + if (!this->_internal_catalog().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_catalog().data(), static_cast(this->_internal_catalog().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "greptime.v1.frontend.ProcessInfo.catalog"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_catalog(), target); + } + + // repeated string schemas = 3; + for (int i = 0, n = this->_internal_schemas_size(); i < n; i++) { + const auto& s = this->_internal_schemas(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "greptime.v1.frontend.ProcessInfo.schemas"); + target = stream->WriteString(3, s, target); + } + + // string query = 4; + if (!this->_internal_query().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_query().data(), static_cast(this->_internal_query().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "greptime.v1.frontend.ProcessInfo.query"); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_query(), target); + } + + // int64 start_timestamp = 5; + if (this->_internal_start_timestamp() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(5, this->_internal_start_timestamp(), target); + } + + // string client = 6; + if (!this->_internal_client().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_client().data(), static_cast(this->_internal_client().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "greptime.v1.frontend.ProcessInfo.client"); + target = stream->WriteStringMaybeAliased( + 6, this->_internal_client(), target); + } + + // string frontend = 7; + if (!this->_internal_frontend().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_frontend().data(), static_cast(this->_internal_frontend().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "greptime.v1.frontend.ProcessInfo.frontend"); + target = stream->WriteStringMaybeAliased( + 7, this->_internal_frontend(), 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.frontend.ProcessInfo) + return target; +} + +size_t ProcessInfo::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.frontend.ProcessInfo) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string schemas = 3; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.schemas_.size()); + for (int i = 0, n = _impl_.schemas_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + _impl_.schemas_.Get(i)); + } + + // string catalog = 2; + if (!this->_internal_catalog().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_catalog()); + } + + // string query = 4; + if (!this->_internal_query().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_query()); + } + + // string client = 6; + if (!this->_internal_client().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_client()); + } + + // string frontend = 7; + if (!this->_internal_frontend().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_frontend()); + } + + // uint64 id = 1; + if (this->_internal_id() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_id()); + } + + // int64 start_timestamp = 5; + if (this->_internal_start_timestamp() != 0) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_start_timestamp()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ProcessInfo::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + ProcessInfo::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ProcessInfo::GetClassData() const { return &_class_data_; } + + +void ProcessInfo::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.frontend.ProcessInfo) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.schemas_.MergeFrom(from._impl_.schemas_); + if (!from._internal_catalog().empty()) { + _this->_internal_set_catalog(from._internal_catalog()); + } + if (!from._internal_query().empty()) { + _this->_internal_set_query(from._internal_query()); + } + if (!from._internal_client().empty()) { + _this->_internal_set_client(from._internal_client()); + } + if (!from._internal_frontend().empty()) { + _this->_internal_set_frontend(from._internal_frontend()); + } + if (from._internal_id() != 0) { + _this->_internal_set_id(from._internal_id()); + } + if (from._internal_start_timestamp() != 0) { + _this->_internal_set_start_timestamp(from._internal_start_timestamp()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ProcessInfo::CopyFrom(const ProcessInfo& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.frontend.ProcessInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ProcessInfo::IsInitialized() const { + return true; +} + +void ProcessInfo::InternalSwap(ProcessInfo* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.schemas_.InternalSwap(&other->_impl_.schemas_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.catalog_, lhs_arena, + &other->_impl_.catalog_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.query_, lhs_arena, + &other->_impl_.query_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.client_, lhs_arena, + &other->_impl_.client_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.frontend_, lhs_arena, + &other->_impl_.frontend_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ProcessInfo, _impl_.start_timestamp_) + + sizeof(ProcessInfo::_impl_.start_timestamp_) + - PROTOBUF_FIELD_OFFSET(ProcessInfo, _impl_.id_)>( + reinterpret_cast(&_impl_.id_), + reinterpret_cast(&other->_impl_.id_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ProcessInfo::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_greptime_2fv1_2ffrontend_2fserver_2eproto_getter, &descriptor_table_greptime_2fv1_2ffrontend_2fserver_2eproto_once, + file_level_metadata_greptime_2fv1_2ffrontend_2fserver_2eproto[2]); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace frontend +} // namespace v1 +} // namespace greptime +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::greptime::v1::frontend::ListProcessRequest* +Arena::CreateMaybeMessage< ::greptime::v1::frontend::ListProcessRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::frontend::ListProcessRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::greptime::v1::frontend::ListProcessResponse* +Arena::CreateMaybeMessage< ::greptime::v1::frontend::ListProcessResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::frontend::ListProcessResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::greptime::v1::frontend::ProcessInfo* +Arena::CreateMaybeMessage< ::greptime::v1::frontend::ProcessInfo >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::frontend::ProcessInfo >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/c++/greptime/v1/frontend/server.pb.h b/c++/greptime/v1/frontend/server.pb.h new file mode 100644 index 0000000..7da1ce5 --- /dev/null +++ b/c++/greptime/v1/frontend/server.pb.h @@ -0,0 +1,1071 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: greptime/v1/frontend/server.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_greptime_2fv1_2ffrontend_2fserver_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_greptime_2fv1_2ffrontend_2fserver_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021006 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_greptime_2fv1_2ffrontend_2fserver_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_greptime_2fv1_2ffrontend_2fserver_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_greptime_2fv1_2ffrontend_2fserver_2eproto; +namespace greptime { +namespace v1 { +namespace frontend { +class ListProcessRequest; +struct ListProcessRequestDefaultTypeInternal; +extern ListProcessRequestDefaultTypeInternal _ListProcessRequest_default_instance_; +class ListProcessResponse; +struct ListProcessResponseDefaultTypeInternal; +extern ListProcessResponseDefaultTypeInternal _ListProcessResponse_default_instance_; +class ProcessInfo; +struct ProcessInfoDefaultTypeInternal; +extern ProcessInfoDefaultTypeInternal _ProcessInfo_default_instance_; +} // namespace frontend +} // namespace v1 +} // namespace greptime +PROTOBUF_NAMESPACE_OPEN +template<> ::greptime::v1::frontend::ListProcessRequest* Arena::CreateMaybeMessage<::greptime::v1::frontend::ListProcessRequest>(Arena*); +template<> ::greptime::v1::frontend::ListProcessResponse* Arena::CreateMaybeMessage<::greptime::v1::frontend::ListProcessResponse>(Arena*); +template<> ::greptime::v1::frontend::ProcessInfo* Arena::CreateMaybeMessage<::greptime::v1::frontend::ProcessInfo>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace greptime { +namespace v1 { +namespace frontend { + +// =================================================================== + +class ListProcessRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.frontend.ListProcessRequest) */ { + public: + inline ListProcessRequest() : ListProcessRequest(nullptr) {} + ~ListProcessRequest() override; + explicit PROTOBUF_CONSTEXPR ListProcessRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ListProcessRequest(const ListProcessRequest& from); + ListProcessRequest(ListProcessRequest&& from) noexcept + : ListProcessRequest() { + *this = ::std::move(from); + } + + inline ListProcessRequest& operator=(const ListProcessRequest& from) { + CopyFrom(from); + return *this; + } + inline ListProcessRequest& operator=(ListProcessRequest&& 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 ListProcessRequest& default_instance() { + return *internal_default_instance(); + } + static inline const ListProcessRequest* internal_default_instance() { + return reinterpret_cast( + &_ListProcessRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(ListProcessRequest& a, ListProcessRequest& b) { + a.Swap(&b); + } + inline void Swap(ListProcessRequest* 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(ListProcessRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ListProcessRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ListProcessRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ListProcessRequest& from) { + ListProcessRequest::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(ListProcessRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "greptime.v1.frontend.ListProcessRequest"; + } + protected: + explicit ListProcessRequest(::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 { + kCatalogFieldNumber = 1, + }; + // string catalog = 1; + void clear_catalog(); + const std::string& catalog() const; + template + void set_catalog(ArgT0&& arg0, ArgT... args); + std::string* mutable_catalog(); + PROTOBUF_NODISCARD std::string* release_catalog(); + void set_allocated_catalog(std::string* catalog); + private: + const std::string& _internal_catalog() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_catalog(const std::string& value); + std::string* _internal_mutable_catalog(); + public: + + // @@protoc_insertion_point(class_scope:greptime.v1.frontend.ListProcessRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr catalog_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_greptime_2fv1_2ffrontend_2fserver_2eproto; +}; +// ------------------------------------------------------------------- + +class ListProcessResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.frontend.ListProcessResponse) */ { + public: + inline ListProcessResponse() : ListProcessResponse(nullptr) {} + ~ListProcessResponse() override; + explicit PROTOBUF_CONSTEXPR ListProcessResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ListProcessResponse(const ListProcessResponse& from); + ListProcessResponse(ListProcessResponse&& from) noexcept + : ListProcessResponse() { + *this = ::std::move(from); + } + + inline ListProcessResponse& operator=(const ListProcessResponse& from) { + CopyFrom(from); + return *this; + } + inline ListProcessResponse& operator=(ListProcessResponse&& 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 ListProcessResponse& default_instance() { + return *internal_default_instance(); + } + static inline const ListProcessResponse* internal_default_instance() { + return reinterpret_cast( + &_ListProcessResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(ListProcessResponse& a, ListProcessResponse& b) { + a.Swap(&b); + } + inline void Swap(ListProcessResponse* 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(ListProcessResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ListProcessResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ListProcessResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ListProcessResponse& from) { + ListProcessResponse::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(ListProcessResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "greptime.v1.frontend.ListProcessResponse"; + } + protected: + explicit ListProcessResponse(::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 { + kProcessesFieldNumber = 1, + }; + // repeated .greptime.v1.frontend.ProcessInfo processes = 1; + int processes_size() const; + private: + int _internal_processes_size() const; + public: + void clear_processes(); + ::greptime::v1::frontend::ProcessInfo* mutable_processes(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::frontend::ProcessInfo >* + mutable_processes(); + private: + const ::greptime::v1::frontend::ProcessInfo& _internal_processes(int index) const; + ::greptime::v1::frontend::ProcessInfo* _internal_add_processes(); + public: + const ::greptime::v1::frontend::ProcessInfo& processes(int index) const; + ::greptime::v1::frontend::ProcessInfo* add_processes(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::frontend::ProcessInfo >& + processes() const; + + // @@protoc_insertion_point(class_scope:greptime.v1.frontend.ListProcessResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::frontend::ProcessInfo > processes_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_greptime_2fv1_2ffrontend_2fserver_2eproto; +}; +// ------------------------------------------------------------------- + +class ProcessInfo final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.frontend.ProcessInfo) */ { + public: + inline ProcessInfo() : ProcessInfo(nullptr) {} + ~ProcessInfo() override; + explicit PROTOBUF_CONSTEXPR ProcessInfo(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ProcessInfo(const ProcessInfo& from); + ProcessInfo(ProcessInfo&& from) noexcept + : ProcessInfo() { + *this = ::std::move(from); + } + + inline ProcessInfo& operator=(const ProcessInfo& from) { + CopyFrom(from); + return *this; + } + inline ProcessInfo& operator=(ProcessInfo&& 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 ProcessInfo& default_instance() { + return *internal_default_instance(); + } + static inline const ProcessInfo* internal_default_instance() { + return reinterpret_cast( + &_ProcessInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(ProcessInfo& a, ProcessInfo& b) { + a.Swap(&b); + } + inline void Swap(ProcessInfo* 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(ProcessInfo* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ProcessInfo* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ProcessInfo& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ProcessInfo& from) { + ProcessInfo::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(ProcessInfo* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "greptime.v1.frontend.ProcessInfo"; + } + protected: + explicit ProcessInfo(::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 { + kSchemasFieldNumber = 3, + kCatalogFieldNumber = 2, + kQueryFieldNumber = 4, + kClientFieldNumber = 6, + kFrontendFieldNumber = 7, + kIdFieldNumber = 1, + kStartTimestampFieldNumber = 5, + }; + // repeated string schemas = 3; + int schemas_size() const; + private: + int _internal_schemas_size() const; + public: + void clear_schemas(); + const std::string& schemas(int index) const; + std::string* mutable_schemas(int index); + void set_schemas(int index, const std::string& value); + void set_schemas(int index, std::string&& value); + void set_schemas(int index, const char* value); + void set_schemas(int index, const char* value, size_t size); + std::string* add_schemas(); + void add_schemas(const std::string& value); + void add_schemas(std::string&& value); + void add_schemas(const char* value); + void add_schemas(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& schemas() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_schemas(); + private: + const std::string& _internal_schemas(int index) const; + std::string* _internal_add_schemas(); + public: + + // string catalog = 2; + void clear_catalog(); + const std::string& catalog() const; + template + void set_catalog(ArgT0&& arg0, ArgT... args); + std::string* mutable_catalog(); + PROTOBUF_NODISCARD std::string* release_catalog(); + void set_allocated_catalog(std::string* catalog); + private: + const std::string& _internal_catalog() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_catalog(const std::string& value); + std::string* _internal_mutable_catalog(); + public: + + // string query = 4; + void clear_query(); + const std::string& query() const; + template + void set_query(ArgT0&& arg0, ArgT... args); + std::string* mutable_query(); + PROTOBUF_NODISCARD std::string* release_query(); + void set_allocated_query(std::string* query); + private: + const std::string& _internal_query() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_query(const std::string& value); + std::string* _internal_mutable_query(); + public: + + // string client = 6; + void clear_client(); + const std::string& client() const; + template + void set_client(ArgT0&& arg0, ArgT... args); + std::string* mutable_client(); + PROTOBUF_NODISCARD std::string* release_client(); + void set_allocated_client(std::string* client); + private: + const std::string& _internal_client() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_client(const std::string& value); + std::string* _internal_mutable_client(); + public: + + // string frontend = 7; + void clear_frontend(); + const std::string& frontend() const; + template + void set_frontend(ArgT0&& arg0, ArgT... args); + std::string* mutable_frontend(); + PROTOBUF_NODISCARD std::string* release_frontend(); + void set_allocated_frontend(std::string* frontend); + private: + const std::string& _internal_frontend() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_frontend(const std::string& value); + std::string* _internal_mutable_frontend(); + public: + + // uint64 id = 1; + void clear_id(); + uint64_t id() const; + void set_id(uint64_t value); + private: + uint64_t _internal_id() const; + void _internal_set_id(uint64_t value); + public: + + // int64 start_timestamp = 5; + void clear_start_timestamp(); + int64_t start_timestamp() const; + void set_start_timestamp(int64_t value); + private: + int64_t _internal_start_timestamp() const; + void _internal_set_start_timestamp(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:greptime.v1.frontend.ProcessInfo) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField schemas_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr catalog_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr query_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr client_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr frontend_; + uint64_t id_; + int64_t start_timestamp_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_greptime_2fv1_2ffrontend_2fserver_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ListProcessRequest + +// string catalog = 1; +inline void ListProcessRequest::clear_catalog() { + _impl_.catalog_.ClearToEmpty(); +} +inline const std::string& ListProcessRequest::catalog() const { + // @@protoc_insertion_point(field_get:greptime.v1.frontend.ListProcessRequest.catalog) + return _internal_catalog(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ListProcessRequest::set_catalog(ArgT0&& arg0, ArgT... args) { + + _impl_.catalog_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:greptime.v1.frontend.ListProcessRequest.catalog) +} +inline std::string* ListProcessRequest::mutable_catalog() { + std::string* _s = _internal_mutable_catalog(); + // @@protoc_insertion_point(field_mutable:greptime.v1.frontend.ListProcessRequest.catalog) + return _s; +} +inline const std::string& ListProcessRequest::_internal_catalog() const { + return _impl_.catalog_.Get(); +} +inline void ListProcessRequest::_internal_set_catalog(const std::string& value) { + + _impl_.catalog_.Set(value, GetArenaForAllocation()); +} +inline std::string* ListProcessRequest::_internal_mutable_catalog() { + + return _impl_.catalog_.Mutable(GetArenaForAllocation()); +} +inline std::string* ListProcessRequest::release_catalog() { + // @@protoc_insertion_point(field_release:greptime.v1.frontend.ListProcessRequest.catalog) + return _impl_.catalog_.Release(); +} +inline void ListProcessRequest::set_allocated_catalog(std::string* catalog) { + if (catalog != nullptr) { + + } else { + + } + _impl_.catalog_.SetAllocated(catalog, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.catalog_.IsDefault()) { + _impl_.catalog_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:greptime.v1.frontend.ListProcessRequest.catalog) +} + +// ------------------------------------------------------------------- + +// ListProcessResponse + +// repeated .greptime.v1.frontend.ProcessInfo processes = 1; +inline int ListProcessResponse::_internal_processes_size() const { + return _impl_.processes_.size(); +} +inline int ListProcessResponse::processes_size() const { + return _internal_processes_size(); +} +inline void ListProcessResponse::clear_processes() { + _impl_.processes_.Clear(); +} +inline ::greptime::v1::frontend::ProcessInfo* ListProcessResponse::mutable_processes(int index) { + // @@protoc_insertion_point(field_mutable:greptime.v1.frontend.ListProcessResponse.processes) + return _impl_.processes_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::frontend::ProcessInfo >* +ListProcessResponse::mutable_processes() { + // @@protoc_insertion_point(field_mutable_list:greptime.v1.frontend.ListProcessResponse.processes) + return &_impl_.processes_; +} +inline const ::greptime::v1::frontend::ProcessInfo& ListProcessResponse::_internal_processes(int index) const { + return _impl_.processes_.Get(index); +} +inline const ::greptime::v1::frontend::ProcessInfo& ListProcessResponse::processes(int index) const { + // @@protoc_insertion_point(field_get:greptime.v1.frontend.ListProcessResponse.processes) + return _internal_processes(index); +} +inline ::greptime::v1::frontend::ProcessInfo* ListProcessResponse::_internal_add_processes() { + return _impl_.processes_.Add(); +} +inline ::greptime::v1::frontend::ProcessInfo* ListProcessResponse::add_processes() { + ::greptime::v1::frontend::ProcessInfo* _add = _internal_add_processes(); + // @@protoc_insertion_point(field_add:greptime.v1.frontend.ListProcessResponse.processes) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::frontend::ProcessInfo >& +ListProcessResponse::processes() const { + // @@protoc_insertion_point(field_list:greptime.v1.frontend.ListProcessResponse.processes) + return _impl_.processes_; +} + +// ------------------------------------------------------------------- + +// ProcessInfo + +// uint64 id = 1; +inline void ProcessInfo::clear_id() { + _impl_.id_ = uint64_t{0u}; +} +inline uint64_t ProcessInfo::_internal_id() const { + return _impl_.id_; +} +inline uint64_t ProcessInfo::id() const { + // @@protoc_insertion_point(field_get:greptime.v1.frontend.ProcessInfo.id) + return _internal_id(); +} +inline void ProcessInfo::_internal_set_id(uint64_t value) { + + _impl_.id_ = value; +} +inline void ProcessInfo::set_id(uint64_t value) { + _internal_set_id(value); + // @@protoc_insertion_point(field_set:greptime.v1.frontend.ProcessInfo.id) +} + +// string catalog = 2; +inline void ProcessInfo::clear_catalog() { + _impl_.catalog_.ClearToEmpty(); +} +inline const std::string& ProcessInfo::catalog() const { + // @@protoc_insertion_point(field_get:greptime.v1.frontend.ProcessInfo.catalog) + return _internal_catalog(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ProcessInfo::set_catalog(ArgT0&& arg0, ArgT... args) { + + _impl_.catalog_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:greptime.v1.frontend.ProcessInfo.catalog) +} +inline std::string* ProcessInfo::mutable_catalog() { + std::string* _s = _internal_mutable_catalog(); + // @@protoc_insertion_point(field_mutable:greptime.v1.frontend.ProcessInfo.catalog) + return _s; +} +inline const std::string& ProcessInfo::_internal_catalog() const { + return _impl_.catalog_.Get(); +} +inline void ProcessInfo::_internal_set_catalog(const std::string& value) { + + _impl_.catalog_.Set(value, GetArenaForAllocation()); +} +inline std::string* ProcessInfo::_internal_mutable_catalog() { + + return _impl_.catalog_.Mutable(GetArenaForAllocation()); +} +inline std::string* ProcessInfo::release_catalog() { + // @@protoc_insertion_point(field_release:greptime.v1.frontend.ProcessInfo.catalog) + return _impl_.catalog_.Release(); +} +inline void ProcessInfo::set_allocated_catalog(std::string* catalog) { + if (catalog != nullptr) { + + } else { + + } + _impl_.catalog_.SetAllocated(catalog, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.catalog_.IsDefault()) { + _impl_.catalog_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:greptime.v1.frontend.ProcessInfo.catalog) +} + +// repeated string schemas = 3; +inline int ProcessInfo::_internal_schemas_size() const { + return _impl_.schemas_.size(); +} +inline int ProcessInfo::schemas_size() const { + return _internal_schemas_size(); +} +inline void ProcessInfo::clear_schemas() { + _impl_.schemas_.Clear(); +} +inline std::string* ProcessInfo::add_schemas() { + std::string* _s = _internal_add_schemas(); + // @@protoc_insertion_point(field_add_mutable:greptime.v1.frontend.ProcessInfo.schemas) + return _s; +} +inline const std::string& ProcessInfo::_internal_schemas(int index) const { + return _impl_.schemas_.Get(index); +} +inline const std::string& ProcessInfo::schemas(int index) const { + // @@protoc_insertion_point(field_get:greptime.v1.frontend.ProcessInfo.schemas) + return _internal_schemas(index); +} +inline std::string* ProcessInfo::mutable_schemas(int index) { + // @@protoc_insertion_point(field_mutable:greptime.v1.frontend.ProcessInfo.schemas) + return _impl_.schemas_.Mutable(index); +} +inline void ProcessInfo::set_schemas(int index, const std::string& value) { + _impl_.schemas_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:greptime.v1.frontend.ProcessInfo.schemas) +} +inline void ProcessInfo::set_schemas(int index, std::string&& value) { + _impl_.schemas_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:greptime.v1.frontend.ProcessInfo.schemas) +} +inline void ProcessInfo::set_schemas(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.schemas_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:greptime.v1.frontend.ProcessInfo.schemas) +} +inline void ProcessInfo::set_schemas(int index, const char* value, size_t size) { + _impl_.schemas_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:greptime.v1.frontend.ProcessInfo.schemas) +} +inline std::string* ProcessInfo::_internal_add_schemas() { + return _impl_.schemas_.Add(); +} +inline void ProcessInfo::add_schemas(const std::string& value) { + _impl_.schemas_.Add()->assign(value); + // @@protoc_insertion_point(field_add:greptime.v1.frontend.ProcessInfo.schemas) +} +inline void ProcessInfo::add_schemas(std::string&& value) { + _impl_.schemas_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:greptime.v1.frontend.ProcessInfo.schemas) +} +inline void ProcessInfo::add_schemas(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.schemas_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:greptime.v1.frontend.ProcessInfo.schemas) +} +inline void ProcessInfo::add_schemas(const char* value, size_t size) { + _impl_.schemas_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:greptime.v1.frontend.ProcessInfo.schemas) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +ProcessInfo::schemas() const { + // @@protoc_insertion_point(field_list:greptime.v1.frontend.ProcessInfo.schemas) + return _impl_.schemas_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +ProcessInfo::mutable_schemas() { + // @@protoc_insertion_point(field_mutable_list:greptime.v1.frontend.ProcessInfo.schemas) + return &_impl_.schemas_; +} + +// string query = 4; +inline void ProcessInfo::clear_query() { + _impl_.query_.ClearToEmpty(); +} +inline const std::string& ProcessInfo::query() const { + // @@protoc_insertion_point(field_get:greptime.v1.frontend.ProcessInfo.query) + return _internal_query(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ProcessInfo::set_query(ArgT0&& arg0, ArgT... args) { + + _impl_.query_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:greptime.v1.frontend.ProcessInfo.query) +} +inline std::string* ProcessInfo::mutable_query() { + std::string* _s = _internal_mutable_query(); + // @@protoc_insertion_point(field_mutable:greptime.v1.frontend.ProcessInfo.query) + return _s; +} +inline const std::string& ProcessInfo::_internal_query() const { + return _impl_.query_.Get(); +} +inline void ProcessInfo::_internal_set_query(const std::string& value) { + + _impl_.query_.Set(value, GetArenaForAllocation()); +} +inline std::string* ProcessInfo::_internal_mutable_query() { + + return _impl_.query_.Mutable(GetArenaForAllocation()); +} +inline std::string* ProcessInfo::release_query() { + // @@protoc_insertion_point(field_release:greptime.v1.frontend.ProcessInfo.query) + return _impl_.query_.Release(); +} +inline void ProcessInfo::set_allocated_query(std::string* query) { + if (query != nullptr) { + + } else { + + } + _impl_.query_.SetAllocated(query, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.query_.IsDefault()) { + _impl_.query_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:greptime.v1.frontend.ProcessInfo.query) +} + +// int64 start_timestamp = 5; +inline void ProcessInfo::clear_start_timestamp() { + _impl_.start_timestamp_ = int64_t{0}; +} +inline int64_t ProcessInfo::_internal_start_timestamp() const { + return _impl_.start_timestamp_; +} +inline int64_t ProcessInfo::start_timestamp() const { + // @@protoc_insertion_point(field_get:greptime.v1.frontend.ProcessInfo.start_timestamp) + return _internal_start_timestamp(); +} +inline void ProcessInfo::_internal_set_start_timestamp(int64_t value) { + + _impl_.start_timestamp_ = value; +} +inline void ProcessInfo::set_start_timestamp(int64_t value) { + _internal_set_start_timestamp(value); + // @@protoc_insertion_point(field_set:greptime.v1.frontend.ProcessInfo.start_timestamp) +} + +// string client = 6; +inline void ProcessInfo::clear_client() { + _impl_.client_.ClearToEmpty(); +} +inline const std::string& ProcessInfo::client() const { + // @@protoc_insertion_point(field_get:greptime.v1.frontend.ProcessInfo.client) + return _internal_client(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ProcessInfo::set_client(ArgT0&& arg0, ArgT... args) { + + _impl_.client_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:greptime.v1.frontend.ProcessInfo.client) +} +inline std::string* ProcessInfo::mutable_client() { + std::string* _s = _internal_mutable_client(); + // @@protoc_insertion_point(field_mutable:greptime.v1.frontend.ProcessInfo.client) + return _s; +} +inline const std::string& ProcessInfo::_internal_client() const { + return _impl_.client_.Get(); +} +inline void ProcessInfo::_internal_set_client(const std::string& value) { + + _impl_.client_.Set(value, GetArenaForAllocation()); +} +inline std::string* ProcessInfo::_internal_mutable_client() { + + return _impl_.client_.Mutable(GetArenaForAllocation()); +} +inline std::string* ProcessInfo::release_client() { + // @@protoc_insertion_point(field_release:greptime.v1.frontend.ProcessInfo.client) + return _impl_.client_.Release(); +} +inline void ProcessInfo::set_allocated_client(std::string* client) { + if (client != nullptr) { + + } else { + + } + _impl_.client_.SetAllocated(client, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.client_.IsDefault()) { + _impl_.client_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:greptime.v1.frontend.ProcessInfo.client) +} + +// string frontend = 7; +inline void ProcessInfo::clear_frontend() { + _impl_.frontend_.ClearToEmpty(); +} +inline const std::string& ProcessInfo::frontend() const { + // @@protoc_insertion_point(field_get:greptime.v1.frontend.ProcessInfo.frontend) + return _internal_frontend(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ProcessInfo::set_frontend(ArgT0&& arg0, ArgT... args) { + + _impl_.frontend_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:greptime.v1.frontend.ProcessInfo.frontend) +} +inline std::string* ProcessInfo::mutable_frontend() { + std::string* _s = _internal_mutable_frontend(); + // @@protoc_insertion_point(field_mutable:greptime.v1.frontend.ProcessInfo.frontend) + return _s; +} +inline const std::string& ProcessInfo::_internal_frontend() const { + return _impl_.frontend_.Get(); +} +inline void ProcessInfo::_internal_set_frontend(const std::string& value) { + + _impl_.frontend_.Set(value, GetArenaForAllocation()); +} +inline std::string* ProcessInfo::_internal_mutable_frontend() { + + return _impl_.frontend_.Mutable(GetArenaForAllocation()); +} +inline std::string* ProcessInfo::release_frontend() { + // @@protoc_insertion_point(field_release:greptime.v1.frontend.ProcessInfo.frontend) + return _impl_.frontend_.Release(); +} +inline void ProcessInfo::set_allocated_frontend(std::string* frontend) { + if (frontend != nullptr) { + + } else { + + } + _impl_.frontend_.SetAllocated(frontend, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.frontend_.IsDefault()) { + _impl_.frontend_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:greptime.v1.frontend.ProcessInfo.frontend) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace frontend +} // namespace v1 +} // namespace greptime + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_greptime_2fv1_2ffrontend_2fserver_2eproto diff --git a/java/src/main/java/io/greptime/v1/frontend/Server.java b/java/src/main/java/io/greptime/v1/frontend/Server.java new file mode 100644 index 0000000..e822a3e --- /dev/null +++ b/java/src/main/java/io/greptime/v1/frontend/Server.java @@ -0,0 +1,3080 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: greptime/v1/frontend/server.proto + +package io.greptime.v1.frontend; + +public final class Server { + private Server() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ListProcessRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.frontend.ListProcessRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string catalog = 1; + * @return The catalog. + */ + java.lang.String getCatalog(); + /** + * string catalog = 1; + * @return The bytes for catalog. + */ + com.google.protobuf.ByteString + getCatalogBytes(); + } + /** + * Protobuf type {@code greptime.v1.frontend.ListProcessRequest} + */ + public static final class ListProcessRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.frontend.ListProcessRequest) + ListProcessRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListProcessRequest.newBuilder() to construct. + private ListProcessRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListProcessRequest() { + catalog_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListProcessRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListProcessRequest( + 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: { + java.lang.String s = input.readStringRequireUtf8(); + + catalog_ = 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.frontend.Server.internal_static_greptime_v1_frontend_ListProcessRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.frontend.Server.internal_static_greptime_v1_frontend_ListProcessRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.frontend.Server.ListProcessRequest.class, io.greptime.v1.frontend.Server.ListProcessRequest.Builder.class); + } + + public static final int CATALOG_FIELD_NUMBER = 1; + private volatile java.lang.Object catalog_; + /** + * string catalog = 1; + * @return The catalog. + */ + @java.lang.Override + public java.lang.String getCatalog() { + java.lang.Object ref = catalog_; + 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(); + catalog_ = s; + return s; + } + } + /** + * string catalog = 1; + * @return The bytes for catalog. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCatalogBytes() { + java.lang.Object ref = catalog_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + catalog_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(catalog_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, catalog_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(catalog_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, catalog_); + } + 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.frontend.Server.ListProcessRequest)) { + return super.equals(obj); + } + io.greptime.v1.frontend.Server.ListProcessRequest other = (io.greptime.v1.frontend.Server.ListProcessRequest) obj; + + if (!getCatalog() + .equals(other.getCatalog())) 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) + CATALOG_FIELD_NUMBER; + hash = (53 * hash) + getCatalog().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.greptime.v1.frontend.Server.ListProcessRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.frontend.Server.ListProcessRequest 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.frontend.Server.ListProcessRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.frontend.Server.ListProcessRequest 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.frontend.Server.ListProcessRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.frontend.Server.ListProcessRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.frontend.Server.ListProcessRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.frontend.Server.ListProcessRequest 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.frontend.Server.ListProcessRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.greptime.v1.frontend.Server.ListProcessRequest 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.frontend.Server.ListProcessRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.frontend.Server.ListProcessRequest 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.frontend.Server.ListProcessRequest 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.frontend.ListProcessRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.frontend.ListProcessRequest) + io.greptime.v1.frontend.Server.ListProcessRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.frontend.Server.internal_static_greptime_v1_frontend_ListProcessRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.frontend.Server.internal_static_greptime_v1_frontend_ListProcessRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.frontend.Server.ListProcessRequest.class, io.greptime.v1.frontend.Server.ListProcessRequest.Builder.class); + } + + // Construct using io.greptime.v1.frontend.Server.ListProcessRequest.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(); + catalog_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.greptime.v1.frontend.Server.internal_static_greptime_v1_frontend_ListProcessRequest_descriptor; + } + + @java.lang.Override + public io.greptime.v1.frontend.Server.ListProcessRequest getDefaultInstanceForType() { + return io.greptime.v1.frontend.Server.ListProcessRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.greptime.v1.frontend.Server.ListProcessRequest build() { + io.greptime.v1.frontend.Server.ListProcessRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.greptime.v1.frontend.Server.ListProcessRequest buildPartial() { + io.greptime.v1.frontend.Server.ListProcessRequest result = new io.greptime.v1.frontend.Server.ListProcessRequest(this); + result.catalog_ = catalog_; + 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.frontend.Server.ListProcessRequest) { + return mergeFrom((io.greptime.v1.frontend.Server.ListProcessRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.greptime.v1.frontend.Server.ListProcessRequest other) { + if (other == io.greptime.v1.frontend.Server.ListProcessRequest.getDefaultInstance()) return this; + if (!other.getCatalog().isEmpty()) { + catalog_ = other.catalog_; + 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.frontend.Server.ListProcessRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.frontend.Server.ListProcessRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object catalog_ = ""; + /** + * string catalog = 1; + * @return The catalog. + */ + public java.lang.String getCatalog() { + java.lang.Object ref = catalog_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + catalog_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string catalog = 1; + * @return The bytes for catalog. + */ + public com.google.protobuf.ByteString + getCatalogBytes() { + java.lang.Object ref = catalog_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + catalog_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string catalog = 1; + * @param value The catalog to set. + * @return This builder for chaining. + */ + public Builder setCatalog( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + catalog_ = value; + onChanged(); + return this; + } + /** + * string catalog = 1; + * @return This builder for chaining. + */ + public Builder clearCatalog() { + + catalog_ = getDefaultInstance().getCatalog(); + onChanged(); + return this; + } + /** + * string catalog = 1; + * @param value The bytes for catalog to set. + * @return This builder for chaining. + */ + public Builder setCatalogBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + catalog_ = 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.frontend.ListProcessRequest) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.frontend.ListProcessRequest) + private static final io.greptime.v1.frontend.Server.ListProcessRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.greptime.v1.frontend.Server.ListProcessRequest(); + } + + public static io.greptime.v1.frontend.Server.ListProcessRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProcessRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListProcessRequest(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.frontend.Server.ListProcessRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ListProcessResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.frontend.ListProcessResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + java.util.List + getProcessesList(); + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + io.greptime.v1.frontend.Server.ProcessInfo getProcesses(int index); + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + int getProcessesCount(); + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + java.util.List + getProcessesOrBuilderList(); + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + io.greptime.v1.frontend.Server.ProcessInfoOrBuilder getProcessesOrBuilder( + int index); + } + /** + * Protobuf type {@code greptime.v1.frontend.ListProcessResponse} + */ + public static final class ListProcessResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.frontend.ListProcessResponse) + ListProcessResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListProcessResponse.newBuilder() to construct. + private ListProcessResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListProcessResponse() { + processes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListProcessResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListProcessResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + 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: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + processes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + processes_.add( + input.readMessage(io.greptime.v1.frontend.Server.ProcessInfo.parser(), extensionRegistry)); + 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 { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + processes_ = java.util.Collections.unmodifiableList(processes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.frontend.Server.internal_static_greptime_v1_frontend_ListProcessResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.frontend.Server.internal_static_greptime_v1_frontend_ListProcessResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.frontend.Server.ListProcessResponse.class, io.greptime.v1.frontend.Server.ListProcessResponse.Builder.class); + } + + public static final int PROCESSES_FIELD_NUMBER = 1; + private java.util.List processes_; + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + @java.lang.Override + public java.util.List getProcessesList() { + return processes_; + } + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + @java.lang.Override + public java.util.List + getProcessesOrBuilderList() { + return processes_; + } + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + @java.lang.Override + public int getProcessesCount() { + return processes_.size(); + } + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + @java.lang.Override + public io.greptime.v1.frontend.Server.ProcessInfo getProcesses(int index) { + return processes_.get(index); + } + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + @java.lang.Override + public io.greptime.v1.frontend.Server.ProcessInfoOrBuilder getProcessesOrBuilder( + int index) { + return processes_.get(index); + } + + 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 { + for (int i = 0; i < processes_.size(); i++) { + output.writeMessage(1, processes_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < processes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, processes_.get(i)); + } + 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.frontend.Server.ListProcessResponse)) { + return super.equals(obj); + } + io.greptime.v1.frontend.Server.ListProcessResponse other = (io.greptime.v1.frontend.Server.ListProcessResponse) obj; + + if (!getProcessesList() + .equals(other.getProcessesList())) 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 (getProcessesCount() > 0) { + hash = (37 * hash) + PROCESSES_FIELD_NUMBER; + hash = (53 * hash) + getProcessesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.greptime.v1.frontend.Server.ListProcessResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.frontend.Server.ListProcessResponse 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.frontend.Server.ListProcessResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.frontend.Server.ListProcessResponse 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.frontend.Server.ListProcessResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.frontend.Server.ListProcessResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.frontend.Server.ListProcessResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.frontend.Server.ListProcessResponse 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.frontend.Server.ListProcessResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.greptime.v1.frontend.Server.ListProcessResponse 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.frontend.Server.ListProcessResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.frontend.Server.ListProcessResponse 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.frontend.Server.ListProcessResponse 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.frontend.ListProcessResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.frontend.ListProcessResponse) + io.greptime.v1.frontend.Server.ListProcessResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.frontend.Server.internal_static_greptime_v1_frontend_ListProcessResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.frontend.Server.internal_static_greptime_v1_frontend_ListProcessResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.frontend.Server.ListProcessResponse.class, io.greptime.v1.frontend.Server.ListProcessResponse.Builder.class); + } + + // Construct using io.greptime.v1.frontend.Server.ListProcessResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getProcessesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (processesBuilder_ == null) { + processes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + processesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.greptime.v1.frontend.Server.internal_static_greptime_v1_frontend_ListProcessResponse_descriptor; + } + + @java.lang.Override + public io.greptime.v1.frontend.Server.ListProcessResponse getDefaultInstanceForType() { + return io.greptime.v1.frontend.Server.ListProcessResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.greptime.v1.frontend.Server.ListProcessResponse build() { + io.greptime.v1.frontend.Server.ListProcessResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.greptime.v1.frontend.Server.ListProcessResponse buildPartial() { + io.greptime.v1.frontend.Server.ListProcessResponse result = new io.greptime.v1.frontend.Server.ListProcessResponse(this); + int from_bitField0_ = bitField0_; + if (processesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + processes_ = java.util.Collections.unmodifiableList(processes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.processes_ = processes_; + } else { + result.processes_ = processesBuilder_.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.frontend.Server.ListProcessResponse) { + return mergeFrom((io.greptime.v1.frontend.Server.ListProcessResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.greptime.v1.frontend.Server.ListProcessResponse other) { + if (other == io.greptime.v1.frontend.Server.ListProcessResponse.getDefaultInstance()) return this; + if (processesBuilder_ == null) { + if (!other.processes_.isEmpty()) { + if (processes_.isEmpty()) { + processes_ = other.processes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProcessesIsMutable(); + processes_.addAll(other.processes_); + } + onChanged(); + } + } else { + if (!other.processes_.isEmpty()) { + if (processesBuilder_.isEmpty()) { + processesBuilder_.dispose(); + processesBuilder_ = null; + processes_ = other.processes_; + bitField0_ = (bitField0_ & ~0x00000001); + processesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getProcessesFieldBuilder() : null; + } else { + processesBuilder_.addAllMessages(other.processes_); + } + } + } + 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.frontend.Server.ListProcessResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.frontend.Server.ListProcessResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List processes_ = + java.util.Collections.emptyList(); + private void ensureProcessesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + processes_ = new java.util.ArrayList(processes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.greptime.v1.frontend.Server.ProcessInfo, io.greptime.v1.frontend.Server.ProcessInfo.Builder, io.greptime.v1.frontend.Server.ProcessInfoOrBuilder> processesBuilder_; + + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + public java.util.List getProcessesList() { + if (processesBuilder_ == null) { + return java.util.Collections.unmodifiableList(processes_); + } else { + return processesBuilder_.getMessageList(); + } + } + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + public int getProcessesCount() { + if (processesBuilder_ == null) { + return processes_.size(); + } else { + return processesBuilder_.getCount(); + } + } + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + public io.greptime.v1.frontend.Server.ProcessInfo getProcesses(int index) { + if (processesBuilder_ == null) { + return processes_.get(index); + } else { + return processesBuilder_.getMessage(index); + } + } + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + public Builder setProcesses( + int index, io.greptime.v1.frontend.Server.ProcessInfo value) { + if (processesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProcessesIsMutable(); + processes_.set(index, value); + onChanged(); + } else { + processesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + public Builder setProcesses( + int index, io.greptime.v1.frontend.Server.ProcessInfo.Builder builderForValue) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.set(index, builderForValue.build()); + onChanged(); + } else { + processesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + public Builder addProcesses(io.greptime.v1.frontend.Server.ProcessInfo value) { + if (processesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProcessesIsMutable(); + processes_.add(value); + onChanged(); + } else { + processesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + public Builder addProcesses( + int index, io.greptime.v1.frontend.Server.ProcessInfo value) { + if (processesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProcessesIsMutable(); + processes_.add(index, value); + onChanged(); + } else { + processesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + public Builder addProcesses( + io.greptime.v1.frontend.Server.ProcessInfo.Builder builderForValue) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.add(builderForValue.build()); + onChanged(); + } else { + processesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + public Builder addProcesses( + int index, io.greptime.v1.frontend.Server.ProcessInfo.Builder builderForValue) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.add(index, builderForValue.build()); + onChanged(); + } else { + processesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + public Builder addAllProcesses( + java.lang.Iterable values) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, processes_); + onChanged(); + } else { + processesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + public Builder clearProcesses() { + if (processesBuilder_ == null) { + processes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + processesBuilder_.clear(); + } + return this; + } + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + public Builder removeProcesses(int index) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.remove(index); + onChanged(); + } else { + processesBuilder_.remove(index); + } + return this; + } + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + public io.greptime.v1.frontend.Server.ProcessInfo.Builder getProcessesBuilder( + int index) { + return getProcessesFieldBuilder().getBuilder(index); + } + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + public io.greptime.v1.frontend.Server.ProcessInfoOrBuilder getProcessesOrBuilder( + int index) { + if (processesBuilder_ == null) { + return processes_.get(index); } else { + return processesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + public java.util.List + getProcessesOrBuilderList() { + if (processesBuilder_ != null) { + return processesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(processes_); + } + } + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + public io.greptime.v1.frontend.Server.ProcessInfo.Builder addProcessesBuilder() { + return getProcessesFieldBuilder().addBuilder( + io.greptime.v1.frontend.Server.ProcessInfo.getDefaultInstance()); + } + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + public io.greptime.v1.frontend.Server.ProcessInfo.Builder addProcessesBuilder( + int index) { + return getProcessesFieldBuilder().addBuilder( + index, io.greptime.v1.frontend.Server.ProcessInfo.getDefaultInstance()); + } + /** + * repeated .greptime.v1.frontend.ProcessInfo processes = 1; + */ + public java.util.List + getProcessesBuilderList() { + return getProcessesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.greptime.v1.frontend.Server.ProcessInfo, io.greptime.v1.frontend.Server.ProcessInfo.Builder, io.greptime.v1.frontend.Server.ProcessInfoOrBuilder> + getProcessesFieldBuilder() { + if (processesBuilder_ == null) { + processesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.greptime.v1.frontend.Server.ProcessInfo, io.greptime.v1.frontend.Server.ProcessInfo.Builder, io.greptime.v1.frontend.Server.ProcessInfoOrBuilder>( + processes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + processes_ = null; + } + return processesBuilder_; + } + @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.frontend.ListProcessResponse) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.frontend.ListProcessResponse) + private static final io.greptime.v1.frontend.Server.ListProcessResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.greptime.v1.frontend.Server.ListProcessResponse(); + } + + public static io.greptime.v1.frontend.Server.ListProcessResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProcessResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListProcessResponse(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.frontend.Server.ListProcessResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ProcessInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.frontend.ProcessInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * ID.
+     * 
+ * + * uint64 id = 1; + * @return The id. + */ + long getId(); + + /** + *
+     * Catalog of process.
+     * 
+ * + * string catalog = 2; + * @return The catalog. + */ + java.lang.String getCatalog(); + /** + *
+     * Catalog of process.
+     * 
+ * + * string catalog = 2; + * @return The bytes for catalog. + */ + com.google.protobuf.ByteString + getCatalogBytes(); + + /** + *
+     * Involved schemas.
+     * 
+ * + * repeated string schemas = 3; + * @return A list containing the schemas. + */ + java.util.List + getSchemasList(); + /** + *
+     * Involved schemas.
+     * 
+ * + * repeated string schemas = 3; + * @return The count of schemas. + */ + int getSchemasCount(); + /** + *
+     * Involved schemas.
+     * 
+ * + * repeated string schemas = 3; + * @param index The index of the element to return. + * @return The schemas at the given index. + */ + java.lang.String getSchemas(int index); + /** + *
+     * Involved schemas.
+     * 
+ * + * repeated string schemas = 3; + * @param index The index of the value to return. + * @return The bytes of the schemas at the given index. + */ + com.google.protobuf.ByteString + getSchemasBytes(int index); + + /** + *
+     * Query string.
+     * 
+ * + * string query = 4; + * @return The query. + */ + java.lang.String getQuery(); + /** + *
+     * Query string.
+     * 
+ * + * string query = 4; + * @return The bytes for query. + */ + com.google.protobuf.ByteString + getQueryBytes(); + + /** + *
+     * Start time.
+     * 
+ * + * int64 start_timestamp = 5; + * @return The startTimestamp. + */ + long getStartTimestamp(); + + /** + *
+     * Client info.
+     * 
+ * + * string client = 6; + * @return The client. + */ + java.lang.String getClient(); + /** + *
+     * Client info.
+     * 
+ * + * string client = 6; + * @return The bytes for client. + */ + com.google.protobuf.ByteString + getClientBytes(); + + /** + *
+     * Frontend info of process.
+     * 
+ * + * string frontend = 7; + * @return The frontend. + */ + java.lang.String getFrontend(); + /** + *
+     * Frontend info of process.
+     * 
+ * + * string frontend = 7; + * @return The bytes for frontend. + */ + com.google.protobuf.ByteString + getFrontendBytes(); + } + /** + * Protobuf type {@code greptime.v1.frontend.ProcessInfo} + */ + public static final class ProcessInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.frontend.ProcessInfo) + ProcessInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ProcessInfo.newBuilder() to construct. + private ProcessInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ProcessInfo() { + catalog_ = ""; + schemas_ = com.google.protobuf.LazyStringArrayList.EMPTY; + query_ = ""; + client_ = ""; + frontend_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ProcessInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ProcessInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + 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: { + + id_ = input.readUInt64(); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + catalog_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + schemas_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + schemas_.add(s); + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + query_ = s; + break; + } + case 40: { + + startTimestamp_ = input.readInt64(); + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + client_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + frontend_ = 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 { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + schemas_ = schemas_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.frontend.Server.internal_static_greptime_v1_frontend_ProcessInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.frontend.Server.internal_static_greptime_v1_frontend_ProcessInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.frontend.Server.ProcessInfo.class, io.greptime.v1.frontend.Server.ProcessInfo.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private long id_; + /** + *
+     * ID.
+     * 
+ * + * uint64 id = 1; + * @return The id. + */ + @java.lang.Override + public long getId() { + return id_; + } + + public static final int CATALOG_FIELD_NUMBER = 2; + private volatile java.lang.Object catalog_; + /** + *
+     * Catalog of process.
+     * 
+ * + * string catalog = 2; + * @return The catalog. + */ + @java.lang.Override + public java.lang.String getCatalog() { + java.lang.Object ref = catalog_; + 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(); + catalog_ = s; + return s; + } + } + /** + *
+     * Catalog of process.
+     * 
+ * + * string catalog = 2; + * @return The bytes for catalog. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCatalogBytes() { + java.lang.Object ref = catalog_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + catalog_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCHEMAS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList schemas_; + /** + *
+     * Involved schemas.
+     * 
+ * + * repeated string schemas = 3; + * @return A list containing the schemas. + */ + public com.google.protobuf.ProtocolStringList + getSchemasList() { + return schemas_; + } + /** + *
+     * Involved schemas.
+     * 
+ * + * repeated string schemas = 3; + * @return The count of schemas. + */ + public int getSchemasCount() { + return schemas_.size(); + } + /** + *
+     * Involved schemas.
+     * 
+ * + * repeated string schemas = 3; + * @param index The index of the element to return. + * @return The schemas at the given index. + */ + public java.lang.String getSchemas(int index) { + return schemas_.get(index); + } + /** + *
+     * Involved schemas.
+     * 
+ * + * repeated string schemas = 3; + * @param index The index of the value to return. + * @return The bytes of the schemas at the given index. + */ + public com.google.protobuf.ByteString + getSchemasBytes(int index) { + return schemas_.getByteString(index); + } + + public static final int QUERY_FIELD_NUMBER = 4; + private volatile java.lang.Object query_; + /** + *
+     * Query string.
+     * 
+ * + * string query = 4; + * @return The query. + */ + @java.lang.Override + public java.lang.String getQuery() { + java.lang.Object ref = query_; + 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(); + query_ = s; + return s; + } + } + /** + *
+     * Query string.
+     * 
+ * + * string query = 4; + * @return The bytes for query. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int START_TIMESTAMP_FIELD_NUMBER = 5; + private long startTimestamp_; + /** + *
+     * Start time.
+     * 
+ * + * int64 start_timestamp = 5; + * @return The startTimestamp. + */ + @java.lang.Override + public long getStartTimestamp() { + return startTimestamp_; + } + + public static final int CLIENT_FIELD_NUMBER = 6; + private volatile java.lang.Object client_; + /** + *
+     * Client info.
+     * 
+ * + * string client = 6; + * @return The client. + */ + @java.lang.Override + public java.lang.String getClient() { + java.lang.Object ref = client_; + 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(); + client_ = s; + return s; + } + } + /** + *
+     * Client info.
+     * 
+ * + * string client = 6; + * @return The bytes for client. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getClientBytes() { + java.lang.Object ref = client_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + client_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FRONTEND_FIELD_NUMBER = 7; + private volatile java.lang.Object frontend_; + /** + *
+     * Frontend info of process.
+     * 
+ * + * string frontend = 7; + * @return The frontend. + */ + @java.lang.Override + public java.lang.String getFrontend() { + java.lang.Object ref = frontend_; + 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(); + frontend_ = s; + return s; + } + } + /** + *
+     * Frontend info of process.
+     * 
+ * + * string frontend = 7; + * @return The bytes for frontend. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFrontendBytes() { + java.lang.Object ref = frontend_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + frontend_ = 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 (id_ != 0L) { + output.writeUInt64(1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(catalog_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, catalog_); + } + for (int i = 0; i < schemas_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, schemas_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, query_); + } + if (startTimestamp_ != 0L) { + output.writeInt64(5, startTimestamp_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(client_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, client_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(frontend_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, frontend_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (id_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(catalog_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, catalog_); + } + { + int dataSize = 0; + for (int i = 0; i < schemas_.size(); i++) { + dataSize += computeStringSizeNoTag(schemas_.getRaw(i)); + } + size += dataSize; + size += 1 * getSchemasList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, query_); + } + if (startTimestamp_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, startTimestamp_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(client_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, client_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(frontend_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, frontend_); + } + 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.frontend.Server.ProcessInfo)) { + return super.equals(obj); + } + io.greptime.v1.frontend.Server.ProcessInfo other = (io.greptime.v1.frontend.Server.ProcessInfo) obj; + + if (getId() + != other.getId()) return false; + if (!getCatalog() + .equals(other.getCatalog())) return false; + if (!getSchemasList() + .equals(other.getSchemasList())) return false; + if (!getQuery() + .equals(other.getQuery())) return false; + if (getStartTimestamp() + != other.getStartTimestamp()) return false; + if (!getClient() + .equals(other.getClient())) return false; + if (!getFrontend() + .equals(other.getFrontend())) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getId()); + hash = (37 * hash) + CATALOG_FIELD_NUMBER; + hash = (53 * hash) + getCatalog().hashCode(); + if (getSchemasCount() > 0) { + hash = (37 * hash) + SCHEMAS_FIELD_NUMBER; + hash = (53 * hash) + getSchemasList().hashCode(); + } + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + hash = (37 * hash) + START_TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getStartTimestamp()); + hash = (37 * hash) + CLIENT_FIELD_NUMBER; + hash = (53 * hash) + getClient().hashCode(); + hash = (37 * hash) + FRONTEND_FIELD_NUMBER; + hash = (53 * hash) + getFrontend().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.greptime.v1.frontend.Server.ProcessInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.frontend.Server.ProcessInfo 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.frontend.Server.ProcessInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.frontend.Server.ProcessInfo 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.frontend.Server.ProcessInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.frontend.Server.ProcessInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.frontend.Server.ProcessInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.frontend.Server.ProcessInfo 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.frontend.Server.ProcessInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.greptime.v1.frontend.Server.ProcessInfo 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.frontend.Server.ProcessInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.frontend.Server.ProcessInfo 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.frontend.Server.ProcessInfo 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.frontend.ProcessInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.frontend.ProcessInfo) + io.greptime.v1.frontend.Server.ProcessInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.frontend.Server.internal_static_greptime_v1_frontend_ProcessInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.frontend.Server.internal_static_greptime_v1_frontend_ProcessInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.frontend.Server.ProcessInfo.class, io.greptime.v1.frontend.Server.ProcessInfo.Builder.class); + } + + // Construct using io.greptime.v1.frontend.Server.ProcessInfo.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(); + id_ = 0L; + + catalog_ = ""; + + schemas_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + query_ = ""; + + startTimestamp_ = 0L; + + client_ = ""; + + frontend_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.greptime.v1.frontend.Server.internal_static_greptime_v1_frontend_ProcessInfo_descriptor; + } + + @java.lang.Override + public io.greptime.v1.frontend.Server.ProcessInfo getDefaultInstanceForType() { + return io.greptime.v1.frontend.Server.ProcessInfo.getDefaultInstance(); + } + + @java.lang.Override + public io.greptime.v1.frontend.Server.ProcessInfo build() { + io.greptime.v1.frontend.Server.ProcessInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.greptime.v1.frontend.Server.ProcessInfo buildPartial() { + io.greptime.v1.frontend.Server.ProcessInfo result = new io.greptime.v1.frontend.Server.ProcessInfo(this); + int from_bitField0_ = bitField0_; + result.id_ = id_; + result.catalog_ = catalog_; + if (((bitField0_ & 0x00000001) != 0)) { + schemas_ = schemas_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.schemas_ = schemas_; + result.query_ = query_; + result.startTimestamp_ = startTimestamp_; + result.client_ = client_; + result.frontend_ = frontend_; + 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.frontend.Server.ProcessInfo) { + return mergeFrom((io.greptime.v1.frontend.Server.ProcessInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.greptime.v1.frontend.Server.ProcessInfo other) { + if (other == io.greptime.v1.frontend.Server.ProcessInfo.getDefaultInstance()) return this; + if (other.getId() != 0L) { + setId(other.getId()); + } + if (!other.getCatalog().isEmpty()) { + catalog_ = other.catalog_; + onChanged(); + } + if (!other.schemas_.isEmpty()) { + if (schemas_.isEmpty()) { + schemas_ = other.schemas_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSchemasIsMutable(); + schemas_.addAll(other.schemas_); + } + onChanged(); + } + if (!other.getQuery().isEmpty()) { + query_ = other.query_; + onChanged(); + } + if (other.getStartTimestamp() != 0L) { + setStartTimestamp(other.getStartTimestamp()); + } + if (!other.getClient().isEmpty()) { + client_ = other.client_; + onChanged(); + } + if (!other.getFrontend().isEmpty()) { + frontend_ = other.frontend_; + 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.frontend.Server.ProcessInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.frontend.Server.ProcessInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private long id_ ; + /** + *
+       * ID.
+       * 
+ * + * uint64 id = 1; + * @return The id. + */ + @java.lang.Override + public long getId() { + return id_; + } + /** + *
+       * ID.
+       * 
+ * + * uint64 id = 1; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(long value) { + + id_ = value; + onChanged(); + return this; + } + /** + *
+       * ID.
+       * 
+ * + * uint64 id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object catalog_ = ""; + /** + *
+       * Catalog of process.
+       * 
+ * + * string catalog = 2; + * @return The catalog. + */ + public java.lang.String getCatalog() { + java.lang.Object ref = catalog_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + catalog_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Catalog of process.
+       * 
+ * + * string catalog = 2; + * @return The bytes for catalog. + */ + public com.google.protobuf.ByteString + getCatalogBytes() { + java.lang.Object ref = catalog_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + catalog_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Catalog of process.
+       * 
+ * + * string catalog = 2; + * @param value The catalog to set. + * @return This builder for chaining. + */ + public Builder setCatalog( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + catalog_ = value; + onChanged(); + return this; + } + /** + *
+       * Catalog of process.
+       * 
+ * + * string catalog = 2; + * @return This builder for chaining. + */ + public Builder clearCatalog() { + + catalog_ = getDefaultInstance().getCatalog(); + onChanged(); + return this; + } + /** + *
+       * Catalog of process.
+       * 
+ * + * string catalog = 2; + * @param value The bytes for catalog to set. + * @return This builder for chaining. + */ + public Builder setCatalogBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + catalog_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList schemas_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureSchemasIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + schemas_ = new com.google.protobuf.LazyStringArrayList(schemas_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       * Involved schemas.
+       * 
+ * + * repeated string schemas = 3; + * @return A list containing the schemas. + */ + public com.google.protobuf.ProtocolStringList + getSchemasList() { + return schemas_.getUnmodifiableView(); + } + /** + *
+       * Involved schemas.
+       * 
+ * + * repeated string schemas = 3; + * @return The count of schemas. + */ + public int getSchemasCount() { + return schemas_.size(); + } + /** + *
+       * Involved schemas.
+       * 
+ * + * repeated string schemas = 3; + * @param index The index of the element to return. + * @return The schemas at the given index. + */ + public java.lang.String getSchemas(int index) { + return schemas_.get(index); + } + /** + *
+       * Involved schemas.
+       * 
+ * + * repeated string schemas = 3; + * @param index The index of the value to return. + * @return The bytes of the schemas at the given index. + */ + public com.google.protobuf.ByteString + getSchemasBytes(int index) { + return schemas_.getByteString(index); + } + /** + *
+       * Involved schemas.
+       * 
+ * + * repeated string schemas = 3; + * @param index The index to set the value at. + * @param value The schemas to set. + * @return This builder for chaining. + */ + public Builder setSchemas( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSchemasIsMutable(); + schemas_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * Involved schemas.
+       * 
+ * + * repeated string schemas = 3; + * @param value The schemas to add. + * @return This builder for chaining. + */ + public Builder addSchemas( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSchemasIsMutable(); + schemas_.add(value); + onChanged(); + return this; + } + /** + *
+       * Involved schemas.
+       * 
+ * + * repeated string schemas = 3; + * @param values The schemas to add. + * @return This builder for chaining. + */ + public Builder addAllSchemas( + java.lang.Iterable values) { + ensureSchemasIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, schemas_); + onChanged(); + return this; + } + /** + *
+       * Involved schemas.
+       * 
+ * + * repeated string schemas = 3; + * @return This builder for chaining. + */ + public Builder clearSchemas() { + schemas_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * Involved schemas.
+       * 
+ * + * repeated string schemas = 3; + * @param value The bytes of the schemas to add. + * @return This builder for chaining. + */ + public Builder addSchemasBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSchemasIsMutable(); + schemas_.add(value); + onChanged(); + return this; + } + + private java.lang.Object query_ = ""; + /** + *
+       * Query string.
+       * 
+ * + * string query = 4; + * @return The query. + */ + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Query string.
+       * 
+ * + * string query = 4; + * @return The bytes for query. + */ + public com.google.protobuf.ByteString + getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Query string.
+       * 
+ * + * string query = 4; + * @param value The query to set. + * @return This builder for chaining. + */ + public Builder setQuery( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + query_ = value; + onChanged(); + return this; + } + /** + *
+       * Query string.
+       * 
+ * + * string query = 4; + * @return This builder for chaining. + */ + public Builder clearQuery() { + + query_ = getDefaultInstance().getQuery(); + onChanged(); + return this; + } + /** + *
+       * Query string.
+       * 
+ * + * string query = 4; + * @param value The bytes for query to set. + * @return This builder for chaining. + */ + public Builder setQueryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + query_ = value; + onChanged(); + return this; + } + + private long startTimestamp_ ; + /** + *
+       * Start time.
+       * 
+ * + * int64 start_timestamp = 5; + * @return The startTimestamp. + */ + @java.lang.Override + public long getStartTimestamp() { + return startTimestamp_; + } + /** + *
+       * Start time.
+       * 
+ * + * int64 start_timestamp = 5; + * @param value The startTimestamp to set. + * @return This builder for chaining. + */ + public Builder setStartTimestamp(long value) { + + startTimestamp_ = value; + onChanged(); + return this; + } + /** + *
+       * Start time.
+       * 
+ * + * int64 start_timestamp = 5; + * @return This builder for chaining. + */ + public Builder clearStartTimestamp() { + + startTimestamp_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object client_ = ""; + /** + *
+       * Client info.
+       * 
+ * + * string client = 6; + * @return The client. + */ + public java.lang.String getClient() { + java.lang.Object ref = client_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + client_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Client info.
+       * 
+ * + * string client = 6; + * @return The bytes for client. + */ + public com.google.protobuf.ByteString + getClientBytes() { + java.lang.Object ref = client_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + client_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Client info.
+       * 
+ * + * string client = 6; + * @param value The client to set. + * @return This builder for chaining. + */ + public Builder setClient( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + client_ = value; + onChanged(); + return this; + } + /** + *
+       * Client info.
+       * 
+ * + * string client = 6; + * @return This builder for chaining. + */ + public Builder clearClient() { + + client_ = getDefaultInstance().getClient(); + onChanged(); + return this; + } + /** + *
+       * Client info.
+       * 
+ * + * string client = 6; + * @param value The bytes for client to set. + * @return This builder for chaining. + */ + public Builder setClientBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + client_ = value; + onChanged(); + return this; + } + + private java.lang.Object frontend_ = ""; + /** + *
+       * Frontend info of process.
+       * 
+ * + * string frontend = 7; + * @return The frontend. + */ + public java.lang.String getFrontend() { + java.lang.Object ref = frontend_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + frontend_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Frontend info of process.
+       * 
+ * + * string frontend = 7; + * @return The bytes for frontend. + */ + public com.google.protobuf.ByteString + getFrontendBytes() { + java.lang.Object ref = frontend_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + frontend_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Frontend info of process.
+       * 
+ * + * string frontend = 7; + * @param value The frontend to set. + * @return This builder for chaining. + */ + public Builder setFrontend( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + frontend_ = value; + onChanged(); + return this; + } + /** + *
+       * Frontend info of process.
+       * 
+ * + * string frontend = 7; + * @return This builder for chaining. + */ + public Builder clearFrontend() { + + frontend_ = getDefaultInstance().getFrontend(); + onChanged(); + return this; + } + /** + *
+       * Frontend info of process.
+       * 
+ * + * string frontend = 7; + * @param value The bytes for frontend to set. + * @return This builder for chaining. + */ + public Builder setFrontendBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + frontend_ = 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.frontend.ProcessInfo) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.frontend.ProcessInfo) + private static final io.greptime.v1.frontend.Server.ProcessInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.greptime.v1.frontend.Server.ProcessInfo(); + } + + public static io.greptime.v1.frontend.Server.ProcessInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProcessInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ProcessInfo(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.frontend.Server.ProcessInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_frontend_ListProcessRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_frontend_ListProcessRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_frontend_ListProcessResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_frontend_ListProcessResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_frontend_ProcessInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_frontend_ProcessInfo_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n!greptime/v1/frontend/server.proto\022\024gre" + + "ptime.v1.frontend\"%\n\022ListProcessRequest\022" + + "\017\n\007catalog\030\001 \001(\t\"K\n\023ListProcessResponse\022" + + "4\n\tprocesses\030\001 \003(\0132!.greptime.v1.fronten" + + "d.ProcessInfo\"\205\001\n\013ProcessInfo\022\n\n\002id\030\001 \001(" + + "\004\022\017\n\007catalog\030\002 \001(\t\022\017\n\007schemas\030\003 \003(\t\022\r\n\005q" + + "uery\030\004 \001(\t\022\027\n\017start_timestamp\030\005 \001(\003\022\016\n\006c" + + "lient\030\006 \001(\t\022\020\n\010frontend\030\007 \001(\t2n\n\010Fronten" + + "d\022b\n\013ListProcess\022(.greptime.v1.frontend." + + "ListProcessRequest\032).greptime.v1.fronten" + + "d.ListProcessResponseBa\n\027io.greptime.v1." + + "frontendB\006ServerZ>github.com/GreptimeTea" + + "m/greptime-proto/go/greptime/v1/frontend" + + "b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_greptime_v1_frontend_ListProcessRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_greptime_v1_frontend_ListProcessRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_greptime_v1_frontend_ListProcessRequest_descriptor, + new java.lang.String[] { "Catalog", }); + internal_static_greptime_v1_frontend_ListProcessResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_greptime_v1_frontend_ListProcessResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_greptime_v1_frontend_ListProcessResponse_descriptor, + new java.lang.String[] { "Processes", }); + internal_static_greptime_v1_frontend_ProcessInfo_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_greptime_v1_frontend_ProcessInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_greptime_v1_frontend_ProcessInfo_descriptor, + new java.lang.String[] { "Id", "Catalog", "Schemas", "Query", "StartTimestamp", "Client", "Frontend", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto/greptime/v1/frontend/server.proto b/proto/greptime/v1/frontend/server.proto new file mode 100644 index 0000000..e7cd8f9 --- /dev/null +++ b/proto/greptime/v1/frontend/server.proto @@ -0,0 +1,51 @@ +// Copyright 2023 Greptime Team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package greptime.v1.frontend; + +option java_package = "io.greptime.v1.frontend"; +option java_outer_classname = "Server"; +option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/frontend"; + +service Frontend { + // List all running processes on frontend. + rpc ListProcess(ListProcessRequest) returns (ListProcessResponse); +} + +message ListProcessRequest { + string catalog = 1; +} + +message ListProcessResponse { + repeated ProcessInfo processes = 1; +} + +message ProcessInfo { + // ID. + uint64 id = 1; + // Catalog of process. + string catalog = 2; + // Involved schemas. + repeated string schemas = 3; + // Query string. + string query = 4; + // Start time. + int64 start_timestamp = 5; + // Client info. + string client = 6; + // Frontend info of process. + string frontend = 7; +} diff --git a/src/v1.rs b/src/v1.rs index 1dcd693..110fb31 100644 --- a/src/v1.rs +++ b/src/v1.rs @@ -19,6 +19,7 @@ use crate::v1::value::ValueData; pub const GREPTIME_GRPC_DESC: &[u8] = tonic::include_file_descriptor_set!("greptime_grpc_desc"); pub mod flow; +pub mod frontend; pub mod index; pub mod meta; pub mod region; diff --git a/src/v1/frontend.rs b/src/v1/frontend.rs new file mode 100644 index 0000000..9a2e12c --- /dev/null +++ b/src/v1/frontend.rs @@ -0,0 +1,15 @@ +// Copyright 2023 Greptime Team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +tonic::include_proto!("greptime.v1.frontend");