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

#include "modbus_gateway.pb.h"
#include "modbus_gateway.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 hc900 {

static const char* ModbusGateway_method_names[] = {
  "/hc900.ModbusGateway/ReadTags",
  "/hc900.ModbusGateway/WriteTag",
  "/hc900.ModbusGateway/StreamTags",
  "/hc900.ModbusGateway/ListTags",
  "/hc900.ModbusGateway/HealthCheck",
};

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

ModbusGateway::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options)
  : channel_(channel), rpcmethod_ReadTags_(ModbusGateway_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
  , rpcmethod_WriteTag_(ModbusGateway_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
  , rpcmethod_StreamTags_(ModbusGateway_method_names[2], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel)
  , rpcmethod_ListTags_(ModbusGateway_method_names[3], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
  , rpcmethod_HealthCheck_(ModbusGateway_method_names[4], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
  {}

::grpc::Status ModbusGateway::Stub::ReadTags(::grpc::ClientContext* context, const ::hc900::ReadTagsRequest& request, ::hc900::ReadTagsResponse* response) {
  return ::grpc::internal::BlockingUnaryCall< ::hc900::ReadTagsRequest, ::hc900::ReadTagsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_ReadTags_, context, request, response);
}

void ModbusGateway::Stub::async::ReadTags(::grpc::ClientContext* context, const ::hc900::ReadTagsRequest* request, ::hc900::ReadTagsResponse* response, std::function<void(::grpc::Status)> f) {
  ::grpc::internal::CallbackUnaryCall< ::hc900::ReadTagsRequest, ::hc900::ReadTagsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ReadTags_, context, request, response, std::move(f));
}

void ModbusGateway::Stub::async::ReadTags(::grpc::ClientContext* context, const ::hc900::ReadTagsRequest* request, ::hc900::ReadTagsResponse* response, ::grpc::ClientUnaryReactor* reactor) {
  ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ReadTags_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader< ::hc900::ReadTagsResponse>* ModbusGateway::Stub::PrepareAsyncReadTagsRaw(::grpc::ClientContext* context, const ::hc900::ReadTagsRequest& request, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::hc900::ReadTagsResponse, ::hc900::ReadTagsRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_ReadTags_, context, request);
}

::grpc::ClientAsyncResponseReader< ::hc900::ReadTagsResponse>* ModbusGateway::Stub::AsyncReadTagsRaw(::grpc::ClientContext* context, const ::hc900::ReadTagsRequest& request, ::grpc::CompletionQueue* cq) {
  auto* result =
    this->PrepareAsyncReadTagsRaw(context, request, cq);
  result->StartCall();
  return result;
}

::grpc::Status ModbusGateway::Stub::WriteTag(::grpc::ClientContext* context, const ::hc900::WriteTagRequest& request, ::hc900::WriteTagResponse* response) {
  return ::grpc::internal::BlockingUnaryCall< ::hc900::WriteTagRequest, ::hc900::WriteTagResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_WriteTag_, context, request, response);
}

void ModbusGateway::Stub::async::WriteTag(::grpc::ClientContext* context, const ::hc900::WriteTagRequest* request, ::hc900::WriteTagResponse* response, std::function<void(::grpc::Status)> f) {
  ::grpc::internal::CallbackUnaryCall< ::hc900::WriteTagRequest, ::hc900::WriteTagResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_WriteTag_, context, request, response, std::move(f));
}

void ModbusGateway::Stub::async::WriteTag(::grpc::ClientContext* context, const ::hc900::WriteTagRequest* request, ::hc900::WriteTagResponse* response, ::grpc::ClientUnaryReactor* reactor) {
  ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_WriteTag_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader< ::hc900::WriteTagResponse>* ModbusGateway::Stub::PrepareAsyncWriteTagRaw(::grpc::ClientContext* context, const ::hc900::WriteTagRequest& request, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::hc900::WriteTagResponse, ::hc900::WriteTagRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_WriteTag_, context, request);
}

::grpc::ClientAsyncResponseReader< ::hc900::WriteTagResponse>* ModbusGateway::Stub::AsyncWriteTagRaw(::grpc::ClientContext* context, const ::hc900::WriteTagRequest& request, ::grpc::CompletionQueue* cq) {
  auto* result =
    this->PrepareAsyncWriteTagRaw(context, request, cq);
  result->StartCall();
  return result;
}

