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

#include "keyapis/subscription/v1/keyapis_subscription_plan_v1.pb.h"
#include "keyapis/subscription/v1/keyapis_subscription_plan_v1.grpc.pb.h"

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

static const char* PlanService_method_names[] = {
  "/keyapis.subscription.v1.PlanService/GetPlan",
  "/keyapis.subscription.v1.PlanService/GetPlanList",
  "/keyapis.subscription.v1.PlanService/GetPlanCount",
};

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

PlanService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options)
  : channel_(channel), rpcmethod_GetPlan_(PlanService_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
  , rpcmethod_GetPlanList_(PlanService_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel)
  , rpcmethod_GetPlanCount_(PlanService_method_names[2], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
  {}

::grpc::Status PlanService::Stub::GetPlan(::grpc::ClientContext* context, const ::keyapis::subscription::v1::GetPlanRequest& request, ::keyapis::subscription::v1::GetPlanResponse* response) {
  return ::grpc::internal::BlockingUnaryCall< ::keyapis::subscription::v1::GetPlanRequest, ::keyapis::subscription::v1::GetPlanResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_GetPlan_, context, request, response);
}

void PlanService::Stub::async::GetPlan(::grpc::ClientContext* context, const ::keyapis::subscription::v1::GetPlanRequest* request, ::keyapis::subscription::v1::GetPlanResponse* response, std::function<void(::grpc::Status)> f) {
  ::grpc::internal::CallbackUnaryCall< ::keyapis::subscription::v1::GetPlanRequest, ::keyapis::subscription::v1::GetPlanResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetPlan_, context, request, response, std::move(f));
}

void PlanService::Stub::async::GetPlan(::grpc::ClientContext* context, const ::keyapis::subscription::v1::GetPlanRequest* request, ::keyapis::subscription::v1::GetPlanResponse* response, ::grpc::ClientUnaryReactor* reactor) {
  ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetPlan_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader< ::keyapis::subscription::v1::GetPlanResponse>* PlanService::Stub::PrepareAsyncGetPlanRaw(::grpc::ClientContext* context, const ::keyapis::subscription::v1::GetPlanRequest& request, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::keyapis::subscription::v1::GetPlanResponse, ::keyapis::subscription::v1::GetPlanRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_GetPlan_, context, request);
}

::grpc::ClientAsyncResponseReader< ::keyapis::subscription::v1::GetPlanResponse>* PlanService::Stub::AsyncGetPlanRaw(::grpc::ClientContext* context, const ::keyapis::subscription::v1::GetPlanRequest& request, ::grpc::CompletionQueue* cq) {
  auto* result =
    this->PrepareAsyncGetPlanRaw(context, request, cq);
  result->StartCall();
  return result;
}

::grpc::ClientReader< ::keyapis::subscription::v1::GetPlanListResponse>* PlanService::Stub::GetPlanListRaw(::grpc::ClientContext* context, const ::keyapis::subscription::v1::GetPlanListRequest& request) {
  return ::grpc::internal::ClientReaderFactory< ::keyapis::subscription::v1::GetPlanListResponse>::Create(channel_.get(), rpcmethod_GetPlanList_, context, request);
}

void PlanService::Stub::async::GetPlanList(::grpc::ClientContext* context, const ::keyapis::subscription::v1::GetPlanListRequest* request, ::grpc::ClientReadReactor< ::keyapis::subscription::v1::GetPlanListResponse>* reactor) {
  ::grpc::internal::ClientCallbackReaderFactory< ::keyapis::subscription::v1::GetPlanListResponse>::Create(stub_->channel_.get(), stub_->rpcmethod_GetPlanList_, context, request, reactor);
}

::grpc::ClientAsyncReader< ::keyapis::subscription::v1::GetPlanListResponse>* PlanService::Stub::AsyncGetPlanListRaw(::grpc::ClientContext* context, const ::keyapis::subscription::v1::GetPlanListRequest& request, ::grpc::CompletionQueue* cq, void* tag) {
  return ::grpc::internal::ClientAsyncReaderFactory< ::keyapis::subscription::v1::GetPlanListResponse>::Create(channel_.get(), cq, rpcmethod_GetPlanList_, context, request, true, tag);
}

::grpc::ClientAsyncReader< ::keyapis::subscription::v1::GetPlanListResponse>* PlanService::Stub::PrepareAsyncGetPlanListRaw(::grpc::ClientContext* context, const ::keyapis::subscription::v1::GetPlanListRequest& request, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncReaderFactory< ::keyapis::subscription::v1::GetPlanListResponse>::Create(channel_.get(), cq, rpcmethod_GetPlanList_, context, request, false, nullptr);
}

