// Code generated by protoc-gen-go. DO NOT EDIT.
// source: dmi/hw_events_mgmt_service.proto

package dmi

import (
	context "context"
	fmt "fmt"
	proto "github.com/golang/protobuf/proto"
	empty "github.com/golang/protobuf/ptypes/empty"
	timestamp "github.com/golang/protobuf/ptypes/timestamp"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	math "math"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package

type EventIds int32

const (
	EventIds_EVENT_NAME_UNDEFINED EventIds = 0
	// Events from the Transceivers
	EventIds_EVENT_TRANSCEIVER_PLUG_OUT EventIds = 100
	EventIds_EVENT_TRANSCEIVER_PLUG_IN  EventIds = 101
	// The threshold based events on the transceivers should be configured on
	// the port components of that transceiver and not on the transceiver
	// component itself. This is because there could be different thresholds
	// on the different ports of a transceiver (for example for a transceiver of
	// type COMBO_GPON_XGSPON the power thresholds could be different for the
	// GPON and XGSPON ports)
	EventIds_EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD               EventIds = 102
	EventIds_EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD               EventIds = 103
	EventIds_EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD           EventIds = 104
	EventIds_EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD           EventIds = 105
	EventIds_EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD               EventIds = 106
	EventIds_EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD               EventIds = 107
	EventIds_EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD              EventIds = 108
	EventIds_EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD              EventIds = 109
	EventIds_EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD              EventIds = 110
	EventIds_EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD              EventIds = 111
	EventIds_EVENT_TRANSCEIVER_FAILURE                               EventIds = 112
	EventIds_EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD_RECOVERED     EventIds = 113
	EventIds_EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD_RECOVERED     EventIds = 114
	EventIds_EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD_RECOVERED EventIds = 115
	EventIds_EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD_RECOVERED EventIds = 116
	EventIds_EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD_RECOVERED     EventIds = 117
	EventIds_EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD_RECOVERED     EventIds = 118
	EventIds_EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD_RECOVERED    EventIds = 119
	EventIds_EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD_RECOVERED    EventIds = 120
	EventIds_EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD_RECOVERED    EventIds = 121
	EventIds_EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD_RECOVERED    EventIds = 122
	EventIds_EVENT_TRANSCEIVER_FAILURE_RECOVERED                     EventIds = 123
	// Events from the PSU
	EventIds_EVENT_PSU_PLUG_OUT          EventIds = 200
	EventIds_EVENT_PSU_PLUG_IN           EventIds = 201
	EventIds_EVENT_PSU_FAILURE           EventIds = 202
	EventIds_EVENT_PSU_FAILURE_RECOVERED EventIds = 203
	// Events for the Fans
	EventIds_EVENT_FAN_FAILURE           EventIds = 300
	EventIds_EVENT_FAN_PLUG_OUT          EventIds = 301
	EventIds_EVENT_FAN_PLUG_IN           EventIds = 302
	EventIds_EVENT_FAN_FAILURE_RECOVERED EventIds = 303
	// Events for the CPUs
	EventIds_EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL           EventIds = 400
	EventIds_EVENT_CPU_TEMPERATURE_ABOVE_FATAL              EventIds = 401
	EventIds_EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL_RECOVERED EventIds = 402
	EventIds_EVENT_CPU_TEMPERATURE_ABOVE_FATAL_RECOVERED    EventIds = 403
	EventIds_EVENT_CPU_USAGE_ABOVE_THRESHOLD                EventIds = 404
	EventIds_EVENT_CPU_USAGE_ABOVE_THRESHOLD_RECOVERED      EventIds = 405
	// Events for the complete HW Device
	EventIds_EVENT_HW_DEVICE_RESET                                EventIds = 500
	EventIds_EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL           EventIds = 501
	EventIds_EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL              EventIds = 502
	EventIds_EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL_RECOVERED EventIds = 503
	EventIds_EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL_RECOVERED    EventIds = 504
	EventIds_EVENT_HW_DEVICE_REBOOT                               EventIds = 505
	EventIds_EVENT_HW_TEMPERATURE_SENSOR_FAILED                   EventIds = 506
	EventIds_EVENT_HW_ALL_TEMPERATURE_SENSORS_FAILED              EventIds = 507
	EventIds_EVENT_HW_DISK_USAGE_ABOVE_THRESHOLD                  EventIds = 508
	EventIds_EVENT_HW_DISK_USAGE_ABOVE_THRESHOLD_RECOVERED        EventIds = 509
	EventIds_EVENT_HW_MEMORY_USAGE_ABOVE_THRESHOLD                EventIds = 510
	EventIds_EVENT_HW_MEMORY_USAGE_ABOVE_THRESHOLD_RECOVERED      EventIds = 511
	EventIds_EVENT_HW_NTP_SYNC_FAILURE                            EventIds = 512
	EventIds_EVENT_HW_NTP_SYNC_FAILURE_RECOVERED                  EventIds = 513
	// Events for the line cards on the HW Device
	EventIds_EVENT_LINE_CARD_PLUG_OUT EventIds = 600
	EventIds_EVENT_LINE_CARD_PLUG_IN  EventIds = 601
	// Indicates that the a state of a component has changed.
	// The StateChangeInfo message inside the event conveys the old and new states.
	EventIds_EVENT_COMPONENT_ADMIN_STATE_CHANGED   EventIds = 700
	EventIds_EVENT_COMPONENT_OPER_STATE_CHANGED    EventIds = 701
	EventIds_EVENT_COMPONENT_ALARM_STATE_CHANGED   EventIds = 702
	EventIds_EVENT_COMPONENT_USAGE_STATE_CHANGED   EventIds = 703
	EventIds_EVENT_COMPONENT_STANDBY_STATE_CHANGED EventIds = 704
)

var EventIds_name = map[int32]string{
	0:   "EVENT_NAME_UNDEFINED",
	100: "EVENT_TRANSCEIVER_PLUG_OUT",
	101: "EVENT_TRANSCEIVER_PLUG_IN",
	102: "EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD",
	103: "EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD",
	104: "EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD",
	105: "EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD",
	106: "EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD",
	107: "EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD",
	108: "EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD",
	109: "EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD",
	110: "EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD",
	111: "EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD",
	112: "EVENT_TRANSCEIVER_FAILURE",
	113: "EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD_RECOVERED",
	114: "EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD_RECOVERED",
	115: "EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD_RECOVERED",
	116: "EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD_RECOVERED",
	117: "EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD_RECOVERED",
	118: "EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD_RECOVERED",
	119: "EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD_RECOVERED",
	120: "EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD_RECOVERED",
	121: "EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD_RECOVERED",
	122: "EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD_RECOVERED",
	123: "EVENT_TRANSCEIVER_FAILURE_RECOVERED",
	200: "EVENT_PSU_PLUG_OUT",
	201: "EVENT_PSU_PLUG_IN",
	202: "EVENT_PSU_FAILURE",
	203: "EVENT_PSU_FAILURE_RECOVERED",
	300: "EVENT_FAN_FAILURE",
	301: "EVENT_FAN_PLUG_OUT",
	302: "EVENT_FAN_PLUG_IN",
	303: "EVENT_FAN_FAILURE_RECOVERED",
	400: "EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL",
	401: "EVENT_CPU_TEMPERATURE_ABOVE_FATAL",
	402: "EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL_RECOVERED",
	403: "EVENT_CPU_TEMPERATURE_ABOVE_FATAL_RECOVERED",
	404: "EVENT_CPU_USAGE_ABOVE_THRESHOLD",
	405: "EVENT_CPU_USAGE_ABOVE_THRESHOLD_RECOVERED",
	500: "EVENT_HW_DEVICE_RESET",
	501: "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL",
	502: "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL",
	503: "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL_RECOVERED",
	504: "EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL_RECOVERED",
	505: "EVENT_HW_DEVICE_REBOOT",
	506: "EVENT_HW_TEMPERATURE_SENSOR_FAILED",
	507: "EVENT_HW_ALL_TEMPERATURE_SENSORS_FAILED",
	508: "EVENT_HW_DISK_USAGE_ABOVE_THRESHOLD",
	509: "EVENT_HW_DISK_USAGE_ABOVE_THRESHOLD_RECOVERED",
	510: "EVENT_HW_MEMORY_USAGE_ABOVE_THRESHOLD",
	511: "EVENT_HW_MEMORY_USAGE_ABOVE_THRESHOLD_RECOVERED",
	512: "EVENT_HW_NTP_SYNC_FAILURE",
	513: "EVENT_HW_NTP_SYNC_FAILURE_RECOVERED",
	600: "EVENT_LINE_CARD_PLUG_OUT",
	601: "EVENT_LINE_CARD_PLUG_IN",
	700: "EVENT_COMPONENT_ADMIN_STATE_CHANGED",
	701: "EVENT_COMPONENT_OPER_STATE_CHANGED",
	702: "EVENT_COMPONENT_ALARM_STATE_CHANGED",
	703: "EVENT_COMPONENT_USAGE_STATE_CHANGED",
	704: "EVENT_COMPONENT_STANDBY_STATE_CHANGED",
}

var EventIds_value = map[string]int32{
	"EVENT_NAME_UNDEFINED":                                    0,
	"EVENT_TRANSCEIVER_PLUG_OUT":                              100,
	"EVENT_TRANSCEIVER_PLUG_IN":                               101,
	"EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD":               102,
	"EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD":               103,
	"EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD":           104,
	"EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD":           105,
	"EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD":               106,
	"EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD":               107,
	"EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD":              108,
	"EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD":              109,
	"EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD":              110,
	"EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD":              111,
	"EVENT_TRANSCEIVER_FAILURE":                               112,
	"EVENT_TRANSCEIVER_VOLTAGE_ABOVE_THRESHOLD_RECOVERED":     113,
	"EVENT_TRANSCEIVER_VOLTAGE_BELOW_THRESHOLD_RECOVERED":     114,
	"EVENT_TRANSCEIVER_TEMPERATURE_ABOVE_THRESHOLD_RECOVERED": 115,
	"EVENT_TRANSCEIVER_TEMPERATURE_BELOW_THRESHOLD_RECOVERED": 116,
	"EVENT_TRANSCEIVER_CURRENT_ABOVE_THRESHOLD_RECOVERED":     117,
	"EVENT_TRANSCEIVER_CURRENT_BELOW_THRESHOLD_RECOVERED":     118,
	"EVENT_TRANSCEIVER_RX_POWER_ABOVE_THRESHOLD_RECOVERED":    119,
	"EVENT_TRANSCEIVER_RX_POWER_BELOW_THRESHOLD_RECOVERED":    120,
	"EVENT_TRANSCEIVER_TX_POWER_ABOVE_THRESHOLD_RECOVERED":    121,
	"EVENT_TRANSCEIVER_TX_POWER_BELOW_THRESHOLD_RECOVERED":    122,
	"EVENT_TRANSCEIVER_FAILURE_RECOVERED":                     123,
	"EVENT_PSU_PLUG_OUT":                                      200,
	"EVENT_PSU_PLUG_IN":                                       201,
	"EVENT_PSU_FAILURE":                                       202,
	"EVENT_PSU_FAILURE_RECOVERED":                             203,
	"EVENT_FAN_FAILURE":                                       300,
	"EVENT_FAN_PLUG_OUT":                                      301,
	"EVENT_FAN_PLUG_IN":                                       302,
	"EVENT_FAN_FAILURE_RECOVERED":                             303,
	"EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL":                    400,
	"EVENT_CPU_TEMPERATURE_ABOVE_FATAL":                       401,
	"EVENT_CPU_TEMPERATURE_ABOVE_CRITICAL_RECOVERED":          402,
	"EVENT_CPU_TEMPERATURE_ABOVE_FATAL_RECOVERED":             403,
	"EVENT_CPU_USAGE_ABOVE_THRESHOLD":                         404,
	"EVENT_CPU_USAGE_ABOVE_THRESHOLD_RECOVERED":               405,
	"EVENT_HW_DEVICE_RESET":                                   500,
	"EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL":              501,
	"EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL":                 502,
	"EVENT_HW_DEVICE_TEMPERATURE_ABOVE_CRITICAL_RECOVERED":    503,
	"EVENT_HW_DEVICE_TEMPERATURE_ABOVE_FATAL_RECOVERED":       504,
	"EVENT_HW_DEVICE_REBOOT":                                  505,
	"EVENT_HW_TEMPERATURE_SENSOR_FAILED":                      506,
	"EVENT_HW_ALL_TEMPERATURE_SENSORS_FAILED":                 507,
	"EVENT_HW_DISK_USAGE_ABOVE_THRESHOLD":                     508,
	"EVENT_HW_DISK_USAGE_ABOVE_THRESHOLD_RECOVERED":           509,
	"EVENT_HW_MEMORY_USAGE_ABOVE_THRESHOLD":                   510,
	"EVENT_HW_MEMORY_USAGE_ABOVE_THRESHOLD_RECOVERED":         511,
	"EVENT_HW_NTP_SYNC_FAILURE":                               512,
	"EVENT_HW_NTP_SYNC_FAILURE_RECOVERED":                     513,
	"EVENT_LINE_CARD_PLUG_OUT":                                600,
	"EVENT_LINE_CARD_PLUG_IN":                                 601,
	"EVENT_COMPONENT_ADMIN_STATE_CHANGED":                     700,
	"EVENT_COMPONENT_OPER_STATE_CHANGED":                      701,
	"EVENT_COMPONENT_ALARM_STATE_CHANGED":                     702,
	"EVENT_COMPONENT_USAGE_STATE_CHANGED":                     703,
	"EVENT_COMPONENT_STANDBY_STATE_CHANGED":                   704,
}

func (x EventIds) String() string {
	return proto.EnumName(EventIds_name, int32(x))
}

func (EventIds) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_8962d785556e9979, []int{0}
}

