// Generated by the gRPC C++ plugin.
// If you make any local change, they will be lost.
// source: google/cloud/bigquery/storage/v1/storage.proto

#include "google/cloud/bigquery/storage/v1/storage.pb.h"
#include "google/cloud/bigquery/storage/v1/storage.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 google {
namespace cloud {
namespace bigquery {
namespace storage {
namespace v1 {

static const char* BigQueryRead_method_names[] = {
  "/google.cloud.bigquery.storage.v1.BigQueryRead/CreateReadSession",
  "/google.cloud.bigquery.storage.v1.BigQueryRead/ReadRows",
  "/google.cloud.bigquery.storage.v1.BigQueryRead/SplitReadStream",
};

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

BigQueryRead::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options)
  : channel_(channel), rpcmethod_CreateReadSession_(BigQueryRead_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
  , rpcmethod_ReadRows_(BigQueryRead_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel)
  , rpcmethod_SplitReadStream_(BigQueryRead_method_names[2], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
  {}

::grpc::Status BigQueryRead::Stub::CreateReadSession(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::CreateReadSessionRequest& request, ::google::cloud::bigquery::storage::v1::ReadSession* response) {
  return ::grpc::internal::BlockingUnaryCall< ::google::cloud::bigquery::storage::v1::CreateReadSessionRequest, ::google::cloud::bigquery::storage::v1::ReadSession, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_CreateReadSession_, context, request, response);
}

void BigQueryRead::Stub::async::CreateReadSession(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::CreateReadSessionRequest* request, ::google::cloud::bigquery::storage::v1::ReadSession* response, std::function<void(::grpc::Status)> f) {
  ::grpc::internal::CallbackUnaryCall< ::google::cloud::bigquery::storage::v1::CreateReadSessionRequest, ::google::cloud::bigquery::storage::v1::ReadSession, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_CreateReadSession_, context, request, response, std::move(f));
}

void BigQueryRead::Stub::async::CreateReadSession(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::CreateReadSessionRequest* request, ::google::cloud::bigquery::storage::v1::ReadSession* response, ::grpc::ClientUnaryReactor* reactor) {
  ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_CreateReadSession_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader< ::google::cloud::bigquery::storage::v1::ReadSession>* BigQueryRead::Stub::PrepareAsyncCreateReadSessionRaw(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::CreateReadSessionRequest& request, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::google::cloud::bigquery::storage::v1::ReadSession, ::google::cloud::bigquery::storage::v1::CreateReadSessionRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_CreateReadSession_, context, request);
}

::grpc::ClientAsyncResponseReader< ::google::cloud::bigquery::storage::v1::ReadSession>* BigQueryRead::Stub::AsyncCreateReadSessionRaw(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::CreateReadSessionRequest& request, ::grpc::CompletionQueue* cq) {
  auto* result =
    this->PrepareAsyncCreateReadSessionRaw(context, request, cq);
  result->StartCall();
  return result;
}

::grpc::ClientReader< ::google::cloud::bigquery::storage::v1::ReadRowsResponse>* BigQueryRead::Stub::ReadRowsRaw(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::ReadRowsRequest& request) {
  return ::grpc::internal::ClientReaderFactory< ::google::cloud::bigquery::storage::v1::ReadRowsResponse>::Create(channel_.get(), rpcmethod_ReadRows_, context, request);
}

void BigQueryRead::Stub::async::ReadRows(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::ReadRowsRequest* request, ::grpc::ClientReadReactor< ::google::cloud::bigquery::storage::v1::ReadRowsResponse>* reactor) {
  ::grpc::internal::ClientCallbackReaderFactory< ::google::cloud::bigquery::storage::v1::ReadRowsResponse>::Create(stub_->channel_.get(), stub_->rpcmethod_ReadRows_, context, request, reactor);
}

::grpc::ClientAsyncReader< ::google::cloud::bigquery::storage::v1::ReadRowsResponse>* BigQueryRead::Stub::AsyncReadRowsRaw(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::ReadRowsRequest& request, ::grpc::CompletionQueue* cq, void* tag) {
  return ::grpc::internal::ClientAsyncReaderFactory< ::google::cloud::bigquery::storage::v1::ReadRowsResponse>::Create(channel_.get(), cq, rpcmethod_ReadRows_, context, request, true, tag);
}

::grpc::ClientAsyncReader< ::google::cloud::bigquery::storage::v1::ReadRowsResponse>* BigQueryRead::Stub::PrepareAsyncReadRowsRaw(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::ReadRowsRequest& request, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncReaderFactory< ::google::cloud::bigquery::storage::v1::ReadRowsResponse>::Create(channel_.get(), cq, rpcmethod_ReadRows_, context, request, false, nullptr);
}

::grpc::Status BigQueryRead::Stub::SplitReadStream(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::SplitReadStreamRequest& request, ::google::cloud::bigquery::storage::v1::SplitReadStreamResponse* response) {
  return ::grpc::internal::BlockingUnaryCall< ::google::cloud::bigquery::storage::v1::SplitReadStreamRequest, ::google::cloud::bigquery::storage::v1::SplitReadStreamResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_SplitReadStream_, context, request, response);
}

void BigQueryRead::Stub::async::SplitReadStream(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::SplitReadStreamRequest* request, ::google::cloud::bigquery::storage::v1::SplitReadStreamResponse* response, std::function<void(::grpc::Status)> f) {
  ::grpc::internal::CallbackUnaryCall< ::google::cloud::bigquery::storage::v1::SplitReadStreamRequest, ::google::cloud::bigquery::storage::v1::SplitReadStreamResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SplitReadStream_, context, request, response, std::move(f));
}

void BigQueryRead::Stub::async::SplitReadStream(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::SplitReadStreamRequest* request, ::google::cloud::bigquery::storage::v1::SplitReadStreamResponse* response, ::grpc::ClientUnaryReactor* reactor) {
  ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SplitReadStream_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader< ::google::cloud::bigquery::storage::v1::SplitReadStreamResponse>* BigQueryRead::Stub::PrepareAsyncSplitReadStreamRaw(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::SplitReadStreamRequest& request, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::google::cloud::bigquery::storage::v1::SplitReadStreamResponse, ::google::cloud::bigquery::storage::v1::SplitReadStreamRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_SplitReadStream_, context, request);
}

::grpc::ClientAsyncResponseReader< ::google::cloud::bigquery::storage::v1::SplitReadStreamResponse>* BigQueryRead::Stub::AsyncSplitReadStreamRaw(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::SplitReadStreamRequest& request, ::grpc::CompletionQueue* cq) {
  auto* result =
    this->PrepareAsyncSplitReadStreamRaw(context, request, cq);
  result->StartCall();
  return result;
}

BigQueryRead::Service::Service() {
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      BigQueryRead_method_names[0],
      ::grpc::internal::RpcMethod::NORMAL_RPC,
      new ::grpc::internal::RpcMethodHandler< BigQueryRead::Service, ::google::cloud::bigquery::storage::v1::CreateReadSessionRequest, ::google::cloud::bigquery::storage::v1::ReadSession, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
          [](BigQueryRead::Service* service,
             ::grpc::ServerContext* ctx,
             const ::google::cloud::bigquery::storage::v1::CreateReadSessionRequest* req,
             ::google::cloud::bigquery::storage::v1::ReadSession* resp) {
               return service->CreateReadSession(ctx, req, resp);
             }, this)));
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      BigQueryRead_method_names[1],
      ::grpc::internal::RpcMethod::SERVER_STREAMING,
      new ::grpc::internal::ServerStreamingHandler< BigQueryRead::Service, ::google::cloud::bigquery::storage::v1::ReadRowsRequest, ::google::cloud::bigquery::storage::v1::ReadRowsResponse>(
          [](BigQueryRead::Service* service,
             ::grpc::ServerContext* ctx,
             const ::google::cloud::bigquery::storage::v1::ReadRowsRequest* req,
             ::grpc::ServerWriter<::google::cloud::bigquery::storage::v1::ReadRowsResponse>* writer) {
               return service->ReadRows(ctx, req, writer);
             }, this)));
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      BigQueryRead_method_names[2],
      ::grpc::internal::RpcMethod::NORMAL_RPC,
      new ::grpc::internal::RpcMethodHandler< BigQueryRead::Service, ::google::cloud::bigquery::storage::v1::SplitReadStreamRequest, ::google::cloud::bigquery::storage::v1::SplitReadStreamResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
          [](BigQueryRead::Service* service,
             ::grpc::ServerContext* ctx,
             const ::google::cloud::bigquery::storage::v1::SplitReadStreamRequest* req,
             ::google::cloud::bigquery::storage::v1::SplitReadStreamResponse* resp) {
               return service->SplitReadStream(ctx, req, resp);
             }, this)));
}

