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

#include "clickhouse_grpc.pb.h"
#include "clickhouse_grpc.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/server_callback_handlers.h>
#include <grpcpp/server_context.h>
#include <grpcpp/impl/service_type.h>
#include <grpcpp/support/sync_stream.h>
#include <grpcpp/ports_def.inc>
namespace clickhouse {
namespace grpc {

static const char* ClickHouse_method_names[] = {
  "/clickhouse.grpc.ClickHouse/ExecuteQuery",
  "/clickhouse.grpc.ClickHouse/ExecuteQueryWithStreamInput",
  "/clickhouse.grpc.ClickHouse/ExecuteQueryWithStreamOutput",
  "/clickhouse.grpc.ClickHouse/ExecuteQueryWithStreamIO",
};

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

ClickHouse::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options)
  : channel_(channel), rpcmethod_ExecuteQuery_(ClickHouse_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
  , rpcmethod_ExecuteQueryWithStreamInput_(ClickHouse_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::CLIENT_STREAMING, channel)
  , rpcmethod_ExecuteQueryWithStreamOutput_(ClickHouse_method_names[2], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel)
  , rpcmethod_ExecuteQueryWithStreamIO_(ClickHouse_method_names[3], options.suffix_for_stats(),::grpc::internal::RpcMethod::BIDI_STREAMING, channel)
  {}

::grpc::Status ClickHouse::Stub::ExecuteQuery(::grpc::ClientContext* context, const ::clickhouse::grpc::QueryInfo& request, ::clickhouse::grpc::Result* response) {
  return ::grpc::internal::BlockingUnaryCall< ::clickhouse::grpc::QueryInfo, ::clickhouse::grpc::Result, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_ExecuteQuery_, context, request, response);
}

void ClickHouse::Stub::async::ExecuteQuery(::grpc::ClientContext* context, const ::clickhouse::grpc::QueryInfo* request, ::clickhouse::grpc::Result* response, std::function<void(::grpc::Status)> f) {
  ::grpc::internal::CallbackUnaryCall< ::clickhouse::grpc::QueryInfo, ::clickhouse::grpc::Result, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ExecuteQuery_, context, request, response, std::move(f));
}

void ClickHouse::Stub::async::ExecuteQuery(::grpc::ClientContext* context, const ::clickhouse::grpc::QueryInfo* request, ::clickhouse::grpc::Result* response, ::grpc::ClientUnaryReactor* reactor) {
  ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ExecuteQuery_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader< ::clickhouse::grpc::Result>* ClickHouse::Stub::PrepareAsyncExecuteQueryRaw(::grpc::ClientContext* context, const ::clickhouse::grpc::QueryInfo& request, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::clickhouse::grpc::Result, ::clickhouse::grpc::QueryInfo, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_ExecuteQuery_, context, request);
}

::grpc::ClientAsyncResponseReader< ::clickhouse::grpc::Result>* ClickHouse::Stub::AsyncExecuteQueryRaw(::grpc::ClientContext* context, const ::clickhouse::grpc::QueryInfo& request, ::grpc::CompletionQueue* cq) {
  auto* result =
    this->PrepareAsyncExecuteQueryRaw(context, request, cq);
  result->StartCall();
  return result;
}

::grpc::ClientWriter< ::clickhouse::grpc::QueryInfo>* ClickHouse::Stub::ExecuteQueryWithStreamInputRaw(::grpc::ClientContext* context, ::clickhouse::grpc::Result* response) {
  return ::grpc::internal::ClientWriterFactory< ::clickhouse::grpc::QueryInfo>::Create(channel_.get(), rpcmethod_ExecuteQueryWithStreamInput_, context, response);
}

void ClickHouse::Stub::async::ExecuteQueryWithStreamInput(::grpc::ClientContext* context, ::clickhouse::grpc::Result* response, ::grpc::ClientWriteReactor< ::clickhouse::grpc::QueryInfo>* reactor) {
  ::grpc::internal::ClientCallbackWriterFactory< ::clickhouse::grpc::QueryInfo>::Create(stub_->channel_.get(), stub_->rpcmethod_ExecuteQueryWithStreamInput_, context, response, reactor);
}

