blob: 6cfebd2902b64e514bbee5b0f175f6e1a98760ab [file] [log] [blame]
Amit Ghosh09f28362020-06-12 21:52:19 +01001// Code generated by protoc-gen-go. DO NOT EDIT.
2// source: dmi/hw_metrics_mgmt_service.proto
3
4package dmi
5
6import (
7 context "context"
8 fmt "fmt"
9 proto "github.com/golang/protobuf/proto"
Chandrakanth Nalkudre Gowda68590a42021-04-22 15:19:21 +053010 empty "github.com/golang/protobuf/ptypes/empty"
Amit Ghosh09f28362020-06-12 21:52:19 +010011 grpc "google.golang.org/grpc"
Andrea Campanellac795b7d2021-04-14 13:24:44 +020012 codes "google.golang.org/grpc/codes"
13 status "google.golang.org/grpc/status"
Amit Ghosh09f28362020-06-12 21:52:19 +010014 math "math"
15)
16
17// Reference imports to suppress errors if they are not otherwise used.
18var _ = proto.Marshal
19var _ = fmt.Errorf
20var _ = math.Inf
21
22// This is a compile-time assertion to ensure that this generated file
23// is compatible with the proto package it is being compiled against.
24// A compilation error at this line likely means your copy of the
25// proto package needs to be updated.
26const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
27
28type MetricNames int32
29
30const (
31 MetricNames_METRIC_NAME_UNDEFINED MetricNames = 0
32 // FAN related metrics
33 MetricNames_METRIC_FAN_SPEED MetricNames = 1
34 // CPU related metrics
35 MetricNames_METRIC_CPU_TEMP MetricNames = 100
36 MetricNames_METRIC_CPU_USAGE_PERCENTAGE MetricNames = 101
37 // Transceiver related metrics
Abhilash laxmeshwarfbf836c2026-02-03 16:25:31 +053038 MetricNames_METRIC_TRANSCEIVER_TEMP MetricNames = 200
39 MetricNames_METRIC_TRANSCEIVER_VOLTAGE MetricNames = 201
40 MetricNames_METRIC_TRANSCEIVER_BIAS MetricNames = 202
41 MetricNames_METRIC_TRANSCEIVER_RX_POWER MetricNames = 203
42 MetricNames_METRIC_TRANSCEIVER_TX_POWER MetricNames = 204
43 MetricNames_METRIC_TRANSCEIVER_WAVELENGTH MetricNames = 205
44 MetricNames_METRIC_TRANSCEIVER_XGSPON_TX_POWER MetricNames = 206
Amit Ghosh09f28362020-06-12 21:52:19 +010045 // Disk related metrics
46 MetricNames_METRIC_DISK_TEMP MetricNames = 300
47 MetricNames_METRIC_DISK_CAPACITY MetricNames = 301
48 MetricNames_METRIC_DISK_USAGE MetricNames = 302
49 MetricNames_METRIC_DISK_USAGE_PERCENTAGE MetricNames = 303
50 MetricNames_METRIC_DISK_READ_WRITE_PERCENTAGE MetricNames = 304
51 MetricNames_METRIC_DISK_FAULTY_CELLS_PERCENTAGE MetricNames = 305
52 // RAM related metrics
53 MetricNames_METRIC_RAM_TEMP MetricNames = 400
54 MetricNames_METRIC_RAM_CAPACITY MetricNames = 401
55 MetricNames_METRIC_RAM_USAGE MetricNames = 402
56 MetricNames_METRIC_RAM_USAGE_PERCENTAGE MetricNames = 403
57 // Power related metrics
58 MetricNames_METRIC_POWER_MAX MetricNames = 500
59 MetricNames_METRIC_POWER_USAGE MetricNames = 501
60 MetricNames_METRIC_POWER_USAGE_PERCENTAGE MetricNames = 502
61 // Chassis related metrics
62 MetricNames_METRIC_INNER_SURROUNDING_TEMP MetricNames = 600
63)
64
65var MetricNames_name = map[int32]string{
66 0: "METRIC_NAME_UNDEFINED",
67 1: "METRIC_FAN_SPEED",
68 100: "METRIC_CPU_TEMP",
69 101: "METRIC_CPU_USAGE_PERCENTAGE",
70 200: "METRIC_TRANSCEIVER_TEMP",
71 201: "METRIC_TRANSCEIVER_VOLTAGE",
72 202: "METRIC_TRANSCEIVER_BIAS",
73 203: "METRIC_TRANSCEIVER_RX_POWER",
74 204: "METRIC_TRANSCEIVER_TX_POWER",
75 205: "METRIC_TRANSCEIVER_WAVELENGTH",
Abhilash laxmeshwarfbf836c2026-02-03 16:25:31 +053076 206: "METRIC_TRANSCEIVER_XGSPON_TX_POWER",
Amit Ghosh09f28362020-06-12 21:52:19 +010077 300: "METRIC_DISK_TEMP",
78 301: "METRIC_DISK_CAPACITY",
79 302: "METRIC_DISK_USAGE",
80 303: "METRIC_DISK_USAGE_PERCENTAGE",
81 304: "METRIC_DISK_READ_WRITE_PERCENTAGE",
82 305: "METRIC_DISK_FAULTY_CELLS_PERCENTAGE",
83 400: "METRIC_RAM_TEMP",
84 401: "METRIC_RAM_CAPACITY",
85 402: "METRIC_RAM_USAGE",
86 403: "METRIC_RAM_USAGE_PERCENTAGE",
87 500: "METRIC_POWER_MAX",
88 501: "METRIC_POWER_USAGE",
89 502: "METRIC_POWER_USAGE_PERCENTAGE",
90 600: "METRIC_INNER_SURROUNDING_TEMP",
91}
92
93var MetricNames_value = map[string]int32{
94 "METRIC_NAME_UNDEFINED": 0,
95 "METRIC_FAN_SPEED": 1,
96 "METRIC_CPU_TEMP": 100,
97 "METRIC_CPU_USAGE_PERCENTAGE": 101,
98 "METRIC_TRANSCEIVER_TEMP": 200,
99 "METRIC_TRANSCEIVER_VOLTAGE": 201,
100 "METRIC_TRANSCEIVER_BIAS": 202,
101 "METRIC_TRANSCEIVER_RX_POWER": 203,
102 "METRIC_TRANSCEIVER_TX_POWER": 204,
103 "METRIC_TRANSCEIVER_WAVELENGTH": 205,
Abhilash laxmeshwarfbf836c2026-02-03 16:25:31 +0530104 "METRIC_TRANSCEIVER_XGSPON_TX_POWER": 206,
Amit Ghosh09f28362020-06-12 21:52:19 +0100105 "METRIC_DISK_TEMP": 300,
106 "METRIC_DISK_CAPACITY": 301,
107 "METRIC_DISK_USAGE": 302,
108 "METRIC_DISK_USAGE_PERCENTAGE": 303,
109 "METRIC_DISK_READ_WRITE_PERCENTAGE": 304,
110 "METRIC_DISK_FAULTY_CELLS_PERCENTAGE": 305,
111 "METRIC_RAM_TEMP": 400,
112 "METRIC_RAM_CAPACITY": 401,
113 "METRIC_RAM_USAGE": 402,
114 "METRIC_RAM_USAGE_PERCENTAGE": 403,
115 "METRIC_POWER_MAX": 500,
116 "METRIC_POWER_USAGE": 501,
117 "METRIC_POWER_USAGE_PERCENTAGE": 502,
118 "METRIC_INNER_SURROUNDING_TEMP": 600,
119}
120
121func (x MetricNames) String() string {
122 return proto.EnumName(MetricNames_name, int32(x))
123}
124
125func (MetricNames) EnumDescriptor() ([]byte, []int) {
126 return fileDescriptor_6b6c2f1384c11ff5, []int{0}
127}
128
amit.ghoshae473032021-01-10 11:59:10 +0100129type ListMetricsResponse_Reason int32
130
131const (
amit.ghoshbd2022e2021-02-22 05:58:53 +0100132 ListMetricsResponse_UNDEFINED_REASON ListMetricsResponse_Reason = 0
133 ListMetricsResponse_UNKNOWN_DEVICE ListMetricsResponse_Reason = 1
134 ListMetricsResponse_INTERNAL_ERROR ListMetricsResponse_Reason = 2
135 ListMetricsResponse_DEVICE_UNREACHABLE ListMetricsResponse_Reason = 3
amit.ghoshae473032021-01-10 11:59:10 +0100136)
137
138var ListMetricsResponse_Reason_name = map[int32]string{
139 0: "UNDEFINED_REASON",
140 1: "UNKNOWN_DEVICE",
141 2: "INTERNAL_ERROR",
amit.ghoshbd2022e2021-02-22 05:58:53 +0100142 3: "DEVICE_UNREACHABLE",
amit.ghoshae473032021-01-10 11:59:10 +0100143}
144
145var ListMetricsResponse_Reason_value = map[string]int32{
amit.ghoshbd2022e2021-02-22 05:58:53 +0100146 "UNDEFINED_REASON": 0,
147 "UNKNOWN_DEVICE": 1,
148 "INTERNAL_ERROR": 2,
149 "DEVICE_UNREACHABLE": 3,
amit.ghoshae473032021-01-10 11:59:10 +0100150}
151
152func (x ListMetricsResponse_Reason) String() string {
153 return proto.EnumName(ListMetricsResponse_Reason_name, int32(x))
154}
155
156func (ListMetricsResponse_Reason) EnumDescriptor() ([]byte, []int) {
157 return fileDescriptor_6b6c2f1384c11ff5, []int{2, 0}
158}
159
160type MetricsConfigurationResponse_Reason int32
161
162const (
163 MetricsConfigurationResponse_UNDEFINED_REASON MetricsConfigurationResponse_Reason = 0
164 MetricsConfigurationResponse_UNKNOWN_DEVICE MetricsConfigurationResponse_Reason = 1
165 MetricsConfigurationResponse_INTERNAL_ERROR MetricsConfigurationResponse_Reason = 2
166 MetricsConfigurationResponse_POLL_INTERVAL_UNSUPPORTED MetricsConfigurationResponse_Reason = 3
167 MetricsConfigurationResponse_INVALID_METRIC MetricsConfigurationResponse_Reason = 4
amit.ghoshbd2022e2021-02-22 05:58:53 +0100168 MetricsConfigurationResponse_DEVICE_UNREACHABLE MetricsConfigurationResponse_Reason = 5
amit.ghoshae473032021-01-10 11:59:10 +0100169)
170
171var MetricsConfigurationResponse_Reason_name = map[int32]string{
172 0: "UNDEFINED_REASON",
173 1: "UNKNOWN_DEVICE",
174 2: "INTERNAL_ERROR",
175 3: "POLL_INTERVAL_UNSUPPORTED",
176 4: "INVALID_METRIC",
amit.ghoshbd2022e2021-02-22 05:58:53 +0100177 5: "DEVICE_UNREACHABLE",
amit.ghoshae473032021-01-10 11:59:10 +0100178}
179
180var MetricsConfigurationResponse_Reason_value = map[string]int32{
181 "UNDEFINED_REASON": 0,
182 "UNKNOWN_DEVICE": 1,
183 "INTERNAL_ERROR": 2,
184 "POLL_INTERVAL_UNSUPPORTED": 3,
185 "INVALID_METRIC": 4,
amit.ghoshbd2022e2021-02-22 05:58:53 +0100186 "DEVICE_UNREACHABLE": 5,
amit.ghoshae473032021-01-10 11:59:10 +0100187}
188
189func (x MetricsConfigurationResponse_Reason) String() string {
190 return proto.EnumName(MetricsConfigurationResponse_Reason_name, int32(x))
191}
192
193func (MetricsConfigurationResponse_Reason) EnumDescriptor() ([]byte, []int) {
194 return fileDescriptor_6b6c2f1384c11ff5, []int{4, 0}
195}
196
197type GetMetricResponse_Reason int32
198
199const (
amit.ghoshbd2022e2021-02-22 05:58:53 +0100200 GetMetricResponse_UNDEFINED_REASON GetMetricResponse_Reason = 0
201 GetMetricResponse_UNKNOWN_DEVICE GetMetricResponse_Reason = 1
202 GetMetricResponse_UNKNOWN_COMPONENT GetMetricResponse_Reason = 2
203 GetMetricResponse_INTERNAL_ERROR GetMetricResponse_Reason = 3
204 GetMetricResponse_INVALID_METRIC GetMetricResponse_Reason = 4
205 GetMetricResponse_DEVICE_UNREACHABLE GetMetricResponse_Reason = 5
amit.ghoshae473032021-01-10 11:59:10 +0100206)
207
208var GetMetricResponse_Reason_name = map[int32]string{
209 0: "UNDEFINED_REASON",
210 1: "UNKNOWN_DEVICE",
211 2: "UNKNOWN_COMPONENT",
212 3: "INTERNAL_ERROR",
213 4: "INVALID_METRIC",
amit.ghoshbd2022e2021-02-22 05:58:53 +0100214 5: "DEVICE_UNREACHABLE",
amit.ghoshae473032021-01-10 11:59:10 +0100215}
216
217var GetMetricResponse_Reason_value = map[string]int32{
amit.ghoshbd2022e2021-02-22 05:58:53 +0100218 "UNDEFINED_REASON": 0,
219 "UNKNOWN_DEVICE": 1,
220 "UNKNOWN_COMPONENT": 2,
221 "INTERNAL_ERROR": 3,
222 "INVALID_METRIC": 4,
223 "DEVICE_UNREACHABLE": 5,
amit.ghoshae473032021-01-10 11:59:10 +0100224}
225
226func (x GetMetricResponse_Reason) String() string {
227 return proto.EnumName(GetMetricResponse_Reason_name, int32(x))
228}
229
230func (GetMetricResponse_Reason) EnumDescriptor() ([]byte, []int) {
231 return fileDescriptor_6b6c2f1384c11ff5, []int{8, 0}
232}
233
Amit Ghosh09f28362020-06-12 21:52:19 +0100234type MetricConfig struct {
235 MetricId MetricNames `protobuf:"varint,1,opt,name=metric_id,json=metricId,proto3,enum=dmi.MetricNames" json:"metric_id,omitempty"`
236 // Whether the device manager is collecting and reporting this metric or not
237 IsConfigured bool `protobuf:"varint,2,opt,name=is_configured,json=isConfigured,proto3" json:"is_configured,omitempty"`
238 // Number of seconds between two consecutive polls of the particular metric
239 // Each device manager implemenation could have it's per metric default poll frequency which
240 // can be requested to be changed using this value
241 PollInterval uint32 `protobuf:"varint,3,opt,name=poll_interval,json=pollInterval,proto3" json:"poll_interval,omitempty"`
242 XXX_NoUnkeyedLiteral struct{} `json:"-"`
243 XXX_unrecognized []byte `json:"-"`
244 XXX_sizecache int32 `json:"-"`
245}
246
247func (m *MetricConfig) Reset() { *m = MetricConfig{} }
248func (m *MetricConfig) String() string { return proto.CompactTextString(m) }
249func (*MetricConfig) ProtoMessage() {}
250func (*MetricConfig) Descriptor() ([]byte, []int) {
251 return fileDescriptor_6b6c2f1384c11ff5, []int{0}
252}
253
254func (m *MetricConfig) XXX_Unmarshal(b []byte) error {
255 return xxx_messageInfo_MetricConfig.Unmarshal(m, b)
256}
257func (m *MetricConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
258 return xxx_messageInfo_MetricConfig.Marshal(b, m, deterministic)
259}
260func (m *MetricConfig) XXX_Merge(src proto.Message) {
261 xxx_messageInfo_MetricConfig.Merge(m, src)
262}
263func (m *MetricConfig) XXX_Size() int {
264 return xxx_messageInfo_MetricConfig.Size(m)
265}
266func (m *MetricConfig) XXX_DiscardUnknown() {
267 xxx_messageInfo_MetricConfig.DiscardUnknown(m)
268}
269
270var xxx_messageInfo_MetricConfig proto.InternalMessageInfo
271
272func (m *MetricConfig) GetMetricId() MetricNames {
273 if m != nil {
274 return m.MetricId
275 }
276 return MetricNames_METRIC_NAME_UNDEFINED
277}
278
279func (m *MetricConfig) GetIsConfigured() bool {
280 if m != nil {
281 return m.IsConfigured
282 }
283 return false
284}
285
286func (m *MetricConfig) GetPollInterval() uint32 {
287 if m != nil {
288 return m.PollInterval
289 }
290 return 0
291}
292
293type MetricsConfig struct {
294 Metrics []*MetricConfig `protobuf:"bytes,1,rep,name=metrics,proto3" json:"metrics,omitempty"`
295 XXX_NoUnkeyedLiteral struct{} `json:"-"`
296 XXX_unrecognized []byte `json:"-"`
297 XXX_sizecache int32 `json:"-"`
298}
299
300func (m *MetricsConfig) Reset() { *m = MetricsConfig{} }
301func (m *MetricsConfig) String() string { return proto.CompactTextString(m) }
302func (*MetricsConfig) ProtoMessage() {}
303func (*MetricsConfig) Descriptor() ([]byte, []int) {
304 return fileDescriptor_6b6c2f1384c11ff5, []int{1}
305}
306
307func (m *MetricsConfig) XXX_Unmarshal(b []byte) error {
308 return xxx_messageInfo_MetricsConfig.Unmarshal(m, b)
309}
310func (m *MetricsConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
311 return xxx_messageInfo_MetricsConfig.Marshal(b, m, deterministic)
312}
313func (m *MetricsConfig) XXX_Merge(src proto.Message) {
314 xxx_messageInfo_MetricsConfig.Merge(m, src)
315}
316func (m *MetricsConfig) XXX_Size() int {
317 return xxx_messageInfo_MetricsConfig.Size(m)
318}
319func (m *MetricsConfig) XXX_DiscardUnknown() {
320 xxx_messageInfo_MetricsConfig.DiscardUnknown(m)
321}
322
323var xxx_messageInfo_MetricsConfig proto.InternalMessageInfo
324
325func (m *MetricsConfig) GetMetrics() []*MetricConfig {
326 if m != nil {
327 return m.Metrics
328 }
329 return nil
330}
331
332type ListMetricsResponse struct {
amit.ghoshae473032021-01-10 11:59:10 +0100333 Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=dmi.Status" json:"status,omitempty"`
334 Reason ListMetricsResponse_Reason `protobuf:"varint,2,opt,name=reason,proto3,enum=dmi.ListMetricsResponse_Reason" json:"reason,omitempty"`
335 Metrics *MetricsConfig `protobuf:"bytes,3,opt,name=metrics,proto3" json:"metrics,omitempty"`
amit.ghosh8ab1e6e2021-02-23 07:40:17 +0100336 ReasonDetail string `protobuf:"bytes,4,opt,name=reason_detail,json=reasonDetail,proto3" json:"reason_detail,omitempty"`
amit.ghoshae473032021-01-10 11:59:10 +0100337 XXX_NoUnkeyedLiteral struct{} `json:"-"`
338 XXX_unrecognized []byte `json:"-"`
339 XXX_sizecache int32 `json:"-"`
Amit Ghosh09f28362020-06-12 21:52:19 +0100340}
341
342func (m *ListMetricsResponse) Reset() { *m = ListMetricsResponse{} }
343func (m *ListMetricsResponse) String() string { return proto.CompactTextString(m) }
344func (*ListMetricsResponse) ProtoMessage() {}
345func (*ListMetricsResponse) Descriptor() ([]byte, []int) {
346 return fileDescriptor_6b6c2f1384c11ff5, []int{2}
347}
348
349func (m *ListMetricsResponse) XXX_Unmarshal(b []byte) error {
350 return xxx_messageInfo_ListMetricsResponse.Unmarshal(m, b)
351}
352func (m *ListMetricsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
353 return xxx_messageInfo_ListMetricsResponse.Marshal(b, m, deterministic)
354}
355func (m *ListMetricsResponse) XXX_Merge(src proto.Message) {
356 xxx_messageInfo_ListMetricsResponse.Merge(m, src)
357}
358func (m *ListMetricsResponse) XXX_Size() int {
359 return xxx_messageInfo_ListMetricsResponse.Size(m)
360}
361func (m *ListMetricsResponse) XXX_DiscardUnknown() {
362 xxx_messageInfo_ListMetricsResponse.DiscardUnknown(m)
363}
364
365var xxx_messageInfo_ListMetricsResponse proto.InternalMessageInfo
366
367func (m *ListMetricsResponse) GetStatus() Status {
368 if m != nil {
369 return m.Status
370 }
371 return Status_UNDEFINED_STATUS
372}
373
amit.ghoshae473032021-01-10 11:59:10 +0100374func (m *ListMetricsResponse) GetReason() ListMetricsResponse_Reason {
Amit Ghosh09f28362020-06-12 21:52:19 +0100375 if m != nil {
376 return m.Reason
377 }
amit.ghoshae473032021-01-10 11:59:10 +0100378 return ListMetricsResponse_UNDEFINED_REASON
Amit Ghosh09f28362020-06-12 21:52:19 +0100379}
380
381func (m *ListMetricsResponse) GetMetrics() *MetricsConfig {
382 if m != nil {
383 return m.Metrics
384 }
385 return nil
386}
387
amit.ghosh8ab1e6e2021-02-23 07:40:17 +0100388func (m *ListMetricsResponse) GetReasonDetail() string {
389 if m != nil {
390 return m.ReasonDetail
391 }
392 return ""
393}
394
Amit Ghosh09f28362020-06-12 21:52:19 +0100395type MetricsConfigurationRequest struct {
396 DeviceUuid *Uuid `protobuf:"bytes,1,opt,name=device_uuid,json=deviceUuid,proto3" json:"device_uuid,omitempty"`
397 // Types that are valid to be assigned to Operation:
398 // *MetricsConfigurationRequest_Changes
399 // *MetricsConfigurationRequest_ResetToDefault
400 Operation isMetricsConfigurationRequest_Operation `protobuf_oneof:"operation"`
401 XXX_NoUnkeyedLiteral struct{} `json:"-"`
402 XXX_unrecognized []byte `json:"-"`
403 XXX_sizecache int32 `json:"-"`
404}
405
406func (m *MetricsConfigurationRequest) Reset() { *m = MetricsConfigurationRequest{} }
407func (m *MetricsConfigurationRequest) String() string { return proto.CompactTextString(m) }
408func (*MetricsConfigurationRequest) ProtoMessage() {}
409func (*MetricsConfigurationRequest) Descriptor() ([]byte, []int) {
410 return fileDescriptor_6b6c2f1384c11ff5, []int{3}
411}
412
413func (m *MetricsConfigurationRequest) XXX_Unmarshal(b []byte) error {
414 return xxx_messageInfo_MetricsConfigurationRequest.Unmarshal(m, b)
415}
416func (m *MetricsConfigurationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
417 return xxx_messageInfo_MetricsConfigurationRequest.Marshal(b, m, deterministic)
418}
419func (m *MetricsConfigurationRequest) XXX_Merge(src proto.Message) {
420 xxx_messageInfo_MetricsConfigurationRequest.Merge(m, src)
421}
422func (m *MetricsConfigurationRequest) XXX_Size() int {
423 return xxx_messageInfo_MetricsConfigurationRequest.Size(m)
424}
425func (m *MetricsConfigurationRequest) XXX_DiscardUnknown() {
426 xxx_messageInfo_MetricsConfigurationRequest.DiscardUnknown(m)
427}
428
429var xxx_messageInfo_MetricsConfigurationRequest proto.InternalMessageInfo
430
431func (m *MetricsConfigurationRequest) GetDeviceUuid() *Uuid {
432 if m != nil {
433 return m.DeviceUuid
434 }
435 return nil
436}
437
438type isMetricsConfigurationRequest_Operation interface {
439 isMetricsConfigurationRequest_Operation()
440}
441
442type MetricsConfigurationRequest_Changes struct {
443 Changes *MetricsConfig `protobuf:"bytes,2,opt,name=changes,proto3,oneof"`
444}
445
446type MetricsConfigurationRequest_ResetToDefault struct {
447 ResetToDefault bool `protobuf:"varint,3,opt,name=reset_to_default,json=resetToDefault,proto3,oneof"`
448}
449
450func (*MetricsConfigurationRequest_Changes) isMetricsConfigurationRequest_Operation() {}
451
452func (*MetricsConfigurationRequest_ResetToDefault) isMetricsConfigurationRequest_Operation() {}
453
454func (m *MetricsConfigurationRequest) GetOperation() isMetricsConfigurationRequest_Operation {
455 if m != nil {
456 return m.Operation
457 }
458 return nil
459}
460
461func (m *MetricsConfigurationRequest) GetChanges() *MetricsConfig {
462 if x, ok := m.GetOperation().(*MetricsConfigurationRequest_Changes); ok {
463 return x.Changes
464 }
465 return nil
466}
467
468func (m *MetricsConfigurationRequest) GetResetToDefault() bool {
469 if x, ok := m.GetOperation().(*MetricsConfigurationRequest_ResetToDefault); ok {
470 return x.ResetToDefault
471 }
472 return false
473}
474
475// XXX_OneofWrappers is for the internal use of the proto package.
476func (*MetricsConfigurationRequest) XXX_OneofWrappers() []interface{} {
477 return []interface{}{
478 (*MetricsConfigurationRequest_Changes)(nil),
479 (*MetricsConfigurationRequest_ResetToDefault)(nil),
480 }
481}
482
483type MetricsConfigurationResponse struct {
amit.ghoshae473032021-01-10 11:59:10 +0100484 Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=dmi.Status" json:"status,omitempty"`
485 Reason MetricsConfigurationResponse_Reason `protobuf:"varint,2,opt,name=reason,proto3,enum=dmi.MetricsConfigurationResponse_Reason" json:"reason,omitempty"`
amit.ghosh8ab1e6e2021-02-23 07:40:17 +0100486 ReasonDetail string `protobuf:"bytes,3,opt,name=reason_detail,json=reasonDetail,proto3" json:"reason_detail,omitempty"`
amit.ghoshae473032021-01-10 11:59:10 +0100487 XXX_NoUnkeyedLiteral struct{} `json:"-"`
488 XXX_unrecognized []byte `json:"-"`
489 XXX_sizecache int32 `json:"-"`
Amit Ghosh09f28362020-06-12 21:52:19 +0100490}
491
492func (m *MetricsConfigurationResponse) Reset() { *m = MetricsConfigurationResponse{} }
493func (m *MetricsConfigurationResponse) String() string { return proto.CompactTextString(m) }
494func (*MetricsConfigurationResponse) ProtoMessage() {}
495func (*MetricsConfigurationResponse) Descriptor() ([]byte, []int) {
496 return fileDescriptor_6b6c2f1384c11ff5, []int{4}
497}
498
499func (m *MetricsConfigurationResponse) XXX_Unmarshal(b []byte) error {
500 return xxx_messageInfo_MetricsConfigurationResponse.Unmarshal(m, b)
501}
502func (m *MetricsConfigurationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
503 return xxx_messageInfo_MetricsConfigurationResponse.Marshal(b, m, deterministic)
504}
505func (m *MetricsConfigurationResponse) XXX_Merge(src proto.Message) {
506 xxx_messageInfo_MetricsConfigurationResponse.Merge(m, src)
507}
508func (m *MetricsConfigurationResponse) XXX_Size() int {
509 return xxx_messageInfo_MetricsConfigurationResponse.Size(m)
510}
511func (m *MetricsConfigurationResponse) XXX_DiscardUnknown() {
512 xxx_messageInfo_MetricsConfigurationResponse.DiscardUnknown(m)
513}
514
515var xxx_messageInfo_MetricsConfigurationResponse proto.InternalMessageInfo
516
517func (m *MetricsConfigurationResponse) GetStatus() Status {
518 if m != nil {
519 return m.Status
520 }
521 return Status_UNDEFINED_STATUS
522}
523
amit.ghoshae473032021-01-10 11:59:10 +0100524func (m *MetricsConfigurationResponse) GetReason() MetricsConfigurationResponse_Reason {
Amit Ghosh09f28362020-06-12 21:52:19 +0100525 if m != nil {
526 return m.Reason
527 }
amit.ghoshae473032021-01-10 11:59:10 +0100528 return MetricsConfigurationResponse_UNDEFINED_REASON
Amit Ghosh09f28362020-06-12 21:52:19 +0100529}
530
amit.ghosh8ab1e6e2021-02-23 07:40:17 +0100531func (m *MetricsConfigurationResponse) GetReasonDetail() string {
532 if m != nil {
533 return m.ReasonDetail
534 }
535 return ""
536}
537
Amit Ghosh09f28362020-06-12 21:52:19 +0100538type MetricMetaData struct {
539 DeviceUuid *Uuid `protobuf:"bytes,1,opt,name=device_uuid,json=deviceUuid,proto3" json:"device_uuid,omitempty"`
540 // uuid of the component
541 ComponentUuid *Uuid `protobuf:"bytes,2,opt,name=component_uuid,json=componentUuid,proto3" json:"component_uuid,omitempty"`
542 ComponentName string `protobuf:"bytes,3,opt,name=component_name,json=componentName,proto3" json:"component_name,omitempty"`
543 XXX_NoUnkeyedLiteral struct{} `json:"-"`
544 XXX_unrecognized []byte `json:"-"`
545 XXX_sizecache int32 `json:"-"`
546}
547
548func (m *MetricMetaData) Reset() { *m = MetricMetaData{} }
549func (m *MetricMetaData) String() string { return proto.CompactTextString(m) }
550func (*MetricMetaData) ProtoMessage() {}
551func (*MetricMetaData) Descriptor() ([]byte, []int) {
552 return fileDescriptor_6b6c2f1384c11ff5, []int{5}
553}
554
555func (m *MetricMetaData) XXX_Unmarshal(b []byte) error {
556 return xxx_messageInfo_MetricMetaData.Unmarshal(m, b)
557}
558func (m *MetricMetaData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
559 return xxx_messageInfo_MetricMetaData.Marshal(b, m, deterministic)
560}
561func (m *MetricMetaData) XXX_Merge(src proto.Message) {
562 xxx_messageInfo_MetricMetaData.Merge(m, src)
563}
564func (m *MetricMetaData) XXX_Size() int {
565 return xxx_messageInfo_MetricMetaData.Size(m)
566}
567func (m *MetricMetaData) XXX_DiscardUnknown() {
568 xxx_messageInfo_MetricMetaData.DiscardUnknown(m)
569}
570
571var xxx_messageInfo_MetricMetaData proto.InternalMessageInfo
572
573func (m *MetricMetaData) GetDeviceUuid() *Uuid {
574 if m != nil {
575 return m.DeviceUuid
576 }
577 return nil
578}
579
580func (m *MetricMetaData) GetComponentUuid() *Uuid {
581 if m != nil {
582 return m.ComponentUuid
583 }
584 return nil
585}
586
587func (m *MetricMetaData) GetComponentName() string {
588 if m != nil {
589 return m.ComponentName
590 }
591 return ""
592}
593
Chandrakanth Nalkudre Gowda68590a42021-04-22 15:19:21 +0530594// The Metrics are conveyed to external systems either by submitting them on a message bus or using gRPC server streaming.
Amit Ghosh09f28362020-06-12 21:52:19 +0100595// The topic to which are Metrics are submitted would be configured as startup
596// configuration of the components
597type Metric struct {
598 MetricId MetricNames `protobuf:"varint,1,opt,name=metric_id,json=metricId,proto3,enum=dmi.MetricNames" json:"metric_id,omitempty"`
599 MetricMetadata *MetricMetaData `protobuf:"bytes,2,opt,name=metric_metadata,json=metricMetadata,proto3" json:"metric_metadata,omitempty"`
600 Value *ComponentSensorData `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
601 XXX_NoUnkeyedLiteral struct{} `json:"-"`
602 XXX_unrecognized []byte `json:"-"`
603 XXX_sizecache int32 `json:"-"`
604}
605
606func (m *Metric) Reset() { *m = Metric{} }
607func (m *Metric) String() string { return proto.CompactTextString(m) }
608func (*Metric) ProtoMessage() {}
609func (*Metric) Descriptor() ([]byte, []int) {
610 return fileDescriptor_6b6c2f1384c11ff5, []int{6}
611}
612
613func (m *Metric) XXX_Unmarshal(b []byte) error {
614 return xxx_messageInfo_Metric.Unmarshal(m, b)
615}
616func (m *Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
617 return xxx_messageInfo_Metric.Marshal(b, m, deterministic)
618}
619func (m *Metric) XXX_Merge(src proto.Message) {
620 xxx_messageInfo_Metric.Merge(m, src)
621}
622func (m *Metric) XXX_Size() int {
623 return xxx_messageInfo_Metric.Size(m)
624}
625func (m *Metric) XXX_DiscardUnknown() {
626 xxx_messageInfo_Metric.DiscardUnknown(m)
627}
628
629var xxx_messageInfo_Metric proto.InternalMessageInfo
630
631func (m *Metric) GetMetricId() MetricNames {
632 if m != nil {
633 return m.MetricId
634 }
635 return MetricNames_METRIC_NAME_UNDEFINED
636}
637
638func (m *Metric) GetMetricMetadata() *MetricMetaData {
639 if m != nil {
640 return m.MetricMetadata
641 }
642 return nil
643}
644
645func (m *Metric) GetValue() *ComponentSensorData {
646 if m != nil {
647 return m.Value
648 }
649 return nil
650}
651
652type GetMetricRequest struct {
653 MetaData *MetricMetaData `protobuf:"bytes,1,opt,name=meta_data,json=metaData,proto3" json:"meta_data,omitempty"`
654 MetricId MetricNames `protobuf:"varint,2,opt,name=metric_id,json=metricId,proto3,enum=dmi.MetricNames" json:"metric_id,omitempty"`
655 XXX_NoUnkeyedLiteral struct{} `json:"-"`
656 XXX_unrecognized []byte `json:"-"`
657 XXX_sizecache int32 `json:"-"`
658}
659
660func (m *GetMetricRequest) Reset() { *m = GetMetricRequest{} }
661func (m *GetMetricRequest) String() string { return proto.CompactTextString(m) }
662func (*GetMetricRequest) ProtoMessage() {}
663func (*GetMetricRequest) Descriptor() ([]byte, []int) {
664 return fileDescriptor_6b6c2f1384c11ff5, []int{7}
665}
666
667func (m *GetMetricRequest) XXX_Unmarshal(b []byte) error {
668 return xxx_messageInfo_GetMetricRequest.Unmarshal(m, b)
669}
670func (m *GetMetricRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
671 return xxx_messageInfo_GetMetricRequest.Marshal(b, m, deterministic)
672}
673func (m *GetMetricRequest) XXX_Merge(src proto.Message) {
674 xxx_messageInfo_GetMetricRequest.Merge(m, src)
675}
676func (m *GetMetricRequest) XXX_Size() int {
677 return xxx_messageInfo_GetMetricRequest.Size(m)
678}
679func (m *GetMetricRequest) XXX_DiscardUnknown() {
680 xxx_messageInfo_GetMetricRequest.DiscardUnknown(m)
681}
682
683var xxx_messageInfo_GetMetricRequest proto.InternalMessageInfo
684
685func (m *GetMetricRequest) GetMetaData() *MetricMetaData {
686 if m != nil {
687 return m.MetaData
688 }
689 return nil
690}
691
692func (m *GetMetricRequest) GetMetricId() MetricNames {
693 if m != nil {
694 return m.MetricId
695 }
696 return MetricNames_METRIC_NAME_UNDEFINED
697}
698
aghoshc301dcd2020-09-03 16:55:34 +0100699type GetMetricResponse struct {
amit.ghoshae473032021-01-10 11:59:10 +0100700 Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=dmi.Status" json:"status,omitempty"`
701 Reason GetMetricResponse_Reason `protobuf:"varint,2,opt,name=reason,proto3,enum=dmi.GetMetricResponse_Reason" json:"reason,omitempty"`
702 Metric *Metric `protobuf:"bytes,3,opt,name=metric,proto3" json:"metric,omitempty"`
amit.ghosh8ab1e6e2021-02-23 07:40:17 +0100703 ReasonDetail string `protobuf:"bytes,4,opt,name=reason_detail,json=reasonDetail,proto3" json:"reason_detail,omitempty"`
amit.ghoshae473032021-01-10 11:59:10 +0100704 XXX_NoUnkeyedLiteral struct{} `json:"-"`
705 XXX_unrecognized []byte `json:"-"`
706 XXX_sizecache int32 `json:"-"`
aghoshc301dcd2020-09-03 16:55:34 +0100707}
708
709func (m *GetMetricResponse) Reset() { *m = GetMetricResponse{} }
710func (m *GetMetricResponse) String() string { return proto.CompactTextString(m) }
711func (*GetMetricResponse) ProtoMessage() {}
712func (*GetMetricResponse) Descriptor() ([]byte, []int) {
713 return fileDescriptor_6b6c2f1384c11ff5, []int{8}
714}
715
716func (m *GetMetricResponse) XXX_Unmarshal(b []byte) error {
717 return xxx_messageInfo_GetMetricResponse.Unmarshal(m, b)
718}
719func (m *GetMetricResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
720 return xxx_messageInfo_GetMetricResponse.Marshal(b, m, deterministic)
721}
722func (m *GetMetricResponse) XXX_Merge(src proto.Message) {
723 xxx_messageInfo_GetMetricResponse.Merge(m, src)
724}
725func (m *GetMetricResponse) XXX_Size() int {
726 return xxx_messageInfo_GetMetricResponse.Size(m)
727}
728func (m *GetMetricResponse) XXX_DiscardUnknown() {
729 xxx_messageInfo_GetMetricResponse.DiscardUnknown(m)
730}
731
732var xxx_messageInfo_GetMetricResponse proto.InternalMessageInfo
733
734func (m *GetMetricResponse) GetStatus() Status {
735 if m != nil {
736 return m.Status
737 }
738 return Status_UNDEFINED_STATUS
739}
740
amit.ghoshae473032021-01-10 11:59:10 +0100741func (m *GetMetricResponse) GetReason() GetMetricResponse_Reason {
aghoshc301dcd2020-09-03 16:55:34 +0100742 if m != nil {
743 return m.Reason
744 }
amit.ghoshae473032021-01-10 11:59:10 +0100745 return GetMetricResponse_UNDEFINED_REASON
aghoshc301dcd2020-09-03 16:55:34 +0100746}
747
748func (m *GetMetricResponse) GetMetric() *Metric {
749 if m != nil {
750 return m.Metric
751 }
752 return nil
753}
754
amit.ghosh8ab1e6e2021-02-23 07:40:17 +0100755func (m *GetMetricResponse) GetReasonDetail() string {
756 if m != nil {
757 return m.ReasonDetail
758 }
759 return ""
760}
761
Amit Ghosh09f28362020-06-12 21:52:19 +0100762func init() {
763 proto.RegisterEnum("dmi.MetricNames", MetricNames_name, MetricNames_value)
amit.ghoshae473032021-01-10 11:59:10 +0100764 proto.RegisterEnum("dmi.ListMetricsResponse_Reason", ListMetricsResponse_Reason_name, ListMetricsResponse_Reason_value)
765 proto.RegisterEnum("dmi.MetricsConfigurationResponse_Reason", MetricsConfigurationResponse_Reason_name, MetricsConfigurationResponse_Reason_value)
766 proto.RegisterEnum("dmi.GetMetricResponse_Reason", GetMetricResponse_Reason_name, GetMetricResponse_Reason_value)
Amit Ghosh09f28362020-06-12 21:52:19 +0100767 proto.RegisterType((*MetricConfig)(nil), "dmi.MetricConfig")
768 proto.RegisterType((*MetricsConfig)(nil), "dmi.MetricsConfig")
769 proto.RegisterType((*ListMetricsResponse)(nil), "dmi.ListMetricsResponse")
770 proto.RegisterType((*MetricsConfigurationRequest)(nil), "dmi.MetricsConfigurationRequest")
771 proto.RegisterType((*MetricsConfigurationResponse)(nil), "dmi.MetricsConfigurationResponse")
772 proto.RegisterType((*MetricMetaData)(nil), "dmi.MetricMetaData")
773 proto.RegisterType((*Metric)(nil), "dmi.Metric")
774 proto.RegisterType((*GetMetricRequest)(nil), "dmi.GetMetricRequest")
aghoshc301dcd2020-09-03 16:55:34 +0100775 proto.RegisterType((*GetMetricResponse)(nil), "dmi.GetMetricResponse")
Amit Ghosh09f28362020-06-12 21:52:19 +0100776}
777
778func init() { proto.RegisterFile("dmi/hw_metrics_mgmt_service.proto", fileDescriptor_6b6c2f1384c11ff5) }
779
780var fileDescriptor_6b6c2f1384c11ff5 = []byte{
Abhilash laxmeshwarfbf836c2026-02-03 16:25:31 +0530781 // 1258 bytes of a gzipped FileDescriptorProto
amit.ghosh8ab1e6e2021-02-23 07:40:17 +0100782 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4d, 0x6f, 0xdb, 0x46,
Chandrakanth Nalkudre Gowda68590a42021-04-22 15:19:21 +0530783 0x13, 0x36, 0xa9, 0xc4, 0x89, 0x57, 0xb6, 0x42, 0xaf, 0xf3, 0xa1, 0x28, 0xc9, 0x1b, 0x59, 0xc1,
Abhilash laxmeshwarfbf836c2026-02-03 16:25:31 +0530784 0xdb, 0x0a, 0x69, 0x23, 0x05, 0x0e, 0xfa, 0x9d, 0x43, 0x69, 0x72, 0x63, 0x13, 0x91, 0x28, 0x61,
785 0x49, 0xd9, 0x49, 0x0f, 0x5d, 0x6c, 0xc4, 0xb5, 0x42, 0x40, 0x24, 0x55, 0x92, 0x72, 0xd0, 0x6b,
786 0x2f, 0x45, 0x6f, 0x4d, 0x8b, 0xfe, 0x84, 0xf6, 0xd4, 0xaf, 0xf4, 0x07, 0xf4, 0x56, 0xa0, 0xdf,
787 0xe7, 0xfe, 0x90, 0xb6, 0xe7, 0x82, 0xbb, 0x94, 0xb2, 0x96, 0xe5, 0xa6, 0x2e, 0x7a, 0x93, 0x9e,
788 0x79, 0x66, 0xe6, 0x99, 0x99, 0xe5, 0xec, 0x82, 0x75, 0x2f, 0xf0, 0x9b, 0x0f, 0x1f, 0x91, 0x80,
789 0xa5, 0xb1, 0xdf, 0x4f, 0x48, 0x30, 0x08, 0x52, 0x92, 0xb0, 0x78, 0xdf, 0xef, 0xb3, 0xc6, 0x28,
790 0x8e, 0xd2, 0x08, 0x16, 0xbc, 0xc0, 0xaf, 0xac, 0x66, 0xbc, 0x7e, 0x14, 0x04, 0x51, 0x98, 0x08,
791 0xbc, 0xb2, 0x2c, 0x5c, 0xf3, 0x7f, 0x97, 0x06, 0x51, 0x34, 0x18, 0xb2, 0x26, 0xff, 0xf7, 0x60,
792 0xbc, 0xd7, 0x64, 0xc1, 0x28, 0x7d, 0x57, 0x18, 0x6b, 0xef, 0x2b, 0x60, 0xb9, 0xcd, 0x33, 0x18,
793 0x51, 0xb8, 0xe7, 0x0f, 0xe0, 0x0d, 0xb0, 0x24, 0x32, 0x12, 0xdf, 0x2b, 0x2b, 0x55, 0xa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x05, 0xff, 0xb3, 0x69, 0xea, 0xef, 0xb3, 0xfc, 0xc2, 0x6b, 0xd3, 0x90, 0x0e, 0x58, 0xc0, 0xd7,
851 0x1d, 0x7f, 0x54, 0xc2, 0x57, 0x41, 0x51, 0x7a, 0xf3, 0xc0, 0x33, 0xfc, 0xe3, 0xdf, 0xa6, 0xb1,
852 0xf7, 0x88, 0xc6, 0xcc, 0x32, 0x2b, 0xe5, 0xa3, 0x9e, 0x45, 0x90, 0x82, 0x4a, 0x6f, 0xe4, 0xd1,
853 0x94, 0xcd, 0xbb, 0x4c, 0x61, 0xf5, 0x6f, 0xee, 0x59, 0xbe, 0x4a, 0x2b, 0xeb, 0xcf, 0xbc, 0x89,
854 0xe1, 0xeb, 0x60, 0x69, 0xba, 0xbe, 0xe0, 0xb9, 0xd9, 0x75, 0x26, 0xc2, 0x9c, 0x9f, 0xbf, 0xe5,
855 0xe0, 0xcb, 0x60, 0xc5, 0x49, 0x63, 0x46, 0x83, 0x49, 0x69, 0xe7, 0x1b, 0xe2, 0x4d, 0xdc, 0x98,
856 0xbc, 0x89, 0x1b, 0x28, 0x7b, 0x13, 0x57, 0xe4, 0x7d, 0x77, 0x53, 0xd9, 0x7c, 0xe3, 0xad, 0xd7,
857 0x06, 0x7e, 0xfa, 0x70, 0xfc, 0xa0, 0xd1, 0x8f, 0x82, 0x66, 0x34, 0x62, 0x61, 0x3f, 0x8a, 0xbd,
858 0xa6, 0xb8, 0x18, 0x6f, 0x04, 0xd3, 0x06, 0xde, 0xe0, 0x0f, 0xdb, 0x3d, 0xda, 0x67, 0xcd, 0xfd,
859 0x5b, 0xcd, 0x41, 0xd4, 0xf4, 0x02, 0xff, 0xc1, 0x22, 0x8f, 0x7d, 0xeb, 0xaf, 0x00, 0x00, 0x00,
860 0xff, 0xff, 0x08, 0x7e, 0xf5, 0xaf, 0xc8, 0x0b, 0x00, 0x00,
Amit Ghosh09f28362020-06-12 21:52:19 +0100861}
862
863// Reference imports to suppress errors if they are not otherwise used.
864var _ context.Context
865var _ grpc.ClientConn
866
867// This is a compile-time assertion to ensure that this generated file
868// is compatible with the grpc package it is being compiled against.
869const _ = grpc.SupportPackageIsVersion4
870
871// NativeMetricsManagementServiceClient is the client API for NativeMetricsManagementService service.
872//
873// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
874type NativeMetricsManagementServiceClient interface {
875 // List the supported metrics for the passed device.
876 // This would be the first call that you make to know about the metrics that a particular device supports and
877 // then use the UpdateMetricsConfiguration API to monitor only the required metrics.
878 ListMetrics(ctx context.Context, in *HardwareID, opts ...grpc.CallOption) (*ListMetricsResponse, error)
879 // Updates the configuration of the list of metrics in the request
880 // Acts upon single metric configuration, collection of a single metric can be started/stopped
881 // by changing its configuration.
882 //
883 // This configuration is persisted across restart of the device or the device manager
884 UpdateMetricsConfiguration(ctx context.Context, in *MetricsConfigurationRequest, opts ...grpc.CallOption) (*MetricsConfigurationResponse, error)
885 // Get the instantenous value of a metric
aghoshc301dcd2020-09-03 16:55:34 +0100886 GetMetric(ctx context.Context, in *GetMetricRequest, opts ...grpc.CallOption) (*GetMetricResponse, error)
Chandrakanth Nalkudre Gowda68590a42021-04-22 15:19:21 +0530887 // Initiate the server streaming of the metrics
888 StreamMetrics(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (NativeMetricsManagementService_StreamMetricsClient, error)
Amit Ghosh09f28362020-06-12 21:52:19 +0100889}
890
891type nativeMetricsManagementServiceClient struct {
892 cc *grpc.ClientConn
893}
894
895func NewNativeMetricsManagementServiceClient(cc *grpc.ClientConn) NativeMetricsManagementServiceClient {
896 return &nativeMetricsManagementServiceClient{cc}
897}
898
899func (c *nativeMetricsManagementServiceClient) ListMetrics(ctx context.Context, in *HardwareID, opts ...grpc.CallOption) (*ListMetricsResponse, error) {
900 out := new(ListMetricsResponse)
901 err := c.cc.Invoke(ctx, "/dmi.NativeMetricsManagementService/ListMetrics", in, out, opts...)
902 if err != nil {
903 return nil, err
904 }
905 return out, nil
906}
907
908func (c *nativeMetricsManagementServiceClient) UpdateMetricsConfiguration(ctx context.Context, in *MetricsConfigurationRequest, opts ...grpc.CallOption) (*MetricsConfigurationResponse, error) {
909 out := new(MetricsConfigurationResponse)
910 err := c.cc.Invoke(ctx, "/dmi.NativeMetricsManagementService/UpdateMetricsConfiguration", in, out, opts...)
911 if err != nil {
912 return nil, err
913 }
914 return out, nil
915}
916
aghoshc301dcd2020-09-03 16:55:34 +0100917func (c *nativeMetricsManagementServiceClient) GetMetric(ctx context.Context, in *GetMetricRequest, opts ...grpc.CallOption) (*GetMetricResponse, error) {
918 out := new(GetMetricResponse)
Amit Ghosh09f28362020-06-12 21:52:19 +0100919 err := c.cc.Invoke(ctx, "/dmi.NativeMetricsManagementService/GetMetric", in, out, opts...)
920 if err != nil {
921 return nil, err
922 }
923 return out, nil
924}
925
Chandrakanth Nalkudre Gowda68590a42021-04-22 15:19:21 +0530926func (c *nativeMetricsManagementServiceClient) StreamMetrics(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (NativeMetricsManagementService_StreamMetricsClient, error) {
927 stream, err := c.cc.NewStream(ctx, &_NativeMetricsManagementService_serviceDesc.Streams[0], "/dmi.NativeMetricsManagementService/StreamMetrics", opts...)
928 if err != nil {
929 return nil, err
930 }
931 x := &nativeMetricsManagementServiceStreamMetricsClient{stream}
932 if err := x.ClientStream.SendMsg(in); err != nil {
933 return nil, err
934 }
935 if err := x.ClientStream.CloseSend(); err != nil {
936 return nil, err
937 }
938 return x, nil
939}
940
941type NativeMetricsManagementService_StreamMetricsClient interface {
942 Recv() (*Metric, error)
943 grpc.ClientStream
944}
945
946type nativeMetricsManagementServiceStreamMetricsClient struct {
947 grpc.ClientStream
948}
949
950func (x *nativeMetricsManagementServiceStreamMetricsClient) Recv() (*Metric, error) {
951 m := new(Metric)
952 if err := x.ClientStream.RecvMsg(m); err != nil {
953 return nil, err
954 }
955 return m, nil
956}
957
Amit Ghosh09f28362020-06-12 21:52:19 +0100958// NativeMetricsManagementServiceServer is the server API for NativeMetricsManagementService service.
959type NativeMetricsManagementServiceServer interface {
960 // List the supported metrics for the passed device.
961 // This would be the first call that you make to know about the metrics that a particular device supports and
962 // then use the UpdateMetricsConfiguration API to monitor only the required metrics.
963 ListMetrics(context.Context, *HardwareID) (*ListMetricsResponse, error)
964 // Updates the configuration of the list of metrics in the request
965 // Acts upon single metric configuration, collection of a single metric can be started/stopped
966 // by changing its configuration.
967 //
968 // This configuration is persisted across restart of the device or the device manager
969 UpdateMetricsConfiguration(context.Context, *MetricsConfigurationRequest) (*MetricsConfigurationResponse, error)
970 // Get the instantenous value of a metric
aghoshc301dcd2020-09-03 16:55:34 +0100971 GetMetric(context.Context, *GetMetricRequest) (*GetMetricResponse, error)
Chandrakanth Nalkudre Gowda68590a42021-04-22 15:19:21 +0530972 // Initiate the server streaming of the metrics
973 StreamMetrics(*empty.Empty, NativeMetricsManagementService_StreamMetricsServer) error
Amit Ghosh09f28362020-06-12 21:52:19 +0100974}
975
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200976// UnimplementedNativeMetricsManagementServiceServer can be embedded to have forward compatible implementations.
977type UnimplementedNativeMetricsManagementServiceServer struct {
978}
979
980func (*UnimplementedNativeMetricsManagementServiceServer) ListMetrics(ctx context.Context, req *HardwareID) (*ListMetricsResponse, error) {
981 return nil, status.Errorf(codes.Unimplemented, "method ListMetrics not implemented")
982}
983func (*UnimplementedNativeMetricsManagementServiceServer) UpdateMetricsConfiguration(ctx context.Context, req *MetricsConfigurationRequest) (*MetricsConfigurationResponse, error) {
984 return nil, status.Errorf(codes.Unimplemented, "method UpdateMetricsConfiguration not implemented")
985}
986func (*UnimplementedNativeMetricsManagementServiceServer) GetMetric(ctx context.Context, req *GetMetricRequest) (*GetMetricResponse, error) {
987 return nil, status.Errorf(codes.Unimplemented, "method GetMetric not implemented")
988}
Chandrakanth Nalkudre Gowda68590a42021-04-22 15:19:21 +0530989func (*UnimplementedNativeMetricsManagementServiceServer) StreamMetrics(req *empty.Empty, srv NativeMetricsManagementService_StreamMetricsServer) error {
990 return status.Errorf(codes.Unimplemented, "method StreamMetrics not implemented")
991}
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200992
Amit Ghosh09f28362020-06-12 21:52:19 +0100993func RegisterNativeMetricsManagementServiceServer(s *grpc.Server, srv NativeMetricsManagementServiceServer) {
994 s.RegisterService(&_NativeMetricsManagementService_serviceDesc, srv)
995}
996
997func _NativeMetricsManagementService_ListMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
998 in := new(HardwareID)
999 if err := dec(in); err != nil {
1000 return nil, err
1001 }
1002 if interceptor == nil {
1003 return srv.(NativeMetricsManagementServiceServer).ListMetrics(ctx, in)
1004 }
1005 info := &grpc.UnaryServerInfo{
1006 Server: srv,
1007 FullMethod: "/dmi.NativeMetricsManagementService/ListMetrics",
1008 }
1009 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
1010 return srv.(NativeMetricsManagementServiceServer).ListMetrics(ctx, req.(*HardwareID))
1011 }
1012 return interceptor(ctx, in, info, handler)
1013}
1014
1015func _NativeMetricsManagementService_UpdateMetricsConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
1016 in := new(MetricsConfigurationRequest)
1017 if err := dec(in); err != nil {
1018 return nil, err
1019 }
1020 if interceptor == nil {
1021 return srv.(NativeMetricsManagementServiceServer).UpdateMetricsConfiguration(ctx, in)
1022 }
1023 info := &grpc.UnaryServerInfo{
1024 Server: srv,
1025 FullMethod: "/dmi.NativeMetricsManagementService/UpdateMetricsConfiguration",
1026 }
1027 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
1028 return srv.(NativeMetricsManagementServiceServer).UpdateMetricsConfiguration(ctx, req.(*MetricsConfigurationRequest))
1029 }
1030 return interceptor(ctx, in, info, handler)
1031}
1032
1033func _NativeMetricsManagementService_GetMetric_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
1034 in := new(GetMetricRequest)
1035 if err := dec(in); err != nil {
1036 return nil, err
1037 }
1038 if interceptor == nil {
1039 return srv.(NativeMetricsManagementServiceServer).GetMetric(ctx, in)
1040 }
1041 info := &grpc.UnaryServerInfo{
1042 Server: srv,
1043 FullMethod: "/dmi.NativeMetricsManagementService/GetMetric",
1044 }
1045 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
1046 return srv.(NativeMetricsManagementServiceServer).GetMetric(ctx, req.(*GetMetricRequest))
1047 }
1048 return interceptor(ctx, in, info, handler)
1049}
1050
Chandrakanth Nalkudre Gowda68590a42021-04-22 15:19:21 +05301051func _NativeMetricsManagementService_StreamMetrics_Handler(srv interface{}, stream grpc.ServerStream) error {
1052 m := new(empty.Empty)
1053 if err := stream.RecvMsg(m); err != nil {
1054 return err
1055 }
1056 return srv.(NativeMetricsManagementServiceServer).StreamMetrics(m, &nativeMetricsManagementServiceStreamMetricsServer{stream})
1057}
1058
1059type NativeMetricsManagementService_StreamMetricsServer interface {
1060 Send(*Metric) error
1061 grpc.ServerStream
1062}
1063
1064type nativeMetricsManagementServiceStreamMetricsServer struct {
1065 grpc.ServerStream
1066}
1067
1068func (x *nativeMetricsManagementServiceStreamMetricsServer) Send(m *Metric) error {
1069 return x.ServerStream.SendMsg(m)
1070}
1071
Amit Ghosh09f28362020-06-12 21:52:19 +01001072var _NativeMetricsManagementService_serviceDesc = grpc.ServiceDesc{
1073 ServiceName: "dmi.NativeMetricsManagementService",
1074 HandlerType: (*NativeMetricsManagementServiceServer)(nil),
1075 Methods: []grpc.MethodDesc{
1076 {
1077 MethodName: "ListMetrics",
1078 Handler: _NativeMetricsManagementService_ListMetrics_Handler,
1079 },
1080 {
1081 MethodName: "UpdateMetricsConfiguration",
1082 Handler: _NativeMetricsManagementService_UpdateMetricsConfiguration_Handler,
1083 },
1084 {
1085 MethodName: "GetMetric",
1086 Handler: _NativeMetricsManagementService_GetMetric_Handler,
1087 },
1088 },
Chandrakanth Nalkudre Gowda68590a42021-04-22 15:19:21 +05301089 Streams: []grpc.StreamDesc{
1090 {
1091 StreamName: "StreamMetrics",
1092 Handler: _NativeMetricsManagementService_StreamMetrics_Handler,
1093 ServerStreams: true,
1094 },
1095 },
Amit Ghosh09f28362020-06-12 21:52:19 +01001096 Metadata: "dmi/hw_metrics_mgmt_service.proto",
1097}