BigQueryRead::Service::~Service() {
}

::grpc::Status BigQueryRead::Service::CreateReadSession(::grpc::ServerContext* context, const ::google::cloud::bigquery::storage::v1::CreateReadSessionRequest* request, ::google::cloud::bigquery::storage::v1::ReadSession* response) {
  (void) context;
  (void) request;
  (void) response;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

::grpc::Status BigQueryRead::Service::ReadRows(::grpc::ServerContext* context, const ::google::cloud::bigquery::storage::v1::ReadRowsRequest* request, ::grpc::ServerWriter< ::google::cloud::bigquery::storage::v1::ReadRowsResponse>* writer) {
  (void) context;
  (void) request;
  (void) writer;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

::grpc::Status BigQueryRead::Service::SplitReadStream(::grpc::ServerContext* context, const ::google::cloud::bigquery::storage::v1::SplitReadStreamRequest* request, ::google::cloud::bigquery::storage::v1::SplitReadStreamResponse* response) {
  (void) context;
  (void) request;
  (void) response;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}


static const char* BigQueryWrite_method_names[] = {
  "/google.cloud.bigquery.storage.v1.BigQueryWrite/CreateWriteStream",
  "/google.cloud.bigquery.storage.v1.BigQueryWrite/AppendRows",
  "/google.cloud.bigquery.storage.v1.BigQueryWrite/GetWriteStream",
  "/google.cloud.bigquery.storage.v1.BigQueryWrite/FinalizeWriteStream",
  "/google.cloud.bigquery.storage.v1.BigQueryWrite/BatchCommitWriteStreams",
  "/google.cloud.bigquery.storage.v1.BigQueryWrite/FlushRows",
};

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

BigQueryWrite::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options)
  : channel_(channel), rpcmethod_CreateWriteStream_(BigQueryWrite_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
  , rpcmethod_AppendRows_(BigQueryWrite_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::BIDI_STREAMING, channel)
  , rpcmethod_GetWriteStream_(BigQueryWrite_method_names[2], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
  , rpcmethod_FinalizeWriteStream_(BigQueryWrite_method_names[3], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
  , rpcmethod_BatchCommitWriteStreams_(BigQueryWrite_method_names[4], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
  , rpcmethod_FlushRows_(BigQueryWrite_method_names[5], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
  {}

::grpc::Status BigQueryWrite::Stub::CreateWriteStream(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::CreateWriteStreamRequest& request, ::google::cloud::bigquery::storage::v1::WriteStream* response) {
  return ::grpc::internal::BlockingUnaryCall< ::google::cloud::bigquery::storage::v1::CreateWriteStreamRequest, ::google::cloud::bigquery::storage::v1::WriteStream, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_CreateWriteStream_, context, request, response);
}

void BigQueryWrite::Stub::async::CreateWriteStream(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::CreateWriteStreamRequest* request, ::google::cloud::bigquery::storage::v1::WriteStream* response, std::function<void(::grpc::Status)> f) {
  ::grpc::internal::CallbackUnaryCall< ::google::cloud::bigquery::storage::v1::CreateWriteStreamRequest, ::google::cloud::bigquery::storage::v1::WriteStream, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_CreateWriteStream_, context, request, response, std::move(f));
}

void BigQueryWrite::Stub::async::CreateWriteStream(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::CreateWriteStreamRequest* request, ::google::cloud::bigquery::storage::v1::WriteStream* response, ::grpc::ClientUnaryReactor* reactor) {
  ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_CreateWriteStream_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader< ::google::cloud::bigquery::storage::v1::WriteStream>* BigQueryWrite::Stub::PrepareAsyncCreateWriteStreamRaw(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::CreateWriteStreamRequest& request, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::google::cloud::bigquery::storage::v1::WriteStream, ::google::cloud::bigquery::storage::v1::CreateWriteStreamRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_CreateWriteStream_, context, request);
}

::grpc::ClientAsyncResponseReader< ::google::cloud::bigquery::storage::v1::WriteStream>* BigQueryWrite::Stub::AsyncCreateWriteStreamRaw(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::CreateWriteStreamRequest& request, ::grpc::CompletionQueue* cq) {
  auto* result =
    this->PrepareAsyncCreateWriteStreamRaw(context, request, cq);
  result->StartCall();
  return result;
}

::grpc::ClientReaderWriter< ::google::cloud::bigquery::storage::v1::AppendRowsRequest, ::google::cloud::bigquery::storage::v1::AppendRowsResponse>* BigQueryWrite::Stub::AppendRowsRaw(::grpc::ClientContext* context) {
  return ::grpc::internal::ClientReaderWriterFactory< ::google::cloud::bigquery::storage::v1::AppendRowsRequest, ::google::cloud::bigquery::storage::v1::AppendRowsResponse>::Create(channel_.get(), rpcmethod_AppendRows_, context);
}

void BigQueryWrite::Stub::async::AppendRows(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::google::cloud::bigquery::storage::v1::AppendRowsRequest,::google::cloud::bigquery::storage::v1::AppendRowsResponse>* reactor) {
  ::grpc::internal::ClientCallbackReaderWriterFactory< ::google::cloud::bigquery::storage::v1::AppendRowsRequest,::google::cloud::bigquery::storage::v1::AppendRowsResponse>::Create(stub_->channel_.get(), stub_->rpcmethod_AppendRows_, context, reactor);
}

::grpc::ClientAsyncReaderWriter< ::google::cloud::bigquery::storage::v1::AppendRowsRequest, ::google::cloud::bigquery::storage::v1::AppendRowsResponse>* BigQueryWrite::Stub::AsyncAppendRowsRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
  return ::grpc::internal::ClientAsyncReaderWriterFactory< ::google::cloud::bigquery::storage::v1::AppendRowsRequest, ::google::cloud::bigquery::storage::v1::AppendRowsResponse>::Create(channel_.get(), cq, rpcmethod_AppendRows_, context, true, tag);
}

::grpc::ClientAsyncReaderWriter< ::google::cloud::bigquery::storage::v1::AppendRowsRequest, ::google::cloud::bigquery::storage::v1::AppendRowsResponse>* BigQueryWrite::Stub::PrepareAsyncAppendRowsRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncReaderWriterFactory< ::google::cloud::bigquery::storage::v1::AppendRowsRequest, ::google::cloud::bigquery::storage::v1::AppendRowsResponse>::Create(channel_.get(), cq, rpcmethod_AppendRows_, context, false, nullptr);
}

::grpc::Status BigQueryWrite::Stub::GetWriteStream(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::GetWriteStreamRequest& request, ::google::cloud::bigquery::storage::v1::WriteStream* response) {
  return ::grpc::internal::BlockingUnaryCall< ::google::cloud::bigquery::storage::v1::GetWriteStreamRequest, ::google::cloud::bigquery::storage::v1::WriteStream, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_GetWriteStream_, context, request, response);
}

void BigQueryWrite::Stub::async::GetWriteStream(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::GetWriteStreamRequest* request, ::google::cloud::bigquery::storage::v1::WriteStream* response, std::function<void(::grpc::Status)> f) {
  ::grpc::internal::CallbackUnaryCall< ::google::cloud::bigquery::storage::v1::GetWriteStreamRequest, ::google::cloud::bigquery::storage::v1::WriteStream, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetWriteStream_, context, request, response, std::move(f));
}

