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

#include "deviceapis/device/v1/deviceapis_device_update_v1.pb.h"
#include "deviceapis/device/v1/deviceapis_device_update_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 deviceapis {
namespace device {
namespace v1 {

static const char* UpdateService_method_names[] = {
  "/deviceapis.device.v1.UpdateService/PostUpdateDownload",
  "/deviceapis.device.v1.UpdateService/PostUpdateApply",
};

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

UpdateService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options)
  : channel_(channel), rpcmethod_PostUpdateDownload_(UpdateService_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
  , rpcmethod_PostUpdateApply_(UpdateService_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel)
  {}

::grpc::Status UpdateService::Stub::PostUpdateDownload(::grpc::ClientContext* context, const ::deviceapis::device::v1::PostUpdateDownloadRequest& request, ::deviceapis::device::v1::PostUpdateDownloadResponse* response) {
  return ::grpc::internal::BlockingUnaryCall< ::deviceapis::device::v1::PostUpdateDownloadRequest, ::deviceapis::device::v1::PostUpdateDownloadResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_PostUpdateDownload_, context, request, response);
}

void UpdateService::Stub::async::PostUpdateDownload(::grpc::ClientContext* context, const ::deviceapis::device::v1::PostUpdateDownloadRequest* request, ::deviceapis::device::v1::PostUpdateDownloadResponse* response, std::function<void(::grpc::Status)> f) {
  ::grpc::internal::CallbackUnaryCall< ::deviceapis::device::v1::PostUpdateDownloadRequest, ::deviceapis::device::v1::PostUpdateDownloadResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_PostUpdateDownload_, context, request, response, std::move(f));
}

void UpdateService::Stub::async::PostUpdateDownload(::grpc::ClientContext* context, const ::deviceapis::device::v1::PostUpdateDownloadRequest* request, ::deviceapis::device::v1::PostUpdateDownloadResponse* response, ::grpc::ClientUnaryReactor* reactor) {
  ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_PostUpdateDownload_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader< ::deviceapis::device::v1::PostUpdateDownloadResponse>* UpdateService::Stub::PrepareAsyncPostUpdateDownloadRaw(::grpc::ClientContext* context, const ::deviceapis::device::v1::PostUpdateDownloadRequest& request, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::deviceapis::device::v1::PostUpdateDownloadResponse, ::deviceapis::device::v1::PostUpdateDownloadRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_PostUpdateDownload_, context, request);
}

::grpc::ClientAsyncResponseReader< ::deviceapis::device::v1::PostUpdateDownloadResponse>* UpdateService::Stub::AsyncPostUpdateDownloadRaw(::grpc::ClientContext* context, const ::deviceapis::device::v1::PostUpdateDownloadRequest& request, ::grpc::CompletionQueue* cq) {
  auto* result =
    this->PrepareAsyncPostUpdateDownloadRaw(context, request, cq);
  result->StartCall();
  return result;
}

::grpc::Status UpdateService::Stub::PostUpdateApply(::grpc::ClientContext* context, const ::deviceapis::device::v1::PostUpdateApplyRequest& request, ::deviceapis::device::v1::PostUpdateApplyResponse* response) {
  return ::grpc::internal::BlockingUnaryCall< ::deviceapis::device::v1::PostUpdateApplyRequest, ::deviceapis::device::v1::PostUpdateApplyResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_PostUpdateApply_, context, request, response);
}

void UpdateService::Stub::async::PostUpdateApply(::grpc::ClientContext* context, const ::deviceapis::device::v1::PostUpdateApplyRequest* request, ::deviceapis::device::v1::PostUpdateApplyResponse* response, std::function<void(::grpc::Status)> f) {
  ::grpc::internal::CallbackUnaryCall< ::deviceapis::device::v1::PostUpdateApplyRequest, ::deviceapis::device::v1::PostUpdateApplyResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_PostUpdateApply_, context, request, response, std::move(f));
}

void UpdateService::Stub::async::PostUpdateApply(::grpc::ClientContext* context, const ::deviceapis::device::v1::PostUpdateApplyRequest* request, ::deviceapis::device::v1::PostUpdateApplyResponse* response, ::grpc::ClientUnaryReactor* reactor) {
  ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_PostUpdateApply_, context, request, response, reactor);
}

::grpc::ClientAsyncResponseReader< ::deviceapis::device::v1::PostUpdateApplyResponse>* UpdateService::Stub::PrepareAsyncPostUpdateApplyRaw(::grpc::ClientContext* context, const ::deviceapis::device::v1::PostUpdateApplyRequest& request, ::grpc::CompletionQueue* cq) {
  return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::deviceapis::device::v1::PostUpdateApplyResponse, ::deviceapis::device::v1::PostUpdateApplyRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_PostUpdateApply_, context, request);
}

::grpc::ClientAsyncResponseReader< ::deviceapis::device::v1::PostUpdateApplyResponse>* UpdateService::Stub::AsyncPostUpdateApplyRaw(::grpc::ClientContext* context, const ::deviceapis::device::v1::PostUpdateApplyRequest& request, ::grpc::CompletionQueue* cq) {
  auto* result =
    this->PrepareAsyncPostUpdateApplyRaw(context, request, cq);
  result->StartCall();
  return result;
}

UpdateService::Service::Service() {
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      UpdateService_method_names[0],
      ::grpc::internal::RpcMethod::NORMAL_RPC,
      new ::grpc::internal::RpcMethodHandler< UpdateService::Service, ::deviceapis::device::v1::PostUpdateDownloadRequest, ::deviceapis::device::v1::PostUpdateDownloadResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
          [](UpdateService::Service* service,
             ::grpc::ServerContext* ctx,
             const ::deviceapis::device::v1::PostUpdateDownloadRequest* req,
             ::deviceapis::device::v1::PostUpdateDownloadResponse* resp) {
               return service->PostUpdateDownload(ctx, req, resp);
             }, this)));
  AddMethod(new ::grpc::internal::RpcServiceMethod(
      UpdateService_method_names[1],
      ::grpc::internal::RpcMethod::NORMAL_RPC,
      new ::grpc::internal::RpcMethodHandler< UpdateService::Service, ::deviceapis::device::v1::PostUpdateApplyRequest, ::deviceapis::device::v1::PostUpdateApplyResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(
          [](UpdateService::Service* service,
             ::grpc::ServerContext* ctx,
             const ::deviceapis::device::v1::PostUpdateApplyRequest* req,
             ::deviceapis::device::v1::PostUpdateApplyResponse* resp) {
               return service->PostUpdateApply(ctx, req, resp);
             }, this)));
}

UpdateService::Service::~Service() {
}

::grpc::Status UpdateService::Service::PostUpdateDownload(::grpc::ServerContext* context, const ::deviceapis::device::v1::PostUpdateDownloadRequest* request, ::deviceapis::device::v1::PostUpdateDownloadResponse* response) {
  (void) context;
  (void) request;
  (void) response;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}

::grpc::Status UpdateService::Service::PostUpdateApply(::grpc::ServerContext* context, const ::deviceapis::device::v1::PostUpdateApplyRequest* request, ::deviceapis::device::v1::PostUpdateApplyResponse* response) {
  (void) context;
  (void) request;
  (void) response;
  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}


}  // namespace deviceapis
}  // namespace device
}  // namespace v1