type ListEventsResponse_Reason int32

const (
	ListEventsResponse_UNDEFINED_REASON   ListEventsResponse_Reason = 0
	ListEventsResponse_UNKNOWN_DEVICE     ListEventsResponse_Reason = 1
	ListEventsResponse_INTERNAL_ERROR     ListEventsResponse_Reason = 2
	ListEventsResponse_DEVICE_UNREACHABLE ListEventsResponse_Reason = 3
)

var ListEventsResponse_Reason_name = map[int32]string{
	0: "UNDEFINED_REASON",
	1: "UNKNOWN_DEVICE",
	2: "INTERNAL_ERROR",
	3: "DEVICE_UNREACHABLE",
}

var ListEventsResponse_Reason_value = map[string]int32{
	"UNDEFINED_REASON":   0,
	"UNKNOWN_DEVICE":     1,
	"INTERNAL_ERROR":     2,
	"DEVICE_UNREACHABLE": 3,
}

func (x ListEventsResponse_Reason) String() string {
	return proto.EnumName(ListEventsResponse_Reason_name, int32(x))
}

func (ListEventsResponse_Reason) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_8962d785556e9979, []int{6, 0}
}

type EventsConfigurationResponse_Reason int32

const (
	EventsConfigurationResponse_UNDEFINED_REASON   EventsConfigurationResponse_Reason = 0
	EventsConfigurationResponse_UNKNOWN_DEVICE     EventsConfigurationResponse_Reason = 1
	EventsConfigurationResponse_INTERNAL_ERROR     EventsConfigurationResponse_Reason = 2
	EventsConfigurationResponse_INVALID_CONFIG     EventsConfigurationResponse_Reason = 3
	EventsConfigurationResponse_DEVICE_UNREACHABLE EventsConfigurationResponse_Reason = 4
)

var EventsConfigurationResponse_Reason_name = map[int32]string{
	0: "UNDEFINED_REASON",
	1: "UNKNOWN_DEVICE",
	2: "INTERNAL_ERROR",
	3: "INVALID_CONFIG",
	4: "DEVICE_UNREACHABLE",
}

var EventsConfigurationResponse_Reason_value = map[string]int32{
	"UNDEFINED_REASON":   0,
	"UNKNOWN_DEVICE":     1,
	"INTERNAL_ERROR":     2,
	"INVALID_CONFIG":     3,
	"DEVICE_UNREACHABLE": 4,
}

func (x EventsConfigurationResponse_Reason) String() string {
	return proto.EnumName(EventsConfigurationResponse_Reason_name, int32(x))
}

func (EventsConfigurationResponse_Reason) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_8962d785556e9979, []int{8, 0}
}

type ValueType struct {
	// For val no multiples of units shall be used.
	// For example, for memory val should be in bytes and not in kilobytes or any
	// other multiple of the unit byte.
	//
	// Types that are valid to be assigned to Val:
	//	*ValueType_IntVal
	//	*ValueType_UintVal
	//	*ValueType_FloatVal
	Val                  isValueType_Val `protobuf_oneof:"val"`
	TypeOfVal            DataValueType   `protobuf:"varint,4,opt,name=typeOfVal,proto3,enum=dmi.DataValueType" json:"typeOfVal,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (m *ValueType) Reset()         { *m = ValueType{} }
func (m *ValueType) String() string { return proto.CompactTextString(m) }
func (*ValueType) ProtoMessage()    {}
func (*ValueType) Descriptor() ([]byte, []int) {
	return fileDescriptor_8962d785556e9979, []int{0}
}

func (m *ValueType) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_ValueType.Unmarshal(m, b)
}
func (m *ValueType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_ValueType.Marshal(b, m, deterministic)
}
func (m *ValueType) XXX_Merge(src proto.Message) {
	xxx_messageInfo_ValueType.Merge(m, src)
}
func (m *ValueType) XXX_Size() int {
	return xxx_messageInfo_ValueType.Size(m)
}
func (m *ValueType) XXX_DiscardUnknown() {
	xxx_messageInfo_ValueType.DiscardUnknown(m)
}

var xxx_messageInfo_ValueType proto.InternalMessageInfo

type isValueType_Val interface {
	isValueType_Val()
}

type ValueType_IntVal struct {
	IntVal int64 `protobuf:"varint,1,opt,name=int_val,json=intVal,proto3,oneof"`
}

type ValueType_UintVal struct {
	UintVal uint64 `protobuf:"varint,2,opt,name=uint_val,json=uintVal,proto3,oneof"`
}

type ValueType_FloatVal struct {
	FloatVal float32 `protobuf:"fixed32,3,opt,name=float_val,json=floatVal,proto3,oneof"`
}

func (*ValueType_IntVal) isValueType_Val() {}

func (*ValueType_UintVal) isValueType_Val() {}

func (*ValueType_FloatVal) isValueType_Val() {}

func (m *ValueType) GetVal() isValueType_Val {
	if m != nil {
		return m.Val
	}
	return nil
}

func (m *ValueType) GetIntVal() int64 {
	if x, ok := m.GetVal().(*ValueType_IntVal); ok {
		return x.IntVal
	}
	return 0
}

func (m *ValueType) GetUintVal() uint64 {
	if x, ok := m.GetVal().(*ValueType_UintVal); ok {
		return x.UintVal
	}
	return 0
}

func (m *ValueType) GetFloatVal() float32 {
	if x, ok := m.GetVal().(*ValueType_FloatVal); ok {
		return x.FloatVal
	}
	return 0
}

func (m *ValueType) GetTypeOfVal() DataValueType {
	if m != nil {
		return m.TypeOfVal
	}
	return DataValueType_VALUE_TYPE_UNDEFINED
}

// XXX_OneofWrappers is for the internal use of the proto package.
func (*ValueType) XXX_OneofWrappers() []interface{} {
	return []interface{}{
		(*ValueType_IntVal)(nil),
		(*ValueType_UintVal)(nil),
		(*ValueType_FloatVal)(nil),
	}
}

type WaterMarks struct {
	High                 *ValueType `protobuf:"bytes,1,opt,name=high,proto3" json:"high,omitempty"`
	Low                  *ValueType `protobuf:"bytes,2,opt,name=low,proto3" json:"low,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (m *WaterMarks) Reset()         { *m = WaterMarks{} }
func (m *WaterMarks) String() string { return proto.CompactTextString(m) }
func (*WaterMarks) ProtoMessage()    {}
func (*WaterMarks) Descriptor() ([]byte, []int) {
	return fileDescriptor_8962d785556e9979, []int{1}
}

func (m *WaterMarks) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_WaterMarks.Unmarshal(m, b)
}
func (m *WaterMarks) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_WaterMarks.Marshal(b, m, deterministic)
}
func (m *WaterMarks) XXX_Merge(src proto.Message) {
	xxx_messageInfo_WaterMarks.Merge(m, src)
}
func (m *WaterMarks) XXX_Size() int {
	return xxx_messageInfo_WaterMarks.Size(m)
}
func (m *WaterMarks) XXX_DiscardUnknown() {
	xxx_messageInfo_WaterMarks.DiscardUnknown(m)
}

var xxx_messageInfo_WaterMarks proto.InternalMessageInfo

func (m *WaterMarks) GetHigh() *ValueType {
	if m != nil {
		return m.High
	}
	return nil
}

func (m *WaterMarks) GetLow() *ValueType {
	if m != nil {
		return m.Low
	}
	return nil
}

type Thresholds struct {
	// Types that are valid to be assigned to Threshold:
	//	*Thresholds_Upper
	//	*Thresholds_Lower
	Threshold            isThresholds_Threshold `protobuf_oneof:"threshold"`
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

func (m *Thresholds) Reset()         { *m = Thresholds{} }
func (m *Thresholds) String() string { return proto.CompactTextString(m) }
func (*Thresholds) ProtoMessage()    {}
func (*Thresholds) Descriptor() ([]byte, []int) {
	return fileDescriptor_8962d785556e9979, []int{2}
}

func (m *Thresholds) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_Thresholds.Unmarshal(m, b)
}
func (m *Thresholds) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_Thresholds.Marshal(b, m, deterministic)
}
func (m *Thresholds) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Thresholds.Merge(m, src)
}
func (m *Thresholds) XXX_Size() int {
	return xxx_messageInfo_Thresholds.Size(m)
}
func (m *Thresholds) XXX_DiscardUnknown() {
	xxx_messageInfo_Thresholds.DiscardUnknown(m)
}

var xxx_messageInfo_Thresholds proto.InternalMessageInfo

type isThresholds_Threshold interface {
	isThresholds_Threshold()
}

type Thresholds_Upper struct {
	Upper *WaterMarks `protobuf:"bytes,1,opt,name=upper,proto3,oneof"`
}

type Thresholds_Lower struct {
	Lower *WaterMarks `protobuf:"bytes,2,opt,name=lower,proto3,oneof"`
}

func (*Thresholds_Upper) isThresholds_Threshold() {}

