// Generated by the gRPC C++ plugin.
// If you make any local change, they will be lost.
// source: greptime/v1/meta/procedure.proto

#include "greptime/v1/meta/procedure.pb.h"
#include "greptime/v1/meta/procedure.grpc.pb.h"

#include <functional>
#include <grpcpp/support/async_stream.h>
#include <grpcpp/support/async_unary_call.h>
#include <grpcpp/impl/channel_interface.h>
#include <grpcpp/impl/client_unary_call.h>
#include <grpcpp/support/client_callback.h>
#include <grpcpp/support/message_allocator.h>
#include <grpcpp/support/method_handler.h>
#include <grpcpp/impl/rpc_service_method.h>
#include <grpcpp/support/server_callback.h>
#include <grpcpp/impl/codegen/server_callback_handlers.h>
#include <grpcpp/server_context.h>
#include <grpcpp/impl/service_type.h>
#include <grpcpp/support/sync_stream.h>
namespace greptime {
namespace v1 {
namespace meta {

static const char* ProcedureService_method_names[] = {
  "/greptime.v1.meta.ProcedureService/query",
  "/greptime.v1.meta.ProcedureService/ddl",
  "/greptime.v1.meta.ProcedureService/migrate",
  "/greptime.v1.meta.ProcedureService/details",
};

std::unique_ptr< ProcedureService::Stub> ProcedureService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) {
  (void)options;
  std::unique_ptr< ProcedureService::Stub> stub(new ProcedureService::Stub(channel, options));
  return stub;
}

ProcedureService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options)
  : channel_(channel), rpcmethod_query_(ProcedureService_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
  , rpcmethod_ddl_(ProcedureService_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
  , rpcmethod_migrate_(ProcedureService_method_names[2], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
  , rpcmethod_details_(ProcedureService_method_names[3], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
  {}

::grpc::Status ProcedureService::Stub::query(::grpc::ClientContext* context, const ::greptime::v1::meta::QueryProcedureRequest& request, ::greptime::v1::meta::ProcedureStateResponse* response) {
  return ::grpc::internal::BlockingUnaryCall< ::greptime::v1::meta::QueryProcedureRequest, ::greptime::v1::meta::ProcedureStateResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_query_, context, request, response);
}

void ProcedureService::Stub::async::query(::grpc::ClientContext* context, const ::greptime::v1::meta::QueryProcedureRequest* request, ::greptime::v1::meta::ProcedureStateResponse* response, std::function<void(::grpc::Status)> f) {
  ::grpc::internal::CallbackUnaryCall< ::greptime::v1::meta::QueryProcedureRequest, ::greptime::v1::meta::ProcedureStateResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_query_, context, request, response, std::move(f));
}

void ProcedureService::Stub::async::query(::grpc::ClientContext* context, const ::greptime::v1::meta::QueryProcedureRequest* request, ::greptime::v1::meta::ProcedureStateResponse* response, ::grpc::ClientUnaryReactor* reactor) {
  ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_query_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::ProcedureStateResponse>* ProcedureService::Stub::PrepareAsyncqueryRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::QueryProcedureRequest& request, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::greptime::v1::meta::ProcedureStateResponse, ::greptime::v1::meta::QueryProcedureRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_query_, context, request);
}

::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::ProcedureStateResponse>* ProcedureService::Stub::AsyncqueryRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::QueryProcedureRequest& request, ::grpc::CompletionQueue* cq) {
  auto* result =
    this->PrepareAsyncqueryRaw(context, request, cq);
  result->StartCall();
  return result;
}

::grpc::Status ProcedureService::Stub::ddl(::grpc::ClientContext* context, const ::greptime::v1::meta::DdlTaskRequest& request, ::greptime::v1::meta::DdlTaskResponse* response) {
  return ::grpc::internal::BlockingUnaryCall< ::greptime::v1::meta::DdlTaskRequest, ::greptime::v1::meta::DdlTaskResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_ddl_, context, request, response);
}

