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

#include "greptime/v1/meta/cluster.pb.h"
#include "greptime/v1/meta/cluster.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* Cluster_method_names[] = {
  "/greptime.v1.meta.Cluster/BatchGet",
  "/greptime.v1.meta.Cluster/Range",
  "/greptime.v1.meta.Cluster/MetasrvPeers",
};

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

Cluster::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options)
  : channel_(channel), rpcmethod_BatchGet_(Cluster_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
  , rpcmethod_Range_(Cluster_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
  , rpcmethod_MetasrvPeers_(Cluster_method_names[2], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
  {}

::grpc::Status Cluster::Stub::BatchGet(::grpc::ClientContext* context, const ::greptime::v1::meta::BatchGetRequest& request, ::greptime::v1::meta::BatchGetResponse* response) {
  return ::grpc::internal::BlockingUnaryCall< ::greptime::v1::meta::BatchGetRequest, ::greptime::v1::meta::BatchGetResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_BatchGet_, context, request, response);
}

void Cluster::Stub::async::BatchGet(::grpc::ClientContext* context, const ::greptime::v1::meta::BatchGetRequest* request, ::greptime::v1::meta::BatchGetResponse* response, std::function<void(::grpc::Status)> f) {
  ::grpc::internal::CallbackUnaryCall< ::greptime::v1::meta::BatchGetRequest, ::greptime::v1::meta::BatchGetResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_BatchGet_, context, request, response, std::move(f));
}

void Cluster::Stub::async::BatchGet(::grpc::ClientContext* context, const ::greptime::v1::meta::BatchGetRequest* request, ::greptime::v1::meta::BatchGetResponse* response, ::grpc::ClientUnaryReactor* reactor) {
  ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_BatchGet_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::BatchGetResponse>* Cluster::Stub::PrepareAsyncBatchGetRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::BatchGetRequest& request, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::greptime::v1::meta::BatchGetResponse, ::greptime::v1::meta::BatchGetRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_BatchGet_, context, request);
}

::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::BatchGetResponse>* Cluster::Stub::AsyncBatchGetRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::BatchGetRequest& request, ::grpc::CompletionQueue* cq) {
  auto* result =
    this->PrepareAsyncBatchGetRaw(context, request, cq);
  result->StartCall();
  return result;
}

::grpc::Status Cluster::Stub::Range(::grpc::ClientContext* context, const ::greptime::v1::meta::RangeRequest& request, ::greptime::v1::meta::RangeResponse* response) {
  return ::grpc::internal::BlockingUnaryCall< ::greptime::v1::meta::RangeRequest, ::greptime::v1::meta::RangeResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Range_, context, request, response);
}

void Cluster::Stub::async::Range(::grpc::ClientContext* context, const ::greptime::v1::meta::RangeRequest* request, ::greptime::v1::meta::RangeResponse* response, std::function<void(::grpc::Status)> f) {
  ::grpc::internal::CallbackUnaryCall< ::greptime::v1::meta::RangeRequest, ::greptime::v1::meta::RangeResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Range_, context, request, response, std::move(f));
}

void Cluster::Stub::async::Range(::grpc::ClientContext* context, const ::greptime::v1::meta::RangeRequest* request, ::greptime::v1::meta::RangeResponse* response, ::grpc::ClientUnaryReactor* reactor) {
  ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Range_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::RangeResponse>* Cluster::Stub::PrepareAsyncRangeRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::RangeRequest& request, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::greptime::v1::meta::RangeResponse, ::greptime::v1::meta::RangeRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_Range_, context, request);
}

::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::RangeResponse>* Cluster::Stub::AsyncRangeRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::RangeRequest& request, ::grpc::CompletionQueue* cq) {
  auto* result =
    this->PrepareAsyncRangeRaw(context, request, cq);
  result->StartCall();
  return result;
}

::grpc::Status Cluster::Stub::MetasrvPeers(::grpc::ClientContext* context, const ::greptime::v1::meta::MetasrvPeersRequest& request, ::greptime::v1::meta::MetasrvPeersResponse* response) {
  return ::grpc::internal::BlockingUnaryCall< ::greptime::v1::meta::MetasrvPeersRequest, ::greptime::v1::meta::MetasrvPeersResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_MetasrvPeers_, context, request, response);
}