func (*Thresholds_Lower) isThresholds_Threshold() {}

func (m *Thresholds) GetThreshold() isThresholds_Threshold {
	if m != nil {
		return m.Threshold
	}
	return nil
}

func (m *Thresholds) GetUpper() *WaterMarks {
	if x, ok := m.GetThreshold().(*Thresholds_Upper); ok {
		return x.Upper
	}
	return nil
}

func (m *Thresholds) GetLower() *WaterMarks {
	if x, ok := m.GetThreshold().(*Thresholds_Lower); ok {
		return x.Lower
	}
	return nil
}

// XXX_OneofWrappers is for the internal use of the proto package.
func (*Thresholds) XXX_OneofWrappers() []interface{} {
	return []interface{}{
		(*Thresholds_Upper)(nil),
		(*Thresholds_Lower)(nil),
	}
}

type ThresholdInformation struct {
	ObservedValue        *ValueType  `protobuf:"bytes,1,opt,name=observed_value,json=observedValue,proto3" json:"observed_value,omitempty"`
	Thresholds           *Thresholds `protobuf:"bytes,2,opt,name=thresholds,proto3" json:"thresholds,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (m *ThresholdInformation) Reset()         { *m = ThresholdInformation{} }
func (m *ThresholdInformation) String() string { return proto.CompactTextString(m) }
func (*ThresholdInformation) ProtoMessage()    {}
func (*ThresholdInformation) Descriptor() ([]byte, []int) {
	return fileDescriptor_8962d785556e9979, []int{3}
}

func (m *ThresholdInformation) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_ThresholdInformation.Unmarshal(m, b)
}
func (m *ThresholdInformation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_ThresholdInformation.Marshal(b, m, deterministic)
}
func (m *ThresholdInformation) XXX_Merge(src proto.Message) {
	xxx_messageInfo_ThresholdInformation.Merge(m, src)
}
func (m *ThresholdInformation) XXX_Size() int {
	return xxx_messageInfo_ThresholdInformation.Size(m)
}
func (m *ThresholdInformation) XXX_DiscardUnknown() {
	xxx_messageInfo_ThresholdInformation.DiscardUnknown(m)
}

var xxx_messageInfo_ThresholdInformation proto.InternalMessageInfo

func (m *ThresholdInformation) GetObservedValue() *ValueType {
	if m != nil {
		return m.ObservedValue
	}
	return nil
}

func (m *ThresholdInformation) GetThresholds() *Thresholds {
	if m != nil {
		return m.Thresholds
	}
	return nil
}

type EventCfg struct {
	EventId      EventIds `protobuf:"varint,1,opt,name=event_id,json=eventId,proto3,enum=dmi.EventIds" json:"event_id,omitempty"`
	IsConfigured bool     `protobuf:"varint,2,opt,name=is_configured,json=isConfigured,proto3" json:"is_configured,omitempty"`
	// Optional threshold values, applicable only for some specific events
	// If an event needs thresholds but the user does not pass the thresholds here, the Device Manager implementations
	// could choose to use defaults applicable for the specific component (recommended) or return an error for such
	// an EventConfigurationRequest with reason as INVALID_CONFIG
	Thresholds *Thresholds `protobuf:"bytes,3,opt,name=thresholds,proto3" json:"thresholds,omitempty"`
	// For events which can be configured on a particular component this id can be used to identify the component
	// For e.g. for events of the transceivers
	ComponentUuid        *Uuid    `protobuf:"bytes,4,opt,name=component_uuid,json=componentUuid,proto3" json:"component_uuid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *EventCfg) Reset()         { *m = EventCfg{} }
func (m *EventCfg) String() string { return proto.CompactTextString(m) }
func (*EventCfg) ProtoMessage()    {}
func (*EventCfg) Descriptor() ([]byte, []int) {
	return fileDescriptor_8962d785556e9979, []int{4}
}

func (m *EventCfg) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_EventCfg.Unmarshal(m, b)
}
func (m *EventCfg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_EventCfg.Marshal(b, m, deterministic)
}
func (m *EventCfg) XXX_Merge(src proto.Message) {
	xxx_messageInfo_EventCfg.Merge(m, src)
}
func (m *EventCfg) XXX_Size() int {
	return xxx_messageInfo_EventCfg.Size(m)
}
func (m *EventCfg) XXX_DiscardUnknown() {
	xxx_messageInfo_EventCfg.DiscardUnknown(m)
}

var xxx_messageInfo_EventCfg proto.InternalMessageInfo

func (m *EventCfg) GetEventId() EventIds {
	if m != nil {
		return m.EventId
	}
	return EventIds_EVENT_NAME_UNDEFINED
}

func (m *EventCfg) GetIsConfigured() bool {
	if m != nil {
		return m.IsConfigured
	}
	return false
}

func (m *EventCfg) GetThresholds() *Thresholds {
	if m != nil {
		return m.Thresholds
	}
	return nil
}

func (m *EventCfg) GetComponentUuid() *Uuid {
	if m != nil {
		return m.ComponentUuid
	}
	return nil
}

type EventsCfg struct {
	Items                []*EventCfg `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (m *EventsCfg) Reset()         { *m = EventsCfg{} }
func (m *EventsCfg) String() string { return proto.CompactTextString(m) }
func (*EventsCfg) ProtoMessage()    {}
func (*EventsCfg) Descriptor() ([]byte, []int) {
	return fileDescriptor_8962d785556e9979, []int{5}
}

func (m *EventsCfg) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_EventsCfg.Unmarshal(m, b)
}
func (m *EventsCfg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_EventsCfg.Marshal(b, m, deterministic)
}
func (m *EventsCfg) XXX_Merge(src proto.Message) {
	xxx_messageInfo_EventsCfg.Merge(m, src)
}
func (m *EventsCfg) XXX_Size() int {
	return xxx_messageInfo_EventsCfg.Size(m)
}
func (m *EventsCfg) XXX_DiscardUnknown() {
	xxx_messageInfo_EventsCfg.DiscardUnknown(m)
}

var xxx_messageInfo_EventsCfg proto.InternalMessageInfo

func (m *EventsCfg) GetItems() []*EventCfg {
	if m != nil {
		return m.Items
	}
	return nil
}

type ListEventsResponse struct {
	Status               Status                    `protobuf:"varint,1,opt,name=status,proto3,enum=dmi.Status" json:"status,omitempty"`
	Reason               ListEventsResponse_Reason `protobuf:"varint,2,opt,name=reason,proto3,enum=dmi.ListEventsResponse_Reason" json:"reason,omitempty"`
	Events               *EventsCfg                `protobuf:"bytes,3,opt,name=events,proto3" json:"events,omitempty"`
	ReasonDetail         string                    `protobuf:"bytes,4,opt,name=reason_detail,json=reasonDetail,proto3" json:"reason_detail,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
	XXX_unrecognized     []byte                    `json:"-"`
	XXX_sizecache        int32                     `json:"-"`
}

func (m *ListEventsResponse) Reset()         { *m = ListEventsResponse{} }
func (m *ListEventsResponse) String() string { return proto.CompactTextString(m) }
func (*ListEventsResponse) ProtoMessage()    {}
func (*ListEventsResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_8962d785556e9979, []int{6}
}

func (m *ListEventsResponse) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_ListEventsResponse.Unmarshal(m, b)
}
func (m *ListEventsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_ListEventsResponse.Marshal(b, m, deterministic)
}
func (m *ListEventsResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_ListEventsResponse.Merge(m, src)
}
func (m *ListEventsResponse) XXX_Size() int {
	return xxx_messageInfo_ListEventsResponse.Size(m)
}
func (m *ListEventsResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_ListEventsResponse.DiscardUnknown(m)
}

var xxx_messageInfo_ListEventsResponse proto.InternalMessageInfo

func (m *ListEventsResponse) GetStatus() Status {
	if m != nil {
		return m.Status
	}
	return Status_UNDEFINED_STATUS
}

func (m *ListEventsResponse) GetReason() ListEventsResponse_Reason {
	if m != nil {
		return m.Reason
	}
	return ListEventsResponse_UNDEFINED_REASON
}

func (m *ListEventsResponse) GetEvents() *EventsCfg {
	if m != nil {
		return m.Events
	}
	return nil
}

func (m *ListEventsResponse) GetReasonDetail() string {
	if m != nil {
		return m.ReasonDetail
	}
	return ""
}

type EventsConfigurationRequest struct {
	DeviceUuid *Uuid `protobuf:"bytes,1,opt,name=device_uuid,json=deviceUuid,proto3" json:"device_uuid,omitempty"`
	// Types that are valid to be assigned to Operation:
	//	*EventsConfigurationRequest_Changes
	//	*EventsConfigurationRequest_ResetToDefault
	Operation            isEventsConfigurationRequest_Operation `protobuf_oneof:"operation"`
	XXX_NoUnkeyedLiteral struct{}                               `json:"-"`
	XXX_unrecognized     []byte                                 `json:"-"`
	XXX_sizecache        int32                                  `json:"-"`
}

func (m *EventsConfigurationRequest) Reset()         { *m = EventsConfigurationRequest{} }
func (m *EventsConfigurationRequest) String() string { return proto.CompactTextString(m) }
func (*EventsConfigurationRequest) ProtoMessage()    {}
func (*EventsConfigurationRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_8962d785556e9979, []int{7}
}

func (m *EventsConfigurationRequest) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_EventsConfigurationRequest.Unmarshal(m, b)
}
func (m *EventsConfigurationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_EventsConfigurationRequest.Marshal(b, m, deterministic)
}
func (m *EventsConfigurationRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_EventsConfigurationRequest.Merge(m, src)
}
func (m *EventsConfigurationRequest) XXX_Size() int {
	return xxx_messageInfo_EventsConfigurationRequest.Size(m)
}
func (m *EventsConfigurationRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_EventsConfigurationRequest.DiscardUnknown(m)
}

var xxx_messageInfo_EventsConfigurationRequest proto.InternalMessageInfo

func (m *EventsConfigurationRequest) GetDeviceUuid() *Uuid {
	if m != nil {
		return m.DeviceUuid
	}
	return nil
}

type isEventsConfigurationRequest_Operation interface {
	isEventsConfigurationRequest_Operation()
}

type EventsConfigurationRequest_Changes struct {
	Changes *EventsCfg `protobuf:"bytes,2,opt,name=changes,proto3,oneof"`
}

type EventsConfigurationRequest_ResetToDefault struct {
	ResetToDefault bool `protobuf:"varint,3,opt,name=reset_to_default,json=resetToDefault,proto3,oneof"`
}

func (*EventsConfigurationRequest_Changes) isEventsConfigurationRequest_Operation() {}

func (*EventsConfigurationRequest_ResetToDefault) isEventsConfigurationRequest_Operation() {}

func (m *EventsConfigurationRequest) GetOperation() isEventsConfigurationRequest_Operation {
	if m != nil {
		return m.Operation
	}
	return nil
}

func (m *EventsConfigurationRequest) GetChanges() *EventsCfg {
	if x, ok := m.GetOperation().(*EventsConfigurationRequest_Changes); ok {
		return x.Changes
	}
	return nil
}

func (m *EventsConfigurationRequest) GetResetToDefault() bool {
	if x, ok := m.GetOperation().(*EventsConfigurationRequest_ResetToDefault); ok {
		return x.ResetToDefault
	}
	return false
}

