chore: rename RegionServer to Region (#85)

* chore: rename RegionServer to Region

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* add stream api

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

---------

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
This commit is contained in:
Ruihang Xia
2023-08-25 04:01:40 -05:00
committed by GitHub
parent 3489b47421
commit 708866d505
6 changed files with 932 additions and 766 deletions
+52 -17
View File
@@ -23,66 +23,101 @@ namespace greptime {
namespace v1 { namespace v1 {
namespace region { namespace region {
static const char* RegionServer_method_names[] = { static const char* Region_method_names[] = {
"/greptime.v1.region.RegionServer/Handle", "/greptime.v1.region.Region/Handle",
"/greptime.v1.region.Region/HandleRequests",
}; };
std::unique_ptr< RegionServer::Stub> RegionServer::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { std::unique_ptr< Region::Stub> Region::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) {
(void)options; (void)options;
std::unique_ptr< RegionServer::Stub> stub(new RegionServer::Stub(channel, options)); std::unique_ptr< Region::Stub> stub(new Region::Stub(channel, options));
return stub; return stub;
} }
RegionServer::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) Region::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options)
: channel_(channel), rpcmethod_Handle_(RegionServer_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) : channel_(channel), rpcmethod_Handle_(Region_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
, rpcmethod_HandleRequests_(Region_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::CLIENT_STREAMING, channel)
{} {}
::grpc::Status RegionServer::Stub::Handle(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest& request, ::greptime::v1::region::RegionResponse* response) { ::grpc::Status Region::Stub::Handle(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest& request, ::greptime::v1::region::RegionResponse* response) {
return ::grpc::internal::BlockingUnaryCall< ::greptime::v1::region::RegionRequest, ::greptime::v1::region::RegionResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Handle_, context, request, response); return ::grpc::internal::BlockingUnaryCall< ::greptime::v1::region::RegionRequest, ::greptime::v1::region::RegionResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Handle_, context, request, response);
} }
void RegionServer::Stub::async::Handle(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest* request, ::greptime::v1::region::RegionResponse* response, std::function<void(::grpc::Status)> f) { void Region::Stub::async::Handle(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest* request, ::greptime::v1::region::RegionResponse* response, std::function<void(::grpc::Status)> f) {
::grpc::internal::CallbackUnaryCall< ::greptime::v1::region::RegionRequest, ::greptime::v1::region::RegionResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Handle_, context, request, response, std::move(f)); ::grpc::internal::CallbackUnaryCall< ::greptime::v1::region::RegionRequest, ::greptime::v1::region::RegionResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Handle_, context, request, response, std::move(f));
} }
void RegionServer::Stub::async::Handle(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest* request, ::greptime::v1::region::RegionResponse* response, ::grpc::ClientUnaryReactor* reactor) { void Region::Stub::async::Handle(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest* request, ::greptime::v1::region::RegionResponse* response, ::grpc::ClientUnaryReactor* reactor) {
::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Handle_, context, request, response, reactor); ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Handle_, context, request, response, reactor);
} }
::grpc::ClientAsyncResponseReader< ::greptime::v1::region::RegionResponse>* RegionServer::Stub::PrepareAsyncHandleRaw(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest& request, ::grpc::CompletionQueue* cq) { ::grpc::ClientAsyncResponseReader< ::greptime::v1::region::RegionResponse>* Region::Stub::PrepareAsyncHandleRaw(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest& request, ::grpc::CompletionQueue* cq) {
return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::greptime::v1::region::RegionResponse, ::greptime::v1::region::RegionRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_Handle_, context, request); return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::greptime::v1::region::RegionResponse, ::greptime::v1::region::RegionRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_Handle_, context, request);
} }
::grpc::ClientAsyncResponseReader< ::greptime::v1::region::RegionResponse>* RegionServer::Stub::AsyncHandleRaw(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest& request, ::grpc::CompletionQueue* cq) { ::grpc::ClientAsyncResponseReader< ::greptime::v1::region::RegionResponse>* Region::Stub::AsyncHandleRaw(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest& request, ::grpc::CompletionQueue* cq) {
auto* result = auto* result =
this->PrepareAsyncHandleRaw(context, request, cq); this->PrepareAsyncHandleRaw(context, request, cq);
result->StartCall(); result->StartCall();
return result; return result;
} }
RegionServer::Service::Service() { ::grpc::ClientWriter< ::greptime::v1::region::RegionRequest>* Region::Stub::HandleRequestsRaw(::grpc::ClientContext* context, ::greptime::v1::region::RegionResponse* response) {
return ::grpc::internal::ClientWriterFactory< ::greptime::v1::region::RegionRequest>::Create(channel_.get(), rpcmethod_HandleRequests_, context, response);
}
void Region::Stub::async::HandleRequests(::grpc::ClientContext* context, ::greptime::v1::region::RegionResponse* response, ::grpc::ClientWriteReactor< ::greptime::v1::region::RegionRequest>* reactor) {
::grpc::internal::ClientCallbackWriterFactory< ::greptime::v1::region::RegionRequest>::Create(stub_->channel_.get(), stub_->rpcmethod_HandleRequests_, context, response, reactor);
}
::grpc::ClientAsyncWriter< ::greptime::v1::region::RegionRequest>* Region::Stub::AsyncHandleRequestsRaw(::grpc::ClientContext* context, ::greptime::v1::region::RegionResponse* response, ::grpc::CompletionQueue* cq, void* tag) {
return ::grpc::internal::ClientAsyncWriterFactory< ::greptime::v1::region::RegionRequest>::Create(channel_.get(), cq, rpcmethod_HandleRequests_, context, response, true, tag);
}
::grpc::ClientAsyncWriter< ::greptime::v1::region::RegionRequest>* Region::Stub::PrepareAsyncHandleRequestsRaw(::grpc::ClientContext* context, ::greptime::v1::region::RegionResponse* response, ::grpc::CompletionQueue* cq) {
return ::grpc::internal::ClientAsyncWriterFactory< ::greptime::v1::region::RegionRequest>::Create(channel_.get(), cq, rpcmethod_HandleRequests_, context, response, false, nullptr);
}
Region::Service::Service() {
AddMethod(new ::grpc::internal::RpcServiceMethod( AddMethod(new ::grpc::internal::RpcServiceMethod(
RegionServer_method_names[0], Region_method_names[0],
::grpc::internal::RpcMethod::NORMAL_RPC, ::grpc::internal::RpcMethod::NORMAL_RPC,
new ::grpc::internal::RpcMethodHandler< RegionServer::Service, ::greptime::v1::region::RegionRequest, ::greptime::v1::region::RegionResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( new ::grpc::internal::RpcMethodHandler< Region::Service, ::greptime::v1::region::RegionRequest, ::greptime::v1::region::RegionResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
[](RegionServer::Service* service, [](Region::Service* service,
::grpc::ServerContext* ctx, ::grpc::ServerContext* ctx,
const ::greptime::v1::region::RegionRequest* req, const ::greptime::v1::region::RegionRequest* req,
::greptime::v1::region::RegionResponse* resp) { ::greptime::v1::region::RegionResponse* resp) {
return service->Handle(ctx, req, resp); return service->Handle(ctx, req, resp);
}, this))); }, this)));
AddMethod(new ::grpc::internal::RpcServiceMethod(
Region_method_names[1],
::grpc::internal::RpcMethod::CLIENT_STREAMING,
new ::grpc::internal::ClientStreamingHandler< Region::Service, ::greptime::v1::region::RegionRequest, ::greptime::v1::region::RegionResponse>(
[](Region::Service* service,
::grpc::ServerContext* ctx,
::grpc::ServerReader<::greptime::v1::region::RegionRequest>* reader,
::greptime::v1::region::RegionResponse* resp) {
return service->HandleRequests(ctx, reader, resp);
}, this)));
} }
RegionServer::Service::~Service() { Region::Service::~Service() {
} }
::grpc::Status RegionServer::Service::Handle(::grpc::ServerContext* context, const ::greptime::v1::region::RegionRequest* request, ::greptime::v1::region::RegionResponse* response) { ::grpc::Status Region::Service::Handle(::grpc::ServerContext* context, const ::greptime::v1::region::RegionRequest* request, ::greptime::v1::region::RegionResponse* response) {
(void) context; (void) context;
(void) request; (void) request;
(void) response; (void) response;
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
} }
::grpc::Status Region::Service::HandleRequests(::grpc::ServerContext* context, ::grpc::ServerReader< ::greptime::v1::region::RegionRequest>* reader, ::greptime::v1::region::RegionResponse* response) {
(void) context;
(void) reader;
(void) response;
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
} // namespace greptime } // namespace greptime
} // namespace v1 } // namespace v1
+133 -7
View File
@@ -44,10 +44,10 @@ namespace greptime {
namespace v1 { namespace v1 {
namespace region { namespace region {
class RegionServer final { class Region final {
public: public:
static constexpr char const* service_full_name() { static constexpr char const* service_full_name() {
return "greptime.v1.region.RegionServer"; return "greptime.v1.region.Region";
} }
class StubInterface { class StubInterface {
public: public:
@@ -59,13 +59,21 @@ class RegionServer final {
std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::region::RegionResponse>> PrepareAsyncHandle(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest& request, ::grpc::CompletionQueue* cq) { std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::region::RegionResponse>> PrepareAsyncHandle(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::region::RegionResponse>>(PrepareAsyncHandleRaw(context, request, cq)); return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::region::RegionResponse>>(PrepareAsyncHandleRaw(context, request, cq));
} }
// TODO: add stream API std::unique_ptr< ::grpc::ClientWriterInterface< ::greptime::v1::region::RegionRequest>> HandleRequests(::grpc::ClientContext* context, ::greptime::v1::region::RegionResponse* response) {
return std::unique_ptr< ::grpc::ClientWriterInterface< ::greptime::v1::region::RegionRequest>>(HandleRequestsRaw(context, response));
}
std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::greptime::v1::region::RegionRequest>> AsyncHandleRequests(::grpc::ClientContext* context, ::greptime::v1::region::RegionResponse* response, ::grpc::CompletionQueue* cq, void* tag) {
return std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::greptime::v1::region::RegionRequest>>(AsyncHandleRequestsRaw(context, response, cq, tag));
}
std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::greptime::v1::region::RegionRequest>> PrepareAsyncHandleRequests(::grpc::ClientContext* context, ::greptime::v1::region::RegionResponse* response, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::greptime::v1::region::RegionRequest>>(PrepareAsyncHandleRequestsRaw(context, response, cq));
}
class async_interface { class async_interface {
public: public:
virtual ~async_interface() {} virtual ~async_interface() {}
virtual void Handle(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest* request, ::greptime::v1::region::RegionResponse* response, std::function<void(::grpc::Status)>) = 0; virtual void Handle(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest* request, ::greptime::v1::region::RegionResponse* response, std::function<void(::grpc::Status)>) = 0;
virtual void Handle(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest* request, ::greptime::v1::region::RegionResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; virtual void Handle(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest* request, ::greptime::v1::region::RegionResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0;
// TODO: add stream API virtual void HandleRequests(::grpc::ClientContext* context, ::greptime::v1::region::RegionResponse* response, ::grpc::ClientWriteReactor< ::greptime::v1::region::RegionRequest>* reactor) = 0;
}; };
typedef class async_interface experimental_async_interface; typedef class async_interface experimental_async_interface;
virtual class async_interface* async() { return nullptr; } virtual class async_interface* async() { return nullptr; }
@@ -73,6 +81,9 @@ class RegionServer final {
private: private:
virtual ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::region::RegionResponse>* AsyncHandleRaw(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::region::RegionResponse>* AsyncHandleRaw(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::region::RegionResponse>* PrepareAsyncHandleRaw(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::region::RegionResponse>* PrepareAsyncHandleRaw(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest& request, ::grpc::CompletionQueue* cq) = 0;
virtual ::grpc::ClientWriterInterface< ::greptime::v1::region::RegionRequest>* HandleRequestsRaw(::grpc::ClientContext* context, ::greptime::v1::region::RegionResponse* response) = 0;
virtual ::grpc::ClientAsyncWriterInterface< ::greptime::v1::region::RegionRequest>* AsyncHandleRequestsRaw(::grpc::ClientContext* context, ::greptime::v1::region::RegionResponse* response, ::grpc::CompletionQueue* cq, void* tag) = 0;
virtual ::grpc::ClientAsyncWriterInterface< ::greptime::v1::region::RegionRequest>* PrepareAsyncHandleRequestsRaw(::grpc::ClientContext* context, ::greptime::v1::region::RegionResponse* response, ::grpc::CompletionQueue* cq) = 0;
}; };
class Stub final : public StubInterface { class Stub final : public StubInterface {
public: public:
@@ -84,11 +95,21 @@ class RegionServer final {
std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::region::RegionResponse>> PrepareAsyncHandle(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest& request, ::grpc::CompletionQueue* cq) { std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::region::RegionResponse>> PrepareAsyncHandle(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::region::RegionResponse>>(PrepareAsyncHandleRaw(context, request, cq)); return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::region::RegionResponse>>(PrepareAsyncHandleRaw(context, request, cq));
} }
std::unique_ptr< ::grpc::ClientWriter< ::greptime::v1::region::RegionRequest>> HandleRequests(::grpc::ClientContext* context, ::greptime::v1::region::RegionResponse* response) {
return std::unique_ptr< ::grpc::ClientWriter< ::greptime::v1::region::RegionRequest>>(HandleRequestsRaw(context, response));
}
std::unique_ptr< ::grpc::ClientAsyncWriter< ::greptime::v1::region::RegionRequest>> AsyncHandleRequests(::grpc::ClientContext* context, ::greptime::v1::region::RegionResponse* response, ::grpc::CompletionQueue* cq, void* tag) {
return std::unique_ptr< ::grpc::ClientAsyncWriter< ::greptime::v1::region::RegionRequest>>(AsyncHandleRequestsRaw(context, response, cq, tag));
}
std::unique_ptr< ::grpc::ClientAsyncWriter< ::greptime::v1::region::RegionRequest>> PrepareAsyncHandleRequests(::grpc::ClientContext* context, ::greptime::v1::region::RegionResponse* response, ::grpc::CompletionQueue* cq) {
return std::unique_ptr< ::grpc::ClientAsyncWriter< ::greptime::v1::region::RegionRequest>>(PrepareAsyncHandleRequestsRaw(context, response, cq));
}
class async final : class async final :
public StubInterface::async_interface { public StubInterface::async_interface {
public: public:
void Handle(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest* request, ::greptime::v1::region::RegionResponse* response, std::function<void(::grpc::Status)>) override; void Handle(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest* request, ::greptime::v1::region::RegionResponse* response, std::function<void(::grpc::Status)>) override;
void Handle(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest* request, ::greptime::v1::region::RegionResponse* response, ::grpc::ClientUnaryReactor* reactor) override; void Handle(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest* request, ::greptime::v1::region::RegionResponse* response, ::grpc::ClientUnaryReactor* reactor) override;
void HandleRequests(::grpc::ClientContext* context, ::greptime::v1::region::RegionResponse* response, ::grpc::ClientWriteReactor< ::greptime::v1::region::RegionRequest>* reactor) override;
private: private:
friend class Stub; friend class Stub;
explicit async(Stub* stub): stub_(stub) { } explicit async(Stub* stub): stub_(stub) { }
@@ -102,7 +123,11 @@ class RegionServer final {
class async async_stub_{this}; class async async_stub_{this};
::grpc::ClientAsyncResponseReader< ::greptime::v1::region::RegionResponse>* AsyncHandleRaw(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::greptime::v1::region::RegionResponse>* AsyncHandleRaw(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientAsyncResponseReader< ::greptime::v1::region::RegionResponse>* PrepareAsyncHandleRaw(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::greptime::v1::region::RegionResponse>* PrepareAsyncHandleRaw(::grpc::ClientContext* context, const ::greptime::v1::region::RegionRequest& request, ::grpc::CompletionQueue* cq) override;
::grpc::ClientWriter< ::greptime::v1::region::RegionRequest>* HandleRequestsRaw(::grpc::ClientContext* context, ::greptime::v1::region::RegionResponse* response) override;
::grpc::ClientAsyncWriter< ::greptime::v1::region::RegionRequest>* AsyncHandleRequestsRaw(::grpc::ClientContext* context, ::greptime::v1::region::RegionResponse* response, ::grpc::CompletionQueue* cq, void* tag) override;
::grpc::ClientAsyncWriter< ::greptime::v1::region::RegionRequest>* PrepareAsyncHandleRequestsRaw(::grpc::ClientContext* context, ::greptime::v1::region::RegionResponse* response, ::grpc::CompletionQueue* cq) override;
const ::grpc::internal::RpcMethod rpcmethod_Handle_; const ::grpc::internal::RpcMethod rpcmethod_Handle_;
const ::grpc::internal::RpcMethod rpcmethod_HandleRequests_;
}; };
static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
@@ -111,7 +136,7 @@ class RegionServer final {
Service(); Service();
virtual ~Service(); virtual ~Service();
virtual ::grpc::Status Handle(::grpc::ServerContext* context, const ::greptime::v1::region::RegionRequest* request, ::greptime::v1::region::RegionResponse* response); virtual ::grpc::Status Handle(::grpc::ServerContext* context, const ::greptime::v1::region::RegionRequest* request, ::greptime::v1::region::RegionResponse* response);
// TODO: add stream API virtual ::grpc::Status HandleRequests(::grpc::ServerContext* context, ::grpc::ServerReader< ::greptime::v1::region::RegionRequest>* reader, ::greptime::v1::region::RegionResponse* response);
}; };
template <class BaseClass> template <class BaseClass>
class WithAsyncMethod_Handle : public BaseClass { class WithAsyncMethod_Handle : public BaseClass {
@@ -133,7 +158,27 @@ class RegionServer final {
::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
} }
}; };
typedef WithAsyncMethod_Handle<Service > AsyncService; template <class BaseClass>
class WithAsyncMethod_HandleRequests : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
WithAsyncMethod_HandleRequests() {
::grpc::Service::MarkMethodAsync(1);
}
~WithAsyncMethod_HandleRequests() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status HandleRequests(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::greptime::v1::region::RegionRequest>* /*reader*/, ::greptime::v1::region::RegionResponse* /*response*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
void RequestHandleRequests(::grpc::ServerContext* context, ::grpc::ServerAsyncReader< ::greptime::v1::region::RegionResponse, ::greptime::v1::region::RegionRequest>* reader, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
::grpc::Service::RequestAsyncClientStreaming(1, context, reader, new_call_cq, notification_cq, tag);
}
};
typedef WithAsyncMethod_Handle<WithAsyncMethod_HandleRequests<Service > > AsyncService;
template <class BaseClass> template <class BaseClass>
class WithCallbackMethod_Handle : public BaseClass { class WithCallbackMethod_Handle : public BaseClass {
private: private:
@@ -161,7 +206,29 @@ class RegionServer final {
virtual ::grpc::ServerUnaryReactor* Handle( virtual ::grpc::ServerUnaryReactor* Handle(
::grpc::CallbackServerContext* /*context*/, const ::greptime::v1::region::RegionRequest* /*request*/, ::greptime::v1::region::RegionResponse* /*response*/) { return nullptr; } ::grpc::CallbackServerContext* /*context*/, const ::greptime::v1::region::RegionRequest* /*request*/, ::greptime::v1::region::RegionResponse* /*response*/) { return nullptr; }
}; };
typedef WithCallbackMethod_Handle<Service > CallbackService; template <class BaseClass>
class WithCallbackMethod_HandleRequests : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
WithCallbackMethod_HandleRequests() {
::grpc::Service::MarkMethodCallback(1,
new ::grpc::internal::CallbackClientStreamingHandler< ::greptime::v1::region::RegionRequest, ::greptime::v1::region::RegionResponse>(
[this](
::grpc::CallbackServerContext* context, ::greptime::v1::region::RegionResponse* response) { return this->HandleRequests(context, response); }));
}
~WithCallbackMethod_HandleRequests() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status HandleRequests(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::greptime::v1::region::RegionRequest>* /*reader*/, ::greptime::v1::region::RegionResponse* /*response*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
virtual ::grpc::ServerReadReactor< ::greptime::v1::region::RegionRequest>* HandleRequests(
::grpc::CallbackServerContext* /*context*/, ::greptime::v1::region::RegionResponse* /*response*/) { return nullptr; }
};
typedef WithCallbackMethod_Handle<WithCallbackMethod_HandleRequests<Service > > CallbackService;
typedef CallbackService ExperimentalCallbackService; typedef CallbackService ExperimentalCallbackService;
template <class BaseClass> template <class BaseClass>
class WithGenericMethod_Handle : public BaseClass { class WithGenericMethod_Handle : public BaseClass {
@@ -181,6 +248,23 @@ class RegionServer final {
} }
}; };
template <class BaseClass> template <class BaseClass>
class WithGenericMethod_HandleRequests : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
WithGenericMethod_HandleRequests() {
::grpc::Service::MarkMethodGeneric(1);
}
~WithGenericMethod_HandleRequests() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status HandleRequests(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::greptime::v1::region::RegionRequest>* /*reader*/, ::greptime::v1::region::RegionResponse* /*response*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
};
template <class BaseClass>
class WithRawMethod_Handle : public BaseClass { class WithRawMethod_Handle : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
@@ -201,6 +285,26 @@ class RegionServer final {
} }
}; };
template <class BaseClass> template <class BaseClass>
class WithRawMethod_HandleRequests : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
WithRawMethod_HandleRequests() {
::grpc::Service::MarkMethodRaw(1);
}
~WithRawMethod_HandleRequests() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status HandleRequests(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::greptime::v1::region::RegionRequest>* /*reader*/, ::greptime::v1::region::RegionResponse* /*response*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
void RequestHandleRequests(::grpc::ServerContext* context, ::grpc::ServerAsyncReader< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* reader, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
::grpc::Service::RequestAsyncClientStreaming(1, context, reader, new_call_cq, notification_cq, tag);
}
};
template <class BaseClass>
class WithRawCallbackMethod_Handle : public BaseClass { class WithRawCallbackMethod_Handle : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
@@ -223,6 +327,28 @@ class RegionServer final {
::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; }
}; };
template <class BaseClass> template <class BaseClass>
class WithRawCallbackMethod_HandleRequests : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public:
WithRawCallbackMethod_HandleRequests() {
::grpc::Service::MarkMethodRawCallback(1,
new ::grpc::internal::CallbackClientStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
[this](
::grpc::CallbackServerContext* context, ::grpc::ByteBuffer* response) { return this->HandleRequests(context, response); }));
}
~WithRawCallbackMethod_HandleRequests() override {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status HandleRequests(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::greptime::v1::region::RegionRequest>* /*reader*/, ::greptime::v1::region::RegionResponse* /*response*/) override {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
virtual ::grpc::ServerReadReactor< ::grpc::ByteBuffer>* HandleRequests(
::grpc::CallbackServerContext* /*context*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; }
};
template <class BaseClass>
class WithStreamedUnaryMethod_Handle : public BaseClass { class WithStreamedUnaryMethod_Handle : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
+107 -105
View File
@@ -26,7 +26,7 @@ namespace region {
PROTOBUF_CONSTEXPR RegionRequest::RegionRequest( PROTOBUF_CONSTEXPR RegionRequest::RegionRequest(
::_pbi::ConstantInitialized): _impl_{ ::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_.header_)*/nullptr /*decltype(_impl_.header_)*/nullptr
, /*decltype(_impl_.request_)*/{} , /*decltype(_impl_.body_)*/{}
, /*decltype(_impl_._cached_size_)*/{} , /*decltype(_impl_._cached_size_)*/{}
, /*decltype(_impl_._oneof_case_)*/{}} {} , /*decltype(_impl_._oneof_case_)*/{}} {}
struct RegionRequestDefaultTypeInternal { struct RegionRequestDefaultTypeInternal {
@@ -285,7 +285,7 @@ const uint32_t TableStruct_greptime_2fv1_2fregion_2fserver_2eproto::offsets[] PR
::_pbi::kInvalidFieldOffsetTag, ::_pbi::kInvalidFieldOffsetTag,
::_pbi::kInvalidFieldOffsetTag, ::_pbi::kInvalidFieldOffsetTag,
::_pbi::kInvalidFieldOffsetTag, ::_pbi::kInvalidFieldOffsetTag,
PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionRequest, _impl_.request_), PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionRequest, _impl_.body_),
~0u, // no _has_bits_ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionResponse, _internal_metadata_), PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionResponse, _internal_metadata_),
~0u, // no _extensions_ ~0u, // no _extensions_
@@ -466,7 +466,7 @@ static const ::_pb::Message* const file_default_instances[] = {
const char descriptor_table_protodef_greptime_2fv1_2fregion_2fserver_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = const char descriptor_table_protodef_greptime_2fv1_2fregion_2fserver_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\037greptime/v1/region/server.proto\022\022grept" "\n\037greptime/v1/region/server.proto\022\022grept"
"ime.v1.region\032\030greptime/v1/common.proto\032" "ime.v1.region\032\030greptime/v1/common.proto\032"
"\025greptime/v1/row.proto\"\233\004\n\rRegionRequest" "\025greptime/v1/row.proto\"\230\004\n\rRegionRequest"
"\022*\n\006header\030\001 \001(\0132\032.greptime.v1.RequestHe" "\022*\n\006header\030\001 \001(\0132\032.greptime.v1.RequestHe"
"ader\0225\n\007inserts\030\003 \001(\0132\".greptime.v1.regi" "ader\0225\n\007inserts\030\003 \001(\0132\".greptime.v1.regi"
"on.InsertRequestsH\000\0225\n\007deletes\030\004 \001(\0132\".g" "on.InsertRequestsH\000\0225\n\007deletes\030\004 \001(\0132\".g"
@@ -479,44 +479,46 @@ const char descriptor_table_protodef_greptime_2fv1_2fregion_2fserver_2eproto[] P
"alter\030\t \001(\0132 .greptime.v1.region.AlterRe" "alter\030\t \001(\0132 .greptime.v1.region.AlterRe"
"questH\000\0221\n\005flush\030\n \001(\0132 .greptime.v1.reg" "questH\000\0221\n\005flush\030\n \001(\0132 .greptime.v1.reg"
"ion.FlushRequestH\000\0225\n\007compact\030\013 \001(\0132\".gr" "ion.FlushRequestH\000\0225\n\007compact\030\013 \001(\0132\".gr"
"eptime.v1.region.CompactRequestH\000B\t\n\007req" "eptime.v1.region.CompactRequestH\000B\006\n\004bod"
"uest\"T\n\016RegionResponse\022+\n\006header\030\001 \001(\0132\033" "y\"T\n\016RegionResponse\022+\n\006header\030\001 \001(\0132\033.gr"
".greptime.v1.ResponseHeader\022\025\n\raffacted_" "eptime.v1.ResponseHeader\022\025\n\raffacted_row"
"rows\030\002 \001(\004\"E\n\016InsertRequests\0223\n\010requests" "s\030\002 \001(\004\"E\n\016InsertRequests\0223\n\010requests\030\001 "
"\030\001 \003(\0132!.greptime.v1.region.InsertReques" "\003(\0132!.greptime.v1.region.InsertRequest\"E"
"t\"E\n\016DeleteRequests\0223\n\010requests\030\001 \003(\0132!." "\n\016DeleteRequests\0223\n\010requests\030\001 \003(\0132!.gre"
"greptime.v1.region.DeleteRequest\"B\n\rInse" "ptime.v1.region.DeleteRequest\"B\n\rInsertR"
"rtRequest\022\021\n\tregion_id\030\001 \001(\004\022\036\n\004rows\030\002 \003" "equest\022\021\n\tregion_id\030\001 \001(\004\022\036\n\004rows\030\002 \003(\0132"
"(\0132\020.greptime.v1.Row\"B\n\rDeleteRequest\022\021\n" "\020.greptime.v1.Row\"B\n\rDeleteRequest\022\021\n\tre"
"\tregion_id\030\001 \001(\004\022\036\n\004rows\030\002 \003(\0132\020.greptim" "gion_id\030\001 \001(\004\022\036\n\004rows\030\002 \003(\0132\020.greptime.v"
"e.v1.Row\"/\n\014QueryRequest\022\021\n\tregion_id\030\001 " "1.Row\"/\n\014QueryRequest\022\021\n\tregion_id\030\001 \001(\004"
"\001(\004\022\014\n\004plan\030\002 \001(\014\"\236\002\n\rCreateRequest\022\021\n\tr" "\022\014\n\004plan\030\002 \001(\014\"\236\002\n\rCreateRequest\022\021\n\tregi"
"egion_id\030\001 \001(\004\022\016\n\006engine\030\002 \001(\t\0222\n\013column" "on_id\030\001 \001(\004\022\016\n\006engine\030\002 \001(\t\0222\n\013column_de"
"_defs\030\003 \003(\0132\035.greptime.v1.region.ColumnD" "fs\030\003 \003(\0132\035.greptime.v1.region.ColumnDef\022"
"ef\022\023\n\013primary_key\030\004 \003(\r\022\034\n\024create_if_not" "\023\n\013primary_key\030\004 \003(\r\022\034\n\024create_if_not_ex"
"_exists\030\005 \001(\010\022\022\n\nregion_dir\030\006 \001(\t\022\?\n\007opt" "ists\030\005 \001(\010\022\022\n\nregion_dir\030\006 \001(\t\022\?\n\007option"
"ions\030\007 \003(\0132..greptime.v1.region.CreateRe" "s\030\007 \003(\0132..greptime.v1.region.CreateReque"
"quest.OptionsEntry\032.\n\014OptionsEntry\022\013\n\003ke" "st.OptionsEntry\032.\n\014OptionsEntry\022\013\n\003key\030\001"
"y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\" \n\013DropReques" " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\" \n\013DropRequest\022\021"
"t\022\021\n\tregion_id\030\001 \001(\004\"\263\001\n\013OpenRequest\022\021\n\t" "\n\tregion_id\030\001 \001(\004\"\263\001\n\013OpenRequest\022\021\n\treg"
"region_id\030\001 \001(\004\022\016\n\006engine\030\002 \001(\t\022\022\n\nregio" "ion_id\030\001 \001(\004\022\016\n\006engine\030\002 \001(\t\022\022\n\nregion_d"
"n_dir\030\003 \001(\t\022=\n\007options\030\004 \003(\0132,.greptime." "ir\030\003 \001(\t\022=\n\007options\030\004 \003(\0132,.greptime.v1."
"v1.region.OpenRequest.OptionsEntry\032.\n\014Op" "region.OpenRequest.OptionsEntry\032.\n\014Optio"
"tionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" "nsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\""
"8\001\"!\n\014CloseRequest\022\021\n\tregion_id\030\001 \001(\004\"!\n" "!\n\014CloseRequest\022\021\n\tregion_id\030\001 \001(\004\"!\n\014Al"
"\014AlterRequest\022\021\n\tregion_id\030\001 \001(\004\"!\n\014Flus" "terRequest\022\021\n\tregion_id\030\001 \001(\004\"!\n\014FlushRe"
"hRequest\022\021\n\tregion_id\030\001 \001(\004\"#\n\016CompactRe" "quest\022\021\n\tregion_id\030\001 \001(\004\"#\n\016CompactReque"
"quest\022\021\n\tregion_id\030\001 \001(\004\"\276\001\n\tColumnDef\022\014" "st\022\021\n\tregion_id\030\001 \001(\004\"\276\001\n\tColumnDef\022\014\n\004n"
"\n\004name\030\001 \001(\t\022\021\n\tcolumn_id\030\002 \001(\r\022-\n\010datat" "ame\030\001 \001(\t\022\021\n\tcolumn_id\030\002 \001(\r\022-\n\010datatype"
"ype\030\003 \001(\0162\033.greptime.v1.ColumnDataType\022\023" "\030\003 \001(\0162\033.greptime.v1.ColumnDataType\022\023\n\013i"
"\n\013is_nullable\030\004 \001(\010\022\032\n\022default_constrain" "s_nullable\030\004 \001(\010\022\032\n\022default_constraint\030\005"
"t\030\005 \001(\014\0220\n\rsemantic_type\030\006 \001(\0162\031.greptim" " \001(\014\0220\n\rsemantic_type\030\006 \001(\0162\031.greptime.v"
"e.v1.SemanticType2_\n\014RegionServer\022O\n\006Han" "1.SemanticType2\264\001\n\006Region\022O\n\006Handle\022!.gr"
"dle\022!.greptime.v1.region.RegionRequest\032\"" "eptime.v1.region.RegionRequest\032\".greptim"
".greptime.v1.region.RegionResponseB]\n\025io" "e.v1.region.RegionResponse\022Y\n\016HandleRequ"
".greptime.v1.regionB\006ServerZ<github.com/" "ests\022!.greptime.v1.region.RegionRequest\032"
"GreptimeTeam/greptime-proto/go/greptime/" "\".greptime.v1.region.RegionResponse(\001B]\n"
"v1/regionb\006proto3" "\025io.greptime.v1.regionB\006ServerZ<github.c"
"om/GreptimeTeam/greptime-proto/go/grepti"
"me/v1/regionb\006proto3"
; ;
static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_deps[2] = { static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_deps[2] = {
&::descriptor_table_greptime_2fv1_2fcommon_2eproto, &::descriptor_table_greptime_2fv1_2fcommon_2eproto,
@@ -524,7 +526,7 @@ static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2freg
}; };
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_once; static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto = { const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto = {
false, false, 2097, descriptor_table_protodef_greptime_2fv1_2fregion_2fserver_2eproto, false, false, 2180, descriptor_table_protodef_greptime_2fv1_2fregion_2fserver_2eproto,
"greptime/v1/region/server.proto", "greptime/v1/region/server.proto",
&descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_once, descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_deps, 2, 17, &descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_once, descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_deps, 2, 17,
schemas, file_default_instances, TableStruct_greptime_2fv1_2fregion_2fserver_2eproto::offsets, schemas, file_default_instances, TableStruct_greptime_2fv1_2fregion_2fserver_2eproto::offsets,
@@ -563,39 +565,39 @@ RegionRequest::_Internal::header(const RegionRequest* msg) {
} }
const ::greptime::v1::region::InsertRequests& const ::greptime::v1::region::InsertRequests&
RegionRequest::_Internal::inserts(const RegionRequest* msg) { RegionRequest::_Internal::inserts(const RegionRequest* msg) {
return *msg->_impl_.request_.inserts_; return *msg->_impl_.body_.inserts_;
} }
const ::greptime::v1::region::DeleteRequests& const ::greptime::v1::region::DeleteRequests&
RegionRequest::_Internal::deletes(const RegionRequest* msg) { RegionRequest::_Internal::deletes(const RegionRequest* msg) {
return *msg->_impl_.request_.deletes_; return *msg->_impl_.body_.deletes_;
} }
const ::greptime::v1::region::CreateRequest& const ::greptime::v1::region::CreateRequest&
RegionRequest::_Internal::create(const RegionRequest* msg) { RegionRequest::_Internal::create(const RegionRequest* msg) {
return *msg->_impl_.request_.create_; return *msg->_impl_.body_.create_;
} }
const ::greptime::v1::region::DropRequest& const ::greptime::v1::region::DropRequest&
RegionRequest::_Internal::drop(const RegionRequest* msg) { RegionRequest::_Internal::drop(const RegionRequest* msg) {
return *msg->_impl_.request_.drop_; return *msg->_impl_.body_.drop_;
} }
const ::greptime::v1::region::OpenRequest& const ::greptime::v1::region::OpenRequest&
RegionRequest::_Internal::open(const RegionRequest* msg) { RegionRequest::_Internal::open(const RegionRequest* msg) {
return *msg->_impl_.request_.open_; return *msg->_impl_.body_.open_;
} }
const ::greptime::v1::region::CloseRequest& const ::greptime::v1::region::CloseRequest&
RegionRequest::_Internal::close(const RegionRequest* msg) { RegionRequest::_Internal::close(const RegionRequest* msg) {
return *msg->_impl_.request_.close_; return *msg->_impl_.body_.close_;
} }
const ::greptime::v1::region::AlterRequest& const ::greptime::v1::region::AlterRequest&
RegionRequest::_Internal::alter(const RegionRequest* msg) { RegionRequest::_Internal::alter(const RegionRequest* msg) {
return *msg->_impl_.request_.alter_; return *msg->_impl_.body_.alter_;
} }
const ::greptime::v1::region::FlushRequest& const ::greptime::v1::region::FlushRequest&
RegionRequest::_Internal::flush(const RegionRequest* msg) { RegionRequest::_Internal::flush(const RegionRequest* msg) {
return *msg->_impl_.request_.flush_; return *msg->_impl_.body_.flush_;
} }
const ::greptime::v1::region::CompactRequest& const ::greptime::v1::region::CompactRequest&
RegionRequest::_Internal::compact(const RegionRequest* msg) { RegionRequest::_Internal::compact(const RegionRequest* msg) {
return *msg->_impl_.request_.compact_; return *msg->_impl_.body_.compact_;
} }
void RegionRequest::clear_header() { void RegionRequest::clear_header() {
if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) { if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) {
@@ -605,7 +607,7 @@ void RegionRequest::clear_header() {
} }
void RegionRequest::set_allocated_inserts(::greptime::v1::region::InsertRequests* inserts) { void RegionRequest::set_allocated_inserts(::greptime::v1::region::InsertRequests* inserts) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
clear_request(); clear_body();
if (inserts) { if (inserts) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(inserts); ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(inserts);
@@ -614,13 +616,13 @@ void RegionRequest::set_allocated_inserts(::greptime::v1::region::InsertRequests
message_arena, inserts, submessage_arena); message_arena, inserts, submessage_arena);
} }
set_has_inserts(); set_has_inserts();
_impl_.request_.inserts_ = inserts; _impl_.body_.inserts_ = inserts;
} }
// @@protoc_insertion_point(field_set_allocated:greptime.v1.region.RegionRequest.inserts) // @@protoc_insertion_point(field_set_allocated:greptime.v1.region.RegionRequest.inserts)
} }
void RegionRequest::set_allocated_deletes(::greptime::v1::region::DeleteRequests* deletes) { void RegionRequest::set_allocated_deletes(::greptime::v1::region::DeleteRequests* deletes) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
clear_request(); clear_body();
if (deletes) { if (deletes) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(deletes); ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(deletes);
@@ -629,13 +631,13 @@ void RegionRequest::set_allocated_deletes(::greptime::v1::region::DeleteRequests
message_arena, deletes, submessage_arena); message_arena, deletes, submessage_arena);
} }
set_has_deletes(); set_has_deletes();
_impl_.request_.deletes_ = deletes; _impl_.body_.deletes_ = deletes;
} }
// @@protoc_insertion_point(field_set_allocated:greptime.v1.region.RegionRequest.deletes) // @@protoc_insertion_point(field_set_allocated:greptime.v1.region.RegionRequest.deletes)
} }
void RegionRequest::set_allocated_create(::greptime::v1::region::CreateRequest* create) { void RegionRequest::set_allocated_create(::greptime::v1::region::CreateRequest* create) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
clear_request(); clear_body();
if (create) { if (create) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(create); ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(create);
@@ -644,13 +646,13 @@ void RegionRequest::set_allocated_create(::greptime::v1::region::CreateRequest*
message_arena, create, submessage_arena); message_arena, create, submessage_arena);
} }
set_has_create(); set_has_create();
_impl_.request_.create_ = create; _impl_.body_.create_ = create;
} }
// @@protoc_insertion_point(field_set_allocated:greptime.v1.region.RegionRequest.create) // @@protoc_insertion_point(field_set_allocated:greptime.v1.region.RegionRequest.create)
} }
void RegionRequest::set_allocated_drop(::greptime::v1::region::DropRequest* drop) { void RegionRequest::set_allocated_drop(::greptime::v1::region::DropRequest* drop) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
clear_request(); clear_body();
if (drop) { if (drop) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(drop); ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(drop);
@@ -659,13 +661,13 @@ void RegionRequest::set_allocated_drop(::greptime::v1::region::DropRequest* drop
message_arena, drop, submessage_arena); message_arena, drop, submessage_arena);
} }
set_has_drop(); set_has_drop();
_impl_.request_.drop_ = drop; _impl_.body_.drop_ = drop;
} }
// @@protoc_insertion_point(field_set_allocated:greptime.v1.region.RegionRequest.drop) // @@protoc_insertion_point(field_set_allocated:greptime.v1.region.RegionRequest.drop)
} }
void RegionRequest::set_allocated_open(::greptime::v1::region::OpenRequest* open) { void RegionRequest::set_allocated_open(::greptime::v1::region::OpenRequest* open) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
clear_request(); clear_body();
if (open) { if (open) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(open); ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(open);
@@ -674,13 +676,13 @@ void RegionRequest::set_allocated_open(::greptime::v1::region::OpenRequest* open
message_arena, open, submessage_arena); message_arena, open, submessage_arena);
} }
set_has_open(); set_has_open();
_impl_.request_.open_ = open; _impl_.body_.open_ = open;
} }
// @@protoc_insertion_point(field_set_allocated:greptime.v1.region.RegionRequest.open) // @@protoc_insertion_point(field_set_allocated:greptime.v1.region.RegionRequest.open)
} }
void RegionRequest::set_allocated_close(::greptime::v1::region::CloseRequest* close) { void RegionRequest::set_allocated_close(::greptime::v1::region::CloseRequest* close) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
clear_request(); clear_body();
if (close) { if (close) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(close); ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(close);
@@ -689,13 +691,13 @@ void RegionRequest::set_allocated_close(::greptime::v1::region::CloseRequest* cl
message_arena, close, submessage_arena); message_arena, close, submessage_arena);
} }
set_has_close(); set_has_close();
_impl_.request_.close_ = close; _impl_.body_.close_ = close;
} }
// @@protoc_insertion_point(field_set_allocated:greptime.v1.region.RegionRequest.close) // @@protoc_insertion_point(field_set_allocated:greptime.v1.region.RegionRequest.close)
} }
void RegionRequest::set_allocated_alter(::greptime::v1::region::AlterRequest* alter) { void RegionRequest::set_allocated_alter(::greptime::v1::region::AlterRequest* alter) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
clear_request(); clear_body();
if (alter) { if (alter) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(alter); ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(alter);
@@ -704,13 +706,13 @@ void RegionRequest::set_allocated_alter(::greptime::v1::region::AlterRequest* al
message_arena, alter, submessage_arena); message_arena, alter, submessage_arena);
} }
set_has_alter(); set_has_alter();
_impl_.request_.alter_ = alter; _impl_.body_.alter_ = alter;
} }
// @@protoc_insertion_point(field_set_allocated:greptime.v1.region.RegionRequest.alter) // @@protoc_insertion_point(field_set_allocated:greptime.v1.region.RegionRequest.alter)
} }
void RegionRequest::set_allocated_flush(::greptime::v1::region::FlushRequest* flush) { void RegionRequest::set_allocated_flush(::greptime::v1::region::FlushRequest* flush) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
clear_request(); clear_body();
if (flush) { if (flush) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(flush); ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(flush);
@@ -719,13 +721,13 @@ void RegionRequest::set_allocated_flush(::greptime::v1::region::FlushRequest* fl
message_arena, flush, submessage_arena); message_arena, flush, submessage_arena);
} }
set_has_flush(); set_has_flush();
_impl_.request_.flush_ = flush; _impl_.body_.flush_ = flush;
} }
// @@protoc_insertion_point(field_set_allocated:greptime.v1.region.RegionRequest.flush) // @@protoc_insertion_point(field_set_allocated:greptime.v1.region.RegionRequest.flush)
} }
void RegionRequest::set_allocated_compact(::greptime::v1::region::CompactRequest* compact) { void RegionRequest::set_allocated_compact(::greptime::v1::region::CompactRequest* compact) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
clear_request(); clear_body();
if (compact) { if (compact) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(compact); ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(compact);
@@ -734,7 +736,7 @@ void RegionRequest::set_allocated_compact(::greptime::v1::region::CompactRequest
message_arena, compact, submessage_arena); message_arena, compact, submessage_arena);
} }
set_has_compact(); set_has_compact();
_impl_.request_.compact_ = compact; _impl_.body_.compact_ = compact;
} }
// @@protoc_insertion_point(field_set_allocated:greptime.v1.region.RegionRequest.compact) // @@protoc_insertion_point(field_set_allocated:greptime.v1.region.RegionRequest.compact)
} }
@@ -749,7 +751,7 @@ RegionRequest::RegionRequest(const RegionRequest& from)
RegionRequest* const _this = this; (void)_this; RegionRequest* const _this = this; (void)_this;
new (&_impl_) Impl_{ new (&_impl_) Impl_{
decltype(_impl_.header_){nullptr} decltype(_impl_.header_){nullptr}
, decltype(_impl_.request_){} , decltype(_impl_.body_){}
, /*decltype(_impl_._cached_size_)*/{} , /*decltype(_impl_._cached_size_)*/{}
, /*decltype(_impl_._oneof_case_)*/{}}; , /*decltype(_impl_._oneof_case_)*/{}};
@@ -757,8 +759,8 @@ RegionRequest::RegionRequest(const RegionRequest& from)
if (from._internal_has_header()) { if (from._internal_has_header()) {
_this->_impl_.header_ = new ::greptime::v1::RequestHeader(*from._impl_.header_); _this->_impl_.header_ = new ::greptime::v1::RequestHeader(*from._impl_.header_);
} }
clear_has_request(); clear_has_body();
switch (from.request_case()) { switch (from.body_case()) {
case kInserts: { case kInserts: {
_this->_internal_mutable_inserts()->::greptime::v1::region::InsertRequests::MergeFrom( _this->_internal_mutable_inserts()->::greptime::v1::region::InsertRequests::MergeFrom(
from._internal_inserts()); from._internal_inserts());
@@ -804,7 +806,7 @@ RegionRequest::RegionRequest(const RegionRequest& from)
from._internal_compact()); from._internal_compact());
break; break;
} }
case REQUEST_NOT_SET: { case BODY_NOT_SET: {
break; break;
} }
} }
@@ -817,11 +819,11 @@ inline void RegionRequest::SharedCtor(
(void)is_message_owned; (void)is_message_owned;
new (&_impl_) Impl_{ new (&_impl_) Impl_{
decltype(_impl_.header_){nullptr} decltype(_impl_.header_){nullptr}
, decltype(_impl_.request_){} , decltype(_impl_.body_){}
, /*decltype(_impl_._cached_size_)*/{} , /*decltype(_impl_._cached_size_)*/{}
, /*decltype(_impl_._oneof_case_)*/{} , /*decltype(_impl_._oneof_case_)*/{}
}; };
clear_has_request(); clear_has_body();
} }
RegionRequest::~RegionRequest() { RegionRequest::~RegionRequest() {
@@ -836,8 +838,8 @@ RegionRequest::~RegionRequest() {
inline void RegionRequest::SharedDtor() { inline void RegionRequest::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
if (this != internal_default_instance()) delete _impl_.header_; if (this != internal_default_instance()) delete _impl_.header_;
if (has_request()) { if (has_body()) {
clear_request(); clear_body();
} }
} }
@@ -845,68 +847,68 @@ void RegionRequest::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size); _impl_._cached_size_.Set(size);
} }
void RegionRequest::clear_request() { void RegionRequest::clear_body() {
// @@protoc_insertion_point(one_of_clear_start:greptime.v1.region.RegionRequest) // @@protoc_insertion_point(one_of_clear_start:greptime.v1.region.RegionRequest)
switch (request_case()) { switch (body_case()) {
case kInserts: { case kInserts: {
if (GetArenaForAllocation() == nullptr) { if (GetArenaForAllocation() == nullptr) {
delete _impl_.request_.inserts_; delete _impl_.body_.inserts_;
} }
break; break;
} }
case kDeletes: { case kDeletes: {
if (GetArenaForAllocation() == nullptr) { if (GetArenaForAllocation() == nullptr) {
delete _impl_.request_.deletes_; delete _impl_.body_.deletes_;
} }
break; break;
} }
case kCreate: { case kCreate: {
if (GetArenaForAllocation() == nullptr) { if (GetArenaForAllocation() == nullptr) {
delete _impl_.request_.create_; delete _impl_.body_.create_;
} }
break; break;
} }
case kDrop: { case kDrop: {
if (GetArenaForAllocation() == nullptr) { if (GetArenaForAllocation() == nullptr) {
delete _impl_.request_.drop_; delete _impl_.body_.drop_;
} }
break; break;
} }
case kOpen: { case kOpen: {
if (GetArenaForAllocation() == nullptr) { if (GetArenaForAllocation() == nullptr) {
delete _impl_.request_.open_; delete _impl_.body_.open_;
} }
break; break;
} }
case kClose: { case kClose: {
if (GetArenaForAllocation() == nullptr) { if (GetArenaForAllocation() == nullptr) {
delete _impl_.request_.close_; delete _impl_.body_.close_;
} }
break; break;
} }
case kAlter: { case kAlter: {
if (GetArenaForAllocation() == nullptr) { if (GetArenaForAllocation() == nullptr) {
delete _impl_.request_.alter_; delete _impl_.body_.alter_;
} }
break; break;
} }
case kFlush: { case kFlush: {
if (GetArenaForAllocation() == nullptr) { if (GetArenaForAllocation() == nullptr) {
delete _impl_.request_.flush_; delete _impl_.body_.flush_;
} }
break; break;
} }
case kCompact: { case kCompact: {
if (GetArenaForAllocation() == nullptr) { if (GetArenaForAllocation() == nullptr) {
delete _impl_.request_.compact_; delete _impl_.body_.compact_;
} }
break; break;
} }
case REQUEST_NOT_SET: { case BODY_NOT_SET: {
break; break;
} }
} }
_impl_._oneof_case_[0] = REQUEST_NOT_SET; _impl_._oneof_case_[0] = BODY_NOT_SET;
} }
@@ -920,7 +922,7 @@ void RegionRequest::Clear() {
delete _impl_.header_; delete _impl_.header_;
} }
_impl_.header_ = nullptr; _impl_.header_ = nullptr;
clear_request(); clear_body();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
} }
@@ -1132,71 +1134,71 @@ size_t RegionRequest::ByteSizeLong() const {
*_impl_.header_); *_impl_.header_);
} }
switch (request_case()) { switch (body_case()) {
// .greptime.v1.region.InsertRequests inserts = 3; // .greptime.v1.region.InsertRequests inserts = 3;
case kInserts: { case kInserts: {
total_size += 1 + total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.request_.inserts_); *_impl_.body_.inserts_);
break; break;
} }
// .greptime.v1.region.DeleteRequests deletes = 4; // .greptime.v1.region.DeleteRequests deletes = 4;
case kDeletes: { case kDeletes: {
total_size += 1 + total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.request_.deletes_); *_impl_.body_.deletes_);
break; break;
} }
// .greptime.v1.region.CreateRequest create = 5; // .greptime.v1.region.CreateRequest create = 5;
case kCreate: { case kCreate: {
total_size += 1 + total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.request_.create_); *_impl_.body_.create_);
break; break;
} }
// .greptime.v1.region.DropRequest drop = 6; // .greptime.v1.region.DropRequest drop = 6;
case kDrop: { case kDrop: {
total_size += 1 + total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.request_.drop_); *_impl_.body_.drop_);
break; break;
} }
// .greptime.v1.region.OpenRequest open = 7; // .greptime.v1.region.OpenRequest open = 7;
case kOpen: { case kOpen: {
total_size += 1 + total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.request_.open_); *_impl_.body_.open_);
break; break;
} }
// .greptime.v1.region.CloseRequest close = 8; // .greptime.v1.region.CloseRequest close = 8;
case kClose: { case kClose: {
total_size += 1 + total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.request_.close_); *_impl_.body_.close_);
break; break;
} }
// .greptime.v1.region.AlterRequest alter = 9; // .greptime.v1.region.AlterRequest alter = 9;
case kAlter: { case kAlter: {
total_size += 1 + total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.request_.alter_); *_impl_.body_.alter_);
break; break;
} }
// .greptime.v1.region.FlushRequest flush = 10; // .greptime.v1.region.FlushRequest flush = 10;
case kFlush: { case kFlush: {
total_size += 1 + total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.request_.flush_); *_impl_.body_.flush_);
break; break;
} }
// .greptime.v1.region.CompactRequest compact = 11; // .greptime.v1.region.CompactRequest compact = 11;
case kCompact: { case kCompact: {
total_size += 1 + total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.request_.compact_); *_impl_.body_.compact_);
break; break;
} }
case REQUEST_NOT_SET: { case BODY_NOT_SET: {
break; break;
} }
} }
@@ -1222,7 +1224,7 @@ void RegionRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::
_this->_internal_mutable_header()->::greptime::v1::RequestHeader::MergeFrom( _this->_internal_mutable_header()->::greptime::v1::RequestHeader::MergeFrom(
from._internal_header()); from._internal_header());
} }
switch (from.request_case()) { switch (from.body_case()) {
case kInserts: { case kInserts: {
_this->_internal_mutable_inserts()->::greptime::v1::region::InsertRequests::MergeFrom( _this->_internal_mutable_inserts()->::greptime::v1::region::InsertRequests::MergeFrom(
from._internal_inserts()); from._internal_inserts());
@@ -1268,7 +1270,7 @@ void RegionRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::
from._internal_compact()); from._internal_compact());
break; break;
} }
case REQUEST_NOT_SET: { case BODY_NOT_SET: {
break; break;
} }
} }
@@ -1290,7 +1292,7 @@ void RegionRequest::InternalSwap(RegionRequest* other) {
using std::swap; using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_); _internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_.header_, other->_impl_.header_); swap(_impl_.header_, other->_impl_.header_);
swap(_impl_.request_, other->_impl_.request_); swap(_impl_.body_, other->_impl_.body_);
swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
} }
+150 -150
View File
@@ -174,7 +174,7 @@ class RegionRequest final :
static const RegionRequest& default_instance() { static const RegionRequest& default_instance() {
return *internal_default_instance(); return *internal_default_instance();
} }
enum RequestCase { enum BodyCase {
kInserts = 3, kInserts = 3,
kDeletes = 4, kDeletes = 4,
kCreate = 5, kCreate = 5,
@@ -184,7 +184,7 @@ class RegionRequest final :
kAlter = 9, kAlter = 9,
kFlush = 10, kFlush = 10,
kCompact = 11, kCompact = 11,
REQUEST_NOT_SET = 0, BODY_NOT_SET = 0,
}; };
static inline const RegionRequest* internal_default_instance() { static inline const RegionRequest* internal_default_instance() {
@@ -456,8 +456,8 @@ class RegionRequest final :
::greptime::v1::region::CompactRequest* compact); ::greptime::v1::region::CompactRequest* compact);
::greptime::v1::region::CompactRequest* unsafe_arena_release_compact(); ::greptime::v1::region::CompactRequest* unsafe_arena_release_compact();
void clear_request(); void clear_body();
RequestCase request_case() const; BodyCase body_case() const;
// @@protoc_insertion_point(class_scope:greptime.v1.region.RegionRequest) // @@protoc_insertion_point(class_scope:greptime.v1.region.RegionRequest)
private: private:
class _Internal; class _Internal;
@@ -471,16 +471,16 @@ class RegionRequest final :
void set_has_flush(); void set_has_flush();
void set_has_compact(); void set_has_compact();
inline bool has_request() const; inline bool has_body() const;
inline void clear_has_request(); inline void clear_has_body();
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_; typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_; typedef void DestructorSkippable_;
struct Impl_ { struct Impl_ {
::greptime::v1::RequestHeader* header_; ::greptime::v1::RequestHeader* header_;
union RequestUnion { union BodyUnion {
constexpr RequestUnion() : _constinit_{} {} constexpr BodyUnion() : _constinit_{} {}
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_;
::greptime::v1::region::InsertRequests* inserts_; ::greptime::v1::region::InsertRequests* inserts_;
::greptime::v1::region::DeleteRequests* deletes_; ::greptime::v1::region::DeleteRequests* deletes_;
@@ -491,7 +491,7 @@ class RegionRequest final :
::greptime::v1::region::AlterRequest* alter_; ::greptime::v1::region::AlterRequest* alter_;
::greptime::v1::region::FlushRequest* flush_; ::greptime::v1::region::FlushRequest* flush_;
::greptime::v1::region::CompactRequest* compact_; ::greptime::v1::region::CompactRequest* compact_;
} request_; } body_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
uint32_t _oneof_case_[1]; uint32_t _oneof_case_[1];
@@ -3056,7 +3056,7 @@ inline void RegionRequest::set_allocated_header(::greptime::v1::RequestHeader* h
// .greptime.v1.region.InsertRequests inserts = 3; // .greptime.v1.region.InsertRequests inserts = 3;
inline bool RegionRequest::_internal_has_inserts() const { inline bool RegionRequest::_internal_has_inserts() const {
return request_case() == kInserts; return body_case() == kInserts;
} }
inline bool RegionRequest::has_inserts() const { inline bool RegionRequest::has_inserts() const {
return _internal_has_inserts(); return _internal_has_inserts();
@@ -3067,20 +3067,20 @@ inline void RegionRequest::set_has_inserts() {
inline void RegionRequest::clear_inserts() { inline void RegionRequest::clear_inserts() {
if (_internal_has_inserts()) { if (_internal_has_inserts()) {
if (GetArenaForAllocation() == nullptr) { if (GetArenaForAllocation() == nullptr) {
delete _impl_.request_.inserts_; delete _impl_.body_.inserts_;
} }
clear_has_request(); clear_has_body();
} }
} }
inline ::greptime::v1::region::InsertRequests* RegionRequest::release_inserts() { inline ::greptime::v1::region::InsertRequests* RegionRequest::release_inserts() {
// @@protoc_insertion_point(field_release:greptime.v1.region.RegionRequest.inserts) // @@protoc_insertion_point(field_release:greptime.v1.region.RegionRequest.inserts)
if (_internal_has_inserts()) { if (_internal_has_inserts()) {
clear_has_request(); clear_has_body();
::greptime::v1::region::InsertRequests* temp = _impl_.request_.inserts_; ::greptime::v1::region::InsertRequests* temp = _impl_.body_.inserts_;
if (GetArenaForAllocation() != nullptr) { if (GetArenaForAllocation() != nullptr) {
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
} }
_impl_.request_.inserts_ = nullptr; _impl_.body_.inserts_ = nullptr;
return temp; return temp;
} else { } else {
return nullptr; return nullptr;
@@ -3088,7 +3088,7 @@ inline ::greptime::v1::region::InsertRequests* RegionRequest::release_inserts()
} }
inline const ::greptime::v1::region::InsertRequests& RegionRequest::_internal_inserts() const { inline const ::greptime::v1::region::InsertRequests& RegionRequest::_internal_inserts() const {
return _internal_has_inserts() return _internal_has_inserts()
? *_impl_.request_.inserts_ ? *_impl_.body_.inserts_
: reinterpret_cast< ::greptime::v1::region::InsertRequests&>(::greptime::v1::region::_InsertRequests_default_instance_); : reinterpret_cast< ::greptime::v1::region::InsertRequests&>(::greptime::v1::region::_InsertRequests_default_instance_);
} }
inline const ::greptime::v1::region::InsertRequests& RegionRequest::inserts() const { inline const ::greptime::v1::region::InsertRequests& RegionRequest::inserts() const {
@@ -3098,29 +3098,29 @@ inline const ::greptime::v1::region::InsertRequests& RegionRequest::inserts() co
inline ::greptime::v1::region::InsertRequests* RegionRequest::unsafe_arena_release_inserts() { inline ::greptime::v1::region::InsertRequests* RegionRequest::unsafe_arena_release_inserts() {
// @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.region.RegionRequest.inserts) // @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.region.RegionRequest.inserts)
if (_internal_has_inserts()) { if (_internal_has_inserts()) {
clear_has_request(); clear_has_body();
::greptime::v1::region::InsertRequests* temp = _impl_.request_.inserts_; ::greptime::v1::region::InsertRequests* temp = _impl_.body_.inserts_;
_impl_.request_.inserts_ = nullptr; _impl_.body_.inserts_ = nullptr;
return temp; return temp;
} else { } else {
return nullptr; return nullptr;
} }
} }
inline void RegionRequest::unsafe_arena_set_allocated_inserts(::greptime::v1::region::InsertRequests* inserts) { inline void RegionRequest::unsafe_arena_set_allocated_inserts(::greptime::v1::region::InsertRequests* inserts) {
clear_request(); clear_body();
if (inserts) { if (inserts) {
set_has_inserts(); set_has_inserts();
_impl_.request_.inserts_ = inserts; _impl_.body_.inserts_ = inserts;
} }
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.region.RegionRequest.inserts) // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.region.RegionRequest.inserts)
} }
inline ::greptime::v1::region::InsertRequests* RegionRequest::_internal_mutable_inserts() { inline ::greptime::v1::region::InsertRequests* RegionRequest::_internal_mutable_inserts() {
if (!_internal_has_inserts()) { if (!_internal_has_inserts()) {
clear_request(); clear_body();
set_has_inserts(); set_has_inserts();
_impl_.request_.inserts_ = CreateMaybeMessage< ::greptime::v1::region::InsertRequests >(GetArenaForAllocation()); _impl_.body_.inserts_ = CreateMaybeMessage< ::greptime::v1::region::InsertRequests >(GetArenaForAllocation());
} }
return _impl_.request_.inserts_; return _impl_.body_.inserts_;
} }
inline ::greptime::v1::region::InsertRequests* RegionRequest::mutable_inserts() { inline ::greptime::v1::region::InsertRequests* RegionRequest::mutable_inserts() {
::greptime::v1::region::InsertRequests* _msg = _internal_mutable_inserts(); ::greptime::v1::region::InsertRequests* _msg = _internal_mutable_inserts();
@@ -3130,7 +3130,7 @@ inline ::greptime::v1::region::InsertRequests* RegionRequest::mutable_inserts()
// .greptime.v1.region.DeleteRequests deletes = 4; // .greptime.v1.region.DeleteRequests deletes = 4;
inline bool RegionRequest::_internal_has_deletes() const { inline bool RegionRequest::_internal_has_deletes() const {
return request_case() == kDeletes; return body_case() == kDeletes;
} }
inline bool RegionRequest::has_deletes() const { inline bool RegionRequest::has_deletes() const {
return _internal_has_deletes(); return _internal_has_deletes();
@@ -3141,20 +3141,20 @@ inline void RegionRequest::set_has_deletes() {
inline void RegionRequest::clear_deletes() { inline void RegionRequest::clear_deletes() {
if (_internal_has_deletes()) { if (_internal_has_deletes()) {
if (GetArenaForAllocation() == nullptr) { if (GetArenaForAllocation() == nullptr) {
delete _impl_.request_.deletes_; delete _impl_.body_.deletes_;
} }
clear_has_request(); clear_has_body();
} }
} }
inline ::greptime::v1::region::DeleteRequests* RegionRequest::release_deletes() { inline ::greptime::v1::region::DeleteRequests* RegionRequest::release_deletes() {
// @@protoc_insertion_point(field_release:greptime.v1.region.RegionRequest.deletes) // @@protoc_insertion_point(field_release:greptime.v1.region.RegionRequest.deletes)
if (_internal_has_deletes()) { if (_internal_has_deletes()) {
clear_has_request(); clear_has_body();
::greptime::v1::region::DeleteRequests* temp = _impl_.request_.deletes_; ::greptime::v1::region::DeleteRequests* temp = _impl_.body_.deletes_;
if (GetArenaForAllocation() != nullptr) { if (GetArenaForAllocation() != nullptr) {
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
} }
_impl_.request_.deletes_ = nullptr; _impl_.body_.deletes_ = nullptr;
return temp; return temp;
} else { } else {
return nullptr; return nullptr;
@@ -3162,7 +3162,7 @@ inline ::greptime::v1::region::DeleteRequests* RegionRequest::release_deletes()
} }
inline const ::greptime::v1::region::DeleteRequests& RegionRequest::_internal_deletes() const { inline const ::greptime::v1::region::DeleteRequests& RegionRequest::_internal_deletes() const {
return _internal_has_deletes() return _internal_has_deletes()
? *_impl_.request_.deletes_ ? *_impl_.body_.deletes_
: reinterpret_cast< ::greptime::v1::region::DeleteRequests&>(::greptime::v1::region::_DeleteRequests_default_instance_); : reinterpret_cast< ::greptime::v1::region::DeleteRequests&>(::greptime::v1::region::_DeleteRequests_default_instance_);
} }
inline const ::greptime::v1::region::DeleteRequests& RegionRequest::deletes() const { inline const ::greptime::v1::region::DeleteRequests& RegionRequest::deletes() const {
@@ -3172,29 +3172,29 @@ inline const ::greptime::v1::region::DeleteRequests& RegionRequest::deletes() co
inline ::greptime::v1::region::DeleteRequests* RegionRequest::unsafe_arena_release_deletes() { inline ::greptime::v1::region::DeleteRequests* RegionRequest::unsafe_arena_release_deletes() {
// @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.region.RegionRequest.deletes) // @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.region.RegionRequest.deletes)
if (_internal_has_deletes()) { if (_internal_has_deletes()) {
clear_has_request(); clear_has_body();
::greptime::v1::region::DeleteRequests* temp = _impl_.request_.deletes_; ::greptime::v1::region::DeleteRequests* temp = _impl_.body_.deletes_;
_impl_.request_.deletes_ = nullptr; _impl_.body_.deletes_ = nullptr;
return temp; return temp;
} else { } else {
return nullptr; return nullptr;
} }
} }
inline void RegionRequest::unsafe_arena_set_allocated_deletes(::greptime::v1::region::DeleteRequests* deletes) { inline void RegionRequest::unsafe_arena_set_allocated_deletes(::greptime::v1::region::DeleteRequests* deletes) {
clear_request(); clear_body();
if (deletes) { if (deletes) {
set_has_deletes(); set_has_deletes();
_impl_.request_.deletes_ = deletes; _impl_.body_.deletes_ = deletes;
} }
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.region.RegionRequest.deletes) // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.region.RegionRequest.deletes)
} }
inline ::greptime::v1::region::DeleteRequests* RegionRequest::_internal_mutable_deletes() { inline ::greptime::v1::region::DeleteRequests* RegionRequest::_internal_mutable_deletes() {
if (!_internal_has_deletes()) { if (!_internal_has_deletes()) {
clear_request(); clear_body();
set_has_deletes(); set_has_deletes();
_impl_.request_.deletes_ = CreateMaybeMessage< ::greptime::v1::region::DeleteRequests >(GetArenaForAllocation()); _impl_.body_.deletes_ = CreateMaybeMessage< ::greptime::v1::region::DeleteRequests >(GetArenaForAllocation());
} }
return _impl_.request_.deletes_; return _impl_.body_.deletes_;
} }
inline ::greptime::v1::region::DeleteRequests* RegionRequest::mutable_deletes() { inline ::greptime::v1::region::DeleteRequests* RegionRequest::mutable_deletes() {
::greptime::v1::region::DeleteRequests* _msg = _internal_mutable_deletes(); ::greptime::v1::region::DeleteRequests* _msg = _internal_mutable_deletes();
@@ -3204,7 +3204,7 @@ inline ::greptime::v1::region::DeleteRequests* RegionRequest::mutable_deletes()
// .greptime.v1.region.CreateRequest create = 5; // .greptime.v1.region.CreateRequest create = 5;
inline bool RegionRequest::_internal_has_create() const { inline bool RegionRequest::_internal_has_create() const {
return request_case() == kCreate; return body_case() == kCreate;
} }
inline bool RegionRequest::has_create() const { inline bool RegionRequest::has_create() const {
return _internal_has_create(); return _internal_has_create();
@@ -3215,20 +3215,20 @@ inline void RegionRequest::set_has_create() {
inline void RegionRequest::clear_create() { inline void RegionRequest::clear_create() {
if (_internal_has_create()) { if (_internal_has_create()) {
if (GetArenaForAllocation() == nullptr) { if (GetArenaForAllocation() == nullptr) {
delete _impl_.request_.create_; delete _impl_.body_.create_;
} }
clear_has_request(); clear_has_body();
} }
} }
inline ::greptime::v1::region::CreateRequest* RegionRequest::release_create() { inline ::greptime::v1::region::CreateRequest* RegionRequest::release_create() {
// @@protoc_insertion_point(field_release:greptime.v1.region.RegionRequest.create) // @@protoc_insertion_point(field_release:greptime.v1.region.RegionRequest.create)
if (_internal_has_create()) { if (_internal_has_create()) {
clear_has_request(); clear_has_body();
::greptime::v1::region::CreateRequest* temp = _impl_.request_.create_; ::greptime::v1::region::CreateRequest* temp = _impl_.body_.create_;
if (GetArenaForAllocation() != nullptr) { if (GetArenaForAllocation() != nullptr) {
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
} }
_impl_.request_.create_ = nullptr; _impl_.body_.create_ = nullptr;
return temp; return temp;
} else { } else {
return nullptr; return nullptr;
@@ -3236,7 +3236,7 @@ inline ::greptime::v1::region::CreateRequest* RegionRequest::release_create() {
} }
inline const ::greptime::v1::region::CreateRequest& RegionRequest::_internal_create() const { inline const ::greptime::v1::region::CreateRequest& RegionRequest::_internal_create() const {
return _internal_has_create() return _internal_has_create()
? *_impl_.request_.create_ ? *_impl_.body_.create_
: reinterpret_cast< ::greptime::v1::region::CreateRequest&>(::greptime::v1::region::_CreateRequest_default_instance_); : reinterpret_cast< ::greptime::v1::region::CreateRequest&>(::greptime::v1::region::_CreateRequest_default_instance_);
} }
inline const ::greptime::v1::region::CreateRequest& RegionRequest::create() const { inline const ::greptime::v1::region::CreateRequest& RegionRequest::create() const {
@@ -3246,29 +3246,29 @@ inline const ::greptime::v1::region::CreateRequest& RegionRequest::create() cons
inline ::greptime::v1::region::CreateRequest* RegionRequest::unsafe_arena_release_create() { inline ::greptime::v1::region::CreateRequest* RegionRequest::unsafe_arena_release_create() {
// @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.region.RegionRequest.create) // @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.region.RegionRequest.create)
if (_internal_has_create()) { if (_internal_has_create()) {
clear_has_request(); clear_has_body();
::greptime::v1::region::CreateRequest* temp = _impl_.request_.create_; ::greptime::v1::region::CreateRequest* temp = _impl_.body_.create_;
_impl_.request_.create_ = nullptr; _impl_.body_.create_ = nullptr;
return temp; return temp;
} else { } else {
return nullptr; return nullptr;
} }
} }
inline void RegionRequest::unsafe_arena_set_allocated_create(::greptime::v1::region::CreateRequest* create) { inline void RegionRequest::unsafe_arena_set_allocated_create(::greptime::v1::region::CreateRequest* create) {
clear_request(); clear_body();
if (create) { if (create) {
set_has_create(); set_has_create();
_impl_.request_.create_ = create; _impl_.body_.create_ = create;
} }
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.region.RegionRequest.create) // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.region.RegionRequest.create)
} }
inline ::greptime::v1::region::CreateRequest* RegionRequest::_internal_mutable_create() { inline ::greptime::v1::region::CreateRequest* RegionRequest::_internal_mutable_create() {
if (!_internal_has_create()) { if (!_internal_has_create()) {
clear_request(); clear_body();
set_has_create(); set_has_create();
_impl_.request_.create_ = CreateMaybeMessage< ::greptime::v1::region::CreateRequest >(GetArenaForAllocation()); _impl_.body_.create_ = CreateMaybeMessage< ::greptime::v1::region::CreateRequest >(GetArenaForAllocation());
} }
return _impl_.request_.create_; return _impl_.body_.create_;
} }
inline ::greptime::v1::region::CreateRequest* RegionRequest::mutable_create() { inline ::greptime::v1::region::CreateRequest* RegionRequest::mutable_create() {
::greptime::v1::region::CreateRequest* _msg = _internal_mutable_create(); ::greptime::v1::region::CreateRequest* _msg = _internal_mutable_create();
@@ -3278,7 +3278,7 @@ inline ::greptime::v1::region::CreateRequest* RegionRequest::mutable_create() {
// .greptime.v1.region.DropRequest drop = 6; // .greptime.v1.region.DropRequest drop = 6;
inline bool RegionRequest::_internal_has_drop() const { inline bool RegionRequest::_internal_has_drop() const {
return request_case() == kDrop; return body_case() == kDrop;
} }
inline bool RegionRequest::has_drop() const { inline bool RegionRequest::has_drop() const {
return _internal_has_drop(); return _internal_has_drop();
@@ -3289,20 +3289,20 @@ inline void RegionRequest::set_has_drop() {
inline void RegionRequest::clear_drop() { inline void RegionRequest::clear_drop() {
if (_internal_has_drop()) { if (_internal_has_drop()) {
if (GetArenaForAllocation() == nullptr) { if (GetArenaForAllocation() == nullptr) {
delete _impl_.request_.drop_; delete _impl_.body_.drop_;
} }
clear_has_request(); clear_has_body();
} }
} }
inline ::greptime::v1::region::DropRequest* RegionRequest::release_drop() { inline ::greptime::v1::region::DropRequest* RegionRequest::release_drop() {
// @@protoc_insertion_point(field_release:greptime.v1.region.RegionRequest.drop) // @@protoc_insertion_point(field_release:greptime.v1.region.RegionRequest.drop)
if (_internal_has_drop()) { if (_internal_has_drop()) {
clear_has_request(); clear_has_body();
::greptime::v1::region::DropRequest* temp = _impl_.request_.drop_; ::greptime::v1::region::DropRequest* temp = _impl_.body_.drop_;
if (GetArenaForAllocation() != nullptr) { if (GetArenaForAllocation() != nullptr) {
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
} }
_impl_.request_.drop_ = nullptr; _impl_.body_.drop_ = nullptr;
return temp; return temp;
} else { } else {
return nullptr; return nullptr;
@@ -3310,7 +3310,7 @@ inline ::greptime::v1::region::DropRequest* RegionRequest::release_drop() {
} }
inline const ::greptime::v1::region::DropRequest& RegionRequest::_internal_drop() const { inline const ::greptime::v1::region::DropRequest& RegionRequest::_internal_drop() const {
return _internal_has_drop() return _internal_has_drop()
? *_impl_.request_.drop_ ? *_impl_.body_.drop_
: reinterpret_cast< ::greptime::v1::region::DropRequest&>(::greptime::v1::region::_DropRequest_default_instance_); : reinterpret_cast< ::greptime::v1::region::DropRequest&>(::greptime::v1::region::_DropRequest_default_instance_);
} }
inline const ::greptime::v1::region::DropRequest& RegionRequest::drop() const { inline const ::greptime::v1::region::DropRequest& RegionRequest::drop() const {
@@ -3320,29 +3320,29 @@ inline const ::greptime::v1::region::DropRequest& RegionRequest::drop() const {
inline ::greptime::v1::region::DropRequest* RegionRequest::unsafe_arena_release_drop() { inline ::greptime::v1::region::DropRequest* RegionRequest::unsafe_arena_release_drop() {
// @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.region.RegionRequest.drop) // @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.region.RegionRequest.drop)
if (_internal_has_drop()) { if (_internal_has_drop()) {
clear_has_request(); clear_has_body();
::greptime::v1::region::DropRequest* temp = _impl_.request_.drop_; ::greptime::v1::region::DropRequest* temp = _impl_.body_.drop_;
_impl_.request_.drop_ = nullptr; _impl_.body_.drop_ = nullptr;
return temp; return temp;
} else { } else {
return nullptr; return nullptr;
} }
} }
inline void RegionRequest::unsafe_arena_set_allocated_drop(::greptime::v1::region::DropRequest* drop) { inline void RegionRequest::unsafe_arena_set_allocated_drop(::greptime::v1::region::DropRequest* drop) {
clear_request(); clear_body();
if (drop) { if (drop) {
set_has_drop(); set_has_drop();
_impl_.request_.drop_ = drop; _impl_.body_.drop_ = drop;
} }
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.region.RegionRequest.drop) // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.region.RegionRequest.drop)
} }
inline ::greptime::v1::region::DropRequest* RegionRequest::_internal_mutable_drop() { inline ::greptime::v1::region::DropRequest* RegionRequest::_internal_mutable_drop() {
if (!_internal_has_drop()) { if (!_internal_has_drop()) {
clear_request(); clear_body();
set_has_drop(); set_has_drop();
_impl_.request_.drop_ = CreateMaybeMessage< ::greptime::v1::region::DropRequest >(GetArenaForAllocation()); _impl_.body_.drop_ = CreateMaybeMessage< ::greptime::v1::region::DropRequest >(GetArenaForAllocation());
} }
return _impl_.request_.drop_; return _impl_.body_.drop_;
} }
inline ::greptime::v1::region::DropRequest* RegionRequest::mutable_drop() { inline ::greptime::v1::region::DropRequest* RegionRequest::mutable_drop() {
::greptime::v1::region::DropRequest* _msg = _internal_mutable_drop(); ::greptime::v1::region::DropRequest* _msg = _internal_mutable_drop();
@@ -3352,7 +3352,7 @@ inline ::greptime::v1::region::DropRequest* RegionRequest::mutable_drop() {
// .greptime.v1.region.OpenRequest open = 7; // .greptime.v1.region.OpenRequest open = 7;
inline bool RegionRequest::_internal_has_open() const { inline bool RegionRequest::_internal_has_open() const {
return request_case() == kOpen; return body_case() == kOpen;
} }
inline bool RegionRequest::has_open() const { inline bool RegionRequest::has_open() const {
return _internal_has_open(); return _internal_has_open();
@@ -3363,20 +3363,20 @@ inline void RegionRequest::set_has_open() {
inline void RegionRequest::clear_open() { inline void RegionRequest::clear_open() {
if (_internal_has_open()) { if (_internal_has_open()) {
if (GetArenaForAllocation() == nullptr) { if (GetArenaForAllocation() == nullptr) {
delete _impl_.request_.open_; delete _impl_.body_.open_;
} }
clear_has_request(); clear_has_body();
} }
} }
inline ::greptime::v1::region::OpenRequest* RegionRequest::release_open() { inline ::greptime::v1::region::OpenRequest* RegionRequest::release_open() {
// @@protoc_insertion_point(field_release:greptime.v1.region.RegionRequest.open) // @@protoc_insertion_point(field_release:greptime.v1.region.RegionRequest.open)
if (_internal_has_open()) { if (_internal_has_open()) {
clear_has_request(); clear_has_body();
::greptime::v1::region::OpenRequest* temp = _impl_.request_.open_; ::greptime::v1::region::OpenRequest* temp = _impl_.body_.open_;
if (GetArenaForAllocation() != nullptr) { if (GetArenaForAllocation() != nullptr) {
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
} }
_impl_.request_.open_ = nullptr; _impl_.body_.open_ = nullptr;
return temp; return temp;
} else { } else {
return nullptr; return nullptr;
@@ -3384,7 +3384,7 @@ inline ::greptime::v1::region::OpenRequest* RegionRequest::release_open() {
} }
inline const ::greptime::v1::region::OpenRequest& RegionRequest::_internal_open() const { inline const ::greptime::v1::region::OpenRequest& RegionRequest::_internal_open() const {
return _internal_has_open() return _internal_has_open()
? *_impl_.request_.open_ ? *_impl_.body_.open_
: reinterpret_cast< ::greptime::v1::region::OpenRequest&>(::greptime::v1::region::_OpenRequest_default_instance_); : reinterpret_cast< ::greptime::v1::region::OpenRequest&>(::greptime::v1::region::_OpenRequest_default_instance_);
} }
inline const ::greptime::v1::region::OpenRequest& RegionRequest::open() const { inline const ::greptime::v1::region::OpenRequest& RegionRequest::open() const {
@@ -3394,29 +3394,29 @@ inline const ::greptime::v1::region::OpenRequest& RegionRequest::open() const {
inline ::greptime::v1::region::OpenRequest* RegionRequest::unsafe_arena_release_open() { inline ::greptime::v1::region::OpenRequest* RegionRequest::unsafe_arena_release_open() {
// @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.region.RegionRequest.open) // @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.region.RegionRequest.open)
if (_internal_has_open()) { if (_internal_has_open()) {
clear_has_request(); clear_has_body();
::greptime::v1::region::OpenRequest* temp = _impl_.request_.open_; ::greptime::v1::region::OpenRequest* temp = _impl_.body_.open_;
_impl_.request_.open_ = nullptr; _impl_.body_.open_ = nullptr;
return temp; return temp;
} else { } else {
return nullptr; return nullptr;
} }
} }
inline void RegionRequest::unsafe_arena_set_allocated_open(::greptime::v1::region::OpenRequest* open) { inline void RegionRequest::unsafe_arena_set_allocated_open(::greptime::v1::region::OpenRequest* open) {
clear_request(); clear_body();
if (open) { if (open) {
set_has_open(); set_has_open();
_impl_.request_.open_ = open; _impl_.body_.open_ = open;
} }
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.region.RegionRequest.open) // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.region.RegionRequest.open)
} }
inline ::greptime::v1::region::OpenRequest* RegionRequest::_internal_mutable_open() { inline ::greptime::v1::region::OpenRequest* RegionRequest::_internal_mutable_open() {
if (!_internal_has_open()) { if (!_internal_has_open()) {
clear_request(); clear_body();
set_has_open(); set_has_open();
_impl_.request_.open_ = CreateMaybeMessage< ::greptime::v1::region::OpenRequest >(GetArenaForAllocation()); _impl_.body_.open_ = CreateMaybeMessage< ::greptime::v1::region::OpenRequest >(GetArenaForAllocation());
} }
return _impl_.request_.open_; return _impl_.body_.open_;
} }
inline ::greptime::v1::region::OpenRequest* RegionRequest::mutable_open() { inline ::greptime::v1::region::OpenRequest* RegionRequest::mutable_open() {
::greptime::v1::region::OpenRequest* _msg = _internal_mutable_open(); ::greptime::v1::region::OpenRequest* _msg = _internal_mutable_open();
@@ -3426,7 +3426,7 @@ inline ::greptime::v1::region::OpenRequest* RegionRequest::mutable_open() {
// .greptime.v1.region.CloseRequest close = 8; // .greptime.v1.region.CloseRequest close = 8;
inline bool RegionRequest::_internal_has_close() const { inline bool RegionRequest::_internal_has_close() const {
return request_case() == kClose; return body_case() == kClose;
} }
inline bool RegionRequest::has_close() const { inline bool RegionRequest::has_close() const {
return _internal_has_close(); return _internal_has_close();
@@ -3437,20 +3437,20 @@ inline void RegionRequest::set_has_close() {
inline void RegionRequest::clear_close() { inline void RegionRequest::clear_close() {
if (_internal_has_close()) { if (_internal_has_close()) {
if (GetArenaForAllocation() == nullptr) { if (GetArenaForAllocation() == nullptr) {
delete _impl_.request_.close_; delete _impl_.body_.close_;
} }
clear_has_request(); clear_has_body();
} }
} }
inline ::greptime::v1::region::CloseRequest* RegionRequest::release_close() { inline ::greptime::v1::region::CloseRequest* RegionRequest::release_close() {
// @@protoc_insertion_point(field_release:greptime.v1.region.RegionRequest.close) // @@protoc_insertion_point(field_release:greptime.v1.region.RegionRequest.close)
if (_internal_has_close()) { if (_internal_has_close()) {
clear_has_request(); clear_has_body();
::greptime::v1::region::CloseRequest* temp = _impl_.request_.close_; ::greptime::v1::region::CloseRequest* temp = _impl_.body_.close_;
if (GetArenaForAllocation() != nullptr) { if (GetArenaForAllocation() != nullptr) {
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
} }
_impl_.request_.close_ = nullptr; _impl_.body_.close_ = nullptr;
return temp; return temp;
} else { } else {
return nullptr; return nullptr;
@@ -3458,7 +3458,7 @@ inline ::greptime::v1::region::CloseRequest* RegionRequest::release_close() {
} }
inline const ::greptime::v1::region::CloseRequest& RegionRequest::_internal_close() const { inline const ::greptime::v1::region::CloseRequest& RegionRequest::_internal_close() const {
return _internal_has_close() return _internal_has_close()
? *_impl_.request_.close_ ? *_impl_.body_.close_
: reinterpret_cast< ::greptime::v1::region::CloseRequest&>(::greptime::v1::region::_CloseRequest_default_instance_); : reinterpret_cast< ::greptime::v1::region::CloseRequest&>(::greptime::v1::region::_CloseRequest_default_instance_);
} }
inline const ::greptime::v1::region::CloseRequest& RegionRequest::close() const { inline const ::greptime::v1::region::CloseRequest& RegionRequest::close() const {
@@ -3468,29 +3468,29 @@ inline const ::greptime::v1::region::CloseRequest& RegionRequest::close() const
inline ::greptime::v1::region::CloseRequest* RegionRequest::unsafe_arena_release_close() { inline ::greptime::v1::region::CloseRequest* RegionRequest::unsafe_arena_release_close() {
// @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.region.RegionRequest.close) // @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.region.RegionRequest.close)
if (_internal_has_close()) { if (_internal_has_close()) {
clear_has_request(); clear_has_body();
::greptime::v1::region::CloseRequest* temp = _impl_.request_.close_; ::greptime::v1::region::CloseRequest* temp = _impl_.body_.close_;
_impl_.request_.close_ = nullptr; _impl_.body_.close_ = nullptr;
return temp; return temp;
} else { } else {
return nullptr; return nullptr;
} }
} }
inline void RegionRequest::unsafe_arena_set_allocated_close(::greptime::v1::region::CloseRequest* close) { inline void RegionRequest::unsafe_arena_set_allocated_close(::greptime::v1::region::CloseRequest* close) {
clear_request(); clear_body();
if (close) { if (close) {
set_has_close(); set_has_close();
_impl_.request_.close_ = close; _impl_.body_.close_ = close;
} }
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.region.RegionRequest.close) // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.region.RegionRequest.close)
} }
inline ::greptime::v1::region::CloseRequest* RegionRequest::_internal_mutable_close() { inline ::greptime::v1::region::CloseRequest* RegionRequest::_internal_mutable_close() {
if (!_internal_has_close()) { if (!_internal_has_close()) {
clear_request(); clear_body();
set_has_close(); set_has_close();
_impl_.request_.close_ = CreateMaybeMessage< ::greptime::v1::region::CloseRequest >(GetArenaForAllocation()); _impl_.body_.close_ = CreateMaybeMessage< ::greptime::v1::region::CloseRequest >(GetArenaForAllocation());
} }
return _impl_.request_.close_; return _impl_.body_.close_;
} }
inline ::greptime::v1::region::CloseRequest* RegionRequest::mutable_close() { inline ::greptime::v1::region::CloseRequest* RegionRequest::mutable_close() {
::greptime::v1::region::CloseRequest* _msg = _internal_mutable_close(); ::greptime::v1::region::CloseRequest* _msg = _internal_mutable_close();
@@ -3500,7 +3500,7 @@ inline ::greptime::v1::region::CloseRequest* RegionRequest::mutable_close() {
// .greptime.v1.region.AlterRequest alter = 9; // .greptime.v1.region.AlterRequest alter = 9;
inline bool RegionRequest::_internal_has_alter() const { inline bool RegionRequest::_internal_has_alter() const {
return request_case() == kAlter; return body_case() == kAlter;
} }
inline bool RegionRequest::has_alter() const { inline bool RegionRequest::has_alter() const {
return _internal_has_alter(); return _internal_has_alter();
@@ -3511,20 +3511,20 @@ inline void RegionRequest::set_has_alter() {
inline void RegionRequest::clear_alter() { inline void RegionRequest::clear_alter() {
if (_internal_has_alter()) { if (_internal_has_alter()) {
if (GetArenaForAllocation() == nullptr) { if (GetArenaForAllocation() == nullptr) {
delete _impl_.request_.alter_; delete _impl_.body_.alter_;
} }
clear_has_request(); clear_has_body();
} }
} }
inline ::greptime::v1::region::AlterRequest* RegionRequest::release_alter() { inline ::greptime::v1::region::AlterRequest* RegionRequest::release_alter() {
// @@protoc_insertion_point(field_release:greptime.v1.region.RegionRequest.alter) // @@protoc_insertion_point(field_release:greptime.v1.region.RegionRequest.alter)
if (_internal_has_alter()) { if (_internal_has_alter()) {
clear_has_request(); clear_has_body();
::greptime::v1::region::AlterRequest* temp = _impl_.request_.alter_; ::greptime::v1::region::AlterRequest* temp = _impl_.body_.alter_;
if (GetArenaForAllocation() != nullptr) { if (GetArenaForAllocation() != nullptr) {
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
} }
_impl_.request_.alter_ = nullptr; _impl_.body_.alter_ = nullptr;
return temp; return temp;
} else { } else {
return nullptr; return nullptr;
@@ -3532,7 +3532,7 @@ inline ::greptime::v1::region::AlterRequest* RegionRequest::release_alter() {
} }
inline const ::greptime::v1::region::AlterRequest& RegionRequest::_internal_alter() const { inline const ::greptime::v1::region::AlterRequest& RegionRequest::_internal_alter() const {
return _internal_has_alter() return _internal_has_alter()
? *_impl_.request_.alter_ ? *_impl_.body_.alter_
: reinterpret_cast< ::greptime::v1::region::AlterRequest&>(::greptime::v1::region::_AlterRequest_default_instance_); : reinterpret_cast< ::greptime::v1::region::AlterRequest&>(::greptime::v1::region::_AlterRequest_default_instance_);
} }
inline const ::greptime::v1::region::AlterRequest& RegionRequest::alter() const { inline const ::greptime::v1::region::AlterRequest& RegionRequest::alter() const {
@@ -3542,29 +3542,29 @@ inline const ::greptime::v1::region::AlterRequest& RegionRequest::alter() const
inline ::greptime::v1::region::AlterRequest* RegionRequest::unsafe_arena_release_alter() { inline ::greptime::v1::region::AlterRequest* RegionRequest::unsafe_arena_release_alter() {
// @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.region.RegionRequest.alter) // @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.region.RegionRequest.alter)
if (_internal_has_alter()) { if (_internal_has_alter()) {
clear_has_request(); clear_has_body();
::greptime::v1::region::AlterRequest* temp = _impl_.request_.alter_; ::greptime::v1::region::AlterRequest* temp = _impl_.body_.alter_;
_impl_.request_.alter_ = nullptr; _impl_.body_.alter_ = nullptr;
return temp; return temp;
} else { } else {
return nullptr; return nullptr;
} }
} }
inline void RegionRequest::unsafe_arena_set_allocated_alter(::greptime::v1::region::AlterRequest* alter) { inline void RegionRequest::unsafe_arena_set_allocated_alter(::greptime::v1::region::AlterRequest* alter) {
clear_request(); clear_body();
if (alter) { if (alter) {
set_has_alter(); set_has_alter();
_impl_.request_.alter_ = alter; _impl_.body_.alter_ = alter;
} }
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.region.RegionRequest.alter) // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.region.RegionRequest.alter)
} }
inline ::greptime::v1::region::AlterRequest* RegionRequest::_internal_mutable_alter() { inline ::greptime::v1::region::AlterRequest* RegionRequest::_internal_mutable_alter() {
if (!_internal_has_alter()) { if (!_internal_has_alter()) {
clear_request(); clear_body();
set_has_alter(); set_has_alter();
_impl_.request_.alter_ = CreateMaybeMessage< ::greptime::v1::region::AlterRequest >(GetArenaForAllocation()); _impl_.body_.alter_ = CreateMaybeMessage< ::greptime::v1::region::AlterRequest >(GetArenaForAllocation());
} }
return _impl_.request_.alter_; return _impl_.body_.alter_;
} }
inline ::greptime::v1::region::AlterRequest* RegionRequest::mutable_alter() { inline ::greptime::v1::region::AlterRequest* RegionRequest::mutable_alter() {
::greptime::v1::region::AlterRequest* _msg = _internal_mutable_alter(); ::greptime::v1::region::AlterRequest* _msg = _internal_mutable_alter();
@@ -3574,7 +3574,7 @@ inline ::greptime::v1::region::AlterRequest* RegionRequest::mutable_alter() {
// .greptime.v1.region.FlushRequest flush = 10; // .greptime.v1.region.FlushRequest flush = 10;
inline bool RegionRequest::_internal_has_flush() const { inline bool RegionRequest::_internal_has_flush() const {
return request_case() == kFlush; return body_case() == kFlush;
} }
inline bool RegionRequest::has_flush() const { inline bool RegionRequest::has_flush() const {
return _internal_has_flush(); return _internal_has_flush();
@@ -3585,20 +3585,20 @@ inline void RegionRequest::set_has_flush() {
inline void RegionRequest::clear_flush() { inline void RegionRequest::clear_flush() {
if (_internal_has_flush()) { if (_internal_has_flush()) {
if (GetArenaForAllocation() == nullptr) { if (GetArenaForAllocation() == nullptr) {
delete _impl_.request_.flush_; delete _impl_.body_.flush_;
} }
clear_has_request(); clear_has_body();
} }
} }
inline ::greptime::v1::region::FlushRequest* RegionRequest::release_flush() { inline ::greptime::v1::region::FlushRequest* RegionRequest::release_flush() {
// @@protoc_insertion_point(field_release:greptime.v1.region.RegionRequest.flush) // @@protoc_insertion_point(field_release:greptime.v1.region.RegionRequest.flush)
if (_internal_has_flush()) { if (_internal_has_flush()) {
clear_has_request(); clear_has_body();
::greptime::v1::region::FlushRequest* temp = _impl_.request_.flush_; ::greptime::v1::region::FlushRequest* temp = _impl_.body_.flush_;
if (GetArenaForAllocation() != nullptr) { if (GetArenaForAllocation() != nullptr) {
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
} }
_impl_.request_.flush_ = nullptr; _impl_.body_.flush_ = nullptr;
return temp; return temp;
} else { } else {
return nullptr; return nullptr;
@@ -3606,7 +3606,7 @@ inline ::greptime::v1::region::FlushRequest* RegionRequest::release_flush() {
} }
inline const ::greptime::v1::region::FlushRequest& RegionRequest::_internal_flush() const { inline const ::greptime::v1::region::FlushRequest& RegionRequest::_internal_flush() const {
return _internal_has_flush() return _internal_has_flush()
? *_impl_.request_.flush_ ? *_impl_.body_.flush_
: reinterpret_cast< ::greptime::v1::region::FlushRequest&>(::greptime::v1::region::_FlushRequest_default_instance_); : reinterpret_cast< ::greptime::v1::region::FlushRequest&>(::greptime::v1::region::_FlushRequest_default_instance_);
} }
inline const ::greptime::v1::region::FlushRequest& RegionRequest::flush() const { inline const ::greptime::v1::region::FlushRequest& RegionRequest::flush() const {
@@ -3616,29 +3616,29 @@ inline const ::greptime::v1::region::FlushRequest& RegionRequest::flush() const
inline ::greptime::v1::region::FlushRequest* RegionRequest::unsafe_arena_release_flush() { inline ::greptime::v1::region::FlushRequest* RegionRequest::unsafe_arena_release_flush() {
// @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.region.RegionRequest.flush) // @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.region.RegionRequest.flush)
if (_internal_has_flush()) { if (_internal_has_flush()) {
clear_has_request(); clear_has_body();
::greptime::v1::region::FlushRequest* temp = _impl_.request_.flush_; ::greptime::v1::region::FlushRequest* temp = _impl_.body_.flush_;
_impl_.request_.flush_ = nullptr; _impl_.body_.flush_ = nullptr;
return temp; return temp;
} else { } else {
return nullptr; return nullptr;
} }
} }
inline void RegionRequest::unsafe_arena_set_allocated_flush(::greptime::v1::region::FlushRequest* flush) { inline void RegionRequest::unsafe_arena_set_allocated_flush(::greptime::v1::region::FlushRequest* flush) {
clear_request(); clear_body();
if (flush) { if (flush) {
set_has_flush(); set_has_flush();
_impl_.request_.flush_ = flush; _impl_.body_.flush_ = flush;
} }
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.region.RegionRequest.flush) // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.region.RegionRequest.flush)
} }
inline ::greptime::v1::region::FlushRequest* RegionRequest::_internal_mutable_flush() { inline ::greptime::v1::region::FlushRequest* RegionRequest::_internal_mutable_flush() {
if (!_internal_has_flush()) { if (!_internal_has_flush()) {
clear_request(); clear_body();
set_has_flush(); set_has_flush();
_impl_.request_.flush_ = CreateMaybeMessage< ::greptime::v1::region::FlushRequest >(GetArenaForAllocation()); _impl_.body_.flush_ = CreateMaybeMessage< ::greptime::v1::region::FlushRequest >(GetArenaForAllocation());
} }
return _impl_.request_.flush_; return _impl_.body_.flush_;
} }
inline ::greptime::v1::region::FlushRequest* RegionRequest::mutable_flush() { inline ::greptime::v1::region::FlushRequest* RegionRequest::mutable_flush() {
::greptime::v1::region::FlushRequest* _msg = _internal_mutable_flush(); ::greptime::v1::region::FlushRequest* _msg = _internal_mutable_flush();
@@ -3648,7 +3648,7 @@ inline ::greptime::v1::region::FlushRequest* RegionRequest::mutable_flush() {
// .greptime.v1.region.CompactRequest compact = 11; // .greptime.v1.region.CompactRequest compact = 11;
inline bool RegionRequest::_internal_has_compact() const { inline bool RegionRequest::_internal_has_compact() const {
return request_case() == kCompact; return body_case() == kCompact;
} }
inline bool RegionRequest::has_compact() const { inline bool RegionRequest::has_compact() const {
return _internal_has_compact(); return _internal_has_compact();
@@ -3659,20 +3659,20 @@ inline void RegionRequest::set_has_compact() {
inline void RegionRequest::clear_compact() { inline void RegionRequest::clear_compact() {
if (_internal_has_compact()) { if (_internal_has_compact()) {
if (GetArenaForAllocation() == nullptr) { if (GetArenaForAllocation() == nullptr) {
delete _impl_.request_.compact_; delete _impl_.body_.compact_;
} }
clear_has_request(); clear_has_body();
} }
} }
inline ::greptime::v1::region::CompactRequest* RegionRequest::release_compact() { inline ::greptime::v1::region::CompactRequest* RegionRequest::release_compact() {
// @@protoc_insertion_point(field_release:greptime.v1.region.RegionRequest.compact) // @@protoc_insertion_point(field_release:greptime.v1.region.RegionRequest.compact)
if (_internal_has_compact()) { if (_internal_has_compact()) {
clear_has_request(); clear_has_body();
::greptime::v1::region::CompactRequest* temp = _impl_.request_.compact_; ::greptime::v1::region::CompactRequest* temp = _impl_.body_.compact_;
if (GetArenaForAllocation() != nullptr) { if (GetArenaForAllocation() != nullptr) {
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
} }
_impl_.request_.compact_ = nullptr; _impl_.body_.compact_ = nullptr;
return temp; return temp;
} else { } else {
return nullptr; return nullptr;
@@ -3680,7 +3680,7 @@ inline ::greptime::v1::region::CompactRequest* RegionRequest::release_compact()
} }
inline const ::greptime::v1::region::CompactRequest& RegionRequest::_internal_compact() const { inline const ::greptime::v1::region::CompactRequest& RegionRequest::_internal_compact() const {
return _internal_has_compact() return _internal_has_compact()
? *_impl_.request_.compact_ ? *_impl_.body_.compact_
: reinterpret_cast< ::greptime::v1::region::CompactRequest&>(::greptime::v1::region::_CompactRequest_default_instance_); : reinterpret_cast< ::greptime::v1::region::CompactRequest&>(::greptime::v1::region::_CompactRequest_default_instance_);
} }
inline const ::greptime::v1::region::CompactRequest& RegionRequest::compact() const { inline const ::greptime::v1::region::CompactRequest& RegionRequest::compact() const {
@@ -3690,29 +3690,29 @@ inline const ::greptime::v1::region::CompactRequest& RegionRequest::compact() co
inline ::greptime::v1::region::CompactRequest* RegionRequest::unsafe_arena_release_compact() { inline ::greptime::v1::region::CompactRequest* RegionRequest::unsafe_arena_release_compact() {
// @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.region.RegionRequest.compact) // @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.region.RegionRequest.compact)
if (_internal_has_compact()) { if (_internal_has_compact()) {
clear_has_request(); clear_has_body();
::greptime::v1::region::CompactRequest* temp = _impl_.request_.compact_; ::greptime::v1::region::CompactRequest* temp = _impl_.body_.compact_;
_impl_.request_.compact_ = nullptr; _impl_.body_.compact_ = nullptr;
return temp; return temp;
} else { } else {
return nullptr; return nullptr;
} }
} }
inline void RegionRequest::unsafe_arena_set_allocated_compact(::greptime::v1::region::CompactRequest* compact) { inline void RegionRequest::unsafe_arena_set_allocated_compact(::greptime::v1::region::CompactRequest* compact) {
clear_request(); clear_body();
if (compact) { if (compact) {
set_has_compact(); set_has_compact();
_impl_.request_.compact_ = compact; _impl_.body_.compact_ = compact;
} }
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.region.RegionRequest.compact) // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.region.RegionRequest.compact)
} }
inline ::greptime::v1::region::CompactRequest* RegionRequest::_internal_mutable_compact() { inline ::greptime::v1::region::CompactRequest* RegionRequest::_internal_mutable_compact() {
if (!_internal_has_compact()) { if (!_internal_has_compact()) {
clear_request(); clear_body();
set_has_compact(); set_has_compact();
_impl_.request_.compact_ = CreateMaybeMessage< ::greptime::v1::region::CompactRequest >(GetArenaForAllocation()); _impl_.body_.compact_ = CreateMaybeMessage< ::greptime::v1::region::CompactRequest >(GetArenaForAllocation());
} }
return _impl_.request_.compact_; return _impl_.body_.compact_;
} }
inline ::greptime::v1::region::CompactRequest* RegionRequest::mutable_compact() { inline ::greptime::v1::region::CompactRequest* RegionRequest::mutable_compact() {
::greptime::v1::region::CompactRequest* _msg = _internal_mutable_compact(); ::greptime::v1::region::CompactRequest* _msg = _internal_mutable_compact();
@@ -3720,14 +3720,14 @@ inline ::greptime::v1::region::CompactRequest* RegionRequest::mutable_compact()
return _msg; return _msg;
} }
inline bool RegionRequest::has_request() const { inline bool RegionRequest::has_body() const {
return request_case() != REQUEST_NOT_SET; return body_case() != BODY_NOT_SET;
} }
inline void RegionRequest::clear_has_request() { inline void RegionRequest::clear_has_body() {
_impl_._oneof_case_[0] = REQUEST_NOT_SET; _impl_._oneof_case_[0] = BODY_NOT_SET;
} }
inline RegionRequest::RequestCase RegionRequest::request_case() const { inline RegionRequest::BodyCase RegionRequest::body_case() const {
return RegionRequest::RequestCase(_impl_._oneof_case_[0]); return RegionRequest::BodyCase(_impl_._oneof_case_[0]);
} }
// ------------------------------------------------------------------- // -------------------------------------------------------------------
File diff suppressed because it is too large Load Diff
+4 -3
View File
@@ -23,15 +23,16 @@ option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/regio
import "greptime/v1/common.proto"; import "greptime/v1/common.proto";
import "greptime/v1/row.proto"; import "greptime/v1/row.proto";
service RegionServer { service Region {
rpc Handle(RegionRequest) returns (RegionResponse); rpc Handle(RegionRequest) returns (RegionResponse);
// TODO: add stream API
rpc HandleRequests(stream RegionRequest) returns (RegionResponse);
} }
message RegionRequest { message RegionRequest {
RequestHeader header = 1; RequestHeader header = 1;
// query request is handled in flight services. // query request is handled in flight services.
oneof request { oneof body {
InsertRequests inserts = 3; InsertRequests inserts = 3;
DeleteRequests deletes = 4; DeleteRequests deletes = 4;
CreateRequest create = 5; CreateRequest create = 5;