void ProcedureService::Stub::async::ddl(::grpc::ClientContext* context, const ::greptime::v1::meta::DdlTaskRequest* request, ::greptime::v1::meta::DdlTaskResponse* response, std::function<void(::grpc::Status)> f) {
  ::grpc::internal::CallbackUnaryCall< ::greptime::v1::meta::DdlTaskRequest, ::greptime::v1::meta::DdlTaskResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ddl_, context, request, response, std::move(f));
}

void ProcedureService::Stub::async::ddl(::grpc::ClientContext* context, const ::greptime::v1::meta::DdlTaskRequest* request, ::greptime::v1::meta::DdlTaskResponse* response, ::grpc::ClientUnaryReactor* reactor) {
  ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ddl_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::DdlTaskResponse>* ProcedureService::Stub::PrepareAsyncddlRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::DdlTaskRequest& request, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::greptime::v1::meta::DdlTaskResponse, ::greptime::v1::meta::DdlTaskRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_ddl_, context, request);
}

::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::DdlTaskResponse>* ProcedureService::Stub::AsyncddlRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::DdlTaskRequest& request, ::grpc::CompletionQueue* cq) {
  auto* result =
    this->PrepareAsyncddlRaw(context, request, cq);
  result->StartCall();
  return result;
}

::grpc::Status ProcedureService::Stub::migrate(::grpc::ClientContext* context, const ::greptime::v1::meta::MigrateRegionRequest& request, ::greptime::v1::meta::MigrateRegionResponse* response) {
  return ::grpc::internal::BlockingUnaryCall< ::greptime::v1::meta::MigrateRegionRequest, ::greptime::v1::meta::MigrateRegionResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_migrate_, context, request, response);
}

void ProcedureService::Stub::async::migrate(::grpc::ClientContext* context, const ::greptime::v1::meta::MigrateRegionRequest* request, ::greptime::v1::meta::MigrateRegionResponse* response, std::function<void(::grpc::Status)> f) {
  ::grpc::internal::CallbackUnaryCall< ::greptime::v1::meta::MigrateRegionRequest, ::greptime::v1::meta::MigrateRegionResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_migrate_, context, request, response, std::move(f));
}

void ProcedureService::Stub::async::migrate(::grpc::ClientContext* context, const ::greptime::v1::meta::MigrateRegionRequest* request, ::greptime::v1::meta::MigrateRegionResponse* response, ::grpc::ClientUnaryReactor* reactor) {
  ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_migrate_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::MigrateRegionResponse>* ProcedureService::Stub::PrepareAsyncmigrateRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::MigrateRegionRequest& request, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::greptime::v1::meta::MigrateRegionResponse, ::greptime::v1::meta::MigrateRegionRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_migrate_, context, request);
}

::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::MigrateRegionResponse>* ProcedureService::Stub::AsyncmigrateRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::MigrateRegionRequest& request, ::grpc::CompletionQueue* cq) {
  auto* result =
    this->PrepareAsyncmigrateRaw(context, request, cq);
  result->StartCall();
  return result;
}

::grpc::Status ProcedureService::Stub::details(::grpc::ClientContext* context, const ::greptime::v1::meta::ProcedureDetailRequest& request, ::greptime::v1::meta::ProcedureDetailResponse* response) {
  return ::grpc::internal::BlockingUnaryCall< ::greptime::v1::meta::ProcedureDetailRequest, ::greptime::v1::meta::ProcedureDetailResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_details_, context, request, response);
}

void ProcedureService::Stub::async::details(::grpc::ClientContext* context, const ::greptime::v1::meta::ProcedureDetailRequest* request, ::greptime::v1::meta::ProcedureDetailResponse* response, std::function<void(::grpc::Status)> f) {
  ::grpc::internal::CallbackUnaryCall< ::greptime::v1::meta::ProcedureDetailRequest, ::greptime::v1::meta::ProcedureDetailResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_details_, context, request, response, std::move(f));
}

void ProcedureService::Stub::async::details(::grpc::ClientContext* context, const ::greptime::v1::meta::ProcedureDetailRequest* request, ::greptime::v1::meta::ProcedureDetailResponse* response, ::grpc::ClientUnaryReactor* reactor) {
  ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_details_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::ProcedureDetailResponse>* ProcedureService::Stub::PrepareAsyncdetailsRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::ProcedureDetailRequest& request, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::greptime::v1::meta::ProcedureDetailResponse, ::greptime::v1::meta::ProcedureDetailRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_details_, context, request);
}