// XXX_OneofWrappers is for the internal use of the proto package.
func (*EventsConfigurationRequest) XXX_OneofWrappers() []interface{} {
	return []interface{}{
		(*EventsConfigurationRequest_Changes)(nil),
		(*EventsConfigurationRequest_ResetToDefault)(nil),
	}
}

type EventsConfigurationResponse struct {
	Status               Status                             `protobuf:"varint,1,opt,name=status,proto3,enum=dmi.Status" json:"status,omitempty"`
	Reason               EventsConfigurationResponse_Reason `protobuf:"varint,2,opt,name=reason,proto3,enum=dmi.EventsConfigurationResponse_Reason" json:"reason,omitempty"`
	ReasonDetail         string                             `protobuf:"bytes,3,opt,name=reason_detail,json=reasonDetail,proto3" json:"reason_detail,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                           `json:"-"`
	XXX_unrecognized     []byte                             `json:"-"`
	XXX_sizecache        int32                              `json:"-"`
}

func (m *EventsConfigurationResponse) Reset()         { *m = EventsConfigurationResponse{} }
func (m *EventsConfigurationResponse) String() string { return proto.CompactTextString(m) }
func (*EventsConfigurationResponse) ProtoMessage()    {}
func (*EventsConfigurationResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_8962d785556e9979, []int{8}
}

func (m *EventsConfigurationResponse) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_EventsConfigurationResponse.Unmarshal(m, b)
}
func (m *EventsConfigurationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_EventsConfigurationResponse.Marshal(b, m, deterministic)
}
func (m *EventsConfigurationResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_EventsConfigurationResponse.Merge(m, src)
}
func (m *EventsConfigurationResponse) XXX_Size() int {
	return xxx_messageInfo_EventsConfigurationResponse.Size(m)
}
func (m *EventsConfigurationResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_EventsConfigurationResponse.DiscardUnknown(m)
}

var xxx_messageInfo_EventsConfigurationResponse proto.InternalMessageInfo

func (m *EventsConfigurationResponse) GetStatus() Status {
	if m != nil {
		return m.Status
	}
	return Status_UNDEFINED_STATUS
}

func (m *EventsConfigurationResponse) GetReason() EventsConfigurationResponse_Reason {
	if m != nil {
		return m.Reason
	}
	return EventsConfigurationResponse_UNDEFINED_REASON
}

func (m *EventsConfigurationResponse) GetReasonDetail() string {
	if m != nil {
		return m.ReasonDetail
	}
	return ""
}

type EventMetaData struct {
	DeviceUuid *Uuid `protobuf:"bytes,1,opt,name=device_uuid,json=deviceUuid,proto3" json:"device_uuid,omitempty"`
	// uuid of the component
	ComponentUuid        *Uuid    `protobuf:"bytes,2,opt,name=component_uuid,json=componentUuid,proto3" json:"component_uuid,omitempty"`
	ComponentName        string   `protobuf:"bytes,3,opt,name=component_name,json=componentName,proto3" json:"component_name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *EventMetaData) Reset()         { *m = EventMetaData{} }
func (m *EventMetaData) String() string { return proto.CompactTextString(m) }
func (*EventMetaData) ProtoMessage()    {}
func (*EventMetaData) Descriptor() ([]byte, []int) {
	return fileDescriptor_8962d785556e9979, []int{9}
}

func (m *EventMetaData) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_EventMetaData.Unmarshal(m, b)
}
func (m *EventMetaData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_EventMetaData.Marshal(b, m, deterministic)
}
func (m *EventMetaData) XXX_Merge(src proto.Message) {
	xxx_messageInfo_EventMetaData.Merge(m, src)
}
func (m *EventMetaData) XXX_Size() int {
	return xxx_messageInfo_EventMetaData.Size(m)
}
func (m *EventMetaData) XXX_DiscardUnknown() {
	xxx_messageInfo_EventMetaData.DiscardUnknown(m)
}

var xxx_messageInfo_EventMetaData proto.InternalMessageInfo

func (m *EventMetaData) GetDeviceUuid() *Uuid {
	if m != nil {
		return m.DeviceUuid
	}
	return nil
}

func (m *EventMetaData) GetComponentUuid() *Uuid {
	if m != nil {
		return m.ComponentUuid
	}
	return nil
}

func (m *EventMetaData) GetComponentName() string {
	if m != nil {
		return m.ComponentName
	}
	return ""
}

type AdminStateChange struct {
	Old                  ComponentAdminState `protobuf:"varint,1,opt,name=old,proto3,enum=dmi.ComponentAdminState" json:"old,omitempty"`
	New                  ComponentAdminState `protobuf:"varint,2,opt,name=new,proto3,enum=dmi.ComponentAdminState" json:"new,omitempty"`
	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
	XXX_unrecognized     []byte              `json:"-"`
	XXX_sizecache        int32               `json:"-"`
}

func (m *AdminStateChange) Reset()         { *m = AdminStateChange{} }
func (m *AdminStateChange) String() string { return proto.CompactTextString(m) }
func (*AdminStateChange) ProtoMessage()    {}
func (*AdminStateChange) Descriptor() ([]byte, []int) {
	return fileDescriptor_8962d785556e9979, []int{10}
}

func (m *AdminStateChange) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_AdminStateChange.Unmarshal(m, b)
}
func (m *AdminStateChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_AdminStateChange.Marshal(b, m, deterministic)
}
func (m *AdminStateChange) XXX_Merge(src proto.Message) {
	xxx_messageInfo_AdminStateChange.Merge(m, src)
}
func (m *AdminStateChange) XXX_Size() int {
	return xxx_messageInfo_AdminStateChange.Size(m)
}
func (m *AdminStateChange) XXX_DiscardUnknown() {
	xxx_messageInfo_AdminStateChange.DiscardUnknown(m)
}

var xxx_messageInfo_AdminStateChange proto.InternalMessageInfo

func (m *AdminStateChange) GetOld() ComponentAdminState {
	if m != nil {
		return m.Old
	}
	return ComponentAdminState_COMP_ADMIN_STATE_UNDEFINED
}

func (m *AdminStateChange) GetNew() ComponentAdminState {
	if m != nil {
		return m.New
	}
	return ComponentAdminState_COMP_ADMIN_STATE_UNDEFINED
}

