blob: 7bddd75b328248f319d5f9221f6c3e50546ba997 [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"
10 grpc "google.golang.org/grpc"
11 math "math"
12)
13
14// Reference imports to suppress errors if they are not otherwise used.
15var _ = proto.Marshal
16var _ = fmt.Errorf
17var _ = math.Inf
18
19// This is a compile-time assertion to ensure that this generated file
20// is compatible with the proto package it is being compiled against.
21// A compilation error at this line likely means your copy of the
22// proto package needs to be updated.
23const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
24
25type MetricNames int32
26
27const (
28 MetricNames_METRIC_NAME_UNDEFINED MetricNames = 0
29 // FAN related metrics
30 MetricNames_METRIC_FAN_SPEED MetricNames = 1
31 // CPU related metrics
32 MetricNames_METRIC_CPU_TEMP MetricNames = 100
33 MetricNames_METRIC_CPU_USAGE_PERCENTAGE MetricNames = 101
34 // Transceiver related metrics
35 MetricNames_METRIC_TRANSCEIVER_TEMP MetricNames = 200
36 MetricNames_METRIC_TRANSCEIVER_VOLTAGE MetricNames = 201
37 MetricNames_METRIC_TRANSCEIVER_BIAS MetricNames = 202
38 MetricNames_METRIC_TRANSCEIVER_RX_POWER MetricNames = 203
39 MetricNames_METRIC_TRANSCEIVER_TX_POWER MetricNames = 204
40 MetricNames_METRIC_TRANSCEIVER_WAVELENGTH MetricNames = 205
41 // Disk related metrics
42 MetricNames_METRIC_DISK_TEMP MetricNames = 300
43 MetricNames_METRIC_DISK_CAPACITY MetricNames = 301
44 MetricNames_METRIC_DISK_USAGE MetricNames = 302
45 MetricNames_METRIC_DISK_USAGE_PERCENTAGE MetricNames = 303
46 MetricNames_METRIC_DISK_READ_WRITE_PERCENTAGE MetricNames = 304
47 MetricNames_METRIC_DISK_FAULTY_CELLS_PERCENTAGE MetricNames = 305
48 // RAM related metrics
49 MetricNames_METRIC_RAM_TEMP MetricNames = 400
50 MetricNames_METRIC_RAM_CAPACITY MetricNames = 401
51 MetricNames_METRIC_RAM_USAGE MetricNames = 402
52 MetricNames_METRIC_RAM_USAGE_PERCENTAGE MetricNames = 403
53 // Power related metrics
54 MetricNames_METRIC_POWER_MAX MetricNames = 500
55 MetricNames_METRIC_POWER_USAGE MetricNames = 501
56 MetricNames_METRIC_POWER_USAGE_PERCENTAGE MetricNames = 502
57 // Chassis related metrics
58 MetricNames_METRIC_INNER_SURROUNDING_TEMP MetricNames = 600
59)
60
61var MetricNames_name = map[int32]string{
62 0: "METRIC_NAME_UNDEFINED",
63 1: "METRIC_FAN_SPEED",
64 100: "METRIC_CPU_TEMP",
65 101: "METRIC_CPU_USAGE_PERCENTAGE",
66 200: "METRIC_TRANSCEIVER_TEMP",
67 201: "METRIC_TRANSCEIVER_VOLTAGE",
68 202: "METRIC_TRANSCEIVER_BIAS",
69 203: "METRIC_TRANSCEIVER_RX_POWER",
70 204: "METRIC_TRANSCEIVER_TX_POWER",
71 205: "METRIC_TRANSCEIVER_WAVELENGTH",
72 300: "METRIC_DISK_TEMP",
73 301: "METRIC_DISK_CAPACITY",
74 302: "METRIC_DISK_USAGE",
75 303: "METRIC_DISK_USAGE_PERCENTAGE",
76 304: "METRIC_DISK_READ_WRITE_PERCENTAGE",
77 305: "METRIC_DISK_FAULTY_CELLS_PERCENTAGE",
78 400: "METRIC_RAM_TEMP",
79 401: "METRIC_RAM_CAPACITY",
80 402: "METRIC_RAM_USAGE",
81 403: "METRIC_RAM_USAGE_PERCENTAGE",
82 500: "METRIC_POWER_MAX",
83 501: "METRIC_POWER_USAGE",
84 502: "METRIC_POWER_USAGE_PERCENTAGE",
85 600: "METRIC_INNER_SURROUNDING_TEMP",
86}
87
88var MetricNames_value = map[string]int32{
89 "METRIC_NAME_UNDEFINED": 0,
90 "METRIC_FAN_SPEED": 1,
91 "METRIC_CPU_TEMP": 100,
92 "METRIC_CPU_USAGE_PERCENTAGE": 101,
93 "METRIC_TRANSCEIVER_TEMP": 200,
94 "METRIC_TRANSCEIVER_VOLTAGE": 201,
95 "METRIC_TRANSCEIVER_BIAS": 202,
96 "METRIC_TRANSCEIVER_RX_POWER": 203,
97 "METRIC_TRANSCEIVER_TX_POWER": 204,
98 "METRIC_TRANSCEIVER_WAVELENGTH": 205,
99 "METRIC_DISK_TEMP": 300,
100 "METRIC_DISK_CAPACITY": 301,
101 "METRIC_DISK_USAGE": 302,
102 "METRIC_DISK_USAGE_PERCENTAGE": 303,
103 "METRIC_DISK_READ_WRITE_PERCENTAGE": 304,
104 "METRIC_DISK_FAULTY_CELLS_PERCENTAGE": 305,
105 "METRIC_RAM_TEMP": 400,
106 "METRIC_RAM_CAPACITY": 401,
107 "METRIC_RAM_USAGE": 402,
108 "METRIC_RAM_USAGE_PERCENTAGE": 403,
109 "METRIC_POWER_MAX": 500,
110 "METRIC_POWER_USAGE": 501,
111 "METRIC_POWER_USAGE_PERCENTAGE": 502,
112 "METRIC_INNER_SURROUNDING_TEMP": 600,
113}
114
115func (x MetricNames) String() string {
116 return proto.EnumName(MetricNames_name, int32(x))
117}
118
119func (MetricNames) EnumDescriptor() ([]byte, []int) {
120 return fileDescriptor_6b6c2f1384c11ff5, []int{0}
121}
122
123type MetricConfig struct {
124 MetricId MetricNames `protobuf:"varint,1,opt,name=metric_id,json=metricId,proto3,enum=dmi.MetricNames" json:"metric_id,omitempty"`
125 // Whether the device manager is collecting and reporting this metric or not
126 IsConfigured bool `protobuf:"varint,2,opt,name=is_configured,json=isConfigured,proto3" json:"is_configured,omitempty"`
127 // Number of seconds between two consecutive polls of the particular metric
128 // Each device manager implemenation could have it's per metric default poll frequency which
129 // can be requested to be changed using this value
130 PollInterval uint32 `protobuf:"varint,3,opt,name=poll_interval,json=pollInterval,proto3" json:"poll_interval,omitempty"`
131 XXX_NoUnkeyedLiteral struct{} `json:"-"`
132 XXX_unrecognized []byte `json:"-"`
133 XXX_sizecache int32 `json:"-"`
134}
135
136func (m *MetricConfig) Reset() { *m = MetricConfig{} }
137func (m *MetricConfig) String() string { return proto.CompactTextString(m) }
138func (*MetricConfig) ProtoMessage() {}
139func (*MetricConfig) Descriptor() ([]byte, []int) {
140 return fileDescriptor_6b6c2f1384c11ff5, []int{0}
141}
142
143func (m *MetricConfig) XXX_Unmarshal(b []byte) error {
144 return xxx_messageInfo_MetricConfig.Unmarshal(m, b)
145}
146func (m *MetricConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
147 return xxx_messageInfo_MetricConfig.Marshal(b, m, deterministic)
148}
149func (m *MetricConfig) XXX_Merge(src proto.Message) {
150 xxx_messageInfo_MetricConfig.Merge(m, src)
151}
152func (m *MetricConfig) XXX_Size() int {
153 return xxx_messageInfo_MetricConfig.Size(m)
154}
155func (m *MetricConfig) XXX_DiscardUnknown() {
156 xxx_messageInfo_MetricConfig.DiscardUnknown(m)
157}
158
159var xxx_messageInfo_MetricConfig proto.InternalMessageInfo
160
161func (m *MetricConfig) GetMetricId() MetricNames {
162 if m != nil {
163 return m.MetricId
164 }
165 return MetricNames_METRIC_NAME_UNDEFINED
166}
167
168func (m *MetricConfig) GetIsConfigured() bool {
169 if m != nil {
170 return m.IsConfigured
171 }
172 return false
173}
174
175func (m *MetricConfig) GetPollInterval() uint32 {
176 if m != nil {
177 return m.PollInterval
178 }
179 return 0
180}
181
182type MetricsConfig struct {
183 Metrics []*MetricConfig `protobuf:"bytes,1,rep,name=metrics,proto3" json:"metrics,omitempty"`
184 XXX_NoUnkeyedLiteral struct{} `json:"-"`
185 XXX_unrecognized []byte `json:"-"`
186 XXX_sizecache int32 `json:"-"`
187}
188
189func (m *MetricsConfig) Reset() { *m = MetricsConfig{} }
190func (m *MetricsConfig) String() string { return proto.CompactTextString(m) }
191func (*MetricsConfig) ProtoMessage() {}
192func (*MetricsConfig) Descriptor() ([]byte, []int) {
193 return fileDescriptor_6b6c2f1384c11ff5, []int{1}
194}
195
196func (m *MetricsConfig) XXX_Unmarshal(b []byte) error {
197 return xxx_messageInfo_MetricsConfig.Unmarshal(m, b)
198}
199func (m *MetricsConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
200 return xxx_messageInfo_MetricsConfig.Marshal(b, m, deterministic)
201}
202func (m *MetricsConfig) XXX_Merge(src proto.Message) {
203 xxx_messageInfo_MetricsConfig.Merge(m, src)
204}
205func (m *MetricsConfig) XXX_Size() int {
206 return xxx_messageInfo_MetricsConfig.Size(m)
207}
208func (m *MetricsConfig) XXX_DiscardUnknown() {
209 xxx_messageInfo_MetricsConfig.DiscardUnknown(m)
210}
211
212var xxx_messageInfo_MetricsConfig proto.InternalMessageInfo
213
214func (m *MetricsConfig) GetMetrics() []*MetricConfig {
215 if m != nil {
216 return m.Metrics
217 }
218 return nil
219}
220
221type ListMetricsResponse struct {
222 Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=dmi.Status" json:"status,omitempty"`
223 Reason Reason `protobuf:"varint,2,opt,name=reason,proto3,enum=dmi.Reason" json:"reason,omitempty"`
224 Metrics *MetricsConfig `protobuf:"bytes,3,opt,name=metrics,proto3" json:"metrics,omitempty"`
225 XXX_NoUnkeyedLiteral struct{} `json:"-"`
226 XXX_unrecognized []byte `json:"-"`
227 XXX_sizecache int32 `json:"-"`
228}
229
230func (m *ListMetricsResponse) Reset() { *m = ListMetricsResponse{} }
231func (m *ListMetricsResponse) String() string { return proto.CompactTextString(m) }
232func (*ListMetricsResponse) ProtoMessage() {}
233func (*ListMetricsResponse) Descriptor() ([]byte, []int) {
234 return fileDescriptor_6b6c2f1384c11ff5, []int{2}
235}
236
237func (m *ListMetricsResponse) XXX_Unmarshal(b []byte) error {
238 return xxx_messageInfo_ListMetricsResponse.Unmarshal(m, b)
239}
240func (m *ListMetricsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
241 return xxx_messageInfo_ListMetricsResponse.Marshal(b, m, deterministic)
242}
243func (m *ListMetricsResponse) XXX_Merge(src proto.Message) {
244 xxx_messageInfo_ListMetricsResponse.Merge(m, src)
245}
246func (m *ListMetricsResponse) XXX_Size() int {
247 return xxx_messageInfo_ListMetricsResponse.Size(m)
248}
249func (m *ListMetricsResponse) XXX_DiscardUnknown() {
250 xxx_messageInfo_ListMetricsResponse.DiscardUnknown(m)
251}
252
253var xxx_messageInfo_ListMetricsResponse proto.InternalMessageInfo
254
255func (m *ListMetricsResponse) GetStatus() Status {
256 if m != nil {
257 return m.Status
258 }
259 return Status_UNDEFINED_STATUS
260}
261
262func (m *ListMetricsResponse) GetReason() Reason {
263 if m != nil {
264 return m.Reason
265 }
266 return Reason_UNDEFINED_REASON
267}
268
269func (m *ListMetricsResponse) GetMetrics() *MetricsConfig {
270 if m != nil {
271 return m.Metrics
272 }
273 return nil
274}
275
276type MetricsConfigurationRequest struct {
277 DeviceUuid *Uuid `protobuf:"bytes,1,opt,name=device_uuid,json=deviceUuid,proto3" json:"device_uuid,omitempty"`
278 // Types that are valid to be assigned to Operation:
279 // *MetricsConfigurationRequest_Changes
280 // *MetricsConfigurationRequest_ResetToDefault
281 Operation isMetricsConfigurationRequest_Operation `protobuf_oneof:"operation"`
282 XXX_NoUnkeyedLiteral struct{} `json:"-"`
283 XXX_unrecognized []byte `json:"-"`
284 XXX_sizecache int32 `json:"-"`
285}
286
287func (m *MetricsConfigurationRequest) Reset() { *m = MetricsConfigurationRequest{} }
288func (m *MetricsConfigurationRequest) String() string { return proto.CompactTextString(m) }
289func (*MetricsConfigurationRequest) ProtoMessage() {}
290func (*MetricsConfigurationRequest) Descriptor() ([]byte, []int) {
291 return fileDescriptor_6b6c2f1384c11ff5, []int{3}
292}
293
294func (m *MetricsConfigurationRequest) XXX_Unmarshal(b []byte) error {
295 return xxx_messageInfo_MetricsConfigurationRequest.Unmarshal(m, b)
296}
297func (m *MetricsConfigurationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
298 return xxx_messageInfo_MetricsConfigurationRequest.Marshal(b, m, deterministic)
299}
300func (m *MetricsConfigurationRequest) XXX_Merge(src proto.Message) {
301 xxx_messageInfo_MetricsConfigurationRequest.Merge(m, src)
302}
303func (m *MetricsConfigurationRequest) XXX_Size() int {
304 return xxx_messageInfo_MetricsConfigurationRequest.Size(m)
305}
306func (m *MetricsConfigurationRequest) XXX_DiscardUnknown() {
307 xxx_messageInfo_MetricsConfigurationRequest.DiscardUnknown(m)
308}
309
310var xxx_messageInfo_MetricsConfigurationRequest proto.InternalMessageInfo
311
312func (m *MetricsConfigurationRequest) GetDeviceUuid() *Uuid {
313 if m != nil {
314 return m.DeviceUuid
315 }
316 return nil
317}
318
319type isMetricsConfigurationRequest_Operation interface {
320 isMetricsConfigurationRequest_Operation()
321}
322
323type MetricsConfigurationRequest_Changes struct {
324 Changes *MetricsConfig `protobuf:"bytes,2,opt,name=changes,proto3,oneof"`
325}
326
327type MetricsConfigurationRequest_ResetToDefault struct {
328 ResetToDefault bool `protobuf:"varint,3,opt,name=reset_to_default,json=resetToDefault,proto3,oneof"`
329}
330
331func (*MetricsConfigurationRequest_Changes) isMetricsConfigurationRequest_Operation() {}
332
333func (*MetricsConfigurationRequest_ResetToDefault) isMetricsConfigurationRequest_Operation() {}
334
335func (m *MetricsConfigurationRequest) GetOperation() isMetricsConfigurationRequest_Operation {
336 if m != nil {
337 return m.Operation
338 }
339 return nil
340}
341
342func (m *MetricsConfigurationRequest) GetChanges() *MetricsConfig {
343 if x, ok := m.GetOperation().(*MetricsConfigurationRequest_Changes); ok {
344 return x.Changes
345 }
346 return nil
347}
348
349func (m *MetricsConfigurationRequest) GetResetToDefault() bool {
350 if x, ok := m.GetOperation().(*MetricsConfigurationRequest_ResetToDefault); ok {
351 return x.ResetToDefault
352 }
353 return false
354}
355
356// XXX_OneofWrappers is for the internal use of the proto package.
357func (*MetricsConfigurationRequest) XXX_OneofWrappers() []interface{} {
358 return []interface{}{
359 (*MetricsConfigurationRequest_Changes)(nil),
360 (*MetricsConfigurationRequest_ResetToDefault)(nil),
361 }
362}
363
364type MetricsConfigurationResponse struct {
365 Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=dmi.Status" json:"status,omitempty"`
366 Reason Reason `protobuf:"varint,2,opt,name=reason,proto3,enum=dmi.Reason" json:"reason,omitempty"`
367 XXX_NoUnkeyedLiteral struct{} `json:"-"`
368 XXX_unrecognized []byte `json:"-"`
369 XXX_sizecache int32 `json:"-"`
370}
371
372func (m *MetricsConfigurationResponse) Reset() { *m = MetricsConfigurationResponse{} }
373func (m *MetricsConfigurationResponse) String() string { return proto.CompactTextString(m) }
374func (*MetricsConfigurationResponse) ProtoMessage() {}
375func (*MetricsConfigurationResponse) Descriptor() ([]byte, []int) {
376 return fileDescriptor_6b6c2f1384c11ff5, []int{4}
377}
378
379func (m *MetricsConfigurationResponse) XXX_Unmarshal(b []byte) error {
380 return xxx_messageInfo_MetricsConfigurationResponse.Unmarshal(m, b)
381}
382func (m *MetricsConfigurationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
383 return xxx_messageInfo_MetricsConfigurationResponse.Marshal(b, m, deterministic)
384}
385func (m *MetricsConfigurationResponse) XXX_Merge(src proto.Message) {
386 xxx_messageInfo_MetricsConfigurationResponse.Merge(m, src)
387}
388func (m *MetricsConfigurationResponse) XXX_Size() int {
389 return xxx_messageInfo_MetricsConfigurationResponse.Size(m)
390}
391func (m *MetricsConfigurationResponse) XXX_DiscardUnknown() {
392 xxx_messageInfo_MetricsConfigurationResponse.DiscardUnknown(m)
393}
394
395var xxx_messageInfo_MetricsConfigurationResponse proto.InternalMessageInfo
396
397func (m *MetricsConfigurationResponse) GetStatus() Status {
398 if m != nil {
399 return m.Status
400 }
401 return Status_UNDEFINED_STATUS
402}
403
404func (m *MetricsConfigurationResponse) GetReason() Reason {
405 if m != nil {
406 return m.Reason
407 }
408 return Reason_UNDEFINED_REASON
409}
410
411type MetricMetaData struct {
412 DeviceUuid *Uuid `protobuf:"bytes,1,opt,name=device_uuid,json=deviceUuid,proto3" json:"device_uuid,omitempty"`
413 // uuid of the component
414 ComponentUuid *Uuid `protobuf:"bytes,2,opt,name=component_uuid,json=componentUuid,proto3" json:"component_uuid,omitempty"`
415 ComponentName string `protobuf:"bytes,3,opt,name=component_name,json=componentName,proto3" json:"component_name,omitempty"`
416 XXX_NoUnkeyedLiteral struct{} `json:"-"`
417 XXX_unrecognized []byte `json:"-"`
418 XXX_sizecache int32 `json:"-"`
419}
420
421func (m *MetricMetaData) Reset() { *m = MetricMetaData{} }
422func (m *MetricMetaData) String() string { return proto.CompactTextString(m) }
423func (*MetricMetaData) ProtoMessage() {}
424func (*MetricMetaData) Descriptor() ([]byte, []int) {
425 return fileDescriptor_6b6c2f1384c11ff5, []int{5}
426}
427
428func (m *MetricMetaData) XXX_Unmarshal(b []byte) error {
429 return xxx_messageInfo_MetricMetaData.Unmarshal(m, b)
430}
431func (m *MetricMetaData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
432 return xxx_messageInfo_MetricMetaData.Marshal(b, m, deterministic)
433}
434func (m *MetricMetaData) XXX_Merge(src proto.Message) {
435 xxx_messageInfo_MetricMetaData.Merge(m, src)
436}
437func (m *MetricMetaData) XXX_Size() int {
438 return xxx_messageInfo_MetricMetaData.Size(m)
439}
440func (m *MetricMetaData) XXX_DiscardUnknown() {
441 xxx_messageInfo_MetricMetaData.DiscardUnknown(m)
442}
443
444var xxx_messageInfo_MetricMetaData proto.InternalMessageInfo
445
446func (m *MetricMetaData) GetDeviceUuid() *Uuid {
447 if m != nil {
448 return m.DeviceUuid
449 }
450 return nil
451}
452
453func (m *MetricMetaData) GetComponentUuid() *Uuid {
454 if m != nil {
455 return m.ComponentUuid
456 }
457 return nil
458}
459
460func (m *MetricMetaData) GetComponentName() string {
461 if m != nil {
462 return m.ComponentName
463 }
464 return ""
465}
466
467// The Metrics are conveyed to external systems by submitting them on a kafka bus.
468// The topic to which are Metrics are submitted would be configured as startup
469// configuration of the components
470type Metric struct {
471 MetricId MetricNames `protobuf:"varint,1,opt,name=metric_id,json=metricId,proto3,enum=dmi.MetricNames" json:"metric_id,omitempty"`
472 MetricMetadata *MetricMetaData `protobuf:"bytes,2,opt,name=metric_metadata,json=metricMetadata,proto3" json:"metric_metadata,omitempty"`
473 Value *ComponentSensorData `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
474 XXX_NoUnkeyedLiteral struct{} `json:"-"`
475 XXX_unrecognized []byte `json:"-"`
476 XXX_sizecache int32 `json:"-"`
477}
478
479func (m *Metric) Reset() { *m = Metric{} }
480func (m *Metric) String() string { return proto.CompactTextString(m) }
481func (*Metric) ProtoMessage() {}
482func (*Metric) Descriptor() ([]byte, []int) {
483 return fileDescriptor_6b6c2f1384c11ff5, []int{6}
484}
485
486func (m *Metric) XXX_Unmarshal(b []byte) error {
487 return xxx_messageInfo_Metric.Unmarshal(m, b)
488}
489func (m *Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
490 return xxx_messageInfo_Metric.Marshal(b, m, deterministic)
491}
492func (m *Metric) XXX_Merge(src proto.Message) {
493 xxx_messageInfo_Metric.Merge(m, src)
494}
495func (m *Metric) XXX_Size() int {
496 return xxx_messageInfo_Metric.Size(m)
497}
498func (m *Metric) XXX_DiscardUnknown() {
499 xxx_messageInfo_Metric.DiscardUnknown(m)
500}
501
502var xxx_messageInfo_Metric proto.InternalMessageInfo
503
504func (m *Metric) GetMetricId() MetricNames {
505 if m != nil {
506 return m.MetricId
507 }
508 return MetricNames_METRIC_NAME_UNDEFINED
509}
510
511func (m *Metric) GetMetricMetadata() *MetricMetaData {
512 if m != nil {
513 return m.MetricMetadata
514 }
515 return nil
516}
517
518func (m *Metric) GetValue() *ComponentSensorData {
519 if m != nil {
520 return m.Value
521 }
522 return nil
523}
524
525type GetMetricRequest struct {
526 MetaData *MetricMetaData `protobuf:"bytes,1,opt,name=meta_data,json=metaData,proto3" json:"meta_data,omitempty"`
527 MetricId MetricNames `protobuf:"varint,2,opt,name=metric_id,json=metricId,proto3,enum=dmi.MetricNames" json:"metric_id,omitempty"`
528 XXX_NoUnkeyedLiteral struct{} `json:"-"`
529 XXX_unrecognized []byte `json:"-"`
530 XXX_sizecache int32 `json:"-"`
531}
532
533func (m *GetMetricRequest) Reset() { *m = GetMetricRequest{} }
534func (m *GetMetricRequest) String() string { return proto.CompactTextString(m) }
535func (*GetMetricRequest) ProtoMessage() {}
536func (*GetMetricRequest) Descriptor() ([]byte, []int) {
537 return fileDescriptor_6b6c2f1384c11ff5, []int{7}
538}
539
540func (m *GetMetricRequest) XXX_Unmarshal(b []byte) error {
541 return xxx_messageInfo_GetMetricRequest.Unmarshal(m, b)
542}
543func (m *GetMetricRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
544 return xxx_messageInfo_GetMetricRequest.Marshal(b, m, deterministic)
545}
546func (m *GetMetricRequest) XXX_Merge(src proto.Message) {
547 xxx_messageInfo_GetMetricRequest.Merge(m, src)
548}
549func (m *GetMetricRequest) XXX_Size() int {
550 return xxx_messageInfo_GetMetricRequest.Size(m)
551}
552func (m *GetMetricRequest) XXX_DiscardUnknown() {
553 xxx_messageInfo_GetMetricRequest.DiscardUnknown(m)
554}
555
556var xxx_messageInfo_GetMetricRequest proto.InternalMessageInfo
557
558func (m *GetMetricRequest) GetMetaData() *MetricMetaData {
559 if m != nil {
560 return m.MetaData
561 }
562 return nil
563}
564
565func (m *GetMetricRequest) GetMetricId() MetricNames {
566 if m != nil {
567 return m.MetricId
568 }
569 return MetricNames_METRIC_NAME_UNDEFINED
570}
571
572func init() {
573 proto.RegisterEnum("dmi.MetricNames", MetricNames_name, MetricNames_value)
574 proto.RegisterType((*MetricConfig)(nil), "dmi.MetricConfig")
575 proto.RegisterType((*MetricsConfig)(nil), "dmi.MetricsConfig")
576 proto.RegisterType((*ListMetricsResponse)(nil), "dmi.ListMetricsResponse")
577 proto.RegisterType((*MetricsConfigurationRequest)(nil), "dmi.MetricsConfigurationRequest")
578 proto.RegisterType((*MetricsConfigurationResponse)(nil), "dmi.MetricsConfigurationResponse")
579 proto.RegisterType((*MetricMetaData)(nil), "dmi.MetricMetaData")
580 proto.RegisterType((*Metric)(nil), "dmi.Metric")
581 proto.RegisterType((*GetMetricRequest)(nil), "dmi.GetMetricRequest")
582}
583
584func init() { proto.RegisterFile("dmi/hw_metrics_mgmt_service.proto", fileDescriptor_6b6c2f1384c11ff5) }
585
586var fileDescriptor_6b6c2f1384c11ff5 = []byte{
587 // 984 bytes of a gzipped FileDescriptorProto
588 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xdd, 0x6e, 0xe3, 0x44,
589 0x14, 0xc7, 0xeb, 0x84, 0xed, 0xb6, 0x27, 0xfd, 0x70, 0xa7, 0x2d, 0x9b, 0xcd, 0x16, 0x36, 0x4d,
590 0x05, 0xaa, 0x0a, 0x4d, 0x56, 0xdd, 0x1b, 0x10, 0x7b, 0xe3, 0x3a, 0x6e, 0x6b, 0x91, 0xb8, 0xd1,
591 0xc4, 0x69, 0x77, 0xb9, 0x19, 0xcd, 0xc6, 0xd3, 0xd4, 0x52, 0x6d, 0x07, 0x7b, 0xdc, 0x7d, 0x04,
592 0xae, 0x90, 0xf8, 0x10, 0x8f, 0xc0, 0x1d, 0xdf, 0x4f, 0xc1, 0xe7, 0x3d, 0xbc, 0x04, 0x57, 0xc0,
593 0x35, 0xf2, 0x8c, 0x63, 0xa6, 0xdd, 0x14, 0xb4, 0x12, 0x77, 0xcd, 0xff, 0xfc, 0xce, 0x39, 0xff,
594 0x73, 0x6c, 0xcf, 0x14, 0x36, 0xbd, 0xc0, 0x6f, 0x9d, 0x3f, 0x23, 0x01, 0xe3, 0xb1, 0x3f, 0x4c,
595 0x48, 0x30, 0x0a, 0x38, 0x49, 0x58, 0x7c, 0xe9, 0x0f, 0x59, 0x73, 0x1c, 0x47, 0x3c, 0x42, 0x65,
596 0x2f, 0xf0, 0x6b, 0x2b, 0x19, 0x37, 0x8c, 0x82, 0x20, 0x0a, 0x13, 0xa9, 0xd7, 0x16, 0x64, 0xaa,
597 0xfc, 0xd5, 0xf8, 0x40, 0x83, 0x85, 0xae, 0x28, 0x62, 0x46, 0xe1, 0x99, 0x3f, 0x42, 0xbb, 0x30,
598 0x2f, 0x8b, 0x12, 0xdf, 0xab, 0x6a, 0x75, 0x6d, 0x7b, 0x69, 0x4f, 0x6f, 0x7a, 0x81, 0xdf, 0x94,
599 0x94, 0x43, 0x03, 0x96, 0xe0, 0x39, 0x89, 0xd8, 0x1e, 0xda, 0x82, 0x45, 0x3f, 0x21, 0x43, 0x91,
600 0x9b, 0xc6, 0xcc, 0xab, 0x96, 0xea, 0xda, 0xf6, 0x1c, 0x5e, 0xf0, 0x13, 0xb3, 0xd0, 0x32, 0x68,
601 0x1c, 0x5d, 0x5c, 0x10, 0x3f, 0xe4, 0x2c, 0xbe, 0xa4, 0x17, 0xd5, 0x72, 0x5d, 0xdb, 0x5e, 0xc4,
602 0x0b, 0x99, 0x68, 0xe7, 0x5a, 0xe3, 0x11, 0x2c, 0xca, 0x16, 0x79, 0x26, 0x7a, 0x03, 0x6e, 0xe7,
603 0xe3, 0x55, 0xb5, 0x7a, 0x79, 0xbb, 0xb2, 0xb7, 0xa2, 0xf8, 0x90, 0x0c, 0x9e, 0x10, 0x8d, 0x0f,
604 0x35, 0x58, 0xed, 0xf8, 0x09, 0xcf, 0x4b, 0x60, 0x96, 0x8c, 0xa3, 0x30, 0x61, 0x68, 0x0b, 0x66,
605 0x13, 0x4e, 0x79, 0x9a, 0xe4, 0xb3, 0x54, 0x44, 0x8d, 0xbe, 0x90, 0x70, 0x1e, 0xca, 0xa0, 0x98,
606 0xd1, 0x24, 0x0a, 0x85, 0xfb, 0x09, 0x84, 0x85, 0x84, 0xf3, 0x10, 0x7a, 0xf3, 0x1f, 0x3b, 0x99,
607 0xfd, 0xca, 0x1e, 0x52, 0xec, 0x24, 0xd7, 0xfd, 0x7c, 0xa7, 0xc1, 0xbd, 0x2b, 0xa1, 0x34, 0xa6,
608 0xd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, 0xf1, 0xf5, 0x89, 0x6b, 0x15, 0xbd, 0x05, 0x15,
642 0xe5, 0x86, 0x41, 0xcb, 0xe2, 0x4b, 0x39, 0xa2, 0xb1, 0xf7, 0x8c, 0xc6, 0xcc, 0x6e, 0xd7, 0xe4,
643 0x47, 0x3b, 0xed, 0x12, 0xa2, 0x50, 0x1b, 0x8c, 0x3d, 0xca, 0xd9, 0xb4, 0xd3, 0x15, 0xd5, 0x9f,
644 0x3f, 0xcd, 0xaf, 0x5e, 0x16, 0xb5, 0xcd, 0x7f, 0x21, 0xf2, 0x16, 0x2d, 0x98, 0x2f, 0x0e, 0x04,
645 0xb4, 0x2e, 0xf8, 0xeb, 0x07, 0x44, 0xad, 0xa2, 0x94, 0xd9, 0x7f, 0xe7, 0xbd, 0xb7, 0x47, 0x3e,
646 0x3f, 0x4f, 0x9f, 0x36, 0x87, 0x51, 0xd0, 0x8a, 0xc6, 0x2c, 0x1c, 0x46, 0xb1, 0xd7, 0x92, 0x87,
647 0xec, 0x6e, 0x50, 0x4c, 0xbf, 0x2b, 0x2e, 0xed, 0x33, 0x3a, 0x64, 0xad, 0xcb, 0x87, 0xad, 0x51,
648 0xd4, 0xf2, 0x02, 0xff, 0xe9, 0xac, 0xf8, 0xe7, 0xe1, 0xe1, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff,
649 0xe0, 0xe9, 0x64, 0x8e, 0x87, 0x08, 0x00, 0x00,
650}
651
652// Reference imports to suppress errors if they are not otherwise used.
653var _ context.Context
654var _ grpc.ClientConn
655
656// This is a compile-time assertion to ensure that this generated file
657// is compatible with the grpc package it is being compiled against.
658const _ = grpc.SupportPackageIsVersion4
659
660// NativeMetricsManagementServiceClient is the client API for NativeMetricsManagementService service.
661//
662// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
663type NativeMetricsManagementServiceClient interface {
664 // List the supported metrics for the passed device.
665 // This would be the first call that you make to know about the metrics that a particular device supports and
666 // then use the UpdateMetricsConfiguration API to monitor only the required metrics.
667 ListMetrics(ctx context.Context, in *HardwareID, opts ...grpc.CallOption) (*ListMetricsResponse, error)
668 // Updates the configuration of the list of metrics in the request
669 // Acts upon single metric configuration, collection of a single metric can be started/stopped
670 // by changing its configuration.
671 //
672 // This configuration is persisted across restart of the device or the device manager
673 UpdateMetricsConfiguration(ctx context.Context, in *MetricsConfigurationRequest, opts ...grpc.CallOption) (*MetricsConfigurationResponse, error)
674 // Get the instantenous value of a metric
675 GetMetric(ctx context.Context, in *GetMetricRequest, opts ...grpc.CallOption) (*Metric, error)
676}
677
678type nativeMetricsManagementServiceClient struct {
679 cc *grpc.ClientConn
680}
681
682func NewNativeMetricsManagementServiceClient(cc *grpc.ClientConn) NativeMetricsManagementServiceClient {
683 return &nativeMetricsManagementServiceClient{cc}
684}
685
686func (c *nativeMetricsManagementServiceClient) ListMetrics(ctx context.Context, in *HardwareID, opts ...grpc.CallOption) (*ListMetricsResponse, error) {
687 out := new(ListMetricsResponse)
688 err := c.cc.Invoke(ctx, "/dmi.NativeMetricsManagementService/ListMetrics", in, out, opts...)
689 if err != nil {
690 return nil, err
691 }
692 return out, nil
693}
694
695func (c *nativeMetricsManagementServiceClient) UpdateMetricsConfiguration(ctx context.Context, in *MetricsConfigurationRequest, opts ...grpc.CallOption) (*MetricsConfigurationResponse, error) {
696 out := new(MetricsConfigurationResponse)
697 err := c.cc.Invoke(ctx, "/dmi.NativeMetricsManagementService/UpdateMetricsConfiguration", in, out, opts...)
698 if err != nil {
699 return nil, err
700 }
701 return out, nil
702}
703
704func (c *nativeMetricsManagementServiceClient) GetMetric(ctx context.Context, in *GetMetricRequest, opts ...grpc.CallOption) (*Metric, error) {
705 out := new(Metric)
706 err := c.cc.Invoke(ctx, "/dmi.NativeMetricsManagementService/GetMetric", in, out, opts...)
707 if err != nil {
708 return nil, err
709 }
710 return out, nil
711}
712
713// NativeMetricsManagementServiceServer is the server API for NativeMetricsManagementService service.
714type NativeMetricsManagementServiceServer interface {
715 // List the supported metrics for the passed device.
716 // This would be the first call that you make to know about the metrics that a particular device supports and
717 // then use the UpdateMetricsConfiguration API to monitor only the required metrics.
718 ListMetrics(context.Context, *HardwareID) (*ListMetricsResponse, error)
719 // Updates the configuration of the list of metrics in the request
720 // Acts upon single metric configuration, collection of a single metric can be started/stopped
721 // by changing its configuration.
722 //
723 // This configuration is persisted across restart of the device or the device manager
724 UpdateMetricsConfiguration(context.Context, *MetricsConfigurationRequest) (*MetricsConfigurationResponse, error)
725 // Get the instantenous value of a metric
726 GetMetric(context.Context, *GetMetricRequest) (*Metric, error)
727}
728
729func RegisterNativeMetricsManagementServiceServer(s *grpc.Server, srv NativeMetricsManagementServiceServer) {
730 s.RegisterService(&_NativeMetricsManagementService_serviceDesc, srv)
731}
732
733func _NativeMetricsManagementService_ListMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
734 in := new(HardwareID)
735 if err := dec(in); err != nil {
736 return nil, err
737 }
738 if interceptor == nil {
739 return srv.(NativeMetricsManagementServiceServer).ListMetrics(ctx, in)
740 }
741 info := &grpc.UnaryServerInfo{
742 Server: srv,
743 FullMethod: "/dmi.NativeMetricsManagementService/ListMetrics",
744 }
745 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
746 return srv.(NativeMetricsManagementServiceServer).ListMetrics(ctx, req.(*HardwareID))
747 }
748 return interceptor(ctx, in, info, handler)
749}
750
751func _NativeMetricsManagementService_UpdateMetricsConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
752 in := new(MetricsConfigurationRequest)
753 if err := dec(in); err != nil {
754 return nil, err
755 }
756 if interceptor == nil {
757 return srv.(NativeMetricsManagementServiceServer).UpdateMetricsConfiguration(ctx, in)
758 }
759 info := &grpc.UnaryServerInfo{
760 Server: srv,
761 FullMethod: "/dmi.NativeMetricsManagementService/UpdateMetricsConfiguration",
762 }
763 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
764 return srv.(NativeMetricsManagementServiceServer).UpdateMetricsConfiguration(ctx, req.(*MetricsConfigurationRequest))
765 }
766 return interceptor(ctx, in, info, handler)
767}
768
769func _NativeMetricsManagementService_GetMetric_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
770 in := new(GetMetricRequest)
771 if err := dec(in); err != nil {
772 return nil, err
773 }
774 if interceptor == nil {
775 return srv.(NativeMetricsManagementServiceServer).GetMetric(ctx, in)
776 }
777 info := &grpc.UnaryServerInfo{
778 Server: srv,
779 FullMethod: "/dmi.NativeMetricsManagementService/GetMetric",
780 }
781 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
782 return srv.(NativeMetricsManagementServiceServer).GetMetric(ctx, req.(*GetMetricRequest))
783 }
784 return interceptor(ctx, in, info, handler)
785}
786
787var _NativeMetricsManagementService_serviceDesc = grpc.ServiceDesc{
788 ServiceName: "dmi.NativeMetricsManagementService",
789 HandlerType: (*NativeMetricsManagementServiceServer)(nil),
790 Methods: []grpc.MethodDesc{
791 {
792 MethodName: "ListMetrics",
793 Handler: _NativeMetricsManagementService_ListMetrics_Handler,
794 },
795 {
796 MethodName: "UpdateMetricsConfiguration",
797 Handler: _NativeMetricsManagementService_UpdateMetricsConfiguration_Handler,
798 },
799 {
800 MethodName: "GetMetric",
801 Handler: _NativeMetricsManagementService_GetMetric_Handler,
802 },
803 },
804 Streams: []grpc.StreamDesc{},
805 Metadata: "dmi/hw_metrics_mgmt_service.proto",
806}