void BigQueryWrite::Stub::async::GetWriteStream(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::GetWriteStreamRequest* request, ::google::cloud::bigquery::storage::v1::WriteStream* response, ::grpc::ClientUnaryReactor* reactor) {
  ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetWriteStream_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader< ::google::cloud::bigquery::storage::v1::WriteStream>* BigQueryWrite::Stub::PrepareAsyncGetWriteStreamRaw(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::GetWriteStreamRequest& request, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::google::cloud::bigquery::storage::v1::WriteStream, ::google::cloud::bigquery::storage::v1::GetWriteStreamRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_GetWriteStream_, context, request);
}

::grpc::ClientAsyncResponseReader< ::google::cloud::bigquery::storage::v1::WriteStream>* BigQueryWrite::Stub::AsyncGetWriteStreamRaw(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::GetWriteStreamRequest& request, ::grpc::CompletionQueue* cq) {
  auto* result =
    this->PrepareAsyncGetWriteStreamRaw(context, request, cq);
  result->StartCall();
  return result;
}

::grpc::Status BigQueryWrite::Stub::FinalizeWriteStream(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::FinalizeWriteStreamRequest& request, ::google::cloud::bigquery::storage::v1::FinalizeWriteStreamResponse* response) {
  return ::grpc::internal::BlockingUnaryCall< ::google::cloud::bigquery::storage::v1::FinalizeWriteStreamRequest, ::google::cloud::bigquery::storage::v1::FinalizeWriteStreamResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_FinalizeWriteStream_, context, request, response);
}