type OperStateChange struct {
	Old                  ComponentOperState `protobuf:"varint,1,opt,name=old,proto3,enum=dmi.ComponentOperState" json:"old,omitempty"`
	New                  ComponentOperState `protobuf:"varint,2,opt,name=new,proto3,enum=dmi.ComponentOperState" json:"new,omitempty"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

func (m *OperStateChange) Reset()         { *m = OperStateChange{} }
func (m *OperStateChange) String() string { return proto.CompactTextString(m) }
func (*OperStateChange) ProtoMessage()    {}
func (*OperStateChange) Descriptor() ([]byte, []int) {
	return fileDescriptor_8962d785556e9979, []int{11}
}

func (m *OperStateChange) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_OperStateChange.Unmarshal(m, b)
}
func (m *OperStateChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_OperStateChange.Marshal(b, m, deterministic)
}
func (m *OperStateChange) XXX_Merge(src proto.Message) {
	xxx_messageInfo_OperStateChange.Merge(m, src)
}
func (m *OperStateChange) XXX_Size() int {
	return xxx_messageInfo_OperStateChange.Size(m)
}
func (m *OperStateChange) XXX_DiscardUnknown() {
	xxx_messageInfo_OperStateChange.DiscardUnknown(m)
}

var xxx_messageInfo_OperStateChange proto.InternalMessageInfo

func (m *OperStateChange) GetOld() ComponentOperState {
	if m != nil {
		return m.Old
	}
	return ComponentOperState_COMP_OPER_STATE_UNDEFINED
}

func (m *OperStateChange) GetNew() ComponentOperState {
	if m != nil {
		return m.New
	}
	return ComponentOperState_COMP_OPER_STATE_UNDEFINED
}

type AlarmStateChange struct {
	Old                  ComponentAlarmState `protobuf:"varint,1,opt,name=old,proto3,enum=dmi.ComponentAlarmState" json:"old,omitempty"`
	New                  ComponentAlarmState `protobuf:"varint,2,opt,name=new,proto3,enum=dmi.ComponentAlarmState" json:"new,omitempty"`
	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
	XXX_unrecognized     []byte              `json:"-"`
	XXX_sizecache        int32               `json:"-"`
}

func (m *AlarmStateChange) Reset()         { *m = AlarmStateChange{} }
func (m *AlarmStateChange) String() string { return proto.CompactTextString(m) }
func (*AlarmStateChange) ProtoMessage()    {}
func (*AlarmStateChange) Descriptor() ([]byte, []int) {
	return fileDescriptor_8962d785556e9979, []int{12}
}

func (m *AlarmStateChange) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_AlarmStateChange.Unmarshal(m, b)
}
func (m *AlarmStateChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_AlarmStateChange.Marshal(b, m, deterministic)
}
func (m *AlarmStateChange) XXX_Merge(src proto.Message) {
	xxx_messageInfo_AlarmStateChange.Merge(m, src)
}
func (m *AlarmStateChange) XXX_Size() int {
	return xxx_messageInfo_AlarmStateChange.Size(m)
}
func (m *AlarmStateChange) XXX_DiscardUnknown() {
	xxx_messageInfo_AlarmStateChange.DiscardUnknown(m)
}

var xxx_messageInfo_AlarmStateChange proto.InternalMessageInfo

func (m *AlarmStateChange) GetOld() ComponentAlarmState {
	if m != nil {
		return m.Old
	}
	return ComponentAlarmState_COMP_ALARM_STATE_UNDEFINED
}

func (m *AlarmStateChange) GetNew() ComponentAlarmState {
	if m != nil {
		return m.New
	}
	return ComponentAlarmState_COMP_ALARM_STATE_UNDEFINED
}

type UsageStateChange struct {
	Old                  ComponentUsageState `protobuf:"varint,1,opt,name=old,proto3,enum=dmi.ComponentUsageState" json:"old,omitempty"`
	New                  ComponentUsageState `protobuf:"varint,2,opt,name=new,proto3,enum=dmi.ComponentUsageState" json:"new,omitempty"`
	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
	XXX_unrecognized     []byte              `json:"-"`
	XXX_sizecache        int32               `json:"-"`
}

func (m *UsageStateChange) Reset()         { *m = UsageStateChange{} }
func (m *UsageStateChange) String() string { return proto.CompactTextString(m) }
func (*UsageStateChange) ProtoMessage()    {}
func (*UsageStateChange) Descriptor() ([]byte, []int) {
	return fileDescriptor_8962d785556e9979, []int{13}
}

func (m *UsageStateChange) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_UsageStateChange.Unmarshal(m, b)
}
func (m *UsageStateChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_UsageStateChange.Marshal(b, m, deterministic)
}
func (m *UsageStateChange) XXX_Merge(src proto.Message) {
	xxx_messageInfo_UsageStateChange.Merge(m, src)
}
func (m *UsageStateChange) XXX_Size() int {
	return xxx_messageInfo_UsageStateChange.Size(m)
}
func (m *UsageStateChange) XXX_DiscardUnknown() {
	xxx_messageInfo_UsageStateChange.DiscardUnknown(m)
}

var xxx_messageInfo_UsageStateChange proto.InternalMessageInfo

func (m *UsageStateChange) GetOld() ComponentUsageState {
	if m != nil {
		return m.Old
	}
	return ComponentUsageState_COMP_USAGE_STATE_UNDEFINED
}

func (m *UsageStateChange) GetNew() ComponentUsageState {
	if m != nil {
		return m.New
	}
	return ComponentUsageState_COMP_USAGE_STATE_UNDEFINED
}

type StandbyStateChange struct {
	Old                  ComponentStandbyState `protobuf:"varint,1,opt,name=old,proto3,enum=dmi.ComponentStandbyState" json:"old,omitempty"`
	New                  ComponentStandbyState `protobuf:"varint,2,opt,name=new,proto3,enum=dmi.ComponentStandbyState" json:"new,omitempty"`
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

func (m *StandbyStateChange) Reset()         { *m = StandbyStateChange{} }
func (m *StandbyStateChange) String() string { return proto.CompactTextString(m) }
func (*StandbyStateChange) ProtoMessage()    {}
func (*StandbyStateChange) Descriptor() ([]byte, []int) {
	return fileDescriptor_8962d785556e9979, []int{14}
}

func (m *StandbyStateChange) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_StandbyStateChange.Unmarshal(m, b)
}
func (m *StandbyStateChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_StandbyStateChange.Marshal(b, m, deterministic)
}
func (m *StandbyStateChange) XXX_Merge(src proto.Message) {
	xxx_messageInfo_StandbyStateChange.Merge(m, src)
}
func (m *StandbyStateChange) XXX_Size() int {
	return xxx_messageInfo_StandbyStateChange.Size(m)
}
func (m *StandbyStateChange) XXX_DiscardUnknown() {
	xxx_messageInfo_StandbyStateChange.DiscardUnknown(m)
}

var xxx_messageInfo_StandbyStateChange proto.InternalMessageInfo

func (m *StandbyStateChange) GetOld() ComponentStandbyState {
	if m != nil {
		return m.Old
	}
	return ComponentStandbyState_COMP_STANDBY_STATE_UNDEFINED
}

func (m *StandbyStateChange) GetNew() ComponentStandbyState {
	if m != nil {
		return m.New
	}
	return ComponentStandbyState_COMP_STANDBY_STATE_UNDEFINED
}

type StateChangeInfo struct {
	// Types that are valid to be assigned to StateChange:
	//	*StateChangeInfo_AdminStateChange
	//	*StateChangeInfo_OperStateChange
	//	*StateChangeInfo_AlarmStateChange
	//	*StateChangeInfo_UsageStateChange
	//	*StateChangeInfo_StandbyStateChange
	StateChange          isStateChangeInfo_StateChange `protobuf_oneof:"state_change"`
	XXX_NoUnkeyedLiteral struct{}                      `json:"-"`
	XXX_unrecognized     []byte                        `json:"-"`
	XXX_sizecache        int32                         `json:"-"`
}

func (m *StateChangeInfo) Reset()         { *m = StateChangeInfo{} }
func (m *StateChangeInfo) String() string { return proto.CompactTextString(m) }
func (*StateChangeInfo) ProtoMessage()    {}
func (*StateChangeInfo) Descriptor() ([]byte, []int) {
	return fileDescriptor_8962d785556e9979, []int{15}
}

func (m *StateChangeInfo) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_StateChangeInfo.Unmarshal(m, b)
}
func (m *StateChangeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_StateChangeInfo.Marshal(b, m, deterministic)
}
func (m *StateChangeInfo) XXX_Merge(src proto.Message) {
	xxx_messageInfo_StateChangeInfo.Merge(m, src)
}
func (m *StateChangeInfo) XXX_Size() int {
	return xxx_messageInfo_StateChangeInfo.Size(m)
}
func (m *StateChangeInfo) XXX_DiscardUnknown() {
	xxx_messageInfo_StateChangeInfo.DiscardUnknown(m)
}

var xxx_messageInfo_StateChangeInfo proto.InternalMessageInfo

type isStateChangeInfo_StateChange interface {
	isStateChangeInfo_StateChange()
}

type StateChangeInfo_AdminStateChange struct {
	AdminStateChange *AdminStateChange `protobuf:"bytes,1,opt,name=admin_state_change,json=adminStateChange,proto3,oneof"`
}

type StateChangeInfo_OperStateChange struct {
	OperStateChange *OperStateChange `protobuf:"bytes,2,opt,name=oper_state_change,json=operStateChange,proto3,oneof"`
}

type StateChangeInfo_AlarmStateChange struct {
	AlarmStateChange *AlarmStateChange `protobuf:"bytes,3,opt,name=alarm_state_change,json=alarmStateChange,proto3,oneof"`
}

type StateChangeInfo_UsageStateChange struct {
	UsageStateChange *UsageStateChange `protobuf:"bytes,4,opt,name=usage_state_change,json=usageStateChange,proto3,oneof"`
}

type StateChangeInfo_StandbyStateChange struct {
	StandbyStateChange *StandbyStateChange `protobuf:"bytes,5,opt,name=standby_state_change,json=standbyStateChange,proto3,oneof"`
}

func (*StateChangeInfo_AdminStateChange) isStateChangeInfo_StateChange() {}

func (*StateChangeInfo_OperStateChange) isStateChangeInfo_StateChange() {}

func (*StateChangeInfo_AlarmStateChange) isStateChangeInfo_StateChange() {}

func (*StateChangeInfo_UsageStateChange) isStateChangeInfo_StateChange() {}

func (*StateChangeInfo_StandbyStateChange) isStateChangeInfo_StateChange() {}

func (m *StateChangeInfo) GetStateChange() isStateChangeInfo_StateChange {
	if m != nil {
		return m.StateChange
	}
	return nil
}

func (m *StateChangeInfo) GetAdminStateChange() *AdminStateChange {
	if x, ok := m.GetStateChange().(*StateChangeInfo_AdminStateChange); ok {
		return x.AdminStateChange
	}
	return nil
}

func (m *StateChangeInfo) GetOperStateChange() *OperStateChange {
	if x, ok := m.GetStateChange().(*StateChangeInfo_OperStateChange); ok {
		return x.OperStateChange
	}
	return nil
}

func (m *StateChangeInfo) GetAlarmStateChange() *AlarmStateChange {
	if x, ok := m.GetStateChange().(*StateChangeInfo_AlarmStateChange); ok {
		return x.AlarmStateChange
	}
	return nil
}

func (m *StateChangeInfo) GetUsageStateChange() *UsageStateChange {
	if x, ok := m.GetStateChange().(*StateChangeInfo_UsageStateChange); ok {
		return x.UsageStateChange
	}
	return nil
}

func (m *StateChangeInfo) GetStandbyStateChange() *StandbyStateChange {
	if x, ok := m.GetStateChange().(*StateChangeInfo_StandbyStateChange); ok {
		return x.StandbyStateChange
	}
	return nil
}

// XXX_OneofWrappers is for the internal use of the proto package.
func (*StateChangeInfo) XXX_OneofWrappers() []interface{} {
	return []interface{}{
		(*StateChangeInfo_AdminStateChange)(nil),
		(*StateChangeInfo_OperStateChange)(nil),
		(*StateChangeInfo_AlarmStateChange)(nil),
		(*StateChangeInfo_UsageStateChange)(nil),
		(*StateChangeInfo_StandbyStateChange)(nil),
	}
}

type Event struct {
	EventMetadata *EventMetaData       `protobuf:"bytes,1,opt,name=event_metadata,json=eventMetadata,proto3" json:"event_metadata,omitempty"`
	EventId       EventIds             `protobuf:"varint,2,opt,name=event_id,json=eventId,proto3,enum=dmi.EventIds" json:"event_id,omitempty"`
	RaisedTs      *timestamp.Timestamp `protobuf:"bytes,3,opt,name=raised_ts,json=raisedTs,proto3" json:"raised_ts,omitempty"`
	// Optional threshold information for an event
	ThresholdInfo *ThresholdInformation `protobuf:"bytes,4,opt,name=threshold_info,json=thresholdInfo,proto3" json:"threshold_info,omitempty"`
	// Any additional info regarding the event
	AddInfo              string           `protobuf:"bytes,5,opt,name=add_info,json=addInfo,proto3" json:"add_info,omitempty"`
	StateChangeInfo      *StateChangeInfo `protobuf:"bytes,6,opt,name=state_change_info,json=stateChangeInfo,proto3" json:"state_change_info,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func (m *Event) Reset()         { *m = Event{} }
func (m *Event) String() string { return proto.CompactTextString(m) }
func (*Event) ProtoMessage()    {}
func (*Event) Descriptor() ([]byte, []int) {
	return fileDescriptor_8962d785556e9979, []int{16}
}

func (m *Event) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_Event.Unmarshal(m, b)
}
func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_Event.Marshal(b, m, deterministic)
}
func (m *Event) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Event.Merge(m, src)
}
func (m *Event) XXX_Size() int {
	return xxx_messageInfo_Event.Size(m)
}
func (m *Event) XXX_DiscardUnknown() {
	xxx_messageInfo_Event.DiscardUnknown(m)
}

var xxx_messageInfo_Event proto.InternalMessageInfo

func (m *Event) GetEventMetadata() *EventMetaData {
	if m != nil {
		return m.EventMetadata
	}
	return nil
}

func (m *Event) GetEventId() EventIds {
	if m != nil {
		return m.EventId
	}
	return EventIds_EVENT_NAME_UNDEFINED
}

func (m *Event) GetRaisedTs() *timestamp.Timestamp {
	if m != nil {
		return m.RaisedTs
	}
	return nil
}

func (m *Event) GetThresholdInfo() *ThresholdInformation {
	if m != nil {
		return m.ThresholdInfo
	}
	return nil
}

func (m *Event) GetAddInfo() string {
	if m != nil {
		return m.AddInfo
	}
	return ""
}

func (m *Event) GetStateChangeInfo() *StateChangeInfo {
	if m != nil {
		return m.StateChangeInfo
	}
	return nil
}

func init() {
	proto.RegisterEnum("dmi.EventIds", EventIds_name, EventIds_value)
	proto.RegisterEnum("dmi.ListEventsResponse_Reason", ListEventsResponse_Reason_name, ListEventsResponse_Reason_value)
	proto.RegisterEnum("dmi.EventsConfigurationResponse_Reason", EventsConfigurationResponse_Reason_name, EventsConfigurationResponse_Reason_value)
	proto.RegisterType((*ValueType)(nil), "dmi.ValueType")
	proto.RegisterType((*WaterMarks)(nil), "dmi.WaterMarks")
	proto.RegisterType((*Thresholds)(nil), "dmi.Thresholds")
	proto.RegisterType((*ThresholdInformation)(nil), "dmi.ThresholdInformation")
	proto.RegisterType((*EventCfg)(nil), "dmi.EventCfg")
	proto.RegisterType((*EventsCfg)(nil), "dmi.EventsCfg")
	proto.RegisterType((*ListEventsResponse)(nil), "dmi.ListEventsResponse")
	proto.RegisterType((*EventsConfigurationRequest)(nil), "dmi.EventsConfigurationRequest")
	proto.RegisterType((*EventsConfigurationResponse)(nil), "dmi.EventsConfigurationResponse")
	proto.RegisterType((*EventMetaData)(nil), "dmi.EventMetaData")
	proto.RegisterType((*AdminStateChange)(nil), "dmi.AdminStateChange")
	proto.RegisterType((*OperStateChange)(nil), "dmi.OperStateChange")
	proto.RegisterType((*AlarmStateChange)(nil), "dmi.AlarmStateChange")
	proto.RegisterType((*UsageStateChange)(nil), "dmi.UsageStateChange")
	proto.RegisterType((*StandbyStateChange)(nil), "dmi.StandbyStateChange")
	proto.RegisterType((*StateChangeInfo)(nil), "dmi.StateChangeInfo")
	proto.RegisterType((*Event)(nil), "dmi.Event")
}