::grpc::ClientAsyncWriter< ::clickhouse::grpc::QueryInfo>* ClickHouse::Stub::AsyncExecuteQueryWithStreamInputRaw(::grpc::ClientContext* context, ::clickhouse::grpc::Result* response, ::grpc::CompletionQueue* cq, void* tag) {
  return ::grpc::internal::ClientAsyncWriterFactory< ::clickhouse::grpc::QueryInfo>::Create(channel_.get(), cq, rpcmethod_ExecuteQueryWithStreamInput_, context, response, true, tag);
}

::grpc::ClientAsyncWriter< ::clickhouse::grpc::QueryInfo>* ClickHouse::Stub::PrepareAsyncExecuteQueryWithStreamInputRaw(::grpc::ClientContext* context, ::clickhouse::grpc::Result* response, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncWriterFactory< ::clickhouse::grpc::QueryInfo>::Create(channel_.get(), cq, rpcmethod_ExecuteQueryWithStreamInput_, context, response, false, nullptr);
}

::grpc::ClientReader< ::clickhouse::grpc::Result>* ClickHouse::Stub::ExecuteQueryWithStreamOutputRaw(::grpc::ClientContext* context, const ::clickhouse::grpc::QueryInfo& request) {
  return ::grpc::internal::ClientReaderFactory< ::clickhouse::grpc::Result>::Create(channel_.get(), rpcmethod_ExecuteQueryWithStreamOutput_, context, request);
}

void ClickHouse::Stub::async::ExecuteQueryWithStreamOutput(::grpc::ClientContext* context, const ::clickhouse::grpc::QueryInfo* request, ::grpc::ClientReadReactor< ::clickhouse::grpc::Result>* reactor) {
  ::grpc::internal::ClientCallbackReaderFactory< ::clickhouse::grpc::Result>::Create(stub_->channel_.get(), stub_->rpcmethod_ExecuteQueryWithStreamOutput_, context, request, reactor);
}

::grpc::ClientAsyncReader< ::clickhouse::grpc::Result>* ClickHouse::Stub::AsyncExecuteQueryWithStreamOutputRaw(::grpc::ClientContext* context, const ::clickhouse::grpc::QueryInfo& request, ::grpc::CompletionQueue* cq, void* tag) {
  return ::grpc::internal::ClientAsyncReaderFactory< ::clickhouse::grpc::Result>::Create(channel_.get(), cq, rpcmethod_ExecuteQueryWithStreamOutput_, context, request, true, tag);
}

::grpc::ClientAsyncReader< ::clickhouse::grpc::Result>* ClickHouse::Stub::PrepareAsyncExecuteQueryWithStreamOutputRaw(::grpc::ClientContext* context, const ::clickhouse::grpc::QueryInfo& request, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncReaderFactory< ::clickhouse::grpc::Result>::Create(channel_.get(), cq, rpcmethod_ExecuteQueryWithStreamOutput_, context, request, false, nullptr);
}

::grpc::ClientReaderWriter< ::clickhouse::grpc::QueryInfo, ::clickhouse::grpc::Result>* ClickHouse::Stub::ExecuteQueryWithStreamIORaw(::grpc::ClientContext* context) {
  return ::grpc::internal::ClientReaderWriterFactory< ::clickhouse::grpc::QueryInfo, ::clickhouse::grpc::Result>::Create(channel_.get(), rpcmethod_ExecuteQueryWithStreamIO_, context);
}

void ClickHouse::Stub::async::ExecuteQueryWithStreamIO(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::clickhouse::grpc::QueryInfo,::clickhouse::grpc::Result>* reactor) {
  ::grpc::internal::ClientCallbackReaderWriterFactory< ::clickhouse::grpc::QueryInfo,::clickhouse::grpc::Result>::Create(stub_->channel_.get(), stub_->rpcmethod_ExecuteQueryWithStreamIO_, context, reactor);
}

::grpc::ClientAsyncReaderWriter< ::clickhouse::grpc::QueryInfo, ::clickhouse::grpc::Result>* ClickHouse::Stub::AsyncExecuteQueryWithStreamIORaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
  return ::grpc::internal::ClientAsyncReaderWriterFactory< ::clickhouse::grpc::QueryInfo, ::clickhouse::grpc::Result>::Create(channel_.get(), cq, rpcmethod_ExecuteQueryWithStreamIO_, context, true, tag);
}