void BigQueryWrite::Stub::async::FinalizeWriteStream(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::FinalizeWriteStreamRequest* request, ::google::cloud::bigquery::storage::v1::FinalizeWriteStreamResponse* response, std::function<void(::grpc::Status)> f) {
  ::grpc::internal::CallbackUnaryCall< ::google::cloud::bigquery::storage::v1::FinalizeWriteStreamRequest, ::google::cloud::bigquery::storage::v1::FinalizeWriteStreamResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_FinalizeWriteStream_, context, request, response, std::move(f));
}

void BigQueryWrite::Stub::async::FinalizeWriteStream(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::FinalizeWriteStreamRequest* request, ::google::cloud::bigquery::storage::v1::FinalizeWriteStreamResponse* response, ::grpc::ClientUnaryReactor* reactor) {
  ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_FinalizeWriteStream_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader< ::google::cloud::bigquery::storage::v1::FinalizeWriteStreamResponse>* BigQueryWrite::Stub::PrepareAsyncFinalizeWriteStreamRaw(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::FinalizeWriteStreamRequest& request, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::google::cloud::bigquery::storage::v1::FinalizeWriteStreamResponse, ::google::cloud::bigquery::storage::v1::FinalizeWriteStreamRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_FinalizeWriteStream_, context, request);
}