func init() { proto.RegisterFile("dmi/hw_events_mgmt_service.proto", fileDescriptor_8962d785556e9979) }

var fileDescriptor_8962d785556e9979 = []byte{
	// 2015 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0x4b, 0x73, 0xdb, 0xc8,
	0x11, 0x26, 0x09, 0x51, 0x96, 0x5a, 0x16, 0x0d, 0x4f, 0x69, 0x2d, 0x89, 0x8a, 0x6d, 0x85, 0xde,
	0x5d, 0xc9, 0x8a, 0x4d, 0x6a, 0x65, 0xc7, 0x8e, 0x6b, 0x0f, 0x59, 0x90, 0x84, 0x4c, 0x96, 0x49,
	0x40, 0x35, 0x04, 0xa9, 0x38, 0x87, 0x45, 0x41, 0xc2, 0x90, 0xc2, 0x9a, 0x00, 0xb8, 0x00, 0x28,
	0x45, 0x49, 0x55, 0x2a, 0x39, 0xe5, 0x9a, 0xc7, 0xe6, 0x94, 0x54, 0x7e, 0x41, 0x36, 0x39, 0xe5,
	0xb6, 0x79, 0x1c, 0x72, 0xc8, 0xe3, 0x0f, 0x24, 0x3f, 0x22, 0xb7, 0xbc, 0xdf, 0x05, 0x0c, 0x48,
	0x0c, 0xc1, 0x97, 0x5c, 0xb5, 0x37, 0xb1, 0xfb, 0xeb, 0xef, 0xeb, 0x99, 0xee, 0x69, 0x8c, 0x06,
	0xb6, 0x75, 0xd3, 0x28, 0x9c, 0x5d, 0xa8, 0xe4, 0x9c, 0x58, 0x9e, 0xab, 0x9a, 0x1d, 0xd3, 0x53,
	0x5d, 0xe2, 0x9c, 0x1b, 0xa7, 0x24, 0xdf, 0x73, 0x6c, 0xcf, 0x46, 0x9c, 0x6e, 0x1a, 0xd9, 0x9b,
	0x3e, 0xec, 0xd4, 0x36, 0x4d, 0xdb, 0x72, 0xa9, 0x3d, 0x7b, 0x9d, 0x46, 0x86, 0xbf, 0xee, 0x76,
	0x6c, 0xbb, 0xd3, 0x25, 0x85, 0xe0, 0xd7, 0x49, 0xbf, 0x5d, 0xf0, 0x0c, 0x93, 0xb8, 0x9e, 0x66,
	0xf6, 0x42, 0xc0, 0x56, 0x1c, 0x40, 0xcc, 0x9e, 0x77, 0x49, 0x9d, 0xb9, 0x1f, 0x24, 0x61, 0xb9,
	0xa5, 0x75, 0xfb, 0x44, 0xb9, 0xec, 0x11, 0xb4, 0x09, 0xd7, 0x0c, 0xcb, 0x53, 0xcf, 0xb5, 0xee,
	0x46, 0x72, 0x3b, 0xb9, 0xcb, 0x55, 0x12, 0x78, 0xd1, 0xb0, 0xbc, 0x96, 0xd6, 0x45, 0x5b, 0xb0,
	0xd4, 0x1f, 0xf8, 0x52, 0xdb, 0xc9, 0xdd, 0x85, 0x4a, 0x02, 0x5f, 0xeb, 0x87, 0xce, 0xdb, 0xb0,
	0xdc, 0xee, 0xda, 0x1a, 0xf5, 0x72, 0xdb, 0xc9, 0xdd, 0x54, 0x25, 0x81, 0x97, 0x02, 0x93, 0xef,
	0xde, 0x87, 0x65, 0xef, 0xb2, 0x47, 0xe4, 0x76, 0x4b, 0xeb, 0x6e, 0x2c, 0x6c, 0x27, 0x77, 0x33,
	0x07, 0x28, 0xaf, 0x9b, 0x46, 0xbe, 0xac, 0x79, 0xda, 0x50, 0x1d, 0x47, 0xa0, 0x62, 0x1a, 0xb8,
	0x73, 0xad, 0x9b, 0xc3, 0x00, 0xc7, 0x9a, 0x47, 0x9c, 0xba, 0xe6, 0xbc, 0x72, 0x51, 0x0e, 0x16,
	0xce, 0x8c, 0xce, 0x59, 0x90, 0xda, 0xca, 0x41, 0x26, 0x60, 0x88, 0xa2, 0x03, 0x1f, 0xda, 0x06,
	0xae, 0x6b, 0x5f, 0x04, 0x19, 0x8e, 0x43, 0x7c, 0x57, 0xee, 0x15, 0x80, 0x72, 0xe6, 0x10, 0xf7,
	0xcc, 0xee, 0xea, 0x2e, 0xda, 0x81, 0x74, 0xbf, 0xd7, 0x23, 0x4e, 0x48, 0x7a, 0x23, 0x88, 0x88,
	0x34, 0x2b, 0x09, 0x4c, 0xfd, 0x3e, 0xb0, 0x6b, 0x5f, 0x10, 0x27, 0xa4, 0x9e, 0x04, 0x0c, 0xfc,
	0xc5, 0x15, 0x58, 0xf6, 0x06, 0xfc, 0xb9, 0xaf, 0xc3, 0xda, 0x50, 0xac, 0x6a, 0xb5, 0x6d, 0xc7,
	0xd4, 0x3c, 0xc3, 0xb6, 0xd0, 0xe7, 0x21, 0x63, 0x9f, 0xf8, 0xd5, 0x26, 0xba, 0xbf, 0x67, 0x7d,
	0x32, 0x65, 0x51, 0xab, 0x03, 0x54, 0x60, 0x42, 0x05, 0x80, 0x21, 0xb7, 0x3b, 0x92, 0x49, 0xb4,
	0x24, 0xcc, 0x40, 0x72, 0x9f, 0x24, 0x61, 0x49, 0xf4, 0x1b, 0xac, 0xd4, 0xee, 0xa0, 0x5d, 0x58,
	0x0a, 0x9a, 0x4d, 0x35, 0xf4, 0x40, 0x2e, 0x73, 0xb0, 0x1a, 0xc4, 0x06, 0x80, 0xaa, 0xee, 0xe2,
	0x6b, 0x84, 0xfe, 0x85, 0xee, 0xc1, 0xaa, 0xe1, 0xaa, 0xa7, 0xb6, 0xd5, 0x36, 0x3a, 0x7d, 0x87,
	0xe8, 0x81, 0xd4, 0x12, 0xbe, 0x6e, 0xb8, 0xa5, 0xa1, 0x2d, 0x96, 0x0c, 0x37, 0x37, 0x19, 0xb4,
	0x0f, 0x99, 0x53, 0xdb, 0xec, 0xd9, 0x96, 0x9f, 0x43, 0xbf, 0x6f, 0xe8, 0x41, 0x2f, 0xac, 0x1c,
	0x2c, 0x07, 0x41, 0xcd, 0xbe, 0xa1, 0xe3, 0xd5, 0x21, 0xc0, 0xff, 0x99, 0xdb, 0x87, 0xe5, 0x20,
	0x39, 0xd7, 0x4f, 0xff, 0x1e, 0xa4, 0x0d, 0x8f, 0x98, 0xee, 0x46, 0x72, 0x9b, 0xdb, 0x5d, 0x61,
	0x73, 0x2f, 0xb5, 0x3b, 0x98, 0xfa, 0x72, 0x3f, 0x4a, 0x01, 0xaa, 0x19, 0xae, 0x47, 0xc3, 0x30,
	0x71, 0x7b, 0xb6, 0xe5, 0x12, 0x74, 0x0f, 0x16, 0x5d, 0x4f, 0xf3, 0xfa, 0x6e, 0xb8, 0xf0, 0x95,
	0x20, 0xb8, 0x11, 0x98, 0x70, 0xe8, 0x42, 0x4f, 0x60, 0xd1, 0x21, 0x9a, 0x6b, 0x5b, 0xc1, 0x72,
	0x33, 0x07, 0x77, 0x02, 0xd0, 0x38, 0x5b, 0x1e, 0x07, 0x28, 0x1c, 0xa2, 0xd1, 0xdb, 0xb0, 0x48,
	0x0f, 0x71, 0xb8, 0x09, 0x99, 0x28, 0x33, 0x3f, 0x71, 0x1c, 0x7a, 0xfd, 0x5d, 0xa5, 0x11, 0xaa,
	0x4e, 0x3c, 0xcd, 0xa0, 0x47, 0x61, 0x19, 0x5f, 0xa7, 0xc6, 0x72, 0x60, 0xcb, 0xbd, 0x0f, 0x8b,
	0x94, 0x1e, 0xad, 0x01, 0xdf, 0x94, 0xca, 0xe2, 0x61, 0x55, 0x12, 0xcb, 0x2a, 0x16, 0x85, 0x86,
	0x2c, 0xf1, 0x09, 0x84, 0x20, 0xd3, 0x94, 0x5e, 0x48, 0xf2, 0xb1, 0xa4, 0x96, 0xc5, 0x56, 0xb5,
	0x24, 0xf2, 0x49, 0xdf, 0x56, 0x95, 0x14, 0x11, 0x4b, 0x42, 0x4d, 0x15, 0x31, 0x96, 0x31, 0x9f,
	0x42, 0xb7, 0x00, 0x51, 0xbf, 0xda, 0x94, 0xb0, 0x28, 0x94, 0x2a, 0x42, 0xb1, 0x26, 0xf2, 0x5c,
	0xee, 0xe3, 0x24, 0x64, 0xc3, 0xd4, 0xc2, 0x52, 0x06, 0x1d, 0x89, 0xc9, 0x87, 0x7d, 0xe2, 0x7a,
	0x68, 0x0f, 0x56, 0x74, 0xe2, 0xcf, 0x20, 0x5a, 0xa0, 0x64, 0xbc, 0x40, 0x40, 0xbd, 0xfe, 0xdf,
	0x68, 0x0f, 0xae, 0x9d, 0x9e, 0x69, 0x56, 0x87, 0xb8, 0x23, 0xe7, 0x6d, 0xb8, 0x70, 0x7f, 0x42,
	0x84, 0x00, 0xb4, 0x07, 0xbc, 0x43, 0x5c, 0xe2, 0xa9, 0x9e, 0xad, 0xea, 0xa4, 0xad, 0xf5, 0xbb,
	0x5e, 0xb0, 0x5b, 0x4b, 0x95, 0x04, 0xce, 0x04, 0x1e, 0xc5, 0x2e, 0x53, 0xbb, 0x7f, 0x82, 0xec,
	0x1e, 0xa1, 0x79, 0xe5, 0x7e, 0x98, 0x82, 0xad, 0x89, 0xf9, 0xbe, 0x4e, 0x65, 0xbf, 0x18, 0xab,
	0xec, 0x0e, 0x9b, 0xe8, 0x24, 0xda, 0x78, 0x89, 0xc7, 0x4a, 0xc7, 0x4d, 0x28, 0x9d, 0xf3, 0x29,
	0x95, 0x2e, 0xb0, 0xb5, 0x84, 0x5a, 0xb5, 0xac, 0x96, 0x64, 0xe9, 0xb0, 0xfa, 0x9c, 0xe7, 0xa6,
	0x94, 0x73, 0x21, 0xf7, 0x51, 0x12, 0x56, 0x83, 0x75, 0xd4, 0x89, 0xa7, 0xf9, 0xe3, 0xf4, 0xb5,
	0x2a, 0x38, 0x7e, 0x22, 0x53, 0xb3, 0x4f, 0x24, 0x7a, 0x8b, 0x8d, 0xb0, 0x34, 0x93, 0x84, 0x3b,
	0x11, 0xc1, 0x24, 0xcd, 0x24, 0xb9, 0x0f, 0x80, 0x17, 0x74, 0xd3, 0xb0, 0xfc, 0x3a, 0x90, 0x52,
	0xd0, 0x03, 0x68, 0x0f, 0x38, 0xbb, 0x3b, 0x98, 0x3c, 0x1b, 0x81, 0x42, 0x69, 0x10, 0x14, 0x81,
	0xb1, 0x0f, 0xf2, 0xb1, 0x16, 0xb9, 0x08, 0xab, 0x35, 0x03, 0x6b, 0x91, 0x8b, 0x5c, 0x07, 0x6e,
	0xc8, 0x3d, 0xe2, 0xb0, 0x52, 0xf7, 0x59, 0xa9, 0xf5, 0xd1, 0xf0, 0x21, 0x96, 0x2a, 0xdd, 0x67,
	0x95, 0xa6, 0x43, 0x7d, 0x21, 0x7f, 0x51, 0x5d, 0xcd, 0x31, 0xaf, 0xbc, 0xa8, 0x21, 0xf8, 0x0a,
	0x8b, 0x62, 0xb0, 0xa1, 0x56, 0xd3, 0xd5, 0x3a, 0xe4, 0xaa, 0x5a, 0x11, 0x78, 0xbe, 0x16, 0x8b,
	0xf5, 0xb5, 0x7a, 0x80, 0x1a, 0x9e, 0x66, 0xe9, 0x27, 0x97, 0xac, 0xda, 0x03, 0x56, 0x2d, 0x3b,
	0xca, 0xc0, 0xc2, 0xa9, 0xde, 0x03, 0x56, 0x6f, 0x26, 0xda, 0x57, 0xfc, 0x16, 0x07, 0x37, 0x18,
	0x2d, 0xff, 0xcb, 0x88, 0x44, 0x40, 0x9a, 0x5f, 0x59, 0xd5, 0x3f, 0xb3, 0x44, 0xa5, 0x83, 0x23,
	0x6c, 0xdf, 0x37, 0x02, 0xc2, 0x78, 0x47, 0x55, 0x12, 0x98, 0xd7, 0xe2, 0x5d, 0x56, 0x84, 0x9b,
	0xfe, 0xf0, 0x18, 0x65, 0xa1, 0x5d, 0xbd, 0x16, 0xb0, 0xc4, 0x7a, 0xa5, 0x92, 0xc0, 0x37, 0xec,
	0x58, 0xfb, 0xf8, 0xa9, 0xf8, 0xf5, 0x18, 0x25, 0xe1, 0xd8, 0x54, 0x62, 0x7d, 0x10, 0xa4, 0x12,
	0xef, 0x0d, 0x11, 0x50, 0xdf, 0xdf, 0xea, 0x51, 0x9a, 0x05, 0x86, 0x26, 0x5e, 0x62, 0x9f, 0xa6,
	0x1f, 0x2f, 0xfb, 0x0b, 0x58, 0x73, 0xe9, 0x0e, 0x8e, 0x12, 0xa5, 0x03, 0xa2, 0xf5, 0xc1, 0xbc,
	0x8b, 0xd5, 0xaf, 0x92, 0xc0, 0xc8, 0x1d, 0xb3, 0x16, 0x33, 0x70, 0x9d, 0x25, 0xc9, 0xfd, 0x3a,
	0x05, 0xe9, 0x60, 0x7e, 0xa0, 0x67, 0x90, 0xa1, 0xb7, 0x03, 0x93, 0x78, 0x9a, 0xae, 0x79, 0x5a,
	0xb8, 0xf7, 0x28, 0x9a, 0x95, 0x83, 0x19, 0x83, 0x57, 0xc9, 0xe0, 0xa7, 0x0f, 0x1c, 0xb9, 0x58,
	0xa4, 0x66, 0x5e, 0x2c, 0x9e, 0xc2, 0xb2, 0xa3, 0x19, 0x2e, 0xd1, 0xd5, 0xe1, 0xd7, 0x32, 0x9b,
	0xa7, 0xf7, 0xd3, 0xfc, 0xe0, 0x7e, 0x9a, 0x57, 0x06, 0x17, 0x58, 0xbc, 0x44, 0xc1, 0x8a, 0x8b,
	0xde, 0x83, 0xcc, 0xf0, 0x26, 0xa1, 0x1a, 0x56, 0xdb, 0x0e, 0xf7, 0x71, 0x73, 0xf4, 0xc2, 0xc1,
	0xdc, 0xb1, 0xf0, 0xaa, 0xc7, 0x5a, 0xd1, 0x26, 0x2c, 0x69, 0x7a, 0x18, 0x9b, 0x0e, 0x66, 0xd6,
	0x35, 0x4d, 0xa7, 0xae, 0xf7, 0xe0, 0x26, 0xbb, 0x29, 0x14, 0xb3, 0xc8, 0xf4, 0x4c, 0xac, 0x57,
	0xf1, 0x0d, 0x77, 0xd4, 0xb0, 0xf7, 0xb3, 0xb5, 0xf0, 0x9e, 0x55, 0xd5, 0x5d, 0xb4, 0x01, 0x6b,
	0x62, 0x4b, 0x94, 0x14, 0x55, 0x12, 0xea, 0xfe, 0xbc, 0x0e, 0x3f, 0x04, 0x7c, 0x02, 0xdd, 0x81,
	0x2c, 0xf5, 0x28, 0x58, 0x90, 0x1a, 0x25, 0xb1, 0xda, 0x12, 0xb1, 0x7a, 0x54, 0x6b, 0x3e, 0x57,
	0xe5, 0xa6, 0xc2, 0xeb, 0xe8, 0x36, 0x6c, 0x4e, 0xf1, 0x57, 0x25, 0x9e, 0xa0, 0x87, 0x70, 0x7f,
	0xdc, 0xdd, 0x92, 0x6b, 0x8a, 0xf0, 0x5c, 0x54, 0x85, 0xa2, 0xdc, 0x12, 0x55, 0xa5, 0x82, 0xc5,
	0x46, 0x45, 0xae, 0x95, 0xf9, 0xf6, 0x6c, 0x78, 0x51, 0xac, 0xc9, 0xc7, 0x0c, 0xbc, 0x83, 0xde,
	0x81, 0x87, 0xe3, 0x70, 0x45, 0xac, 0x1f, 0x89, 0x58, 0x50, 0x9a, 0x78, 0x5c, 0xe1, 0x6c, 0x7e,
	0x48, 0x5c, 0xc5, 0x98, 0x9c, 0x54, 0xa9, 0x89, 0xb1, 0x6f, 0x8b, 0x2b, 0x7c, 0x30, 0x1b, 0x1e,
	0x67, 0x7f, 0x85, 0xf2, 0xb0, 0x37, 0x0e, 0xc7, 0x5f, 0x52, 0x8f, 0xe4, 0x63, 0x11, 0x8f, 0xd1,
	0x77, 0xe7, 0xe0, 0xe3, 0xfc, 0xe6, 0x64, 0xbc, 0x32, 0x8d, 0xdf, 0x9a, 0x83, 0x8f, 0xf3, 0xdb,
	0x93, 0x1b, 0xe0, 0x50, 0xa8, 0xd6, 0x9a, 0x58, 0xe4, 0x7b, 0xe8, 0x29, 0x3c, 0xba, 0x72, 0x03,
	0xa8, 0x58, 0x2c, 0xc9, 0x2d, 0x11, 0x8b, 0x65, 0xfe, 0xc3, 0xd9, 0x81, 0xb1, 0x34, 0x98, 0x40,
	0x07, 0xbd, 0x0b, 0x4f, 0x5f, 0xab, 0x29, 0x98, 0x60, 0x77, 0x7e, 0xf0, 0x74, 0x65, 0x6f, 0x72,
	0xca, 0x53, 0x1a, 0x85, 0x09, 0xec, 0xcf, 0x0e, 0x9c, 0xae, 0x78, 0x8e, 0xbe, 0x00, 0x8f, 0xaf,
	0xde, 0x3c, 0x4c, 0xe4, 0xc5, 0x9c, 0xc8, 0xe9, 0x9a, 0x5f, 0x99, 0x1c, 0xa9, 0xcc, 0xd7, 0xbc,
	0x9c, 0x13, 0x39, 0x5d, 0xf3, 0xab, 0x68, 0x07, 0xee, 0x4d, 0x6d, 0x32, 0x06, 0xf8, 0x35, 0xb4,
	0x0e, 0x88, 0x02, 0x8f, 0x1a, 0xcd, 0x68, 0x4c, 0xfd, 0x26, 0x89, 0x6e, 0xc1, 0xcd, 0x98, 0xa3,
	0x2a, 0xf1, 0xbf, 0x8d, 0xd9, 0x07, 0x6d, 0xfb, 0xbb, 0x24, 0xda, 0x86, 0xad, 0x31, 0x3b, 0xa3,
	0xf4, 0x7b, 0x26, 0xf2, 0x50, 0x90, 0x86, 0x91, 0x3f, 0x4e, 0x45, 0x29, 0xf8, 0xf6, 0x61, 0x0a,
	0x1f, 0xa7, 0x46, 0x03, 0x06, 0x29, 0xfc, 0x24, 0x15, 0x49, 0x31, 0x44, 0x8c, 0xd4, 0x4f, 0x53,
	0xe8, 0x3e, 0xbc, 0x49, 0x11, 0xa5, 0xa3, 0xe6, 0x84, 0x56, 0x2e, 0xe1, 0xaa, 0x52, 0x2d, 0x09,
	0x35, 0xfe, 0xdb, 0x1c, 0x7a, 0x1b, 0x3e, 0x3b, 0x0b, 0x7a, 0x28, 0x28, 0x42, 0x8d, 0xff, 0x0e,
	0x87, 0x1e, 0x41, 0xfe, 0x2a, 0x94, 0x4c, 0x1e, 0xdf, 0xe5, 0xd0, 0x3e, 0x7c, 0x6e, 0x2e, 0x39,
	0x13, 0xf1, 0x3d, 0x0e, 0xbd, 0x09, 0x77, 0xa3, 0x88, 0x66, 0x63, 0xd2, 0xd4, 0xff, 0x88, 0x43,
	0xf9, 0xc1, 0xc8, 0x9c, 0x8a, 0x62, 0x58, 0xbf, 0xcf, 0xa1, 0x2c, 0xbc, 0x41, 0xf1, 0x95, 0xe3,
	0xf0, 0xff, 0x12, 0x15, 0x8b, 0x0d, 0x51, 0xe1, 0xff, 0xcc, 0xa1, 0xc2, 0x60, 0x7e, 0x45, 0xbe,
	0x19, 0x3b, 0xf6, 0x17, 0x0e, 0x3d, 0x80, 0x9d, 0xf9, 0x01, 0x74, 0xdf, 0xfe, 0xca, 0xa1, 0x67,
	0x83, 0x1e, 0xbe, 0x0a, 0x3d, 0x93, 0xf5, 0xdf, 0x38, 0xf4, 0x04, 0xde, 0xb9, 0xa2, 0x10, 0x13,
	0xf7, 0x77, 0x0e, 0x6d, 0xc1, 0xad, 0xf1, 0xd5, 0x16, 0x65, 0x59, 0xe1, 0xff, 0xc1, 0xa1, 0x1d,
	0xc8, 0x0d, 0x9d, 0x2c, 0x5b, 0x43, 0x94, 0x1a, 0x32, 0x3d, 0x23, 0x62, 0x99, 0xff, 0xe7, 0xe8,
	0x32, 0x85, 0x5a, 0x6d, 0x02, 0xb8, 0x31, 0x40, 0xff, 0x8b, 0x43, 0xbb, 0x83, 0x03, 0xe7, 0x6b,
	0x56, 0x1b, 0x2f, 0xa6, 0xd4, 0xee, 0xdf, 0x1c, 0x3a, 0x18, 0x7c, 0x50, 0x67, 0x22, 0x99, 0x15,
	0xfd, 0x87, 0x43, 0x7b, 0xf0, 0xd6, 0x30, 0xa6, 0x2e, 0xd6, 0x65, 0xfc, 0x72, 0x0a, 0xff, 0x7f,
	0x39, 0xf4, 0x18, 0x0a, 0x57, 0xc2, 0x32, 0x0a, 0xff, 0xe3, 0xd0, 0x9d, 0xc1, 0x57, 0xa9, 0x72,
	0xac, 0x4a, 0xca, 0x91, 0xda, 0x78, 0x29, 0x95, 0x86, 0x87, 0xf4, 0x1b, 0x0b, 0x23, 0xeb, 0x8b,
	0xfb, 0x19, 0xa6, 0x6f, 0x2e, 0xa0, 0xdb, 0xb0, 0x41, 0x91, 0xb5, 0xaa, 0x24, 0xaa, 0x25, 0x01,
	0x97, 0xa3, 0x43, 0xfd, 0x87, 0x05, 0xf4, 0x19, 0x58, 0x9f, 0xe8, 0xae, 0x4a, 0xfc, 0x1f, 0x19,
	0x99, 0x92, 0x5c, 0x3f, 0x92, 0xa5, 0xe0, 0x3b, 0x50, 0xae, 0x57, 0x25, 0xb5, 0xa1, 0x08, 0x8a,
	0xa8, 0x96, 0x2a, 0x82, 0xf4, 0x5c, 0x2c, 0xf3, 0x9f, 0xa4, 0xa3, 0x3a, 0x46, 0x48, 0xf9, 0x48,
	0xc4, 0x31, 0xe0, 0xcf, 0xd3, 0x13, 0x29, 0x6b, 0x02, 0xae, 0xc7, 0x90, 0xbf, 0x98, 0x88, 0xa4,
	0x3b, 0x37, 0x8a, 0xfc, 0x65, 0x3a, 0xaa, 0x47, 0x84, 0x6c, 0x28, 0x82, 0x54, 0x2e, 0xbe, 0x8c,
	0x61, 0x7f, 0x95, 0x3e, 0xf8, 0x53, 0x12, 0x6e, 0x4b, 0x9a, 0x67, 0x9c, 0x13, 0xfa, 0x18, 0x51,
	0xd7, 0x2c, 0xad, 0x43, 0x4c, 0xff, 0x9f, 0x26, 0xfa, 0x14, 0x8c, 0x9e, 0x00, 0x44, 0x2f, 0x50,
	0x88, 0xbe, 0xaf, 0x55, 0x34, 0x47, 0xbf, 0xd0, 0x1c, 0x52, 0x2d, 0x67, 0xd7, 0xa7, 0xbc, 0x51,
	0xa1, 0xf7, 0x61, 0xb3, 0xd9, 0xd3, 0x35, 0x8f, 0x4c, 0x78, 0xe5, 0x40, 0x77, 0xa7, 0xbf, 0x7f,
	0x04, 0xcf, 0x40, 0xd9, 0xed, 0x79, 0x0f, 0x24, 0xe8, 0x31, 0x5c, 0x6f, 0x78, 0x0e, 0xd1, 0xcc,
	0x30, 0xb3, 0x5b, 0x63, 0xd7, 0x78, 0xd1, 0xec, 0x79, 0x97, 0x59, 0x88, 0x98, 0xf6, 0x93, 0xc5,
	0x77, 0xbf, 0xfc, 0xac, 0x63, 0x78, 0x67, 0xfd, 0x93, 0xfc, 0xa9, 0x6d, 0x16, 0xec, 0x1e, 0xb1,
	0x4e, 0x6d, 0x47, 0x2f, 0xd0, 0x27, 0x89, 0x87, 0xe6, 0x70, 0xf5, 0x0f, 0x0d, 0xcb, 0x23, 0x4e,
	0x5b, 0x3b, 0x25, 0x85, 0xf3, 0x47, 0x85, 0x8e, 0x5d, 0xd0, 0x4d, 0xe3, 0x64, 0x31, 0xa0, 0x7e,
	0xf4, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1c, 0x32, 0xf3, 0xdf, 0x3a, 0x17, 0x00, 0x00,
}

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4