::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::ProcedureDetailResponse>* ProcedureService::Stub::AsyncdetailsRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::ProcedureDetailRequest& request, ::grpc::CompletionQueue* cq) {
  auto* result =
    this->PrepareAsyncdetailsRaw(context, request, cq);
  result->StartCall();
  return result;
}

ProcedureService::Service::Service() {
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      ProcedureService_method_names[0],
      ::grpc::internal::RpcMethod::NORMAL_RPC,
      new ::grpc::internal::RpcMethodHandler< ProcedureService::Service, ::greptime::v1::meta::QueryProcedureRequest, ::greptime::v1::meta::ProcedureStateResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
          [](ProcedureService::Service* service,
             ::grpc::ServerContext* ctx,
             const ::greptime::v1::meta::QueryProcedureRequest* req,
             ::greptime::v1::meta::ProcedureStateResponse* resp) {
               return service->query(ctx, req, resp);
             }, this)));
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      ProcedureService_method_names[1],
      ::grpc::internal::RpcMethod::NORMAL_RPC,
      new ::grpc::internal::RpcMethodHandler< ProcedureService::Service, ::greptime::v1::meta::DdlTaskRequest, ::greptime::v1::meta::DdlTaskResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
          [](ProcedureService::Service* service,
             ::grpc::ServerContext* ctx,
             const ::greptime::v1::meta::DdlTaskRequest* req,
             ::greptime::v1::meta::DdlTaskResponse* resp) {
               return service->ddl(ctx, req, resp);
             }, this)));
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      ProcedureService_method_names[2],
      ::grpc::internal::RpcMethod::NORMAL_RPC,
      new ::grpc::internal::RpcMethodHandler< ProcedureService::Service, ::greptime::v1::meta::MigrateRegionRequest, ::greptime::v1::meta::MigrateRegionResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
          [](ProcedureService::Service* service,
             ::grpc::ServerContext* ctx,
             const ::greptime::v1::meta::MigrateRegionRequest* req,
             ::greptime::v1::meta::MigrateRegionResponse* resp) {
               return service->migrate(ctx, req, resp);
             }, this)));
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      ProcedureService_method_names[3],
      ::grpc::internal::RpcMethod::NORMAL_RPC,
      new ::grpc::internal::RpcMethodHandler< ProcedureService::Service, ::greptime::v1::meta::ProcedureDetailRequest, ::greptime::v1::meta::ProcedureDetailResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
          [](ProcedureService::Service* service,
             ::grpc::ServerContext* ctx,
             const ::greptime::v1::meta::ProcedureDetailRequest* req,
             ::greptime::v1::meta::ProcedureDetailResponse* resp) {
               return service->details(ctx, req, resp);
             }, this)));
}

ProcedureService::Service::~Service() {
}

::grpc::Status ProcedureService::Service::query(::grpc::ServerContext* context, const ::greptime::v1::meta::QueryProcedureRequest* request, ::greptime::v1::meta::ProcedureStateResponse* response) {
  (void) context;
  (void) request;
  (void) response;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

::grpc::Status ProcedureService::Service::ddl(::grpc::ServerContext* context, const ::greptime::v1::meta::DdlTaskRequest* request, ::greptime::v1::meta::DdlTaskResponse* response) {
  (void) context;
  (void) request;
  (void) response;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

::grpc::Status ProcedureService::Service::migrate(::grpc::ServerContext* context, const ::greptime::v1::meta::MigrateRegionRequest* request, ::greptime::v1::meta::MigrateRegionResponse* response) {
  (void) context;
  (void) request;
  (void) response;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

::grpc::Status ProcedureService::Service::details(::grpc::ServerContext* context, const ::greptime::v1::meta::ProcedureDetailRequest* request, ::greptime::v1::meta::ProcedureDetailResponse* response) {
  (void) context;
  (void) request;
  (void) response;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}


}  // namespace greptime
}  // namespace v1
}  // namespace meta