::grpc::ClientReader< ::hc900::TagValue>* ModbusGateway::Stub::StreamTagsRaw(::grpc::ClientContext* context, const ::hc900::StreamTagsRequest& request) {
  return ::grpc::internal::ClientReaderFactory< ::hc900::TagValue>::Create(channel_.get(), rpcmethod_StreamTags_, context, request);
}

void ModbusGateway::Stub::async::StreamTags(::grpc::ClientContext* context, const ::hc900::StreamTagsRequest* request, ::grpc::ClientReadReactor< ::hc900::TagValue>* reactor) {
  ::grpc::internal::ClientCallbackReaderFactory< ::hc900::TagValue>::Create(stub_->channel_.get(), stub_->rpcmethod_StreamTags_, context, request, reactor);
}

::grpc::ClientAsyncReader< ::hc900::TagValue>* ModbusGateway::Stub::AsyncStreamTagsRaw(::grpc::ClientContext* context, const ::hc900::StreamTagsRequest& request, ::grpc::CompletionQueue* cq, void* tag) {
  return ::grpc::internal::ClientAsyncReaderFactory< ::hc900::TagValue>::Create(channel_.get(), cq, rpcmethod_StreamTags_, context, request, true, tag);
}

::grpc::ClientAsyncReader< ::hc900::TagValue>* ModbusGateway::Stub::PrepareAsyncStreamTagsRaw(::grpc::ClientContext* context, const ::hc900::StreamTagsRequest& request, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncReaderFactory< ::hc900::TagValue>::Create(channel_.get(), cq, rpcmethod_StreamTags_, context, request, false, nullptr);
}

::grpc::Status ModbusGateway::Stub::ListTags(::grpc::ClientContext* context, const ::hc900::ListTagsRequest& request, ::hc900::ListTagsResponse* response) {
  return ::grpc::internal::BlockingUnaryCall< ::hc900::ListTagsRequest, ::hc900::ListTagsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_ListTags_, context, request, response);
}

void ModbusGateway::Stub::async::ListTags(::grpc::ClientContext* context, const ::hc900::ListTagsRequest* request, ::hc900::ListTagsResponse* response, std::function<void(::grpc::Status)> f) {
  ::grpc::internal::CallbackUnaryCall< ::hc900::ListTagsRequest, ::hc900::ListTagsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ListTags_, context, request, response, std::move(f));
}

void ModbusGateway::Stub::async::ListTags(::grpc::ClientContext* context, const ::hc900::ListTagsRequest* request, ::hc900::ListTagsResponse* response, ::grpc::ClientUnaryReactor* reactor) {
  ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ListTags_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader< ::hc900::ListTagsResponse>* ModbusGateway::Stub::PrepareAsyncListTagsRaw(::grpc::ClientContext* context, const ::hc900::ListTagsRequest& request, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::hc900::ListTagsResponse, ::hc900::ListTagsRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_ListTags_, context, request);
}

::grpc::ClientAsyncResponseReader< ::hc900::ListTagsResponse>* ModbusGateway::Stub::AsyncListTagsRaw(::grpc::ClientContext* context, const ::hc900::ListTagsRequest& request, ::grpc::CompletionQueue* cq) {
  auto* result =
    this->PrepareAsyncListTagsRaw(context, request, cq);
  result->StartCall();
  return result;
}

::grpc::Status ModbusGateway::Stub::HealthCheck(::grpc::ClientContext* context, const ::hc900::HealthCheckRequest& request, ::hc900::HealthCheckResponse* response) {
  return ::grpc::internal::BlockingUnaryCall< ::hc900::HealthCheckRequest, ::hc900::HealthCheckResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_HealthCheck_, context, request, response);
}

void ModbusGateway::Stub::async::HealthCheck(::grpc::ClientContext* context, const ::hc900::HealthCheckRequest* request, ::hc900::HealthCheckResponse* response, std::function<void(::grpc::Status)> f) {
  ::grpc::internal::CallbackUnaryCall< ::hc900::HealthCheckRequest, ::hc900::HealthCheckResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_HealthCheck_, context, request, response, std::move(f));
}

void ModbusGateway::Stub::async::HealthCheck(::grpc::ClientContext* context, const ::hc900::HealthCheckRequest* request, ::hc900::HealthCheckResponse* response, ::grpc::ClientUnaryReactor* reactor) {
  ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_HealthCheck_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader< ::hc900::HealthCheckResponse>* ModbusGateway::Stub::PrepareAsyncHealthCheckRaw(::grpc::ClientContext* context, const ::hc900::HealthCheckRequest& request, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::hc900::HealthCheckResponse, ::hc900::HealthCheckRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_HealthCheck_, context, request);
}