::grpc::ClientAsyncReaderWriter< ::clickhouse::grpc::QueryInfo, ::clickhouse::grpc::Result>* ClickHouse::Stub::PrepareAsyncExecuteQueryWithStreamIORaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncReaderWriterFactory< ::clickhouse::grpc::QueryInfo, ::clickhouse::grpc::Result>::Create(channel_.get(), cq, rpcmethod_ExecuteQueryWithStreamIO_, context, false, nullptr);
}

ClickHouse::Service::Service() {
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      ClickHouse_method_names[0],
      ::grpc::internal::RpcMethod::NORMAL_RPC,
      new ::grpc::internal::RpcMethodHandler< ClickHouse::Service, ::clickhouse::grpc::QueryInfo, ::clickhouse::grpc::Result, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
          [](ClickHouse::Service* service,
             ::grpc::ServerContext* ctx,
             const ::clickhouse::grpc::QueryInfo* req,
             ::clickhouse::grpc::Result* resp) {
               return service->ExecuteQuery(ctx, req, resp);
             }, this)));
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      ClickHouse_method_names[1],
      ::grpc::internal::RpcMethod::CLIENT_STREAMING,
      new ::grpc::internal::ClientStreamingHandler< ClickHouse::Service, ::clickhouse::grpc::QueryInfo, ::clickhouse::grpc::Result>(
          [](ClickHouse::Service* service,
             ::grpc::ServerContext* ctx,
             ::grpc::ServerReader<::clickhouse::grpc::QueryInfo>* reader,
             ::clickhouse::grpc::Result* resp) {
               return service->ExecuteQueryWithStreamInput(ctx, reader, resp);
             }, this)));
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      ClickHouse_method_names[2],
      ::grpc::internal::RpcMethod::SERVER_STREAMING,
      new ::grpc::internal::ServerStreamingHandler< ClickHouse::Service, ::clickhouse::grpc::QueryInfo, ::clickhouse::grpc::Result>(
          [](ClickHouse::Service* service,
             ::grpc::ServerContext* ctx,
             const ::clickhouse::grpc::QueryInfo* req,
             ::grpc::ServerWriter<::clickhouse::grpc::Result>* writer) {
               return service->ExecuteQueryWithStreamOutput(ctx, req, writer);
             }, this)));
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      ClickHouse_method_names[3],
      ::grpc::internal::RpcMethod::BIDI_STREAMING,
      new ::grpc::internal::BidiStreamingHandler< ClickHouse::Service, ::clickhouse::grpc::QueryInfo, ::clickhouse::grpc::Result>(
          [](ClickHouse::Service* service,
             ::grpc::ServerContext* ctx,
             ::grpc::ServerReaderWriter<::clickhouse::grpc::Result,
             ::clickhouse::grpc::QueryInfo>* stream) {
               return service->ExecuteQueryWithStreamIO(ctx, stream);
             }, this)));
}

ClickHouse::Service::~Service() {
}

::grpc::Status ClickHouse::Service::ExecuteQuery(::grpc::ServerContext* context, const ::clickhouse::grpc::QueryInfo* request, ::clickhouse::grpc::Result* response) {
  (void) context;
  (void) request;
  (void) response;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

::grpc::Status ClickHouse::Service::ExecuteQueryWithStreamInput(::grpc::ServerContext* context, ::grpc::ServerReader< ::clickhouse::grpc::QueryInfo>* reader, ::clickhouse::grpc::Result* response) {
  (void) context;
  (void) reader;
  (void) response;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

::grpc::Status ClickHouse::Service::ExecuteQueryWithStreamOutput(::grpc::ServerContext* context, const ::clickhouse::grpc::QueryInfo* request, ::grpc::ServerWriter< ::clickhouse::grpc::Result>* writer) {
  (void) context;
  (void) request;
  (void) writer;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

::grpc::Status ClickHouse::Service::ExecuteQueryWithStreamIO(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::clickhouse::grpc::Result, ::clickhouse::grpc::QueryInfo>* stream) {
  (void) context;
  (void) stream;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}


}  // namespace clickhouse
}  // namespace grpc
#include <grpcpp/ports_undef.inc>