::grpc::Status PlanService::Stub::GetPlanCount(::grpc::ClientContext* context, const ::keyapis::subscription::v1::GetPlanCountRequest& request, ::keyapis::subscription::v1::GetPlanCountResponse* response) {
  return ::grpc::internal::BlockingUnaryCall< ::keyapis::subscription::v1::GetPlanCountRequest, ::keyapis::subscription::v1::GetPlanCountResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_GetPlanCount_, context, request, response);
}

void PlanService::Stub::async::GetPlanCount(::grpc::ClientContext* context, const ::keyapis::subscription::v1::GetPlanCountRequest* request, ::keyapis::subscription::v1::GetPlanCountResponse* response, std::function<void(::grpc::Status)> f) {
  ::grpc::internal::CallbackUnaryCall< ::keyapis::subscription::v1::GetPlanCountRequest, ::keyapis::subscription::v1::GetPlanCountResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetPlanCount_, context, request, response, std::move(f));
}

void PlanService::Stub::async::GetPlanCount(::grpc::ClientContext* context, const ::keyapis::subscription::v1::GetPlanCountRequest* request, ::keyapis::subscription::v1::GetPlanCountResponse* response, ::grpc::ClientUnaryReactor* reactor) {
  ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetPlanCount_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader< ::keyapis::subscription::v1::GetPlanCountResponse>* PlanService::Stub::PrepareAsyncGetPlanCountRaw(::grpc::ClientContext* context, const ::keyapis::subscription::v1::GetPlanCountRequest& request, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::keyapis::subscription::v1::GetPlanCountResponse, ::keyapis::subscription::v1::GetPlanCountRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_GetPlanCount_, context, request);
}

::grpc::ClientAsyncResponseReader< ::keyapis::subscription::v1::GetPlanCountResponse>* PlanService::Stub::AsyncGetPlanCountRaw(::grpc::ClientContext* context, const ::keyapis::subscription::v1::GetPlanCountRequest& request, ::grpc::CompletionQueue* cq) {
  auto* result =
    this->PrepareAsyncGetPlanCountRaw(context, request, cq);
  result->StartCall();
  return result;
}

PlanService::Service::Service() {
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      PlanService_method_names[0],
      ::grpc::internal::RpcMethod::NORMAL_RPC,
      new ::grpc::internal::RpcMethodHandler< PlanService::Service, ::keyapis::subscription::v1::GetPlanRequest, ::keyapis::subscription::v1::GetPlanResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
          [](PlanService::Service* service,
             ::grpc::ServerContext* ctx,
             const ::keyapis::subscription::v1::GetPlanRequest* req,
             ::keyapis::subscription::v1::GetPlanResponse* resp) {
               return service->GetPlan(ctx, req, resp);
             }, this)));
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      PlanService_method_names[1],
      ::grpc::internal::RpcMethod::SERVER_STREAMING,
      new ::grpc::internal::ServerStreamingHandler< PlanService::Service, ::keyapis::subscription::v1::GetPlanListRequest, ::keyapis::subscription::v1::GetPlanListResponse>(
          [](PlanService::Service* service,
             ::grpc::ServerContext* ctx,
             const ::keyapis::subscription::v1::GetPlanListRequest* req,
             ::grpc::ServerWriter<::keyapis::subscription::v1::GetPlanListResponse>* writer) {
               return service->GetPlanList(ctx, req, writer);
             }, this)));
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      PlanService_method_names[2],
      ::grpc::internal::RpcMethod::NORMAL_RPC,
      new ::grpc::internal::RpcMethodHandler< PlanService::Service, ::keyapis::subscription::v1::GetPlanCountRequest, ::keyapis::subscription::v1::GetPlanCountResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
          [](PlanService::Service* service,
             ::grpc::ServerContext* ctx,
             const ::keyapis::subscription::v1::GetPlanCountRequest* req,
             ::keyapis::subscription::v1::GetPlanCountResponse* resp) {
               return service->GetPlanCount(ctx, req, resp);
             }, this)));
}

PlanService::Service::~Service() {
}

::grpc::Status PlanService::Service::GetPlan(::grpc::ServerContext* context, const ::keyapis::subscription::v1::GetPlanRequest* request, ::keyapis::subscription::v1::GetPlanResponse* response) {
  (void) context;
  (void) request;
  (void) response;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

::grpc::Status PlanService::Service::GetPlanList(::grpc::ServerContext* context, const ::keyapis::subscription::v1::GetPlanListRequest* request, ::grpc::ServerWriter< ::keyapis::subscription::v1::GetPlanListResponse>* writer) {
  (void) context;
  (void) request;
  (void) writer;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

::grpc::Status PlanService::Service::GetPlanCount(::grpc::ServerContext* context, const ::keyapis::subscription::v1::GetPlanCountRequest* request, ::keyapis::subscription::v1::GetPlanCountResponse* response) {
  (void) context;
  (void) request;
  (void) response;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}


}  // namespace keyapis
}  // namespace subscription
}  // namespace v1