void Cluster::Stub::async::MetasrvPeers(::grpc::ClientContext* context, const ::greptime::v1::meta::MetasrvPeersRequest* request, ::greptime::v1::meta::MetasrvPeersResponse* response, std::function<void(::grpc::Status)> f) {
  ::grpc::internal::CallbackUnaryCall< ::greptime::v1::meta::MetasrvPeersRequest, ::greptime::v1::meta::MetasrvPeersResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_MetasrvPeers_, context, request, response, std::move(f));
}

void Cluster::Stub::async::MetasrvPeers(::grpc::ClientContext* context, const ::greptime::v1::meta::MetasrvPeersRequest* request, ::greptime::v1::meta::MetasrvPeersResponse* response, ::grpc::ClientUnaryReactor* reactor) {
  ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_MetasrvPeers_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::MetasrvPeersResponse>* Cluster::Stub::PrepareAsyncMetasrvPeersRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::MetasrvPeersRequest& request, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::greptime::v1::meta::MetasrvPeersResponse, ::greptime::v1::meta::MetasrvPeersRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_MetasrvPeers_, context, request);
}

::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::MetasrvPeersResponse>* Cluster::Stub::AsyncMetasrvPeersRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::MetasrvPeersRequest& request, ::grpc::CompletionQueue* cq) {
  auto* result =
    this->PrepareAsyncMetasrvPeersRaw(context, request, cq);
  result->StartCall();
  return result;
}

Cluster::Service::Service() {
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      Cluster_method_names[0],
      ::grpc::internal::RpcMethod::NORMAL_RPC,
      new ::grpc::internal::RpcMethodHandler< Cluster::Service, ::greptime::v1::meta::BatchGetRequest, ::greptime::v1::meta::BatchGetResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
          [](Cluster::Service* service,
             ::grpc::ServerContext* ctx,
             const ::greptime::v1::meta::BatchGetRequest* req,
             ::greptime::v1::meta::BatchGetResponse* resp) {
               return service->BatchGet(ctx, req, resp);
             }, this)));
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      Cluster_method_names[1],
      ::grpc::internal::RpcMethod::NORMAL_RPC,
      new ::grpc::internal::RpcMethodHandler< Cluster::Service, ::greptime::v1::meta::RangeRequest, ::greptime::v1::meta::RangeResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
          [](Cluster::Service* service,
             ::grpc::ServerContext* ctx,
             const ::greptime::v1::meta::RangeRequest* req,
             ::greptime::v1::meta::RangeResponse* resp) {
               return service->Range(ctx, req, resp);
             }, this)));
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      Cluster_method_names[2],
      ::grpc::internal::RpcMethod::NORMAL_RPC,
      new ::grpc::internal::RpcMethodHandler< Cluster::Service, ::greptime::v1::meta::MetasrvPeersRequest, ::greptime::v1::meta::MetasrvPeersResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
          [](Cluster::Service* service,
             ::grpc::ServerContext* ctx,
             const ::greptime::v1::meta::MetasrvPeersRequest* req,
             ::greptime::v1::meta::MetasrvPeersResponse* resp) {
               return service->MetasrvPeers(ctx, req, resp);
             }, this)));
}

Cluster::Service::~Service() {
}

::grpc::Status Cluster::Service::BatchGet(::grpc::ServerContext* context, const ::greptime::v1::meta::BatchGetRequest* request, ::greptime::v1::meta::BatchGetResponse* response) {
  (void) context;
  (void) request;
  (void) response;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

::grpc::Status Cluster::Service::Range(::grpc::ServerContext* context, const ::greptime::v1::meta::RangeRequest* request, ::greptime::v1::meta::RangeResponse* response) {
  (void) context;
  (void) request;
  (void) response;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

::grpc::Status Cluster::Service::MetasrvPeers(::grpc::ServerContext* context, const ::greptime::v1::meta::MetasrvPeersRequest* request, ::greptime::v1::meta::MetasrvPeersResponse* response) {
  (void) context;
  (void) request;
  (void) response;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}


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

