Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 1 | // Generated by the gRPC C++ plugin. |
| 2 | // If you make any local change, they will be lost. |
| 3 | // source: dmi/hw_metrics_mgmt_service.proto |
| 4 | |
| 5 | #include "dmi/hw_metrics_mgmt_service.pb.h" |
| 6 | #include "dmi/hw_metrics_mgmt_service.grpc.pb.h" |
| 7 | |
Andrea Campanella | fb09e7e | 2021-04-26 17:22:49 +0000 | [diff] [blame^] | 8 | #include <grpc++/impl/codegen/async_stream.h> |
| 9 | #include <grpc++/impl/codegen/async_unary_call.h> |
| 10 | #include <grpc++/impl/codegen/channel_interface.h> |
| 11 | #include <grpc++/impl/codegen/client_unary_call.h> |
| 12 | #include <grpc++/impl/codegen/method_handler_impl.h> |
| 13 | #include <grpc++/impl/codegen/rpc_service_method.h> |
| 14 | #include <grpc++/impl/codegen/service_type.h> |
| 15 | #include <grpc++/impl/codegen/sync_stream.h> |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 16 | namespace dmi { |
| 17 | |
| 18 | static const char* NativeMetricsManagementService_method_names[] = { |
| 19 | "/dmi.NativeMetricsManagementService/ListMetrics", |
| 20 | "/dmi.NativeMetricsManagementService/UpdateMetricsConfiguration", |
| 21 | "/dmi.NativeMetricsManagementService/GetMetric", |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 22 | "/dmi.NativeMetricsManagementService/StreamMetrics", |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 23 | }; |
| 24 | |
| 25 | std::unique_ptr< NativeMetricsManagementService::Stub> NativeMetricsManagementService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 26 | std::unique_ptr< NativeMetricsManagementService::Stub> stub(new NativeMetricsManagementService::Stub(channel)); |
| 27 | return stub; |
| 28 | } |
| 29 | |
| 30 | NativeMetricsManagementService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel) |
Andrea Campanella | fb09e7e | 2021-04-26 17:22:49 +0000 | [diff] [blame^] | 31 | : channel_(channel), rpcmethod_ListMetrics_(NativeMetricsManagementService_method_names[0], ::grpc::RpcMethod::NORMAL_RPC, channel) |
| 32 | , rpcmethod_UpdateMetricsConfiguration_(NativeMetricsManagementService_method_names[1], ::grpc::RpcMethod::NORMAL_RPC, channel) |
| 33 | , rpcmethod_GetMetric_(NativeMetricsManagementService_method_names[2], ::grpc::RpcMethod::NORMAL_RPC, channel) |
| 34 | , rpcmethod_StreamMetrics_(NativeMetricsManagementService_method_names[3], ::grpc::RpcMethod::SERVER_STREAMING, channel) |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 35 | {} |
| 36 | |
| 37 | ::grpc::Status NativeMetricsManagementService::Stub::ListMetrics(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::dmi::ListMetricsResponse* response) { |
Andrea Campanella | fb09e7e | 2021-04-26 17:22:49 +0000 | [diff] [blame^] | 38 | return ::grpc::BlockingUnaryCall(channel_.get(), rpcmethod_ListMetrics_, context, request, response); |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 39 | } |
| 40 | |
| 41 | ::grpc::ClientAsyncResponseReader< ::dmi::ListMetricsResponse>* NativeMetricsManagementService::Stub::AsyncListMetricsRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) { |
Andrea Campanella | fb09e7e | 2021-04-26 17:22:49 +0000 | [diff] [blame^] | 42 | return new ::grpc::ClientAsyncResponseReader< ::dmi::ListMetricsResponse>(channel_.get(), cq, rpcmethod_ListMetrics_, context, request); |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 43 | } |
| 44 | |
| 45 | ::grpc::Status NativeMetricsManagementService::Stub::UpdateMetricsConfiguration(::grpc::ClientContext* context, const ::dmi::MetricsConfigurationRequest& request, ::dmi::MetricsConfigurationResponse* response) { |
Andrea Campanella | fb09e7e | 2021-04-26 17:22:49 +0000 | [diff] [blame^] | 46 | return ::grpc::BlockingUnaryCall(channel_.get(), rpcmethod_UpdateMetricsConfiguration_, context, request, response); |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 47 | } |
| 48 | |
| 49 | ::grpc::ClientAsyncResponseReader< ::dmi::MetricsConfigurationResponse>* NativeMetricsManagementService::Stub::AsyncUpdateMetricsConfigurationRaw(::grpc::ClientContext* context, const ::dmi::MetricsConfigurationRequest& request, ::grpc::CompletionQueue* cq) { |
Andrea Campanella | fb09e7e | 2021-04-26 17:22:49 +0000 | [diff] [blame^] | 50 | return new ::grpc::ClientAsyncResponseReader< ::dmi::MetricsConfigurationResponse>(channel_.get(), cq, rpcmethod_UpdateMetricsConfiguration_, context, request); |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 51 | } |
| 52 | |
| 53 | ::grpc::Status NativeMetricsManagementService::Stub::GetMetric(::grpc::ClientContext* context, const ::dmi::GetMetricRequest& request, ::dmi::GetMetricResponse* response) { |
Andrea Campanella | fb09e7e | 2021-04-26 17:22:49 +0000 | [diff] [blame^] | 54 | return ::grpc::BlockingUnaryCall(channel_.get(), rpcmethod_GetMetric_, context, request, response); |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 55 | } |
| 56 | |
| 57 | ::grpc::ClientAsyncResponseReader< ::dmi::GetMetricResponse>* NativeMetricsManagementService::Stub::AsyncGetMetricRaw(::grpc::ClientContext* context, const ::dmi::GetMetricRequest& request, ::grpc::CompletionQueue* cq) { |
Andrea Campanella | fb09e7e | 2021-04-26 17:22:49 +0000 | [diff] [blame^] | 58 | return new ::grpc::ClientAsyncResponseReader< ::dmi::GetMetricResponse>(channel_.get(), cq, rpcmethod_GetMetric_, context, request); |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 59 | } |
| 60 | |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 61 | ::grpc::ClientReader< ::dmi::Metric>* NativeMetricsManagementService::Stub::StreamMetricsRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request) { |
Andrea Campanella | fb09e7e | 2021-04-26 17:22:49 +0000 | [diff] [blame^] | 62 | return new ::grpc::ClientReader< ::dmi::Metric>(channel_.get(), rpcmethod_StreamMetrics_, context, request); |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 63 | } |
| 64 | |
| 65 | ::grpc::ClientAsyncReader< ::dmi::Metric>* NativeMetricsManagementService::Stub::AsyncStreamMetricsRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq, void* tag) { |
Andrea Campanella | fb09e7e | 2021-04-26 17:22:49 +0000 | [diff] [blame^] | 66 | return new ::grpc::ClientAsyncReader< ::dmi::Metric>(channel_.get(), cq, rpcmethod_StreamMetrics_, context, request, tag); |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 67 | } |
| 68 | |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 69 | NativeMetricsManagementService::Service::Service() { |
Andrea Campanella | fb09e7e | 2021-04-26 17:22:49 +0000 | [diff] [blame^] | 70 | AddMethod(new ::grpc::RpcServiceMethod( |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 71 | NativeMetricsManagementService_method_names[0], |
Andrea Campanella | fb09e7e | 2021-04-26 17:22:49 +0000 | [diff] [blame^] | 72 | ::grpc::RpcMethod::NORMAL_RPC, |
| 73 | new ::grpc::RpcMethodHandler< NativeMetricsManagementService::Service, ::dmi::HardwareID, ::dmi::ListMetricsResponse>( |
| 74 | std::mem_fn(&NativeMetricsManagementService::Service::ListMetrics), this))); |
| 75 | AddMethod(new ::grpc::RpcServiceMethod( |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 76 | NativeMetricsManagementService_method_names[1], |
Andrea Campanella | fb09e7e | 2021-04-26 17:22:49 +0000 | [diff] [blame^] | 77 | ::grpc::RpcMethod::NORMAL_RPC, |
| 78 | new ::grpc::RpcMethodHandler< NativeMetricsManagementService::Service, ::dmi::MetricsConfigurationRequest, ::dmi::MetricsConfigurationResponse>( |
| 79 | std::mem_fn(&NativeMetricsManagementService::Service::UpdateMetricsConfiguration), this))); |
| 80 | AddMethod(new ::grpc::RpcServiceMethod( |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 81 | NativeMetricsManagementService_method_names[2], |
Andrea Campanella | fb09e7e | 2021-04-26 17:22:49 +0000 | [diff] [blame^] | 82 | ::grpc::RpcMethod::NORMAL_RPC, |
| 83 | new ::grpc::RpcMethodHandler< NativeMetricsManagementService::Service, ::dmi::GetMetricRequest, ::dmi::GetMetricResponse>( |
| 84 | std::mem_fn(&NativeMetricsManagementService::Service::GetMetric), this))); |
| 85 | AddMethod(new ::grpc::RpcServiceMethod( |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 86 | NativeMetricsManagementService_method_names[3], |
Andrea Campanella | fb09e7e | 2021-04-26 17:22:49 +0000 | [diff] [blame^] | 87 | ::grpc::RpcMethod::SERVER_STREAMING, |
| 88 | new ::grpc::ServerStreamingHandler< NativeMetricsManagementService::Service, ::google::protobuf::Empty, ::dmi::Metric>( |
| 89 | std::mem_fn(&NativeMetricsManagementService::Service::StreamMetrics), this))); |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 90 | } |
| 91 | |
| 92 | NativeMetricsManagementService::Service::~Service() { |
| 93 | } |
| 94 | |
| 95 | ::grpc::Status NativeMetricsManagementService::Service::ListMetrics(::grpc::ServerContext* context, const ::dmi::HardwareID* request, ::dmi::ListMetricsResponse* response) { |
| 96 | (void) context; |
| 97 | (void) request; |
| 98 | (void) response; |
| 99 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 100 | } |
| 101 | |
| 102 | ::grpc::Status NativeMetricsManagementService::Service::UpdateMetricsConfiguration(::grpc::ServerContext* context, const ::dmi::MetricsConfigurationRequest* request, ::dmi::MetricsConfigurationResponse* response) { |
| 103 | (void) context; |
| 104 | (void) request; |
| 105 | (void) response; |
| 106 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 107 | } |
| 108 | |
| 109 | ::grpc::Status NativeMetricsManagementService::Service::GetMetric(::grpc::ServerContext* context, const ::dmi::GetMetricRequest* request, ::dmi::GetMetricResponse* response) { |
| 110 | (void) context; |
| 111 | (void) request; |
| 112 | (void) response; |
| 113 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 114 | } |
| 115 | |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 116 | ::grpc::Status NativeMetricsManagementService::Service::StreamMetrics(::grpc::ServerContext* context, const ::google::protobuf::Empty* request, ::grpc::ServerWriter< ::dmi::Metric>* writer) { |
| 117 | (void) context; |
| 118 | (void) request; |
| 119 | (void) writer; |
| 120 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
| 121 | } |
| 122 | |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 123 | |
| 124 | } // namespace dmi |
| 125 | |