// NativeEventsManagementServiceClient is the client API for NativeEventsManagementService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type NativeEventsManagementServiceClient interface {
	// List the supported events for the passed device
	ListEvents(ctx context.Context, in *HardwareID, opts ...grpc.CallOption) (*ListEventsResponse, error)
	// Updates the configuration of the list of events in the request
	// The default behavior of the device is to report all the supported events
	// This configuration is persisted across reboots of the device or the device manager
	UpdateEventsConfiguration(ctx context.Context, in *EventsConfigurationRequest, opts ...grpc.CallOption) (*EventsConfigurationResponse, error)
	// Initiate the server streaming of the events
	StreamEvents(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (NativeEventsManagementService_StreamEventsClient, error)
}

type nativeEventsManagementServiceClient struct {
	cc *grpc.ClientConn
}

func NewNativeEventsManagementServiceClient(cc *grpc.ClientConn) NativeEventsManagementServiceClient {
	return &nativeEventsManagementServiceClient{cc}
}

func (c *nativeEventsManagementServiceClient) ListEvents(ctx context.Context, in *HardwareID, opts ...grpc.CallOption) (*ListEventsResponse, error) {
	out := new(ListEventsResponse)
	err := c.cc.Invoke(ctx, "/dmi.NativeEventsManagementService/ListEvents", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *nativeEventsManagementServiceClient) UpdateEventsConfiguration(ctx context.Context, in *EventsConfigurationRequest, opts ...grpc.CallOption) (*EventsConfigurationResponse, error) {
	out := new(EventsConfigurationResponse)
	err := c.cc.Invoke(ctx, "/dmi.NativeEventsManagementService/UpdateEventsConfiguration", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *nativeEventsManagementServiceClient) StreamEvents(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (NativeEventsManagementService_StreamEventsClient, error) {
	stream, err := c.cc.NewStream(ctx, &_NativeEventsManagementService_serviceDesc.Streams[0], "/dmi.NativeEventsManagementService/StreamEvents", opts...)
	if err != nil {
		return nil, err
	}
	x := &nativeEventsManagementServiceStreamEventsClient{stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

type NativeEventsManagementService_StreamEventsClient interface {
	Recv() (*Event, error)
	grpc.ClientStream
}

type nativeEventsManagementServiceStreamEventsClient struct {
	grpc.ClientStream
}

func (x *nativeEventsManagementServiceStreamEventsClient) Recv() (*Event, error) {
	m := new(Event)
	if err := x.ClientStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

// NativeEventsManagementServiceServer is the server API for NativeEventsManagementService service.
type NativeEventsManagementServiceServer interface {
	// List the supported events for the passed device
	ListEvents(context.Context, *HardwareID) (*ListEventsResponse, error)
	// Updates the configuration of the list of events in the request
	// The default behavior of the device is to report all the supported events
	// This configuration is persisted across reboots of the device or the device manager
	UpdateEventsConfiguration(context.Context, *EventsConfigurationRequest) (*EventsConfigurationResponse, error)
	// Initiate the server streaming of the events
	StreamEvents(*empty.Empty, NativeEventsManagementService_StreamEventsServer) error
}

// UnimplementedNativeEventsManagementServiceServer can be embedded to have forward compatible implementations.
type UnimplementedNativeEventsManagementServiceServer struct {
}

func (*UnimplementedNativeEventsManagementServiceServer) ListEvents(ctx context.Context, req *HardwareID) (*ListEventsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListEvents not implemented")
}
func (*UnimplementedNativeEventsManagementServiceServer) UpdateEventsConfiguration(ctx context.Context, req *EventsConfigurationRequest) (*EventsConfigurationResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateEventsConfiguration not implemented")
}
func (*UnimplementedNativeEventsManagementServiceServer) StreamEvents(req *empty.Empty, srv NativeEventsManagementService_StreamEventsServer) error {
	return status.Errorf(codes.Unimplemented, "method StreamEvents not implemented")
}

func RegisterNativeEventsManagementServiceServer(s *grpc.Server, srv NativeEventsManagementServiceServer) {
	s.RegisterService(&_NativeEventsManagementService_serviceDesc, srv)
}

func _NativeEventsManagementService_ListEvents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(HardwareID)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(NativeEventsManagementServiceServer).ListEvents(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/dmi.NativeEventsManagementService/ListEvents",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(NativeEventsManagementServiceServer).ListEvents(ctx, req.(*HardwareID))
	}
	return interceptor(ctx, in, info, handler)
}

func _NativeEventsManagementService_UpdateEventsConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(EventsConfigurationRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(NativeEventsManagementServiceServer).UpdateEventsConfiguration(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/dmi.NativeEventsManagementService/UpdateEventsConfiguration",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(NativeEventsManagementServiceServer).UpdateEventsConfiguration(ctx, req.(*EventsConfigurationRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _NativeEventsManagementService_StreamEvents_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(empty.Empty)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(NativeEventsManagementServiceServer).StreamEvents(m, &nativeEventsManagementServiceStreamEventsServer{stream})
}

type NativeEventsManagementService_StreamEventsServer interface {
	Send(*Event) error
	grpc.ServerStream
}

type nativeEventsManagementServiceStreamEventsServer struct {
	grpc.ServerStream
}

func (x *nativeEventsManagementServiceStreamEventsServer) Send(m *Event) error {
	return x.ServerStream.SendMsg(m)
}

var _NativeEventsManagementService_serviceDesc = grpc.ServiceDesc{
	ServiceName: "dmi.NativeEventsManagementService",
	HandlerType: (*NativeEventsManagementServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListEvents",
			Handler:    _NativeEventsManagementService_ListEvents_Handler,
		},
		{
			MethodName: "UpdateEventsConfiguration",
			Handler:    _NativeEventsManagementService_UpdateEventsConfiguration_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StreamEvents",
			Handler:       _NativeEventsManagementService_StreamEvents_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "dmi/hw_events_mgmt_service.proto",
}