::grpc::ClientAsyncResponseReader< ::google::cloud::bigquery::storage::v1::FinalizeWriteStreamResponse>* BigQueryWrite::Stub::AsyncFinalizeWriteStreamRaw(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::FinalizeWriteStreamRequest& request, ::grpc::CompletionQueue* cq) {
  auto* result =
    this->PrepareAsyncFinalizeWriteStreamRaw(context, request, cq);
  result->StartCall();
  return result;
}

::grpc::Status BigQueryWrite::Stub::BatchCommitWriteStreams(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::BatchCommitWriteStreamsRequest& request, ::google::cloud::bigquery::storage::v1::BatchCommitWriteStreamsResponse* response) {
  return ::grpc::internal::BlockingUnaryCall< ::google::cloud::bigquery::storage::v1::BatchCommitWriteStreamsRequest, ::google::cloud::bigquery::storage::v1::BatchCommitWriteStreamsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_BatchCommitWriteStreams_, context, request, response);
}

void BigQueryWrite::Stub::async::BatchCommitWriteStreams(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::BatchCommitWriteStreamsRequest* request, ::google::cloud::bigquery::storage::v1::BatchCommitWriteStreamsResponse* response, std::function<void(::grpc::Status)> f) {
  ::grpc::internal::CallbackUnaryCall< ::google::cloud::bigquery::storage::v1::BatchCommitWriteStreamsRequest, ::google::cloud::bigquery::storage::v1::BatchCommitWriteStreamsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_BatchCommitWriteStreams_, context, request, response, std::move(f));
}

void BigQueryWrite::Stub::async::BatchCommitWriteStreams(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::BatchCommitWriteStreamsRequest* request, ::google::cloud::bigquery::storage::v1::BatchCommitWriteStreamsResponse* response, ::grpc::ClientUnaryReactor* reactor) {
  ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_BatchCommitWriteStreams_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader< ::google::cloud::bigquery::storage::v1::BatchCommitWriteStreamsResponse>* BigQueryWrite::Stub::PrepareAsyncBatchCommitWriteStreamsRaw(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::BatchCommitWriteStreamsRequest& request, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::google::cloud::bigquery::storage::v1::BatchCommitWriteStreamsResponse, ::google::cloud::bigquery::storage::v1::BatchCommitWriteStreamsRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_BatchCommitWriteStreams_, context, request);
}