::grpc::ClientAsyncResponseReader< ::hc900::HealthCheckResponse>* ModbusGateway::Stub::AsyncHealthCheckRaw(::grpc::ClientContext* context, const ::hc900::HealthCheckRequest& request, ::grpc::CompletionQueue* cq) {
  auto* result =
    this->PrepareAsyncHealthCheckRaw(context, request, cq);
  result->StartCall();
  return result;
}

ModbusGateway::Service::Service() {
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      ModbusGateway_method_names[0],
      ::grpc::internal::RpcMethod::NORMAL_RPC,
      new ::grpc::internal::RpcMethodHandler< ModbusGateway::Service, ::hc900::ReadTagsRequest, ::hc900::ReadTagsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
          [](ModbusGateway::Service* service,
             ::grpc::ServerContext* ctx,
             const ::hc900::ReadTagsRequest* req,
             ::hc900::ReadTagsResponse* resp) {
               return service->ReadTags(ctx, req, resp);
             }, this)));
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      ModbusGateway_method_names[1],
      ::grpc::internal::RpcMethod::NORMAL_RPC,
      new ::grpc::internal::RpcMethodHandler< ModbusGateway::Service, ::hc900::WriteTagRequest, ::hc900::WriteTagResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
          [](ModbusGateway::Service* service,
             ::grpc::ServerContext* ctx,
             const ::hc900::WriteTagRequest* req,
             ::hc900::WriteTagResponse* resp) {
               return service->WriteTag(ctx, req, resp);
             }, this)));
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      ModbusGateway_method_names[2],
      ::grpc::internal::RpcMethod::SERVER_STREAMING,
      new ::grpc::internal::ServerStreamingHandler< ModbusGateway::Service, ::hc900::StreamTagsRequest, ::hc900::TagValue>(
          [](ModbusGateway::Service* service,
             ::grpc::ServerContext* ctx,
             const ::hc900::StreamTagsRequest* req,
             ::grpc::ServerWriter<::hc900::TagValue>* writer) {
               return service->StreamTags(ctx, req, writer);
             }, this)));
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      ModbusGateway_method_names[3],
      ::grpc::internal::RpcMethod::NORMAL_RPC,
      new ::grpc::internal::RpcMethodHandler< ModbusGateway::Service, ::hc900::ListTagsRequest, ::hc900::ListTagsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
          [](ModbusGateway::Service* service,
             ::grpc::ServerContext* ctx,
             const ::hc900::ListTagsRequest* req,
             ::hc900::ListTagsResponse* resp) {
               return service->ListTags(ctx, req, resp);
             }, this)));
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      ModbusGateway_method_names[4],
      ::grpc::internal::RpcMethod::NORMAL_RPC,
      new ::grpc::internal::RpcMethodHandler< ModbusGateway::Service, ::hc900::HealthCheckRequest, ::hc900::HealthCheckResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
          [](ModbusGateway::Service* service,
             ::grpc::ServerContext* ctx,
             const ::hc900::HealthCheckRequest* req,
             ::hc900::HealthCheckResponse* resp) {
               return service->HealthCheck(ctx, req, resp);
             }, this)));
}

ModbusGateway::Service::~Service() {
}

::grpc::Status ModbusGateway::Service::ReadTags(::grpc::ServerContext* context, const ::hc900::ReadTagsRequest* request, ::hc900::ReadTagsResponse* response) {
  (void) context;
  (void) request;
  (void) response;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

::grpc::Status ModbusGateway::Service::WriteTag(::grpc::ServerContext* context, const ::hc900::WriteTagRequest* request, ::hc900::WriteTagResponse* response) {
  (void) context;
  (void) request;
  (void) response;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

::grpc::Status ModbusGateway::Service::StreamTags(::grpc::ServerContext* context, const ::hc900::StreamTagsRequest* request, ::grpc::ServerWriter< ::hc900::TagValue>* writer) {
  (void) context;
  (void) request;
  (void) writer;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

::grpc::Status ModbusGateway::Service::ListTags(::grpc::ServerContext* context, const ::hc900::ListTagsRequest* request, ::hc900::ListTagsResponse* response) {
  (void) context;
  (void) request;
  (void) response;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

::grpc::Status ModbusGateway::Service::HealthCheck(::grpc::ServerContext* context, const ::hc900::HealthCheckRequest* request, ::hc900::HealthCheckResponse* response) {
  (void) context;
  (void) request;
  (void) response;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}


}  // namespace hc900

