blob: a35f91e7f747198975f5f4ec6629cd2ee180497d [file] [log] [blame]
Andrea Campanellac795b7d2021-04-14 13:24:44 +02001// 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
8#include <functional>
9#include <grpcpp/impl/codegen/async_stream.h>
10#include <grpcpp/impl/codegen/async_unary_call.h>
11#include <grpcpp/impl/codegen/channel_interface.h>
12#include <grpcpp/impl/codegen/client_unary_call.h>
13#include <grpcpp/impl/codegen/client_callback.h>
14#include <grpcpp/impl/codegen/message_allocator.h>
15#include <grpcpp/impl/codegen/method_handler.h>
16#include <grpcpp/impl/codegen/rpc_service_method.h>
17#include <grpcpp/impl/codegen/server_callback.h>
18#include <grpcpp/impl/codegen/server_callback_handlers.h>
19#include <grpcpp/impl/codegen/server_context.h>
20#include <grpcpp/impl/codegen/service_type.h>
21#include <grpcpp/impl/codegen/sync_stream.h>
22namespace dmi {
23
24static const char* NativeMetricsManagementService_method_names[] = {
25 "/dmi.NativeMetricsManagementService/ListMetrics",
26 "/dmi.NativeMetricsManagementService/UpdateMetricsConfiguration",
27 "/dmi.NativeMetricsManagementService/GetMetric",
Chandrakanth Nalkudre Gowda68590a42021-04-22 15:19:21 +053028 "/dmi.NativeMetricsManagementService/StreamMetrics",
Andrea Campanellac795b7d2021-04-14 13:24:44 +020029};
30
31std::unique_ptr< NativeMetricsManagementService::Stub> NativeMetricsManagementService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) {
32 (void)options;
33 std::unique_ptr< NativeMetricsManagementService::Stub> stub(new NativeMetricsManagementService::Stub(channel));
34 return stub;
35}
36
37NativeMetricsManagementService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel)
38 : channel_(channel), rpcmethod_ListMetrics_(NativeMetricsManagementService_method_names[0], ::grpc::internal::RpcMethod::NORMAL_RPC, channel)
39 , rpcmethod_UpdateMetricsConfiguration_(NativeMetricsManagementService_method_names[1], ::grpc::internal::RpcMethod::NORMAL_RPC, channel)
40 , rpcmethod_GetMetric_(NativeMetricsManagementService_method_names[2], ::grpc::internal::RpcMethod::NORMAL_RPC, channel)
Chandrakanth Nalkudre Gowda68590a42021-04-22 15:19:21 +053041 , rpcmethod_StreamMetrics_(NativeMetricsManagementService_method_names[3], ::grpc::internal::RpcMethod::SERVER_STREAMING, channel)
Andrea Campanellac795b7d2021-04-14 13:24:44 +020042 {}
43
44::grpc::Status NativeMetricsManagementService::Stub::ListMetrics(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::dmi::ListMetricsResponse* response) {
45 return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_ListMetrics_, context, request, response);
46}
47
48void NativeMetricsManagementService::Stub::experimental_async::ListMetrics(::grpc::ClientContext* context, const ::dmi::HardwareID* request, ::dmi::ListMetricsResponse* response, std::function<void(::grpc::Status)> f) {
49 ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_ListMetrics_, context, request, response, std::move(f));
50}
51
52void NativeMetricsManagementService::Stub::experimental_async::ListMetrics(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::ListMetricsResponse* response, std::function<void(::grpc::Status)> f) {
53 ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_ListMetrics_, context, request, response, std::move(f));
54}
55
56void NativeMetricsManagementService::Stub::experimental_async::ListMetrics(::grpc::ClientContext* context, const ::dmi::HardwareID* request, ::dmi::ListMetricsResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
57 ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_ListMetrics_, context, request, response, reactor);
58}
59
60void NativeMetricsManagementService::Stub::experimental_async::ListMetrics(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::ListMetricsResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
61 ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_ListMetrics_, context, request, response, reactor);
62}
63
64::grpc::ClientAsyncResponseReader< ::dmi::ListMetricsResponse>* NativeMetricsManagementService::Stub::AsyncListMetricsRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) {
65 return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::dmi::ListMetricsResponse>::Create(channel_.get(), cq, rpcmethod_ListMetrics_, context, request, true);
66}
67
68::grpc::ClientAsyncResponseReader< ::dmi::ListMetricsResponse>* NativeMetricsManagementService::Stub::PrepareAsyncListMetricsRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) {
69 return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::dmi::ListMetricsResponse>::Create(channel_.get(), cq, rpcmethod_ListMetrics_, context, request, false);
70}
71
72::grpc::Status NativeMetricsManagementService::Stub::UpdateMetricsConfiguration(::grpc::ClientContext* context, const ::dmi::MetricsConfigurationRequest& request, ::dmi::MetricsConfigurationResponse* response) {
73 return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_UpdateMetricsConfiguration_, context, request, response);
74}
75
76void NativeMetricsManagementService::Stub::experimental_async::UpdateMetricsConfiguration(::grpc::ClientContext* context, const ::dmi::MetricsConfigurationRequest* request, ::dmi::MetricsConfigurationResponse* response, std::function<void(::grpc::Status)> f) {
77 ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_UpdateMetricsConfiguration_, context, request, response, std::move(f));
78}
79
80void NativeMetricsManagementService::Stub::experimental_async::UpdateMetricsConfiguration(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::MetricsConfigurationResponse* response, std::function<void(::grpc::Status)> f) {
81 ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_UpdateMetricsConfiguration_, context, request, response, std::move(f));
82}
83
84void NativeMetricsManagementService::Stub::experimental_async::UpdateMetricsConfiguration(::grpc::ClientContext* context, const ::dmi::MetricsConfigurationRequest* request, ::dmi::MetricsConfigurationResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
85 ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_UpdateMetricsConfiguration_, context, request, response, reactor);
86}
87
88void NativeMetricsManagementService::Stub::experimental_async::UpdateMetricsConfiguration(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::MetricsConfigurationResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
89 ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_UpdateMetricsConfiguration_, context, request, response, reactor);
90}
91
92::grpc::ClientAsyncResponseReader< ::dmi::MetricsConfigurationResponse>* NativeMetricsManagementService::Stub::AsyncUpdateMetricsConfigurationRaw(::grpc::ClientContext* context, const ::dmi::MetricsConfigurationRequest& request, ::grpc::CompletionQueue* cq) {
93 return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::dmi::MetricsConfigurationResponse>::Create(channel_.get(), cq, rpcmethod_UpdateMetricsConfiguration_, context, request, true);
94}
95
96::grpc::ClientAsyncResponseReader< ::dmi::MetricsConfigurationResponse>* NativeMetricsManagementService::Stub::PrepareAsyncUpdateMetricsConfigurationRaw(::grpc::ClientContext* context, const ::dmi::MetricsConfigurationRequest& request, ::grpc::CompletionQueue* cq) {
97 return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::dmi::MetricsConfigurationResponse>::Create(channel_.get(), cq, rpcmethod_UpdateMetricsConfiguration_, context, request, false);
98}
99
100::grpc::Status NativeMetricsManagementService::Stub::GetMetric(::grpc::ClientContext* context, const ::dmi::GetMetricRequest& request, ::dmi::GetMetricResponse* response) {
101 return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_GetMetric_, context, request, response);
102}
103
104void NativeMetricsManagementService::Stub::experimental_async::GetMetric(::grpc::ClientContext* context, const ::dmi::GetMetricRequest* request, ::dmi::GetMetricResponse* response, std::function<void(::grpc::Status)> f) {
105 ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_GetMetric_, context, request, response, std::move(f));
106}
107
108void NativeMetricsManagementService::Stub::experimental_async::GetMetric(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::GetMetricResponse* response, std::function<void(::grpc::Status)> f) {
109 ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_GetMetric_, context, request, response, std::move(f));
110}
111
112void NativeMetricsManagementService::Stub::experimental_async::GetMetric(::grpc::ClientContext* context, const ::dmi::GetMetricRequest* request, ::dmi::GetMetricResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
113 ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_GetMetric_, context, request, response, reactor);
114}
115
116void NativeMetricsManagementService::Stub::experimental_async::GetMetric(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::GetMetricResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) {
117 ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_GetMetric_, context, request, response, reactor);
118}
119
120::grpc::ClientAsyncResponseReader< ::dmi::GetMetricResponse>* NativeMetricsManagementService::Stub::AsyncGetMetricRaw(::grpc::ClientContext* context, const ::dmi::GetMetricRequest& request, ::grpc::CompletionQueue* cq) {
121 return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::dmi::GetMetricResponse>::Create(channel_.get(), cq, rpcmethod_GetMetric_, context, request, true);
122}
123
124::grpc::ClientAsyncResponseReader< ::dmi::GetMetricResponse>* NativeMetricsManagementService::Stub::PrepareAsyncGetMetricRaw(::grpc::ClientContext* context, const ::dmi::GetMetricRequest& request, ::grpc::CompletionQueue* cq) {
125 return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::dmi::GetMetricResponse>::Create(channel_.get(), cq, rpcmethod_GetMetric_, context, request, false);
126}
127
Chandrakanth Nalkudre Gowda68590a42021-04-22 15:19:21 +0530128::grpc::ClientReader< ::dmi::Metric>* NativeMetricsManagementService::Stub::StreamMetricsRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request) {
129 return ::grpc_impl::internal::ClientReaderFactory< ::dmi::Metric>::Create(channel_.get(), rpcmethod_StreamMetrics_, context, request);
130}
131
132void NativeMetricsManagementService::Stub::experimental_async::StreamMetrics(::grpc::ClientContext* context, ::google::protobuf::Empty* request, ::grpc::experimental::ClientReadReactor< ::dmi::Metric>* reactor) {
133 ::grpc_impl::internal::ClientCallbackReaderFactory< ::dmi::Metric>::Create(stub_->channel_.get(), stub_->rpcmethod_StreamMetrics_, context, request, reactor);
134}
135
136::grpc::ClientAsyncReader< ::dmi::Metric>* NativeMetricsManagementService::Stub::AsyncStreamMetricsRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq, void* tag) {
137 return ::grpc_impl::internal::ClientAsyncReaderFactory< ::dmi::Metric>::Create(channel_.get(), cq, rpcmethod_StreamMetrics_, context, request, true, tag);
138}
139
140::grpc::ClientAsyncReader< ::dmi::Metric>* NativeMetricsManagementService::Stub::PrepareAsyncStreamMetricsRaw(::grpc::ClientContext* context, const ::google::protobuf::Empty& request, ::grpc::CompletionQueue* cq) {
141 return ::grpc_impl::internal::ClientAsyncReaderFactory< ::dmi::Metric>::Create(channel_.get(), cq, rpcmethod_StreamMetrics_, context, request, false, nullptr);
142}
143
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200144NativeMetricsManagementService::Service::Service() {
145 AddMethod(new ::grpc::internal::RpcServiceMethod(
146 NativeMetricsManagementService_method_names[0],
147 ::grpc::internal::RpcMethod::NORMAL_RPC,
148 new ::grpc::internal::RpcMethodHandler< NativeMetricsManagementService::Service, ::dmi::HardwareID, ::dmi::ListMetricsResponse>(
149 [](NativeMetricsManagementService::Service* service,
150 ::grpc_impl::ServerContext* ctx,
151 const ::dmi::HardwareID* req,
152 ::dmi::ListMetricsResponse* resp) {
153 return service->ListMetrics(ctx, req, resp);
154 }, this)));
155 AddMethod(new ::grpc::internal::RpcServiceMethod(
156 NativeMetricsManagementService_method_names[1],
157 ::grpc::internal::RpcMethod::NORMAL_RPC,
158 new ::grpc::internal::RpcMethodHandler< NativeMetricsManagementService::Service, ::dmi::MetricsConfigurationRequest, ::dmi::MetricsConfigurationResponse>(
159 [](NativeMetricsManagementService::Service* service,
160 ::grpc_impl::ServerContext* ctx,
161 const ::dmi::MetricsConfigurationRequest* req,
162 ::dmi::MetricsConfigurationResponse* resp) {
163 return service->UpdateMetricsConfiguration(ctx, req, resp);
164 }, this)));
165 AddMethod(new ::grpc::internal::RpcServiceMethod(
166 NativeMetricsManagementService_method_names[2],
167 ::grpc::internal::RpcMethod::NORMAL_RPC,
168 new ::grpc::internal::RpcMethodHandler< NativeMetricsManagementService::Service, ::dmi::GetMetricRequest, ::dmi::GetMetricResponse>(
169 [](NativeMetricsManagementService::Service* service,
170 ::grpc_impl::ServerContext* ctx,
171 const ::dmi::GetMetricRequest* req,
172 ::dmi::GetMetricResponse* resp) {
173 return service->GetMetric(ctx, req, resp);
174 }, this)));
Chandrakanth Nalkudre Gowda68590a42021-04-22 15:19:21 +0530175 AddMethod(new ::grpc::internal::RpcServiceMethod(
176 NativeMetricsManagementService_method_names[3],
177 ::grpc::internal::RpcMethod::SERVER_STREAMING,
178 new ::grpc::internal::ServerStreamingHandler< NativeMetricsManagementService::Service, ::google::protobuf::Empty, ::dmi::Metric>(
179 [](NativeMetricsManagementService::Service* service,
180 ::grpc_impl::ServerContext* ctx,
181 const ::google::protobuf::Empty* req,
182 ::grpc_impl::ServerWriter<::dmi::Metric>* writer) {
183 return service->StreamMetrics(ctx, req, writer);
184 }, this)));
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200185}
186
187NativeMetricsManagementService::Service::~Service() {
188}
189
190::grpc::Status NativeMetricsManagementService::Service::ListMetrics(::grpc::ServerContext* context, const ::dmi::HardwareID* request, ::dmi::ListMetricsResponse* response) {
191 (void) context;
192 (void) request;
193 (void) response;
194 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
195}
196
197::grpc::Status NativeMetricsManagementService::Service::UpdateMetricsConfiguration(::grpc::ServerContext* context, const ::dmi::MetricsConfigurationRequest* request, ::dmi::MetricsConfigurationResponse* response) {
198 (void) context;
199 (void) request;
200 (void) response;
201 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
202}
203
204::grpc::Status NativeMetricsManagementService::Service::GetMetric(::grpc::ServerContext* context, const ::dmi::GetMetricRequest* request, ::dmi::GetMetricResponse* response) {
205 (void) context;
206 (void) request;
207 (void) response;
208 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
209}
210
Chandrakanth Nalkudre Gowda68590a42021-04-22 15:19:21 +0530211::grpc::Status NativeMetricsManagementService::Service::StreamMetrics(::grpc::ServerContext* context, const ::google::protobuf::Empty* request, ::grpc::ServerWriter< ::dmi::Metric>* writer) {
212 (void) context;
213 (void) request;
214 (void) writer;
215 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
216}
217
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200218
219} // namespace dmi
220