::grpc::ClientAsyncResponseReader< ::google::cloud::bigquery::storage::v1::BatchCommitWriteStreamsResponse>* BigQueryWrite::Stub::AsyncBatchCommitWriteStreamsRaw(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::BatchCommitWriteStreamsRequest& request, ::grpc::CompletionQueue* cq) {
  auto* result =
    this->PrepareAsyncBatchCommitWriteStreamsRaw(context, request, cq);
  result->StartCall();
  return result;
}

::grpc::Status BigQueryWrite::Stub::FlushRows(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::FlushRowsRequest& request, ::google::cloud::bigquery::storage::v1::FlushRowsResponse* response) {
  return ::grpc::internal::BlockingUnaryCall< ::google::cloud::bigquery::storage::v1::FlushRowsRequest, ::google::cloud::bigquery::storage::v1::FlushRowsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_FlushRows_, context, request, response);
}

void BigQueryWrite::Stub::async::FlushRows(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::FlushRowsRequest* request, ::google::cloud::bigquery::storage::v1::FlushRowsResponse* response, std::function<void(::grpc::Status)> f) {
  ::grpc::internal::CallbackUnaryCall< ::google::cloud::bigquery::storage::v1::FlushRowsRequest, ::google::cloud::bigquery::storage::v1::FlushRowsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_FlushRows_, context, request, response, std::move(f));
}

void BigQueryWrite::Stub::async::FlushRows(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::FlushRowsRequest* request, ::google::cloud::bigquery::storage::v1::FlushRowsResponse* response, ::grpc::ClientUnaryReactor* reactor) {
  ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_FlushRows_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader< ::google::cloud::bigquery::storage::v1::FlushRowsResponse>* BigQueryWrite::Stub::PrepareAsyncFlushRowsRaw(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::FlushRowsRequest& request, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::google::cloud::bigquery::storage::v1::FlushRowsResponse, ::google::cloud::bigquery::storage::v1::FlushRowsRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_FlushRows_, context, request);
}

::grpc::ClientAsyncResponseReader< ::google::cloud::bigquery::storage::v1::FlushRowsResponse>* BigQueryWrite::Stub::AsyncFlushRowsRaw(::grpc::ClientContext* context, const ::google::cloud::bigquery::storage::v1::FlushRowsRequest& request, ::grpc::CompletionQueue* cq) {
  auto* result =
    this->PrepareAsyncFlushRowsRaw(context, request, cq);
  result->StartCall();
  return result;
}

BigQueryWrite::Service::Service() {
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      BigQueryWrite_method_names[0],
      ::grpc::internal::RpcMethod::NORMAL_RPC,
      new ::grpc::internal::RpcMethodHandler< BigQueryWrite::Service, ::google::cloud::bigquery::storage::v1::CreateWriteStreamRequest, ::google::cloud::bigquery::storage::v1::WriteStream, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
          [](BigQueryWrite::Service* service,
             ::grpc::ServerContext* ctx,
             const ::google::cloud::bigquery::storage::v1::CreateWriteStreamRequest* req,
             ::google::cloud::bigquery::storage::v1::WriteStream* resp) {
               return service->CreateWriteStream(ctx, req, resp);
             }, this)));
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      BigQueryWrite_method_names[1],
      ::grpc::internal::RpcMethod::BIDI_STREAMING,
      new ::grpc::internal::BidiStreamingHandler< BigQueryWrite::Service, ::google::cloud::bigquery::storage::v1::AppendRowsRequest, ::google::cloud::bigquery::storage::v1::AppendRowsResponse>(
          [](BigQueryWrite::Service* service,
             ::grpc::ServerContext* ctx,
             ::grpc::ServerReaderWriter<::google::cloud::bigquery::storage::v1::AppendRowsResponse,
             ::google::cloud::bigquery::storage::v1::AppendRowsRequest>* stream) {
               return service->AppendRows(ctx, stream);
             }, this)));
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      BigQueryWrite_method_names[2],
      ::grpc::internal::RpcMethod::NORMAL_RPC,
      new ::grpc::internal::RpcMethodHandler< BigQueryWrite::Service, ::google::cloud::bigquery::storage::v1::GetWriteStreamRequest, ::google::cloud::bigquery::storage::v1::WriteStream, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
          [](BigQueryWrite::Service* service,
             ::grpc::ServerContext* ctx,
             const ::google::cloud::bigquery::storage::v1::GetWriteStreamRequest* req,
             ::google::cloud::bigquery::storage::v1::WriteStream* resp) {
               return service->GetWriteStream(ctx, req, resp);
             }, this)));
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      BigQueryWrite_method_names[3],
      ::grpc::internal::RpcMethod::NORMAL_RPC,
      new ::grpc::internal::RpcMethodHandler< BigQueryWrite::Service, ::google::cloud::bigquery::storage::v1::FinalizeWriteStreamRequest, ::google::cloud::bigquery::storage::v1::FinalizeWriteStreamResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
          [](BigQueryWrite::Service* service,
             ::grpc::ServerContext* ctx,
             const ::google::cloud::bigquery::storage::v1::FinalizeWriteStreamRequest* req,
             ::google::cloud::bigquery::storage::v1::FinalizeWriteStreamResponse* resp) {
               return service->FinalizeWriteStream(ctx, req, resp);
             }, this)));
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      BigQueryWrite_method_names[4],
      ::grpc::internal::RpcMethod::NORMAL_RPC,
      new ::grpc::internal::RpcMethodHandler< BigQueryWrite::Service, ::google::cloud::bigquery::storage::v1::BatchCommitWriteStreamsRequest, ::google::cloud::bigquery::storage::v1::BatchCommitWriteStreamsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
          [](BigQueryWrite::Service* service,
             ::grpc::ServerContext* ctx,
             const ::google::cloud::bigquery::storage::v1::BatchCommitWriteStreamsRequest* req,
             ::google::cloud::bigquery::storage::v1::BatchCommitWriteStreamsResponse* resp) {
               return service->BatchCommitWriteStreams(ctx, req, resp);
             }, this)));
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      BigQueryWrite_method_names[5],
      ::grpc::internal::RpcMethod::NORMAL_RPC,
      new ::grpc::internal::RpcMethodHandler< BigQueryWrite::Service, ::google::cloud::bigquery::storage::v1::FlushRowsRequest, ::google::cloud::bigquery::storage::v1::FlushRowsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
          [](BigQueryWrite::Service* service,
             ::grpc::ServerContext* ctx,
             const ::google::cloud::bigquery::storage::v1::FlushRowsRequest* req,
             ::google::cloud::bigquery::storage::v1::FlushRowsResponse* resp) {
               return service->FlushRows(ctx, req, resp);
             }, this)));
}

BigQueryWrite::Service::~Service() {
}

::grpc::Status BigQueryWrite::Service::CreateWriteStream(::grpc::ServerContext* context, const ::google::cloud::bigquery::storage::v1::CreateWriteStreamRequest* request, ::google::cloud::bigquery::storage::v1::WriteStream* response) {
  (void) context;
  (void) request;
  (void) response;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

::grpc::Status BigQueryWrite::Service::AppendRows(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::google::cloud::bigquery::storage::v1::AppendRowsResponse, ::google::cloud::bigquery::storage::v1::AppendRowsRequest>* stream) {
  (void) context;
  (void) stream;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

::grpc::Status BigQueryWrite::Service::GetWriteStream(::grpc::ServerContext* context, const ::google::cloud::bigquery::storage::v1::GetWriteStreamRequest* request, ::google::cloud::bigquery::storage::v1::WriteStream* response) {
  (void) context;
  (void) request;
  (void) response;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

::grpc::Status BigQueryWrite::Service::FinalizeWriteStream(::grpc::ServerContext* context, const ::google::cloud::bigquery::storage::v1::FinalizeWriteStreamRequest* request, ::google::cloud::bigquery::storage::v1::FinalizeWriteStreamResponse* response) {
  (void) context;
  (void) request;
  (void) response;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

::grpc::Status BigQueryWrite::Service::BatchCommitWriteStreams(::grpc::ServerContext* context, const ::google::cloud::bigquery::storage::v1::BatchCommitWriteStreamsRequest* request, ::google::cloud::bigquery::storage::v1::BatchCommitWriteStreamsResponse* response) {
  (void) context;
  (void) request;
  (void) response;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

::grpc::Status BigQueryWrite::Service::FlushRows(::grpc::ServerContext* context, const ::google::cloud::bigquery::storage::v1::FlushRowsRequest* request, ::google::cloud::bigquery::storage::v1::FlushRowsResponse* response) {
  (void) context;
  (void) request;
  (void) response;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}


}  // namespace google
}  // namespace cloud
}  // namespace bigquery
}  // namespace storage
}  // namespace v1
#include <grpcpp/ports_undef.inc>

