// Code generated by protoc-gen-go. DO NOT EDIT.
// source: voltha_protos/extensions.proto

package extension

import (
	context "context"
	fmt "fmt"
	proto "github.com/golang/protobuf/proto"
	empty "github.com/golang/protobuf/ptypes/empty"
	config "github.com/opencord/voltha-protos/v5/go/ext/config"
	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 ValueType_Type int32

const (
	ValueType_EMPTY    ValueType_Type = 0
	ValueType_DISTANCE ValueType_Type = 1
)

var ValueType_Type_name = map[int32]string{
	0: "EMPTY",
	1: "DISTANCE",
}

var ValueType_Type_value = map[string]int32{
	"EMPTY":    0,
	"DISTANCE": 1,
}

func (x ValueType_Type) String() string {
	return proto.EnumName(ValueType_Type_name, int32(x))
}

func (ValueType_Type) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{1, 0}
}

type GetOnuUniInfoResponse_ConfigurationInd int32

const (
	GetOnuUniInfoResponse_UNKOWN               GetOnuUniInfoResponse_ConfigurationInd = 0
	GetOnuUniInfoResponse_TEN_BASE_T_FDX       GetOnuUniInfoResponse_ConfigurationInd = 1
	GetOnuUniInfoResponse_HUNDRED_BASE_T_FDX   GetOnuUniInfoResponse_ConfigurationInd = 2
	GetOnuUniInfoResponse_GIGABIT_ETHERNET_FDX GetOnuUniInfoResponse_ConfigurationInd = 3
	GetOnuUniInfoResponse_TEN_G_ETHERNET_FDX   GetOnuUniInfoResponse_ConfigurationInd = 4
	GetOnuUniInfoResponse_TEN_BASE_T_HDX       GetOnuUniInfoResponse_ConfigurationInd = 5
	GetOnuUniInfoResponse_HUNDRED_BASE_T_HDX   GetOnuUniInfoResponse_ConfigurationInd = 6
	GetOnuUniInfoResponse_GIGABIT_ETHERNET_HDX GetOnuUniInfoResponse_ConfigurationInd = 7
)

var GetOnuUniInfoResponse_ConfigurationInd_name = map[int32]string{
	0: "UNKOWN",
	1: "TEN_BASE_T_FDX",
	2: "HUNDRED_BASE_T_FDX",
	3: "GIGABIT_ETHERNET_FDX",
	4: "TEN_G_ETHERNET_FDX",
	5: "TEN_BASE_T_HDX",
	6: "HUNDRED_BASE_T_HDX",
	7: "GIGABIT_ETHERNET_HDX",
}

var GetOnuUniInfoResponse_ConfigurationInd_value = map[string]int32{
	"UNKOWN":               0,
	"TEN_BASE_T_FDX":       1,
	"HUNDRED_BASE_T_FDX":   2,
	"GIGABIT_ETHERNET_FDX": 3,
	"TEN_G_ETHERNET_FDX":   4,
	"TEN_BASE_T_HDX":       5,
	"HUNDRED_BASE_T_HDX":   6,
	"GIGABIT_ETHERNET_HDX": 7,
}

func (x GetOnuUniInfoResponse_ConfigurationInd) String() string {
	return proto.EnumName(GetOnuUniInfoResponse_ConfigurationInd_name, int32(x))
}

func (GetOnuUniInfoResponse_ConfigurationInd) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{7, 0}
}

type GetOnuUniInfoResponse_AdministrativeState int32

const (
	GetOnuUniInfoResponse_ADMSTATE_UNDEFINED GetOnuUniInfoResponse_AdministrativeState = 0
	GetOnuUniInfoResponse_LOCKED             GetOnuUniInfoResponse_AdministrativeState = 1
	GetOnuUniInfoResponse_UNLOCKED           GetOnuUniInfoResponse_AdministrativeState = 2
)

var GetOnuUniInfoResponse_AdministrativeState_name = map[int32]string{
	0: "ADMSTATE_UNDEFINED",
	1: "LOCKED",
	2: "UNLOCKED",
}

var GetOnuUniInfoResponse_AdministrativeState_value = map[string]int32{
	"ADMSTATE_UNDEFINED": 0,
	"LOCKED":             1,
	"UNLOCKED":           2,
}

func (x GetOnuUniInfoResponse_AdministrativeState) String() string {
	return proto.EnumName(GetOnuUniInfoResponse_AdministrativeState_name, int32(x))
}

func (GetOnuUniInfoResponse_AdministrativeState) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{7, 1}
}

type GetOnuUniInfoResponse_OperationalState int32

const (
	GetOnuUniInfoResponse_OPERSTATE_UNDEFINED GetOnuUniInfoResponse_OperationalState = 0
	GetOnuUniInfoResponse_ENABLED             GetOnuUniInfoResponse_OperationalState = 1
	GetOnuUniInfoResponse_DISABLED            GetOnuUniInfoResponse_OperationalState = 2
)

var GetOnuUniInfoResponse_OperationalState_name = map[int32]string{
	0: "OPERSTATE_UNDEFINED",
	1: "ENABLED",
	2: "DISABLED",
}

var GetOnuUniInfoResponse_OperationalState_value = map[string]int32{
	"OPERSTATE_UNDEFINED": 0,
	"ENABLED":             1,
	"DISABLED":            2,
}

func (x GetOnuUniInfoResponse_OperationalState) String() string {
	return proto.EnumName(GetOnuUniInfoResponse_OperationalState_name, int32(x))
}

func (GetOnuUniInfoResponse_OperationalState) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{7, 2}
}

type GetOltPortCounters_PortType int32

const (
	GetOltPortCounters_Port_UNKNOWN      GetOltPortCounters_PortType = 0
	GetOltPortCounters_Port_ETHERNET_NNI GetOltPortCounters_PortType = 1
	GetOltPortCounters_Port_PON_OLT      GetOltPortCounters_PortType = 2
)

var GetOltPortCounters_PortType_name = map[int32]string{
	0: "Port_UNKNOWN",
	1: "Port_ETHERNET_NNI",
	2: "Port_PON_OLT",
}

var GetOltPortCounters_PortType_value = map[string]int32{
	"Port_UNKNOWN":      0,
	"Port_ETHERNET_NNI": 1,
	"Port_PON_OLT":      2,
}

func (x GetOltPortCounters_PortType) String() string {
	return proto.EnumName(GetOltPortCounters_PortType_name, int32(x))
}

func (GetOltPortCounters_PortType) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{8, 0}
}

type GetOnuEthernetBridgePortHistory_Direction int32

const (
	GetOnuEthernetBridgePortHistory_UNDEFINED  GetOnuEthernetBridgePortHistory_Direction = 0
	GetOnuEthernetBridgePortHistory_UPSTREAM   GetOnuEthernetBridgePortHistory_Direction = 1
	GetOnuEthernetBridgePortHistory_DOWNSTREAM GetOnuEthernetBridgePortHistory_Direction = 2
)

var GetOnuEthernetBridgePortHistory_Direction_name = map[int32]string{
	0: "UNDEFINED",
	1: "UPSTREAM",
	2: "DOWNSTREAM",
}

var GetOnuEthernetBridgePortHistory_Direction_value = map[string]int32{
	"UNDEFINED":  0,
	"UPSTREAM":   1,
	"DOWNSTREAM": 2,
}

func (x GetOnuEthernetBridgePortHistory_Direction) String() string {
	return proto.EnumName(GetOnuEthernetBridgePortHistory_Direction_name, int32(x))
}

func (GetOnuEthernetBridgePortHistory_Direction) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{12, 0}
}

type GetOmciEthernetFrameExtendedPmResponse_Format int32

const (
	GetOmciEthernetFrameExtendedPmResponse_THIRTY_TWO_BIT GetOmciEthernetFrameExtendedPmResponse_Format = 0
	GetOmciEthernetFrameExtendedPmResponse_SIXTY_FOUR_BIT GetOmciEthernetFrameExtendedPmResponse_Format = 1
)

var GetOmciEthernetFrameExtendedPmResponse_Format_name = map[int32]string{
	0: "THIRTY_TWO_BIT",
	1: "SIXTY_FOUR_BIT",
}

var GetOmciEthernetFrameExtendedPmResponse_Format_value = map[string]int32{
	"THIRTY_TWO_BIT": 0,
	"SIXTY_FOUR_BIT": 1,
}

func (x GetOmciEthernetFrameExtendedPmResponse_Format) String() string {
	return proto.EnumName(GetOmciEthernetFrameExtendedPmResponse_Format_name, int32(x))
}

func (GetOmciEthernetFrameExtendedPmResponse_Format) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{22, 0}
}

type GetOffloadedAppsStatisticsRequest_OffloadedApp int32

const (
	GetOffloadedAppsStatisticsRequest_UNDEFINED GetOffloadedAppsStatisticsRequest_OffloadedApp = 0
	GetOffloadedAppsStatisticsRequest_PPPoeIA   GetOffloadedAppsStatisticsRequest_OffloadedApp = 1
	GetOffloadedAppsStatisticsRequest_DHCPv4RA  GetOffloadedAppsStatisticsRequest_OffloadedApp = 2
	GetOffloadedAppsStatisticsRequest_DHCPv6RA  GetOffloadedAppsStatisticsRequest_OffloadedApp = 3
)

var GetOffloadedAppsStatisticsRequest_OffloadedApp_name = map[int32]string{
	0: "UNDEFINED",
	1: "PPPoeIA",
	2: "DHCPv4RA",
	3: "DHCPv6RA",
}

var GetOffloadedAppsStatisticsRequest_OffloadedApp_value = map[string]int32{
	"UNDEFINED": 0,
	"PPPoeIA":   1,
	"DHCPv4RA":  2,
	"DHCPv6RA":  3,
}

func (x GetOffloadedAppsStatisticsRequest_OffloadedApp) String() string {
	return proto.EnumName(GetOffloadedAppsStatisticsRequest_OffloadedApp_name, int32(x))
}

func (GetOffloadedAppsStatisticsRequest_OffloadedApp) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{31, 0}
}

type GetValueResponse_Status int32

const (
	GetValueResponse_STATUS_UNDEFINED GetValueResponse_Status = 0
	GetValueResponse_OK               GetValueResponse_Status = 1
	GetValueResponse_ERROR            GetValueResponse_Status = 2
)

var GetValueResponse_Status_name = map[int32]string{
	0: "STATUS_UNDEFINED",
	1: "OK",
	2: "ERROR",
}

var GetValueResponse_Status_value = map[string]int32{
	"STATUS_UNDEFINED": 0,
	"OK":               1,
	"ERROR":            2,
}

func (x GetValueResponse_Status) String() string {
	return proto.EnumName(GetValueResponse_Status_name, int32(x))
}

func (GetValueResponse_Status) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{34, 0}
}

type GetValueResponse_ErrorReason int32

const (
	GetValueResponse_REASON_UNDEFINED  GetValueResponse_ErrorReason = 0
	GetValueResponse_UNSUPPORTED       GetValueResponse_ErrorReason = 1
	GetValueResponse_INVALID_DEVICE_ID GetValueResponse_ErrorReason = 2
	GetValueResponse_INVALID_PORT_TYPE GetValueResponse_ErrorReason = 3
	GetValueResponse_TIMEOUT           GetValueResponse_ErrorReason = 4
	GetValueResponse_INVALID_REQ_TYPE  GetValueResponse_ErrorReason = 5
	GetValueResponse_INTERNAL_ERROR    GetValueResponse_ErrorReason = 6
	GetValueResponse_INVALID_DEVICE    GetValueResponse_ErrorReason = 7
)

var GetValueResponse_ErrorReason_name = map[int32]string{
	0: "REASON_UNDEFINED",
	1: "UNSUPPORTED",
	2: "INVALID_DEVICE_ID",
	3: "INVALID_PORT_TYPE",
	4: "TIMEOUT",
	5: "INVALID_REQ_TYPE",
	6: "INTERNAL_ERROR",
	7: "INVALID_DEVICE",
}

var GetValueResponse_ErrorReason_value = map[string]int32{
	"REASON_UNDEFINED":  0,
	"UNSUPPORTED":       1,
	"INVALID_DEVICE_ID": 2,
	"INVALID_PORT_TYPE": 3,
	"TIMEOUT":           4,
	"INVALID_REQ_TYPE":  5,
	"INTERNAL_ERROR":    6,
	"INVALID_DEVICE":    7,
}

func (x GetValueResponse_ErrorReason) String() string {
	return proto.EnumName(GetValueResponse_ErrorReason_name, int32(x))
}

func (GetValueResponse_ErrorReason) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{34, 1}
}

type SetValueResponse_Status int32

const (
	SetValueResponse_STATUS_UNDEFINED SetValueResponse_Status = 0
	SetValueResponse_OK               SetValueResponse_Status = 1
	SetValueResponse_ERROR            SetValueResponse_Status = 2
)

var SetValueResponse_Status_name = map[int32]string{
	0: "STATUS_UNDEFINED",
	1: "OK",
	2: "ERROR",
}

var SetValueResponse_Status_value = map[string]int32{
	"STATUS_UNDEFINED": 0,
	"OK":               1,
	"ERROR":            2,
}

func (x SetValueResponse_Status) String() string {
	return proto.EnumName(SetValueResponse_Status_name, int32(x))
}

func (SetValueResponse_Status) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{38, 0}
}

type SetValueResponse_ErrorReason int32

const (
	SetValueResponse_REASON_UNDEFINED      SetValueResponse_ErrorReason = 0
	SetValueResponse_UNSUPPORTED           SetValueResponse_ErrorReason = 1
	SetValueResponse_INVALID_DEVICE_ID     SetValueResponse_ErrorReason = 2
	SetValueResponse_INVALID_ONU_DEVICE_ID SetValueResponse_ErrorReason = 3
	SetValueResponse_INVALID_UNI_ID        SetValueResponse_ErrorReason = 4
)

var SetValueResponse_ErrorReason_name = map[int32]string{
	0: "REASON_UNDEFINED",
	1: "UNSUPPORTED",
	2: "INVALID_DEVICE_ID",
	3: "INVALID_ONU_DEVICE_ID",
	4: "INVALID_UNI_ID",
}

var SetValueResponse_ErrorReason_value = map[string]int32{
	"REASON_UNDEFINED":      0,
	"UNSUPPORTED":           1,
	"INVALID_DEVICE_ID":     2,
	"INVALID_ONU_DEVICE_ID": 3,
	"INVALID_UNI_ID":        4,
}

func (x SetValueResponse_ErrorReason) String() string {
	return proto.EnumName(SetValueResponse_ErrorReason_name, int32(x))
}

func (SetValueResponse_ErrorReason) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{38, 1}
}

type ValueSet struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Types that are valid to be assigned to Value:
	//	*ValueSet_AlarmConfig
	Value                isValueSet_Value `protobuf_oneof:"value"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

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

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

var xxx_messageInfo_ValueSet proto.InternalMessageInfo

func (m *ValueSet) GetId() string {
	if m != nil {
		return m.Id
	}
	return ""
}

type isValueSet_Value interface {
	isValueSet_Value()
}

type ValueSet_AlarmConfig struct {
	AlarmConfig *config.AlarmConfig `protobuf:"bytes,2,opt,name=alarm_config,json=alarmConfig,proto3,oneof"`
}

func (*ValueSet_AlarmConfig) isValueSet_Value() {}

func (m *ValueSet) GetValue() isValueSet_Value {
	if m != nil {
		return m.Value
	}
	return nil
}

func (m *ValueSet) GetAlarmConfig() *config.AlarmConfig {
	if x, ok := m.GetValue().(*ValueSet_AlarmConfig); ok {
		return x.AlarmConfig
	}
	return nil
}

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

type ValueType struct {
	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_7ecf6e9799a9202d, []int{1}
}

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 ValueSpecifier struct {
	Id                   string         `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Value                ValueType_Type `protobuf:"varint,2,opt,name=value,proto3,enum=extension.ValueType_Type" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

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

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

var xxx_messageInfo_ValueSpecifier proto.InternalMessageInfo

func (m *ValueSpecifier) GetId() string {
	if m != nil {
		return m.Id
	}
	return ""
}

func (m *ValueSpecifier) GetValue() ValueType_Type {
	if m != nil {
		return m.Value
	}
	return ValueType_EMPTY
}

type ReturnValues struct {
	Set                  uint32   `protobuf:"varint,1,opt,name=Set,proto3" json:"Set,omitempty"`
	Unsupported          uint32   `protobuf:"varint,2,opt,name=Unsupported,proto3" json:"Unsupported,omitempty"`
	Error                uint32   `protobuf:"varint,3,opt,name=Error,proto3" json:"Error,omitempty"`
	Distance             uint32   `protobuf:"varint,4,opt,name=Distance,proto3" json:"Distance,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_ReturnValues proto.InternalMessageInfo

func (m *ReturnValues) GetSet() uint32 {
	if m != nil {
		return m.Set
	}
	return 0
}

func (m *ReturnValues) GetUnsupported() uint32 {
	if m != nil {
		return m.Unsupported
	}
	return 0
}

func (m *ReturnValues) GetError() uint32 {
	if m != nil {
		return m.Error
	}
	return 0
}

func (m *ReturnValues) GetDistance() uint32 {
	if m != nil {
		return m.Distance
	}
	return 0
}

type GetDistanceRequest struct {
	OnuDeviceId          string   `protobuf:"bytes,1,opt,name=onuDeviceId,proto3" json:"onuDeviceId,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_GetDistanceRequest proto.InternalMessageInfo

func (m *GetDistanceRequest) GetOnuDeviceId() string {
	if m != nil {
		return m.OnuDeviceId
	}
	return ""
}

type GetDistanceResponse struct {
	Distance             uint32   `protobuf:"varint,1,opt,name=distance,proto3" json:"distance,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_GetDistanceResponse proto.InternalMessageInfo

func (m *GetDistanceResponse) GetDistance() uint32 {
	if m != nil {
		return m.Distance
	}
	return 0
}

type GetOnuUniInfoRequest struct {
	UniIndex             uint32   `protobuf:"varint,1,opt,name=uniIndex,proto3" json:"uniIndex,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_GetOnuUniInfoRequest proto.InternalMessageInfo

func (m *GetOnuUniInfoRequest) GetUniIndex() uint32 {
	if m != nil {
		return m.UniIndex
	}
	return 0
}

type GetOnuUniInfoResponse struct {
	AdmState             GetOnuUniInfoResponse_AdministrativeState `protobuf:"varint,1,opt,name=admState,proto3,enum=extension.GetOnuUniInfoResponse_AdministrativeState" json:"admState,omitempty"`
	OperState            GetOnuUniInfoResponse_OperationalState    `protobuf:"varint,2,opt,name=operState,proto3,enum=extension.GetOnuUniInfoResponse_OperationalState" json:"operState,omitempty"`
	ConfigInd            GetOnuUniInfoResponse_ConfigurationInd    `protobuf:"varint,3,opt,name=configInd,proto3,enum=extension.GetOnuUniInfoResponse_ConfigurationInd" json:"configInd,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                                  `json:"-"`
	XXX_unrecognized     []byte                                    `json:"-"`
	XXX_sizecache        int32                                     `json:"-"`
}

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

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

var xxx_messageInfo_GetOnuUniInfoResponse proto.InternalMessageInfo

func (m *GetOnuUniInfoResponse) GetAdmState() GetOnuUniInfoResponse_AdministrativeState {
	if m != nil {
		return m.AdmState
	}
	return GetOnuUniInfoResponse_ADMSTATE_UNDEFINED
}

func (m *GetOnuUniInfoResponse) GetOperState() GetOnuUniInfoResponse_OperationalState {
	if m != nil {
		return m.OperState
	}
	return GetOnuUniInfoResponse_OPERSTATE_UNDEFINED
}

func (m *GetOnuUniInfoResponse) GetConfigInd() GetOnuUniInfoResponse_ConfigurationInd {
	if m != nil {
		return m.ConfigInd
	}
	return GetOnuUniInfoResponse_UNKOWN
}

type GetOltPortCounters struct {
	PortNo               uint32                      `protobuf:"varint,1,opt,name=portNo,proto3" json:"portNo,omitempty"`
	PortType             GetOltPortCounters_PortType `protobuf:"varint,2,opt,name=portType,proto3,enum=extension.GetOltPortCounters_PortType" json:"portType,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                    `json:"-"`
	XXX_unrecognized     []byte                      `json:"-"`
	XXX_sizecache        int32                       `json:"-"`
}

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

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

var xxx_messageInfo_GetOltPortCounters proto.InternalMessageInfo

func (m *GetOltPortCounters) GetPortNo() uint32 {
	if m != nil {
		return m.PortNo
	}
	return 0
}

func (m *GetOltPortCounters) GetPortType() GetOltPortCounters_PortType {
	if m != nil {
		return m.PortType
	}
	return GetOltPortCounters_Port_UNKNOWN
}

type GetOltPortCountersResponse struct {
	TxBytes              uint64   `protobuf:"varint,1,opt,name=txBytes,proto3" json:"txBytes,omitempty"`
	RxBytes              uint64   `protobuf:"varint,2,opt,name=rxBytes,proto3" json:"rxBytes,omitempty"`
	TxPackets            uint64   `protobuf:"varint,3,opt,name=txPackets,proto3" json:"txPackets,omitempty"`
	RxPackets            uint64   `protobuf:"varint,4,opt,name=rxPackets,proto3" json:"rxPackets,omitempty"`
	TxErrorPackets       uint64   `protobuf:"varint,5,opt,name=txErrorPackets,proto3" json:"txErrorPackets,omitempty"`
	RxErrorPackets       uint64   `protobuf:"varint,6,opt,name=rxErrorPackets,proto3" json:"rxErrorPackets,omitempty"`
	TxBcastPackets       uint64   `protobuf:"varint,7,opt,name=txBcastPackets,proto3" json:"txBcastPackets,omitempty"`
	RxBcastPackets       uint64   `protobuf:"varint,8,opt,name=rxBcastPackets,proto3" json:"rxBcastPackets,omitempty"`
	TxUcastPackets       uint64   `protobuf:"varint,9,opt,name=txUcastPackets,proto3" json:"txUcastPackets,omitempty"`
	RxUcastPackets       uint64   `protobuf:"varint,10,opt,name=rxUcastPackets,proto3" json:"rxUcastPackets,omitempty"`
	TxMcastPackets       uint64   `protobuf:"varint,11,opt,name=txMcastPackets,proto3" json:"txMcastPackets,omitempty"`
	RxMcastPackets       uint64   `protobuf:"varint,12,opt,name=rxMcastPackets,proto3" json:"rxMcastPackets,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_GetOltPortCountersResponse proto.InternalMessageInfo

func (m *GetOltPortCountersResponse) GetTxBytes() uint64 {
	if m != nil {
		return m.TxBytes
	}
	return 0
}

func (m *GetOltPortCountersResponse) GetRxBytes() uint64 {
	if m != nil {
		return m.RxBytes
	}
	return 0
}

func (m *GetOltPortCountersResponse) GetTxPackets() uint64 {
	if m != nil {
		return m.TxPackets
	}
	return 0
}

func (m *GetOltPortCountersResponse) GetRxPackets() uint64 {
	if m != nil {
		return m.RxPackets
	}
	return 0
}

func (m *GetOltPortCountersResponse) GetTxErrorPackets() uint64 {
	if m != nil {
		return m.TxErrorPackets
	}
	return 0
}

func (m *GetOltPortCountersResponse) GetRxErrorPackets() uint64 {
	if m != nil {
		return m.RxErrorPackets
	}
	return 0
}

func (m *GetOltPortCountersResponse) GetTxBcastPackets() uint64 {
	if m != nil {
		return m.TxBcastPackets
	}
	return 0
}

func (m *GetOltPortCountersResponse) GetRxBcastPackets() uint64 {
	if m != nil {
		return m.RxBcastPackets
	}
	return 0
}

func (m *GetOltPortCountersResponse) GetTxUcastPackets() uint64 {
	if m != nil {
		return m.TxUcastPackets
	}
	return 0
}

func (m *GetOltPortCountersResponse) GetRxUcastPackets() uint64 {
	if m != nil {
		return m.RxUcastPackets
	}
	return 0
}

func (m *GetOltPortCountersResponse) GetTxMcastPackets() uint64 {
	if m != nil {
		return m.TxMcastPackets
	}
	return 0
}

func (m *GetOltPortCountersResponse) GetRxMcastPackets() uint64 {
	if m != nil {
		return m.RxMcastPackets
	}
	return 0
}

type GetOnuPonOpticalInfo struct {
	Empty                *empty.Empty `protobuf:"bytes,1,opt,name=empty,proto3" json:"empty,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

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

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

var xxx_messageInfo_GetOnuPonOpticalInfo proto.InternalMessageInfo

func (m *GetOnuPonOpticalInfo) GetEmpty() *empty.Empty {
	if m != nil {
		return m.Empty
	}
	return nil
}

// These values correspond to the Optical Line Supervision Test results
// described in section A3.39.5 of ITU-T G.988 (11/2017) specification.
type GetOnuPonOpticalInfoResponse struct {
	PowerFeedVoltage       float32  `protobuf:"fixed32,1,opt,name=powerFeedVoltage,proto3" json:"powerFeedVoltage,omitempty"`
	ReceivedOpticalPower   float32  `protobuf:"fixed32,2,opt,name=receivedOpticalPower,proto3" json:"receivedOpticalPower,omitempty"`
	MeanOpticalLaunchPower float32  `protobuf:"fixed32,3,opt,name=meanOpticalLaunchPower,proto3" json:"meanOpticalLaunchPower,omitempty"`
	LaserBiasCurrent       float32  `protobuf:"fixed32,4,opt,name=laserBiasCurrent,proto3" json:"laserBiasCurrent,omitempty"`
	Temperature            float32  `protobuf:"fixed32,5,opt,name=temperature,proto3" json:"temperature,omitempty"`
	XXX_NoUnkeyedLiteral   struct{} `json:"-"`
	XXX_unrecognized       []byte   `json:"-"`
	XXX_sizecache          int32    `json:"-"`
}

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

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

var xxx_messageInfo_GetOnuPonOpticalInfoResponse proto.InternalMessageInfo

func (m *GetOnuPonOpticalInfoResponse) GetPowerFeedVoltage() float32 {
	if m != nil {
		return m.PowerFeedVoltage
	}
	return 0
}

func (m *GetOnuPonOpticalInfoResponse) GetReceivedOpticalPower() float32 {
	if m != nil {
		return m.ReceivedOpticalPower
	}
	return 0
}

func (m *GetOnuPonOpticalInfoResponse) GetMeanOpticalLaunchPower() float32 {
	if m != nil {
		return m.MeanOpticalLaunchPower
	}
	return 0
}

func (m *GetOnuPonOpticalInfoResponse) GetLaserBiasCurrent() float32 {
	if m != nil {
		return m.LaserBiasCurrent
	}
	return 0
}

func (m *GetOnuPonOpticalInfoResponse) GetTemperature() float32 {
	if m != nil {
		return m.Temperature
	}
	return 0
}

type GetOnuEthernetBridgePortHistory struct {
	Direction            GetOnuEthernetBridgePortHistory_Direction `protobuf:"varint,1,opt,name=direction,proto3,enum=extension.GetOnuEthernetBridgePortHistory_Direction" json:"direction,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                                  `json:"-"`
	XXX_unrecognized     []byte                                    `json:"-"`
	XXX_sizecache        int32                                     `json:"-"`
}

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

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

var xxx_messageInfo_GetOnuEthernetBridgePortHistory proto.InternalMessageInfo

func (m *GetOnuEthernetBridgePortHistory) GetDirection() GetOnuEthernetBridgePortHistory_Direction {
	if m != nil {
		return m.Direction
	}
	return GetOnuEthernetBridgePortHistory_UNDEFINED
}

type GetOnuEthernetBridgePortHistoryResponse struct {
	DropEvents              uint32   `protobuf:"varint,1,opt,name=dropEvents,proto3" json:"dropEvents,omitempty"`
	Octets                  uint32   `protobuf:"varint,2,opt,name=octets,proto3" json:"octets,omitempty"`
	Packets                 uint32   `protobuf:"varint,3,opt,name=packets,proto3" json:"packets,omitempty"`
	BroadcastPackets        uint32   `protobuf:"varint,4,opt,name=broadcastPackets,proto3" json:"broadcastPackets,omitempty"`
	MulticastPackets        uint32   `protobuf:"varint,5,opt,name=multicastPackets,proto3" json:"multicastPackets,omitempty"`
	CrcErroredPackets       uint32   `protobuf:"varint,6,opt,name=crcErroredPackets,proto3" json:"crcErroredPackets,omitempty"`
	UndersizePackets        uint32   `protobuf:"varint,7,opt,name=undersizePackets,proto3" json:"undersizePackets,omitempty"`
	OversizePackets         uint32   `protobuf:"varint,8,opt,name=oversizePackets,proto3" json:"oversizePackets,omitempty"`
	Packets64Octets         uint32   `protobuf:"varint,9,opt,name=packets64octets,proto3" json:"packets64octets,omitempty"`
	Packets65To127Octets    uint32   `protobuf:"varint,10,opt,name=packets65To127octets,proto3" json:"packets65To127octets,omitempty"`
	Packets128To255Octets   uint32   `protobuf:"varint,11,opt,name=packets128To255Octets,proto3" json:"packets128To255Octets,omitempty"`
	Packets256To511Octets   uint32   `protobuf:"varint,12,opt,name=packets256To511octets,proto3" json:"packets256To511octets,omitempty"`
	Packets512To1023Octets  uint32   `protobuf:"varint,13,opt,name=packets512To1023octets,proto3" json:"packets512To1023octets,omitempty"`
	Packets1024To1518Octets uint32   `protobuf:"varint,14,opt,name=packets1024To1518octets,proto3" json:"packets1024To1518octets,omitempty"`
	XXX_NoUnkeyedLiteral    struct{} `json:"-"`
	XXX_unrecognized        []byte   `json:"-"`
	XXX_sizecache           int32    `json:"-"`
}

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

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

var xxx_messageInfo_GetOnuEthernetBridgePortHistoryResponse proto.InternalMessageInfo

func (m *GetOnuEthernetBridgePortHistoryResponse) GetDropEvents() uint32 {
	if m != nil {
		return m.DropEvents
	}
	return 0
}

func (m *GetOnuEthernetBridgePortHistoryResponse) GetOctets() uint32 {
	if m != nil {
		return m.Octets
	}
	return 0
}

func (m *GetOnuEthernetBridgePortHistoryResponse) GetPackets() uint32 {
	if m != nil {
		return m.Packets
	}
	return 0
}

func (m *GetOnuEthernetBridgePortHistoryResponse) GetBroadcastPackets() uint32 {
	if m != nil {
		return m.BroadcastPackets
	}
	return 0
}

func (m *GetOnuEthernetBridgePortHistoryResponse) GetMulticastPackets() uint32 {
	if m != nil {
		return m.MulticastPackets
	}
	return 0
}

func (m *GetOnuEthernetBridgePortHistoryResponse) GetCrcErroredPackets() uint32 {
	if m != nil {
		return m.CrcErroredPackets
	}
	return 0
}

func (m *GetOnuEthernetBridgePortHistoryResponse) GetUndersizePackets() uint32 {
	if m != nil {
		return m.UndersizePackets
	}
	return 0
}

func (m *GetOnuEthernetBridgePortHistoryResponse) GetOversizePackets() uint32 {
	if m != nil {
		return m.OversizePackets
	}
	return 0
}

func (m *GetOnuEthernetBridgePortHistoryResponse) GetPackets64Octets() uint32 {
	if m != nil {
		return m.Packets64Octets
	}
	return 0
}

func (m *GetOnuEthernetBridgePortHistoryResponse) GetPackets65To127Octets() uint32 {
	if m != nil {
		return m.Packets65To127Octets
	}
	return 0
}

func (m *GetOnuEthernetBridgePortHistoryResponse) GetPackets128To255Octets() uint32 {
	if m != nil {
		return m.Packets128To255Octets
	}
	return 0
}

func (m *GetOnuEthernetBridgePortHistoryResponse) GetPackets256To511Octets() uint32 {
	if m != nil {
		return m.Packets256To511Octets
	}
	return 0
}

func (m *GetOnuEthernetBridgePortHistoryResponse) GetPackets512To1023Octets() uint32 {
	if m != nil {
		return m.Packets512To1023Octets
	}
	return 0
}

func (m *GetOnuEthernetBridgePortHistoryResponse) GetPackets1024To1518Octets() uint32 {
	if m != nil {
		return m.Packets1024To1518Octets
	}
	return 0
}

type GetOnuFecHistory struct {
	Empty                *empty.Empty `protobuf:"bytes,1,opt,name=empty,proto3" json:"empty,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

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

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

var xxx_messageInfo_GetOnuFecHistory proto.InternalMessageInfo

func (m *GetOnuFecHistory) GetEmpty() *empty.Empty {
	if m != nil {
		return m.Empty
	}
	return nil
}

type GetOnuFecHistoryResponse struct {
	CorrectedBytes         uint32   `protobuf:"varint,1,opt,name=correctedBytes,proto3" json:"correctedBytes,omitempty"`
	CorrectedCodeWords     uint32   `protobuf:"varint,2,opt,name=correctedCodeWords,proto3" json:"correctedCodeWords,omitempty"`
	FecSeconds             uint32   `protobuf:"varint,3,opt,name=fecSeconds,proto3" json:"fecSeconds,omitempty"`
	TotalCodeWords         uint32   `protobuf:"varint,4,opt,name=totalCodeWords,proto3" json:"totalCodeWords,omitempty"`
	UncorrectableCodeWords uint32   `protobuf:"varint,5,opt,name=uncorrectableCodeWords,proto3" json:"uncorrectableCodeWords,omitempty"`
	XXX_NoUnkeyedLiteral   struct{} `json:"-"`
	XXX_unrecognized       []byte   `json:"-"`
	XXX_sizecache          int32    `json:"-"`
}

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

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

var xxx_messageInfo_GetOnuFecHistoryResponse proto.InternalMessageInfo

func (m *GetOnuFecHistoryResponse) GetCorrectedBytes() uint32 {
	if m != nil {
		return m.CorrectedBytes
	}
	return 0
}

func (m *GetOnuFecHistoryResponse) GetCorrectedCodeWords() uint32 {
	if m != nil {
		return m.CorrectedCodeWords
	}
	return 0
}

func (m *GetOnuFecHistoryResponse) GetFecSeconds() uint32 {
	if m != nil {
		return m.FecSeconds
	}
	return 0
}

func (m *GetOnuFecHistoryResponse) GetTotalCodeWords() uint32 {
	if m != nil {
		return m.TotalCodeWords
	}
	return 0
}

func (m *GetOnuFecHistoryResponse) GetUncorrectableCodeWords() uint32 {
	if m != nil {
		return m.UncorrectableCodeWords
	}
	return 0
}

type GetOnuCountersRequest struct {
	IntfId               uint32   `protobuf:"fixed32,1,opt,name=intf_id,json=intfId,proto3" json:"intf_id,omitempty"`
	OnuId                uint32   `protobuf:"fixed32,2,opt,name=onu_id,json=onuId,proto3" json:"onu_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_GetOnuCountersRequest proto.InternalMessageInfo

func (m *GetOnuCountersRequest) GetIntfId() uint32 {
	if m != nil {
		return m.IntfId
	}
	return 0
}

func (m *GetOnuCountersRequest) GetOnuId() uint32 {
	if m != nil {
		return m.OnuId
	}
	return 0
}

type GetOmciEthernetFrameExtendedPmRequest struct {
	OnuDeviceId string `protobuf:"bytes,1,opt,name=onuDeviceId,proto3" json:"onuDeviceId,omitempty"`
	// Types that are valid to be assigned to IsUniIndex:
	//	*GetOmciEthernetFrameExtendedPmRequest_UniIndex
	IsUniIndex           isGetOmciEthernetFrameExtendedPmRequest_IsUniIndex `protobuf_oneof:"is_uni_index"`
	Reset_               bool                                               `protobuf:"varint,3,opt,name=reset,proto3" json:"reset,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                                           `json:"-"`
	XXX_unrecognized     []byte                                             `json:"-"`
	XXX_sizecache        int32                                              `json:"-"`
}

func (m *GetOmciEthernetFrameExtendedPmRequest) Reset()         { *m = GetOmciEthernetFrameExtendedPmRequest{} }
func (m *GetOmciEthernetFrameExtendedPmRequest) String() string { return proto.CompactTextString(m) }
func (*GetOmciEthernetFrameExtendedPmRequest) ProtoMessage()    {}
func (*GetOmciEthernetFrameExtendedPmRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{17}
}

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

var xxx_messageInfo_GetOmciEthernetFrameExtendedPmRequest proto.InternalMessageInfo

func (m *GetOmciEthernetFrameExtendedPmRequest) GetOnuDeviceId() string {
	if m != nil {
		return m.OnuDeviceId
	}
	return ""
}

type isGetOmciEthernetFrameExtendedPmRequest_IsUniIndex interface {
	isGetOmciEthernetFrameExtendedPmRequest_IsUniIndex()
}

type GetOmciEthernetFrameExtendedPmRequest_UniIndex struct {
	UniIndex uint32 `protobuf:"varint,2,opt,name=uniIndex,proto3,oneof"`
}

func (*GetOmciEthernetFrameExtendedPmRequest_UniIndex) isGetOmciEthernetFrameExtendedPmRequest_IsUniIndex() {
}

func (m *GetOmciEthernetFrameExtendedPmRequest) GetIsUniIndex() isGetOmciEthernetFrameExtendedPmRequest_IsUniIndex {
	if m != nil {
		return m.IsUniIndex
	}
	return nil
}

func (m *GetOmciEthernetFrameExtendedPmRequest) GetUniIndex() uint32 {
	if x, ok := m.GetIsUniIndex().(*GetOmciEthernetFrameExtendedPmRequest_UniIndex); ok {
		return x.UniIndex
	}
	return 0
}

func (m *GetOmciEthernetFrameExtendedPmRequest) GetReset_() bool {
	if m != nil {
		return m.Reset_
	}
	return false
}

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

// DEPRECATED
type GetRxPowerRequest struct {
	IntfId               uint32   `protobuf:"fixed32,1,opt,name=intf_id,json=intfId,proto3" json:"intf_id,omitempty"`
	OnuId                uint32   `protobuf:"fixed32,2,opt,name=onu_id,json=onuId,proto3" json:"onu_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *GetRxPowerRequest) Reset()         { *m = GetRxPowerRequest{} }
func (m *GetRxPowerRequest) String() string { return proto.CompactTextString(m) }
func (*GetRxPowerRequest) ProtoMessage()    {}
func (*GetRxPowerRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{18}
}

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

var xxx_messageInfo_GetRxPowerRequest proto.InternalMessageInfo

func (m *GetRxPowerRequest) GetIntfId() uint32 {
	if m != nil {
		return m.IntfId
	}
	return 0
}

func (m *GetRxPowerRequest) GetOnuId() uint32 {
	if m != nil {
		return m.OnuId
	}
	return 0
}

type GetOltRxPowerRequest struct {
	PortLabel string `protobuf:"bytes,1,opt,name=port_label,json=portLabel,proto3" json:"port_label,omitempty"`
	// onu_sn is optional and if onu_sn is an empty string and the label is
	// of a PON port then it means that the Rx Power corresponding to all
	// the ONUs on that PON port is requested. In case the port_label is not
	// of a PON port, the onu_sn does not have any significance
	OnuSn                string   `protobuf:"bytes,2,opt,name=onu_sn,json=onuSn,proto3" json:"onu_sn,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *GetOltRxPowerRequest) Reset()         { *m = GetOltRxPowerRequest{} }
func (m *GetOltRxPowerRequest) String() string { return proto.CompactTextString(m) }
func (*GetOltRxPowerRequest) ProtoMessage()    {}
func (*GetOltRxPowerRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{19}
}

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

var xxx_messageInfo_GetOltRxPowerRequest proto.InternalMessageInfo

func (m *GetOltRxPowerRequest) GetPortLabel() string {
	if m != nil {
		return m.PortLabel
	}
	return ""
}

func (m *GetOltRxPowerRequest) GetOnuSn() string {
	if m != nil {
		return m.OnuSn
	}
	return ""
}

type GetOnuCountersResponse struct {
	// Types that are valid to be assigned to IsIntfId:
	//	*GetOnuCountersResponse_IntfId
	IsIntfId isGetOnuCountersResponse_IsIntfId `protobuf_oneof:"is_intf_id"`
	// Types that are valid to be assigned to IsOnuId:
	//	*GetOnuCountersResponse_OnuId
	IsOnuId isGetOnuCountersResponse_IsOnuId `protobuf_oneof:"is_onu_id"`
	// Types that are valid to be assigned to IsPositiveDrift:
	//	*GetOnuCountersResponse_PositiveDrift
	IsPositiveDrift isGetOnuCountersResponse_IsPositiveDrift `protobuf_oneof:"is_positive_drift"`
	// Types that are valid to be assigned to IsNegativeDrift:
	//	*GetOnuCountersResponse_NegativeDrift
	IsNegativeDrift isGetOnuCountersResponse_IsNegativeDrift `protobuf_oneof:"is_negative_drift"`
	// Types that are valid to be assigned to IsDelimiterMissDetection:
	//	*GetOnuCountersResponse_DelimiterMissDetection
	IsDelimiterMissDetection isGetOnuCountersResponse_IsDelimiterMissDetection `protobuf_oneof:"is_delimiter_miss_detection"`
	// Types that are valid to be assigned to IsBipErrors:
	//	*GetOnuCountersResponse_BipErrors
	IsBipErrors isGetOnuCountersResponse_IsBipErrors `protobuf_oneof:"is_bip_errors"`
	// Types that are valid to be assigned to IsBipUnits:
	//	*GetOnuCountersResponse_BipUnits
	IsBipUnits isGetOnuCountersResponse_IsBipUnits `protobuf_oneof:"is_bip_units"`
	// Types that are valid to be assigned to IsFecCorrectedSymbols:
	//	*GetOnuCountersResponse_FecCorrectedSymbols
	IsFecCorrectedSymbols isGetOnuCountersResponse_IsFecCorrectedSymbols `protobuf_oneof:"is_fec_corrected_symbols"`
	// Types that are valid to be assigned to IsFecCodewordsCorrected:
	//	*GetOnuCountersResponse_FecCodewordsCorrected
	IsFecCodewordsCorrected isGetOnuCountersResponse_IsFecCodewordsCorrected `protobuf_oneof:"is_fec_codewords_corrected"`
	// Types that are valid to be assigned to IsFecCodewordsUncorrectable:
	//	*GetOnuCountersResponse_FecCodewordsUncorrectable
	IsFecCodewordsUncorrectable isGetOnuCountersResponse_IsFecCodewordsUncorrectable `protobuf_oneof:"is_fec_codewords_uncorrectable"`
	// Types that are valid to be assigned to IsFecCodewords:
	//	*GetOnuCountersResponse_FecCodewords
	IsFecCodewords isGetOnuCountersResponse_IsFecCodewords `protobuf_oneof:"is_fec_codewords"`
	// Types that are valid to be assigned to IsFecCorrectedUnits:
	//	*GetOnuCountersResponse_FecCorrectedUnits
	IsFecCorrectedUnits isGetOnuCountersResponse_IsFecCorrectedUnits `protobuf_oneof:"is_fec_corrected_units"`
	// Types that are valid to be assigned to IsXgemKeyErrors:
	//	*GetOnuCountersResponse_XgemKeyErrors
	IsXgemKeyErrors isGetOnuCountersResponse_IsXgemKeyErrors `protobuf_oneof:"is_xgem_key_errors"`
	// Types that are valid to be assigned to IsXgemLoss:
	//	*GetOnuCountersResponse_XgemLoss
	IsXgemLoss isGetOnuCountersResponse_IsXgemLoss `protobuf_oneof:"is_xgem_loss"`
	// Types that are valid to be assigned to IsRxPloamsError:
	//	*GetOnuCountersResponse_RxPloamsError
	IsRxPloamsError isGetOnuCountersResponse_IsRxPloamsError `protobuf_oneof:"is_rx_ploams_error"`
	// Types that are valid to be assigned to IsRxPloamsNonIdle:
	//	*GetOnuCountersResponse_RxPloamsNonIdle
	IsRxPloamsNonIdle isGetOnuCountersResponse_IsRxPloamsNonIdle `protobuf_oneof:"is_rx_ploams_non_idle"`
	// Types that are valid to be assigned to IsRxOmci:
	//	*GetOnuCountersResponse_RxOmci
	IsRxOmci isGetOnuCountersResponse_IsRxOmci `protobuf_oneof:"is_rx_omci"`
	// Types that are valid to be assigned to IsTxOmci:
	//	*GetOnuCountersResponse_TxOmci
	IsTxOmci isGetOnuCountersResponse_IsTxOmci `protobuf_oneof:"is_tx_omci"`
	// Types that are valid to be assigned to IsRxOmciPacketsCrcError:
	//	*GetOnuCountersResponse_RxOmciPacketsCrcError
	IsRxOmciPacketsCrcError isGetOnuCountersResponse_IsRxOmciPacketsCrcError `protobuf_oneof:"is_rx_omci_packets_crc_error"`
	// Types that are valid to be assigned to IsRxBytes:
	//	*GetOnuCountersResponse_RxBytes
	IsRxBytes isGetOnuCountersResponse_IsRxBytes `protobuf_oneof:"is_rx_bytes"`
	// Types that are valid to be assigned to IsRxPackets:
	//	*GetOnuCountersResponse_RxPackets
	IsRxPackets isGetOnuCountersResponse_IsRxPackets `protobuf_oneof:"is_rx_packets"`
	// Types that are valid to be assigned to IsTxBytes:
	//	*GetOnuCountersResponse_TxBytes
	IsTxBytes isGetOnuCountersResponse_IsTxBytes `protobuf_oneof:"is_tx_bytes"`
	// Types that are valid to be assigned to IsTxPackets:
	//	*GetOnuCountersResponse_TxPackets
	IsTxPackets isGetOnuCountersResponse_IsTxPackets `protobuf_oneof:"is_tx_packets"`
	// Types that are valid to be assigned to IsBerReported:
	//	*GetOnuCountersResponse_BerReported
	IsBerReported isGetOnuCountersResponse_IsBerReported `protobuf_oneof:"is_ber_reported"`
	// Types that are valid to be assigned to IsLcdgErrors:
	//	*GetOnuCountersResponse_LcdgErrors
	IsLcdgErrors isGetOnuCountersResponse_IsLcdgErrors `protobuf_oneof:"is_lcdg_errors"`
	// Types that are valid to be assigned to IsRdiErrors:
	//	*GetOnuCountersResponse_RdiErrors
	IsRdiErrors isGetOnuCountersResponse_IsRdiErrors `protobuf_oneof:"is_rdi_errors"`
	// Types that are valid to be assigned to IsTimestamp:
	//	*GetOnuCountersResponse_Timestamp
	IsTimestamp          isGetOnuCountersResponse_IsTimestamp `protobuf_oneof:"is_timestamp"`
	XXX_NoUnkeyedLiteral struct{}                             `json:"-"`
	XXX_unrecognized     []byte                               `json:"-"`
	XXX_sizecache        int32                                `json:"-"`
}

func (m *GetOnuCountersResponse) Reset()         { *m = GetOnuCountersResponse{} }
func (m *GetOnuCountersResponse) String() string { return proto.CompactTextString(m) }
func (*GetOnuCountersResponse) ProtoMessage()    {}
func (*GetOnuCountersResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{20}
}

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

var xxx_messageInfo_GetOnuCountersResponse proto.InternalMessageInfo

type isGetOnuCountersResponse_IsIntfId interface {
	isGetOnuCountersResponse_IsIntfId()
}

type GetOnuCountersResponse_IntfId struct {
	IntfId uint32 `protobuf:"fixed32,1,opt,name=intf_id,json=intfId,proto3,oneof"`
}

func (*GetOnuCountersResponse_IntfId) isGetOnuCountersResponse_IsIntfId() {}

func (m *GetOnuCountersResponse) GetIsIntfId() isGetOnuCountersResponse_IsIntfId {
	if m != nil {
		return m.IsIntfId
	}
	return nil
}

func (m *GetOnuCountersResponse) GetIntfId() uint32 {
	if x, ok := m.GetIsIntfId().(*GetOnuCountersResponse_IntfId); ok {
		return x.IntfId
	}
	return 0
}

type isGetOnuCountersResponse_IsOnuId interface {
	isGetOnuCountersResponse_IsOnuId()
}

type GetOnuCountersResponse_OnuId struct {
	OnuId uint32 `protobuf:"fixed32,2,opt,name=onu_id,json=onuId,proto3,oneof"`
}

func (*GetOnuCountersResponse_OnuId) isGetOnuCountersResponse_IsOnuId() {}

func (m *GetOnuCountersResponse) GetIsOnuId() isGetOnuCountersResponse_IsOnuId {
	if m != nil {
		return m.IsOnuId
	}
	return nil
}

func (m *GetOnuCountersResponse) GetOnuId() uint32 {
	if x, ok := m.GetIsOnuId().(*GetOnuCountersResponse_OnuId); ok {
		return x.OnuId
	}
	return 0
}

type isGetOnuCountersResponse_IsPositiveDrift interface {
	isGetOnuCountersResponse_IsPositiveDrift()
}

type GetOnuCountersResponse_PositiveDrift struct {
	PositiveDrift uint64 `protobuf:"fixed64,3,opt,name=positive_drift,json=positiveDrift,proto3,oneof"`
}

func (*GetOnuCountersResponse_PositiveDrift) isGetOnuCountersResponse_IsPositiveDrift() {}

func (m *GetOnuCountersResponse) GetIsPositiveDrift() isGetOnuCountersResponse_IsPositiveDrift {
	if m != nil {
		return m.IsPositiveDrift
	}
	return nil
}

func (m *GetOnuCountersResponse) GetPositiveDrift() uint64 {
	if x, ok := m.GetIsPositiveDrift().(*GetOnuCountersResponse_PositiveDrift); ok {
		return x.PositiveDrift
	}
	return 0
}

type isGetOnuCountersResponse_IsNegativeDrift interface {
	isGetOnuCountersResponse_IsNegativeDrift()
}

type GetOnuCountersResponse_NegativeDrift struct {
	NegativeDrift uint64 `protobuf:"fixed64,4,opt,name=negative_drift,json=negativeDrift,proto3,oneof"`
}

func (*GetOnuCountersResponse_NegativeDrift) isGetOnuCountersResponse_IsNegativeDrift() {}

func (m *GetOnuCountersResponse) GetIsNegativeDrift() isGetOnuCountersResponse_IsNegativeDrift {
	if m != nil {
		return m.IsNegativeDrift
	}
	return nil
}

func (m *GetOnuCountersResponse) GetNegativeDrift() uint64 {
	if x, ok := m.GetIsNegativeDrift().(*GetOnuCountersResponse_NegativeDrift); ok {
		return x.NegativeDrift
	}
	return 0
}

type isGetOnuCountersResponse_IsDelimiterMissDetection interface {
	isGetOnuCountersResponse_IsDelimiterMissDetection()
}

type GetOnuCountersResponse_DelimiterMissDetection struct {
	DelimiterMissDetection uint64 `protobuf:"fixed64,5,opt,name=delimiter_miss_detection,json=delimiterMissDetection,proto3,oneof"`
}

func (*GetOnuCountersResponse_DelimiterMissDetection) isGetOnuCountersResponse_IsDelimiterMissDetection() {
}

func (m *GetOnuCountersResponse) GetIsDelimiterMissDetection() isGetOnuCountersResponse_IsDelimiterMissDetection {
	if m != nil {
		return m.IsDelimiterMissDetection
	}
	return nil
}

func (m *GetOnuCountersResponse) GetDelimiterMissDetection() uint64 {
	if x, ok := m.GetIsDelimiterMissDetection().(*GetOnuCountersResponse_DelimiterMissDetection); ok {
		return x.DelimiterMissDetection
	}
	return 0
}

type isGetOnuCountersResponse_IsBipErrors interface {
	isGetOnuCountersResponse_IsBipErrors()
}

type GetOnuCountersResponse_BipErrors struct {
	BipErrors uint64 `protobuf:"fixed64,6,opt,name=bip_errors,json=bipErrors,proto3,oneof"`
}

func (*GetOnuCountersResponse_BipErrors) isGetOnuCountersResponse_IsBipErrors() {}

func (m *GetOnuCountersResponse) GetIsBipErrors() isGetOnuCountersResponse_IsBipErrors {
	if m != nil {
		return m.IsBipErrors
	}
	return nil
}

func (m *GetOnuCountersResponse) GetBipErrors() uint64 {
	if x, ok := m.GetIsBipErrors().(*GetOnuCountersResponse_BipErrors); ok {
		return x.BipErrors
	}
	return 0
}

type isGetOnuCountersResponse_IsBipUnits interface {
	isGetOnuCountersResponse_IsBipUnits()
}

type GetOnuCountersResponse_BipUnits struct {
	BipUnits uint64 `protobuf:"fixed64,7,opt,name=bip_units,json=bipUnits,proto3,oneof"`
}

func (*GetOnuCountersResponse_BipUnits) isGetOnuCountersResponse_IsBipUnits() {}

func (m *GetOnuCountersResponse) GetIsBipUnits() isGetOnuCountersResponse_IsBipUnits {
	if m != nil {
		return m.IsBipUnits
	}
	return nil
}

func (m *GetOnuCountersResponse) GetBipUnits() uint64 {
	if x, ok := m.GetIsBipUnits().(*GetOnuCountersResponse_BipUnits); ok {
		return x.BipUnits
	}
	return 0
}

type isGetOnuCountersResponse_IsFecCorrectedSymbols interface {
	isGetOnuCountersResponse_IsFecCorrectedSymbols()
}

type GetOnuCountersResponse_FecCorrectedSymbols struct {
	FecCorrectedSymbols uint64 `protobuf:"fixed64,8,opt,name=fec_corrected_symbols,json=fecCorrectedSymbols,proto3,oneof"`
}

func (*GetOnuCountersResponse_FecCorrectedSymbols) isGetOnuCountersResponse_IsFecCorrectedSymbols() {}

func (m *GetOnuCountersResponse) GetIsFecCorrectedSymbols() isGetOnuCountersResponse_IsFecCorrectedSymbols {
	if m != nil {
		return m.IsFecCorrectedSymbols
	}
	return nil
}

func (m *GetOnuCountersResponse) GetFecCorrectedSymbols() uint64 {
	if x, ok := m.GetIsFecCorrectedSymbols().(*GetOnuCountersResponse_FecCorrectedSymbols); ok {
		return x.FecCorrectedSymbols
	}
	return 0
}

type isGetOnuCountersResponse_IsFecCodewordsCorrected interface {
	isGetOnuCountersResponse_IsFecCodewordsCorrected()
}

type GetOnuCountersResponse_FecCodewordsCorrected struct {
	FecCodewordsCorrected uint64 `protobuf:"fixed64,9,opt,name=fec_codewords_corrected,json=fecCodewordsCorrected,proto3,oneof"`
}

func (*GetOnuCountersResponse_FecCodewordsCorrected) isGetOnuCountersResponse_IsFecCodewordsCorrected() {
}

func (m *GetOnuCountersResponse) GetIsFecCodewordsCorrected() isGetOnuCountersResponse_IsFecCodewordsCorrected {
	if m != nil {
		return m.IsFecCodewordsCorrected
	}
	return nil
}

func (m *GetOnuCountersResponse) GetFecCodewordsCorrected() uint64 {
	if x, ok := m.GetIsFecCodewordsCorrected().(*GetOnuCountersResponse_FecCodewordsCorrected); ok {
		return x.FecCodewordsCorrected
	}
	return 0
}

type isGetOnuCountersResponse_IsFecCodewordsUncorrectable interface {
	isGetOnuCountersResponse_IsFecCodewordsUncorrectable()
}

type GetOnuCountersResponse_FecCodewordsUncorrectable struct {
	FecCodewordsUncorrectable uint64 `protobuf:"fixed64,10,opt,name=fec_codewords_uncorrectable,json=fecCodewordsUncorrectable,proto3,oneof"`
}

func (*GetOnuCountersResponse_FecCodewordsUncorrectable) isGetOnuCountersResponse_IsFecCodewordsUncorrectable() {
}

func (m *GetOnuCountersResponse) GetIsFecCodewordsUncorrectable() isGetOnuCountersResponse_IsFecCodewordsUncorrectable {
	if m != nil {
		return m.IsFecCodewordsUncorrectable
	}
	return nil
}

func (m *GetOnuCountersResponse) GetFecCodewordsUncorrectable() uint64 {
	if x, ok := m.GetIsFecCodewordsUncorrectable().(*GetOnuCountersResponse_FecCodewordsUncorrectable); ok {
		return x.FecCodewordsUncorrectable
	}
	return 0
}

type isGetOnuCountersResponse_IsFecCodewords interface {
	isGetOnuCountersResponse_IsFecCodewords()
}

type GetOnuCountersResponse_FecCodewords struct {
	FecCodewords uint64 `protobuf:"fixed64,11,opt,name=fec_codewords,json=fecCodewords,proto3,oneof"`
}

func (*GetOnuCountersResponse_FecCodewords) isGetOnuCountersResponse_IsFecCodewords() {}

func (m *GetOnuCountersResponse) GetIsFecCodewords() isGetOnuCountersResponse_IsFecCodewords {
	if m != nil {
		return m.IsFecCodewords
	}
	return nil
}

func (m *GetOnuCountersResponse) GetFecCodewords() uint64 {
	if x, ok := m.GetIsFecCodewords().(*GetOnuCountersResponse_FecCodewords); ok {
		return x.FecCodewords
	}
	return 0
}

type isGetOnuCountersResponse_IsFecCorrectedUnits interface {
	isGetOnuCountersResponse_IsFecCorrectedUnits()
}

type GetOnuCountersResponse_FecCorrectedUnits struct {
	FecCorrectedUnits uint64 `protobuf:"fixed64,12,opt,name=fec_corrected_units,json=fecCorrectedUnits,proto3,oneof"`
}

func (*GetOnuCountersResponse_FecCorrectedUnits) isGetOnuCountersResponse_IsFecCorrectedUnits() {}

func (m *GetOnuCountersResponse) GetIsFecCorrectedUnits() isGetOnuCountersResponse_IsFecCorrectedUnits {
	if m != nil {
		return m.IsFecCorrectedUnits
	}
	return nil
}

func (m *GetOnuCountersResponse) GetFecCorrectedUnits() uint64 {
	if x, ok := m.GetIsFecCorrectedUnits().(*GetOnuCountersResponse_FecCorrectedUnits); ok {
		return x.FecCorrectedUnits
	}
	return 0
}

type isGetOnuCountersResponse_IsXgemKeyErrors interface {
	isGetOnuCountersResponse_IsXgemKeyErrors()
}

type GetOnuCountersResponse_XgemKeyErrors struct {
	XgemKeyErrors uint64 `protobuf:"fixed64,13,opt,name=xgem_key_errors,json=xgemKeyErrors,proto3,oneof"`
}

func (*GetOnuCountersResponse_XgemKeyErrors) isGetOnuCountersResponse_IsXgemKeyErrors() {}

func (m *GetOnuCountersResponse) GetIsXgemKeyErrors() isGetOnuCountersResponse_IsXgemKeyErrors {
	if m != nil {
		return m.IsXgemKeyErrors
	}
	return nil
}

func (m *GetOnuCountersResponse) GetXgemKeyErrors() uint64 {
	if x, ok := m.GetIsXgemKeyErrors().(*GetOnuCountersResponse_XgemKeyErrors); ok {
		return x.XgemKeyErrors
	}
	return 0
}

type isGetOnuCountersResponse_IsXgemLoss interface {
	isGetOnuCountersResponse_IsXgemLoss()
}

type GetOnuCountersResponse_XgemLoss struct {
	XgemLoss uint64 `protobuf:"fixed64,14,opt,name=xgem_loss,json=xgemLoss,proto3,oneof"`
}

func (*GetOnuCountersResponse_XgemLoss) isGetOnuCountersResponse_IsXgemLoss() {}

func (m *GetOnuCountersResponse) GetIsXgemLoss() isGetOnuCountersResponse_IsXgemLoss {
	if m != nil {
		return m.IsXgemLoss
	}
	return nil
}

func (m *GetOnuCountersResponse) GetXgemLoss() uint64 {
	if x, ok := m.GetIsXgemLoss().(*GetOnuCountersResponse_XgemLoss); ok {
		return x.XgemLoss
	}
	return 0
}

type isGetOnuCountersResponse_IsRxPloamsError interface {
	isGetOnuCountersResponse_IsRxPloamsError()
}

type GetOnuCountersResponse_RxPloamsError struct {
	RxPloamsError uint64 `protobuf:"fixed64,15,opt,name=rx_ploams_error,json=rxPloamsError,proto3,oneof"`
}

func (*GetOnuCountersResponse_RxPloamsError) isGetOnuCountersResponse_IsRxPloamsError() {}

func (m *GetOnuCountersResponse) GetIsRxPloamsError() isGetOnuCountersResponse_IsRxPloamsError {
	if m != nil {
		return m.IsRxPloamsError
	}
	return nil
}

func (m *GetOnuCountersResponse) GetRxPloamsError() uint64 {
	if x, ok := m.GetIsRxPloamsError().(*GetOnuCountersResponse_RxPloamsError); ok {
		return x.RxPloamsError
	}
	return 0
}

type isGetOnuCountersResponse_IsRxPloamsNonIdle interface {
	isGetOnuCountersResponse_IsRxPloamsNonIdle()
}

type GetOnuCountersResponse_RxPloamsNonIdle struct {
	RxPloamsNonIdle uint64 `protobuf:"fixed64,16,opt,name=rx_ploams_non_idle,json=rxPloamsNonIdle,proto3,oneof"`
}

func (*GetOnuCountersResponse_RxPloamsNonIdle) isGetOnuCountersResponse_IsRxPloamsNonIdle() {}

func (m *GetOnuCountersResponse) GetIsRxPloamsNonIdle() isGetOnuCountersResponse_IsRxPloamsNonIdle {
	if m != nil {
		return m.IsRxPloamsNonIdle
	}
	return nil
}

func (m *GetOnuCountersResponse) GetRxPloamsNonIdle() uint64 {
	if x, ok := m.GetIsRxPloamsNonIdle().(*GetOnuCountersResponse_RxPloamsNonIdle); ok {
		return x.RxPloamsNonIdle
	}
	return 0
}

type isGetOnuCountersResponse_IsRxOmci interface {
	isGetOnuCountersResponse_IsRxOmci()
}

type GetOnuCountersResponse_RxOmci struct {
	RxOmci uint64 `protobuf:"fixed64,17,opt,name=rx_omci,json=rxOmci,proto3,oneof"`
}

func (*GetOnuCountersResponse_RxOmci) isGetOnuCountersResponse_IsRxOmci() {}

func (m *GetOnuCountersResponse) GetIsRxOmci() isGetOnuCountersResponse_IsRxOmci {
	if m != nil {
		return m.IsRxOmci
	}
	return nil
}

func (m *GetOnuCountersResponse) GetRxOmci() uint64 {
	if x, ok := m.GetIsRxOmci().(*GetOnuCountersResponse_RxOmci); ok {
		return x.RxOmci
	}
	return 0
}

type isGetOnuCountersResponse_IsTxOmci interface {
	isGetOnuCountersResponse_IsTxOmci()
}

type GetOnuCountersResponse_TxOmci struct {
	TxOmci uint64 `protobuf:"fixed64,18,opt,name=tx_omci,json=txOmci,proto3,oneof"`
}

func (*GetOnuCountersResponse_TxOmci) isGetOnuCountersResponse_IsTxOmci() {}

func (m *GetOnuCountersResponse) GetIsTxOmci() isGetOnuCountersResponse_IsTxOmci {
	if m != nil {
		return m.IsTxOmci
	}
	return nil
}

func (m *GetOnuCountersResponse) GetTxOmci() uint64 {
	if x, ok := m.GetIsTxOmci().(*GetOnuCountersResponse_TxOmci); ok {
		return x.TxOmci
	}
	return 0
}

type isGetOnuCountersResponse_IsRxOmciPacketsCrcError interface {
	isGetOnuCountersResponse_IsRxOmciPacketsCrcError()
}

type GetOnuCountersResponse_RxOmciPacketsCrcError struct {
	RxOmciPacketsCrcError uint64 `protobuf:"fixed64,19,opt,name=rx_omci_packets_crc_error,json=rxOmciPacketsCrcError,proto3,oneof"`
}

func (*GetOnuCountersResponse_RxOmciPacketsCrcError) isGetOnuCountersResponse_IsRxOmciPacketsCrcError() {
}

func (m *GetOnuCountersResponse) GetIsRxOmciPacketsCrcError() isGetOnuCountersResponse_IsRxOmciPacketsCrcError {
	if m != nil {
		return m.IsRxOmciPacketsCrcError
	}
	return nil
}

func (m *GetOnuCountersResponse) GetRxOmciPacketsCrcError() uint64 {
	if x, ok := m.GetIsRxOmciPacketsCrcError().(*GetOnuCountersResponse_RxOmciPacketsCrcError); ok {
		return x.RxOmciPacketsCrcError
	}
	return 0
}

type isGetOnuCountersResponse_IsRxBytes interface {
	isGetOnuCountersResponse_IsRxBytes()
}

type GetOnuCountersResponse_RxBytes struct {
	RxBytes uint64 `protobuf:"fixed64,20,opt,name=rx_bytes,json=rxBytes,proto3,oneof"`
}

func (*GetOnuCountersResponse_RxBytes) isGetOnuCountersResponse_IsRxBytes() {}

func (m *GetOnuCountersResponse) GetIsRxBytes() isGetOnuCountersResponse_IsRxBytes {
	if m != nil {
		return m.IsRxBytes
	}
	return nil
}

func (m *GetOnuCountersResponse) GetRxBytes() uint64 {
	if x, ok := m.GetIsRxBytes().(*GetOnuCountersResponse_RxBytes); ok {
		return x.RxBytes
	}
	return 0
}

type isGetOnuCountersResponse_IsRxPackets interface {
	isGetOnuCountersResponse_IsRxPackets()
}

type GetOnuCountersResponse_RxPackets struct {
	RxPackets uint64 `protobuf:"fixed64,21,opt,name=rx_packets,json=rxPackets,proto3,oneof"`
}

func (*GetOnuCountersResponse_RxPackets) isGetOnuCountersResponse_IsRxPackets() {}

func (m *GetOnuCountersResponse) GetIsRxPackets() isGetOnuCountersResponse_IsRxPackets {
	if m != nil {
		return m.IsRxPackets
	}
	return nil
}

func (m *GetOnuCountersResponse) GetRxPackets() uint64 {
	if x, ok := m.GetIsRxPackets().(*GetOnuCountersResponse_RxPackets); ok {
		return x.RxPackets
	}
	return 0
}

type isGetOnuCountersResponse_IsTxBytes interface {
	isGetOnuCountersResponse_IsTxBytes()
}

type GetOnuCountersResponse_TxBytes struct {
	TxBytes uint64 `protobuf:"fixed64,22,opt,name=tx_bytes,json=txBytes,proto3,oneof"`
}

func (*GetOnuCountersResponse_TxBytes) isGetOnuCountersResponse_IsTxBytes() {}

func (m *GetOnuCountersResponse) GetIsTxBytes() isGetOnuCountersResponse_IsTxBytes {
	if m != nil {
		return m.IsTxBytes
	}
	return nil
}

func (m *GetOnuCountersResponse) GetTxBytes() uint64 {
	if x, ok := m.GetIsTxBytes().(*GetOnuCountersResponse_TxBytes); ok {
		return x.TxBytes
	}
	return 0
}

type isGetOnuCountersResponse_IsTxPackets interface {
	isGetOnuCountersResponse_IsTxPackets()
}

type GetOnuCountersResponse_TxPackets struct {
	TxPackets uint64 `protobuf:"fixed64,23,opt,name=tx_packets,json=txPackets,proto3,oneof"`
}

func (*GetOnuCountersResponse_TxPackets) isGetOnuCountersResponse_IsTxPackets() {}

func (m *GetOnuCountersResponse) GetIsTxPackets() isGetOnuCountersResponse_IsTxPackets {
	if m != nil {
		return m.IsTxPackets
	}
	return nil
}

func (m *GetOnuCountersResponse) GetTxPackets() uint64 {
	if x, ok := m.GetIsTxPackets().(*GetOnuCountersResponse_TxPackets); ok {
		return x.TxPackets
	}
	return 0
}

type isGetOnuCountersResponse_IsBerReported interface {
	isGetOnuCountersResponse_IsBerReported()
}

type GetOnuCountersResponse_BerReported struct {
	BerReported uint64 `protobuf:"fixed64,24,opt,name=ber_reported,json=berReported,proto3,oneof"`
}

func (*GetOnuCountersResponse_BerReported) isGetOnuCountersResponse_IsBerReported() {}

func (m *GetOnuCountersResponse) GetIsBerReported() isGetOnuCountersResponse_IsBerReported {
	if m != nil {
		return m.IsBerReported
	}
	return nil
}

func (m *GetOnuCountersResponse) GetBerReported() uint64 {
	if x, ok := m.GetIsBerReported().(*GetOnuCountersResponse_BerReported); ok {
		return x.BerReported
	}
	return 0
}

type isGetOnuCountersResponse_IsLcdgErrors interface {
	isGetOnuCountersResponse_IsLcdgErrors()
}

type GetOnuCountersResponse_LcdgErrors struct {
	LcdgErrors uint64 `protobuf:"fixed64,25,opt,name=lcdg_errors,json=lcdgErrors,proto3,oneof"`
}

func (*GetOnuCountersResponse_LcdgErrors) isGetOnuCountersResponse_IsLcdgErrors() {}

func (m *GetOnuCountersResponse) GetIsLcdgErrors() isGetOnuCountersResponse_IsLcdgErrors {
	if m != nil {
		return m.IsLcdgErrors
	}
	return nil
}

func (m *GetOnuCountersResponse) GetLcdgErrors() uint64 {
	if x, ok := m.GetIsLcdgErrors().(*GetOnuCountersResponse_LcdgErrors); ok {
		return x.LcdgErrors
	}
	return 0
}

type isGetOnuCountersResponse_IsRdiErrors interface {
	isGetOnuCountersResponse_IsRdiErrors()
}

type GetOnuCountersResponse_RdiErrors struct {
	RdiErrors uint64 `protobuf:"fixed64,26,opt,name=rdi_errors,json=rdiErrors,proto3,oneof"`
}

func (*GetOnuCountersResponse_RdiErrors) isGetOnuCountersResponse_IsRdiErrors() {}

func (m *GetOnuCountersResponse) GetIsRdiErrors() isGetOnuCountersResponse_IsRdiErrors {
	if m != nil {
		return m.IsRdiErrors
	}
	return nil
}

func (m *GetOnuCountersResponse) GetRdiErrors() uint64 {
	if x, ok := m.GetIsRdiErrors().(*GetOnuCountersResponse_RdiErrors); ok {
		return x.RdiErrors
	}
	return 0
}

type isGetOnuCountersResponse_IsTimestamp interface {
	isGetOnuCountersResponse_IsTimestamp()
}

type GetOnuCountersResponse_Timestamp struct {
	Timestamp uint32 `protobuf:"fixed32,27,opt,name=timestamp,proto3,oneof"`
}

func (*GetOnuCountersResponse_Timestamp) isGetOnuCountersResponse_IsTimestamp() {}

func (m *GetOnuCountersResponse) GetIsTimestamp() isGetOnuCountersResponse_IsTimestamp {
	if m != nil {
		return m.IsTimestamp
	}
	return nil
}

func (m *GetOnuCountersResponse) GetTimestamp() uint32 {
	if x, ok := m.GetIsTimestamp().(*GetOnuCountersResponse_Timestamp); ok {
		return x.Timestamp
	}
	return 0
}

// XXX_OneofWrappers is for the internal use of the proto package.
func (*GetOnuCountersResponse) XXX_OneofWrappers() []interface{} {
	return []interface{}{
		(*GetOnuCountersResponse_IntfId)(nil),
		(*GetOnuCountersResponse_OnuId)(nil),
		(*GetOnuCountersResponse_PositiveDrift)(nil),
		(*GetOnuCountersResponse_NegativeDrift)(nil),
		(*GetOnuCountersResponse_DelimiterMissDetection)(nil),
		(*GetOnuCountersResponse_BipErrors)(nil),
		(*GetOnuCountersResponse_BipUnits)(nil),
		(*GetOnuCountersResponse_FecCorrectedSymbols)(nil),
		(*GetOnuCountersResponse_FecCodewordsCorrected)(nil),
		(*GetOnuCountersResponse_FecCodewordsUncorrectable)(nil),
		(*GetOnuCountersResponse_FecCodewords)(nil),
		(*GetOnuCountersResponse_FecCorrectedUnits)(nil),
		(*GetOnuCountersResponse_XgemKeyErrors)(nil),
		(*GetOnuCountersResponse_XgemLoss)(nil),
		(*GetOnuCountersResponse_RxPloamsError)(nil),
		(*GetOnuCountersResponse_RxPloamsNonIdle)(nil),
		(*GetOnuCountersResponse_RxOmci)(nil),
		(*GetOnuCountersResponse_TxOmci)(nil),
		(*GetOnuCountersResponse_RxOmciPacketsCrcError)(nil),
		(*GetOnuCountersResponse_RxBytes)(nil),
		(*GetOnuCountersResponse_RxPackets)(nil),
		(*GetOnuCountersResponse_TxBytes)(nil),
		(*GetOnuCountersResponse_TxPackets)(nil),
		(*GetOnuCountersResponse_BerReported)(nil),
		(*GetOnuCountersResponse_LcdgErrors)(nil),
		(*GetOnuCountersResponse_RdiErrors)(nil),
		(*GetOnuCountersResponse_Timestamp)(nil),
	}
}

type OmciEthernetFrameExtendedPm struct {
	DropEvents               uint64   `protobuf:"fixed64,1,opt,name=drop_events,json=dropEvents,proto3" json:"drop_events,omitempty"`
	Octets                   uint64   `protobuf:"fixed64,2,opt,name=octets,proto3" json:"octets,omitempty"`
	Frames                   uint64   `protobuf:"fixed64,3,opt,name=frames,proto3" json:"frames,omitempty"`
	BroadcastFrames          uint64   `protobuf:"fixed64,4,opt,name=broadcast_frames,json=broadcastFrames,proto3" json:"broadcast_frames,omitempty"`
	MulticastFrames          uint64   `protobuf:"fixed64,5,opt,name=multicast_frames,json=multicastFrames,proto3" json:"multicast_frames,omitempty"`
	CrcErroredFrames         uint64   `protobuf:"fixed64,6,opt,name=crc_errored_frames,json=crcErroredFrames,proto3" json:"crc_errored_frames,omitempty"`
	UndersizeFrames          uint64   `protobuf:"fixed64,7,opt,name=undersize_frames,json=undersizeFrames,proto3" json:"undersize_frames,omitempty"`
	OversizeFrames           uint64   `protobuf:"fixed64,8,opt,name=oversize_frames,json=oversizeFrames,proto3" json:"oversize_frames,omitempty"`
	Frames_64Octets          uint64   `protobuf:"fixed64,9,opt,name=frames_64_octets,json=frames64Octets,proto3" json:"frames_64_octets,omitempty"`
	Frames_65To_127Octets    uint64   `protobuf:"fixed64,10,opt,name=frames_65_to_127_octets,json=frames65To127Octets,proto3" json:"frames_65_to_127_octets,omitempty"`
	Frames_128To_255Octets   uint64   `protobuf:"fixed64,11,opt,name=frames_128_to_255_octets,json=frames128To255Octets,proto3" json:"frames_128_to_255_octets,omitempty"`
	Frames_256To_511Octets   uint64   `protobuf:"fixed64,12,opt,name=frames_256_to_511_octets,json=frames256To511Octets,proto3" json:"frames_256_to_511_octets,omitempty"`
	Frames_512To_1023Octets  uint64   `protobuf:"fixed64,13,opt,name=frames_512_to_1023_octets,json=frames512To1023Octets,proto3" json:"frames_512_to_1023_octets,omitempty"`
	Frames_1024To_1518Octets uint64   `protobuf:"fixed64,14,opt,name=frames_1024_to_1518_octets,json=frames1024To1518Octets,proto3" json:"frames_1024_to_1518_octets,omitempty"`
	XXX_NoUnkeyedLiteral     struct{} `json:"-"`
	XXX_unrecognized         []byte   `json:"-"`
	XXX_sizecache            int32    `json:"-"`
}

func (m *OmciEthernetFrameExtendedPm) Reset()         { *m = OmciEthernetFrameExtendedPm{} }
func (m *OmciEthernetFrameExtendedPm) String() string { return proto.CompactTextString(m) }
func (*OmciEthernetFrameExtendedPm) ProtoMessage()    {}
func (*OmciEthernetFrameExtendedPm) Descriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{21}
}

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

var xxx_messageInfo_OmciEthernetFrameExtendedPm proto.InternalMessageInfo

func (m *OmciEthernetFrameExtendedPm) GetDropEvents() uint64 {
	if m != nil {
		return m.DropEvents
	}
	return 0
}

func (m *OmciEthernetFrameExtendedPm) GetOctets() uint64 {
	if m != nil {
		return m.Octets
	}
	return 0
}

func (m *OmciEthernetFrameExtendedPm) GetFrames() uint64 {
	if m != nil {
		return m.Frames
	}
	return 0
}

func (m *OmciEthernetFrameExtendedPm) GetBroadcastFrames() uint64 {
	if m != nil {
		return m.BroadcastFrames
	}
	return 0
}

func (m *OmciEthernetFrameExtendedPm) GetMulticastFrames() uint64 {
	if m != nil {
		return m.MulticastFrames
	}
	return 0
}

func (m *OmciEthernetFrameExtendedPm) GetCrcErroredFrames() uint64 {
	if m != nil {
		return m.CrcErroredFrames
	}
	return 0
}

func (m *OmciEthernetFrameExtendedPm) GetUndersizeFrames() uint64 {
	if m != nil {
		return m.UndersizeFrames
	}
	return 0
}

func (m *OmciEthernetFrameExtendedPm) GetOversizeFrames() uint64 {
	if m != nil {
		return m.OversizeFrames
	}
	return 0
}

func (m *OmciEthernetFrameExtendedPm) GetFrames_64Octets() uint64 {
	if m != nil {
		return m.Frames_64Octets
	}
	return 0
}

func (m *OmciEthernetFrameExtendedPm) GetFrames_65To_127Octets() uint64 {
	if m != nil {
		return m.Frames_65To_127Octets
	}
	return 0
}

func (m *OmciEthernetFrameExtendedPm) GetFrames_128To_255Octets() uint64 {
	if m != nil {
		return m.Frames_128To_255Octets
	}
	return 0
}

func (m *OmciEthernetFrameExtendedPm) GetFrames_256To_511Octets() uint64 {
	if m != nil {
		return m.Frames_256To_511Octets
	}
	return 0
}

func (m *OmciEthernetFrameExtendedPm) GetFrames_512To_1023Octets() uint64 {
	if m != nil {
		return m.Frames_512To_1023Octets
	}
	return 0
}

func (m *OmciEthernetFrameExtendedPm) GetFrames_1024To_1518Octets() uint64 {
	if m != nil {
		return m.Frames_1024To_1518Octets
	}
	return 0
}

type GetOmciEthernetFrameExtendedPmResponse struct {
	Upstream                          *OmciEthernetFrameExtendedPm                  `protobuf:"bytes,1,opt,name=upstream,proto3" json:"upstream,omitempty"`
	Downstream                        *OmciEthernetFrameExtendedPm                  `protobuf:"bytes,2,opt,name=downstream,proto3" json:"downstream,omitempty"`
	OmciEthernetFrameExtendedPmFormat GetOmciEthernetFrameExtendedPmResponse_Format `protobuf:"varint,3,opt,name=omci_ethernet_frame_extended_pm_format,json=omciEthernetFrameExtendedPmFormat,proto3,enum=extension.GetOmciEthernetFrameExtendedPmResponse_Format" json:"omci_ethernet_frame_extended_pm_format,omitempty"`
	XXX_NoUnkeyedLiteral              struct{}                                      `json:"-"`
	XXX_unrecognized                  []byte                                        `json:"-"`
	XXX_sizecache                     int32                                         `json:"-"`
}

func (m *GetOmciEthernetFrameExtendedPmResponse) Reset() {
	*m = GetOmciEthernetFrameExtendedPmResponse{}
}
func (m *GetOmciEthernetFrameExtendedPmResponse) String() string { return proto.CompactTextString(m) }
func (*GetOmciEthernetFrameExtendedPmResponse) ProtoMessage()    {}
func (*GetOmciEthernetFrameExtendedPmResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{22}
}

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

var xxx_messageInfo_GetOmciEthernetFrameExtendedPmResponse proto.InternalMessageInfo

func (m *GetOmciEthernetFrameExtendedPmResponse) GetUpstream() *OmciEthernetFrameExtendedPm {
	if m != nil {
		return m.Upstream
	}
	return nil
}

func (m *GetOmciEthernetFrameExtendedPmResponse) GetDownstream() *OmciEthernetFrameExtendedPm {
	if m != nil {
		return m.Downstream
	}
	return nil
}

func (m *GetOmciEthernetFrameExtendedPmResponse) GetOmciEthernetFrameExtendedPmFormat() GetOmciEthernetFrameExtendedPmResponse_Format {
	if m != nil {
		return m.OmciEthernetFrameExtendedPmFormat
	}
	return GetOmciEthernetFrameExtendedPmResponse_THIRTY_TWO_BIT
}

type RxPower struct {
	OnuSn                string   `protobuf:"bytes,1,opt,name=onu_sn,json=onuSn,proto3" json:"onu_sn,omitempty"`
	Status               string   `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	FailReason           string   `protobuf:"bytes,3,opt,name=fail_reason,json=failReason,proto3" json:"fail_reason,omitempty"`
	RxPower              float64  `protobuf:"fixed64,4,opt,name=rx_power,json=rxPower,proto3" json:"rx_power,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *RxPower) Reset()         { *m = RxPower{} }
func (m *RxPower) String() string { return proto.CompactTextString(m) }
func (*RxPower) ProtoMessage()    {}
func (*RxPower) Descriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{23}
}

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

var xxx_messageInfo_RxPower proto.InternalMessageInfo

func (m *RxPower) GetOnuSn() string {
	if m != nil {
		return m.OnuSn
	}
	return ""
}

func (m *RxPower) GetStatus() string {
	if m != nil {
		return m.Status
	}
	return ""
}

func (m *RxPower) GetFailReason() string {
	if m != nil {
		return m.FailReason
	}
	return ""
}

func (m *RxPower) GetRxPower() float64 {
	if m != nil {
		return m.RxPower
	}
	return 0
}

type GetOltRxPowerResponse struct {
	PortLabel            string     `protobuf:"bytes,1,opt,name=port_label,json=portLabel,proto3" json:"port_label,omitempty"`
	RxPower              []*RxPower `protobuf:"bytes,2,rep,name=rx_power,json=rxPower,proto3" json:"rx_power,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (m *GetOltRxPowerResponse) Reset()         { *m = GetOltRxPowerResponse{} }
func (m *GetOltRxPowerResponse) String() string { return proto.CompactTextString(m) }
func (*GetOltRxPowerResponse) ProtoMessage()    {}
func (*GetOltRxPowerResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{24}
}

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

var xxx_messageInfo_GetOltRxPowerResponse proto.InternalMessageInfo

func (m *GetOltRxPowerResponse) GetPortLabel() string {
	if m != nil {
		return m.PortLabel
	}
	return ""
}

func (m *GetOltRxPowerResponse) GetRxPower() []*RxPower {
	if m != nil {
		return m.RxPower
	}
	return nil
}

// DEPRECATED
type GetRxPowerResponse struct {
	IntfId               uint32   `protobuf:"fixed32,1,opt,name=intf_id,json=intfId,proto3" json:"intf_id,omitempty"`
	OnuId                uint32   `protobuf:"fixed32,2,opt,name=onu_id,json=onuId,proto3" json:"onu_id,omitempty"`
	Status               string   `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
	FailReason           string   `protobuf:"bytes,4,opt,name=fail_reason,json=failReason,proto3" json:"fail_reason,omitempty"`
	RxPower              float64  `protobuf:"fixed64,5,opt,name=rx_power,json=rxPower,proto3" json:"rx_power,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *GetRxPowerResponse) Reset()         { *m = GetRxPowerResponse{} }
func (m *GetRxPowerResponse) String() string { return proto.CompactTextString(m) }
func (*GetRxPowerResponse) ProtoMessage()    {}
func (*GetRxPowerResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{25}
}

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

var xxx_messageInfo_GetRxPowerResponse proto.InternalMessageInfo

func (m *GetRxPowerResponse) GetIntfId() uint32 {
	if m != nil {
		return m.IntfId
	}
	return 0
}

func (m *GetRxPowerResponse) GetOnuId() uint32 {
	if m != nil {
		return m.OnuId
	}
	return 0
}

func (m *GetRxPowerResponse) GetStatus() string {
	if m != nil {
		return m.Status
	}
	return ""
}

func (m *GetRxPowerResponse) GetFailReason() string {
	if m != nil {
		return m.FailReason
	}
	return ""
}

func (m *GetRxPowerResponse) GetRxPower() float64 {
	if m != nil {
		return m.RxPower
	}
	return 0
}

type GetOnuOmciTxRxStatsRequest struct {
	Empty                *empty.Empty `protobuf:"bytes,1,opt,name=empty,proto3" json:"empty,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (m *GetOnuOmciTxRxStatsRequest) Reset()         { *m = GetOnuOmciTxRxStatsRequest{} }
func (m *GetOnuOmciTxRxStatsRequest) String() string { return proto.CompactTextString(m) }
func (*GetOnuOmciTxRxStatsRequest) ProtoMessage()    {}
func (*GetOnuOmciTxRxStatsRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{26}
}

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

var xxx_messageInfo_GetOnuOmciTxRxStatsRequest proto.InternalMessageInfo

func (m *GetOnuOmciTxRxStatsRequest) GetEmpty() *empty.Empty {
	if m != nil {
		return m.Empty
	}
	return nil
}

// see ITU-T G.988 clause 11.2.2
type GetOnuOmciTxRxStatsResponse struct {
	// OMCI baseline Tx frames with AR bit set
	BaseTxArFrames uint32 `protobuf:"varint,1,opt,name=base_tx_ar_frames,json=baseTxArFrames,proto3" json:"base_tx_ar_frames,omitempty"`
	// OMCI baseline Rx frames with AK bit set
	BaseRxAkFrames uint32 `protobuf:"varint,2,opt,name=base_rx_ak_frames,json=baseRxAkFrames,proto3" json:"base_rx_ak_frames,omitempty"`
	// OMCI baseline Tx frames with AR bit unset
	BaseTxNoArFrames uint32 `protobuf:"varint,3,opt,name=base_tx_no_ar_frames,json=baseTxNoArFrames,proto3" json:"base_tx_no_ar_frames,omitempty"`
	// OMCI baseline Rx frames with AK bit unset
	BaseRxNoAkFrames uint32 `protobuf:"varint,4,opt,name=base_rx_no_ak_frames,json=baseRxNoAkFrames,proto3" json:"base_rx_no_ak_frames,omitempty"`
	// OMCI extended Tx frames with AR bit set
	ExtTxArFrames uint32 `protobuf:"varint,5,opt,name=ext_tx_ar_frames,json=extTxArFrames,proto3" json:"ext_tx_ar_frames,omitempty"`
	// OMCI extended Rx frames with AK bit set
	ExtRxAkFrames uint32 `protobuf:"varint,6,opt,name=ext_rx_ak_frames,json=extRxAkFrames,proto3" json:"ext_rx_ak_frames,omitempty"`
	// OMCI extended Tx frames with AR bit unset
	ExtTxNoArFrames uint32 `protobuf:"varint,7,opt,name=ext_tx_no_ar_frames,json=extTxNoArFrames,proto3" json:"ext_tx_no_ar_frames,omitempty"`
	// OMCI extended Rx frames with AK bit unset
	ExtRxNoAkFrames uint32 `protobuf:"varint,8,opt,name=ext_rx_no_ak_frames,json=extRxNoAkFrames,proto3" json:"ext_rx_no_ak_frames,omitempty"`
	// Number of retries of requests (tx) due to not received responses (Rx)
	TxOmciCounterRetries uint32 `protobuf:"varint,9,opt,name=tx_omci_counter_retries,json=txOmciCounterRetries,proto3" json:"tx_omci_counter_retries,omitempty"`
	// Number of timeouts of requests (tx) due to not received responses (Rx) after configured number of retries
	TxOmciCounterTimeouts uint32   `protobuf:"varint,10,opt,name=tx_omci_counter_timeouts,json=txOmciCounterTimeouts,proto3" json:"tx_omci_counter_timeouts,omitempty"`
	XXX_NoUnkeyedLiteral  struct{} `json:"-"`
	XXX_unrecognized      []byte   `json:"-"`
	XXX_sizecache         int32    `json:"-"`
}

func (m *GetOnuOmciTxRxStatsResponse) Reset()         { *m = GetOnuOmciTxRxStatsResponse{} }
func (m *GetOnuOmciTxRxStatsResponse) String() string { return proto.CompactTextString(m) }
func (*GetOnuOmciTxRxStatsResponse) ProtoMessage()    {}
func (*GetOnuOmciTxRxStatsResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{27}
}

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

var xxx_messageInfo_GetOnuOmciTxRxStatsResponse proto.InternalMessageInfo

func (m *GetOnuOmciTxRxStatsResponse) GetBaseTxArFrames() uint32 {
	if m != nil {
		return m.BaseTxArFrames
	}
	return 0
}

func (m *GetOnuOmciTxRxStatsResponse) GetBaseRxAkFrames() uint32 {
	if m != nil {
		return m.BaseRxAkFrames
	}
	return 0
}

func (m *GetOnuOmciTxRxStatsResponse) GetBaseTxNoArFrames() uint32 {
	if m != nil {
		return m.BaseTxNoArFrames
	}
	return 0
}

func (m *GetOnuOmciTxRxStatsResponse) GetBaseRxNoAkFrames() uint32 {
	if m != nil {
		return m.BaseRxNoAkFrames
	}
	return 0
}

func (m *GetOnuOmciTxRxStatsResponse) GetExtTxArFrames() uint32 {
	if m != nil {
		return m.ExtTxArFrames
	}
	return 0
}

func (m *GetOnuOmciTxRxStatsResponse) GetExtRxAkFrames() uint32 {
	if m != nil {
		return m.ExtRxAkFrames
	}
	return 0
}

func (m *GetOnuOmciTxRxStatsResponse) GetExtTxNoArFrames() uint32 {
	if m != nil {
		return m.ExtTxNoArFrames
	}
	return 0
}

func (m *GetOnuOmciTxRxStatsResponse) GetExtRxNoAkFrames() uint32 {
	if m != nil {
		return m.ExtRxNoAkFrames
	}
	return 0
}

func (m *GetOnuOmciTxRxStatsResponse) GetTxOmciCounterRetries() uint32 {
	if m != nil {
		return m.TxOmciCounterRetries
	}
	return 0
}

func (m *GetOnuOmciTxRxStatsResponse) GetTxOmciCounterTimeouts() uint32 {
	if m != nil {
		return m.TxOmciCounterTimeouts
	}
	return 0
}

type GetOnuOmciActiveAlarmsRequest struct {
	Empty                *empty.Empty `protobuf:"bytes,1,opt,name=empty,proto3" json:"empty,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (m *GetOnuOmciActiveAlarmsRequest) Reset()         { *m = GetOnuOmciActiveAlarmsRequest{} }
func (m *GetOnuOmciActiveAlarmsRequest) String() string { return proto.CompactTextString(m) }
func (*GetOnuOmciActiveAlarmsRequest) ProtoMessage()    {}
func (*GetOnuOmciActiveAlarmsRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{28}
}

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

var xxx_messageInfo_GetOnuOmciActiveAlarmsRequest proto.InternalMessageInfo

func (m *GetOnuOmciActiveAlarmsRequest) GetEmpty() *empty.Empty {
	if m != nil {
		return m.Empty
	}
	return nil
}

type AlarmData struct {
	ClassId              uint32   `protobuf:"varint,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
	InstanceId           uint32   `protobuf:"varint,2,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"`
	Name                 string   `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	Description          string   `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *AlarmData) Reset()         { *m = AlarmData{} }
func (m *AlarmData) String() string { return proto.CompactTextString(m) }
func (*AlarmData) ProtoMessage()    {}
func (*AlarmData) Descriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{29}
}

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

var xxx_messageInfo_AlarmData proto.InternalMessageInfo

func (m *AlarmData) GetClassId() uint32 {
	if m != nil {
		return m.ClassId
	}
	return 0
}

func (m *AlarmData) GetInstanceId() uint32 {
	if m != nil {
		return m.InstanceId
	}
	return 0
}

func (m *AlarmData) GetName() string {
	if m != nil {
		return m.Name
	}
	return ""
}

func (m *AlarmData) GetDescription() string {
	if m != nil {
		return m.Description
	}
	return ""
}

type GetOnuOmciActiveAlarmsResponse struct {
	ActiveAlarms         []*AlarmData `protobuf:"bytes,1,rep,name=active_alarms,json=activeAlarms,proto3" json:"active_alarms,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (m *GetOnuOmciActiveAlarmsResponse) Reset()         { *m = GetOnuOmciActiveAlarmsResponse{} }
func (m *GetOnuOmciActiveAlarmsResponse) String() string { return proto.CompactTextString(m) }
func (*GetOnuOmciActiveAlarmsResponse) ProtoMessage()    {}
func (*GetOnuOmciActiveAlarmsResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{30}
}

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

var xxx_messageInfo_GetOnuOmciActiveAlarmsResponse proto.InternalMessageInfo

func (m *GetOnuOmciActiveAlarmsResponse) GetActiveAlarms() []*AlarmData {
	if m != nil {
		return m.ActiveAlarms
	}
	return nil
}

type GetOffloadedAppsStatisticsRequest struct {
	// The offloaded application whose statistics are requested
	StatsFor             GetOffloadedAppsStatisticsRequest_OffloadedApp `protobuf:"varint,1,opt,name=statsFor,proto3,enum=extension.GetOffloadedAppsStatisticsRequest_OffloadedApp" json:"statsFor,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                                       `json:"-"`
	XXX_unrecognized     []byte                                         `json:"-"`
	XXX_sizecache        int32                                          `json:"-"`
}

func (m *GetOffloadedAppsStatisticsRequest) Reset()         { *m = GetOffloadedAppsStatisticsRequest{} }
func (m *GetOffloadedAppsStatisticsRequest) String() string { return proto.CompactTextString(m) }
func (*GetOffloadedAppsStatisticsRequest) ProtoMessage()    {}
func (*GetOffloadedAppsStatisticsRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{31}
}

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

var xxx_messageInfo_GetOffloadedAppsStatisticsRequest proto.InternalMessageInfo

func (m *GetOffloadedAppsStatisticsRequest) GetStatsFor() GetOffloadedAppsStatisticsRequest_OffloadedApp {
	if m != nil {
		return m.StatsFor
	}
	return GetOffloadedAppsStatisticsRequest_UNDEFINED
}

type GetOffloadedAppsStatisticsResponse struct {
	// Types that are valid to be assigned to Stats:
	//	*GetOffloadedAppsStatisticsResponse_Dhcpv4RaStats
	//	*GetOffloadedAppsStatisticsResponse_Dhcpv6RaStats
	//	*GetOffloadedAppsStatisticsResponse_PppoeIaStats
	Stats                isGetOffloadedAppsStatisticsResponse_Stats `protobuf_oneof:"stats"`
	XXX_NoUnkeyedLiteral struct{}                                   `json:"-"`
	XXX_unrecognized     []byte                                     `json:"-"`
	XXX_sizecache        int32                                      `json:"-"`
}

func (m *GetOffloadedAppsStatisticsResponse) Reset()         { *m = GetOffloadedAppsStatisticsResponse{} }
func (m *GetOffloadedAppsStatisticsResponse) String() string { return proto.CompactTextString(m) }
func (*GetOffloadedAppsStatisticsResponse) ProtoMessage()    {}
func (*GetOffloadedAppsStatisticsResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{32}
}

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

var xxx_messageInfo_GetOffloadedAppsStatisticsResponse proto.InternalMessageInfo

type isGetOffloadedAppsStatisticsResponse_Stats interface {
	isGetOffloadedAppsStatisticsResponse_Stats()
}

type GetOffloadedAppsStatisticsResponse_Dhcpv4RaStats struct {
	Dhcpv4RaStats *GetOffloadedAppsStatisticsResponse_DHCPv4RAStats `protobuf:"bytes,1,opt,name=dhcpv4RaStats,proto3,oneof"`
}

type GetOffloadedAppsStatisticsResponse_Dhcpv6RaStats struct {
	Dhcpv6RaStats *GetOffloadedAppsStatisticsResponse_DHCPv6RAStats `protobuf:"bytes,2,opt,name=dhcpv6RaStats,proto3,oneof"`
}

type GetOffloadedAppsStatisticsResponse_PppoeIaStats struct {
	PppoeIaStats *GetOffloadedAppsStatisticsResponse_PPPoeIAStats `protobuf:"bytes,3,opt,name=pppoeIaStats,proto3,oneof"`
}

func (*GetOffloadedAppsStatisticsResponse_Dhcpv4RaStats) isGetOffloadedAppsStatisticsResponse_Stats() {
}

func (*GetOffloadedAppsStatisticsResponse_Dhcpv6RaStats) isGetOffloadedAppsStatisticsResponse_Stats() {
}

func (*GetOffloadedAppsStatisticsResponse_PppoeIaStats) isGetOffloadedAppsStatisticsResponse_Stats() {
}

func (m *GetOffloadedAppsStatisticsResponse) GetStats() isGetOffloadedAppsStatisticsResponse_Stats {
	if m != nil {
		return m.Stats
	}
	return nil
}

func (m *GetOffloadedAppsStatisticsResponse) GetDhcpv4RaStats() *GetOffloadedAppsStatisticsResponse_DHCPv4RAStats {
	if x, ok := m.GetStats().(*GetOffloadedAppsStatisticsResponse_Dhcpv4RaStats); ok {
		return x.Dhcpv4RaStats
	}
	return nil
}

func (m *GetOffloadedAppsStatisticsResponse) GetDhcpv6RaStats() *GetOffloadedAppsStatisticsResponse_DHCPv6RAStats {
	if x, ok := m.GetStats().(*GetOffloadedAppsStatisticsResponse_Dhcpv6RaStats); ok {
		return x.Dhcpv6RaStats
	}
	return nil
}

func (m *GetOffloadedAppsStatisticsResponse) GetPppoeIaStats() *GetOffloadedAppsStatisticsResponse_PPPoeIAStats {
	if x, ok := m.GetStats().(*GetOffloadedAppsStatisticsResponse_PppoeIaStats); ok {
		return x.PppoeIaStats
	}
	return nil
}

// XXX_OneofWrappers is for the internal use of the proto package.
func (*GetOffloadedAppsStatisticsResponse) XXX_OneofWrappers() []interface{} {
	return []interface{}{
		(*GetOffloadedAppsStatisticsResponse_Dhcpv4RaStats)(nil),
		(*GetOffloadedAppsStatisticsResponse_Dhcpv6RaStats)(nil),
		(*GetOffloadedAppsStatisticsResponse_PppoeIaStats)(nil),
	}
}

type GetOffloadedAppsStatisticsResponse_DHCPv4RAStats struct {
	// From https://github.com/BroadbandForum/yang/blob/master/standard/networking/bbf-l2-dhcpv4-relay.yang
	InBadPacketsFromClient           uint32 `protobuf:"varint,1,opt,name=in_bad_packets_from_client,json=inBadPacketsFromClient,proto3" json:"in_bad_packets_from_client,omitempty"`
	InBadPacketsFromServer           uint32 `protobuf:"varint,2,opt,name=in_bad_packets_from_server,json=inBadPacketsFromServer,proto3" json:"in_bad_packets_from_server,omitempty"`
	InPacketsFromClient              uint32 `protobuf:"varint,3,opt,name=in_packets_from_client,json=inPacketsFromClient,proto3" json:"in_packets_from_client,omitempty"`
	InPacketsFromServer              uint32 `protobuf:"varint,4,opt,name=in_packets_from_server,json=inPacketsFromServer,proto3" json:"in_packets_from_server,omitempty"`
	OutPacketsToServer               uint32 `protobuf:"varint,5,opt,name=out_packets_to_server,json=outPacketsToServer,proto3" json:"out_packets_to_server,omitempty"`
	OutPacketsToClient               uint32 `protobuf:"varint,6,opt,name=out_packets_to_client,json=outPacketsToClient,proto3" json:"out_packets_to_client,omitempty"`
	Option_82InsertedPacketsToServer uint32 `protobuf:"varint,7,opt,name=option_82_inserted_packets_to_server,json=option82InsertedPacketsToServer,proto3" json:"option_82_inserted_packets_to_server,omitempty"`
	Option_82RemovedPacketsToClient  uint32 `protobuf:"varint,8,opt,name=option_82_removed_packets_to_client,json=option82RemovedPacketsToClient,proto3" json:"option_82_removed_packets_to_client,omitempty"`
	Option_82NotInsertedToServer     uint32 `protobuf:"varint,9,opt,name=option_82_not_inserted_to_server,json=option82NotInsertedToServer,proto3" json:"option_82_not_inserted_to_server,omitempty"`
	// Name value pairs that gives the flexibility to report different statistics that implementations may choose
	AdditionalStats      map[string]string `protobuf:"bytes,10,rep,name=additional_stats,json=additionalStats,proto3" json:"additional_stats,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

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

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

var xxx_messageInfo_GetOffloadedAppsStatisticsResponse_DHCPv4RAStats proto.InternalMessageInfo

func (m *GetOffloadedAppsStatisticsResponse_DHCPv4RAStats) GetInBadPacketsFromClient() uint32 {
	if m != nil {
		return m.InBadPacketsFromClient
	}
	return 0
}

func (m *GetOffloadedAppsStatisticsResponse_DHCPv4RAStats) GetInBadPacketsFromServer() uint32 {
	if m != nil {
		return m.InBadPacketsFromServer
	}
	return 0
}

func (m *GetOffloadedAppsStatisticsResponse_DHCPv4RAStats) GetInPacketsFromClient() uint32 {
	if m != nil {
		return m.InPacketsFromClient
	}
	return 0
}

func (m *GetOffloadedAppsStatisticsResponse_DHCPv4RAStats) GetInPacketsFromServer() uint32 {
	if m != nil {
		return m.InPacketsFromServer
	}
	return 0
}

func (m *GetOffloadedAppsStatisticsResponse_DHCPv4RAStats) GetOutPacketsToServer() uint32 {
	if m != nil {
		return m.OutPacketsToServer
	}
	return 0
}

func (m *GetOffloadedAppsStatisticsResponse_DHCPv4RAStats) GetOutPacketsToClient() uint32 {
	if m != nil {
		return m.OutPacketsToClient
	}
	return 0
}

func (m *GetOffloadedAppsStatisticsResponse_DHCPv4RAStats) GetOption_82InsertedPacketsToServer() uint32 {
	if m != nil {
		return m.Option_82InsertedPacketsToServer
	}
	return 0
}

func (m *GetOffloadedAppsStatisticsResponse_DHCPv4RAStats) GetOption_82RemovedPacketsToClient() uint32 {
	if m != nil {
		return m.Option_82RemovedPacketsToClient
	}
	return 0
}

func (m *GetOffloadedAppsStatisticsResponse_DHCPv4RAStats) GetOption_82NotInsertedToServer() uint32 {
	if m != nil {
		return m.Option_82NotInsertedToServer
	}
	return 0
}

func (m *GetOffloadedAppsStatisticsResponse_DHCPv4RAStats) GetAdditionalStats() map[string]string {
	if m != nil {
		return m.AdditionalStats
	}
	return nil
}

type GetOffloadedAppsStatisticsResponse_DHCPv6RAStats struct {
	// From https://github.com/BroadbandForum/yang/blob/master/standard/networking/bbf-ldra.yang
	InBadPacketsFromClient               uint32 `protobuf:"varint,1,opt,name=in_bad_packets_from_client,json=inBadPacketsFromClient,proto3" json:"in_bad_packets_from_client,omitempty"`
	InBadPacketsFromServer               uint32 `protobuf:"varint,2,opt,name=in_bad_packets_from_server,json=inBadPacketsFromServer,proto3" json:"in_bad_packets_from_server,omitempty"`
	Option_17InsertedPacketsToServer     uint32 `protobuf:"varint,3,opt,name=option_17_inserted_packets_to_server,json=option17InsertedPacketsToServer,proto3" json:"option_17_inserted_packets_to_server,omitempty"`
	Option_17RemovedPacketsToClient      uint32 `protobuf:"varint,4,opt,name=option_17_removed_packets_to_client,json=option17RemovedPacketsToClient,proto3" json:"option_17_removed_packets_to_client,omitempty"`
	Option_18InsertedPacketsToServer     uint32 `protobuf:"varint,5,opt,name=option_18_inserted_packets_to_server,json=option18InsertedPacketsToServer,proto3" json:"option_18_inserted_packets_to_server,omitempty"`
	Option_18RemovedPacketsToClient      uint32 `protobuf:"varint,6,opt,name=option_18_removed_packets_to_client,json=option18RemovedPacketsToClient,proto3" json:"option_18_removed_packets_to_client,omitempty"`
	Option_37InsertedPacketsToServer     uint32 `protobuf:"varint,7,opt,name=option_37_inserted_packets_to_server,json=option37InsertedPacketsToServer,proto3" json:"option_37_inserted_packets_to_server,omitempty"`
	Option_37RemovedPacketsToClient      uint32 `protobuf:"varint,8,opt,name=option_37_removed_packets_to_client,json=option37RemovedPacketsToClient,proto3" json:"option_37_removed_packets_to_client,omitempty"`
	OutgoingMtuExceededPacketsFromClient uint32 `protobuf:"varint,9,opt,name=outgoing_mtu_exceeded_packets_from_client,json=outgoingMtuExceededPacketsFromClient,proto3" json:"outgoing_mtu_exceeded_packets_from_client,omitempty"`
	// Name value pairs that gives the flexibility to report different statistics that implementations may choose
	AdditionalStats      map[string]string `protobuf:"bytes,10,rep,name=additional_stats,json=additionalStats,proto3" json:"additional_stats,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

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

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

var xxx_messageInfo_GetOffloadedAppsStatisticsResponse_DHCPv6RAStats proto.InternalMessageInfo

func (m *GetOffloadedAppsStatisticsResponse_DHCPv6RAStats) GetInBadPacketsFromClient() uint32 {
	if m != nil {
		return m.InBadPacketsFromClient
	}
	return 0
}

func (m *GetOffloadedAppsStatisticsResponse_DHCPv6RAStats) GetInBadPacketsFromServer() uint32 {
	if m != nil {
		return m.InBadPacketsFromServer
	}
	return 0
}

func (m *GetOffloadedAppsStatisticsResponse_DHCPv6RAStats) GetOption_17InsertedPacketsToServer() uint32 {
	if m != nil {
		return m.Option_17InsertedPacketsToServer
	}
	return 0
}

func (m *GetOffloadedAppsStatisticsResponse_DHCPv6RAStats) GetOption_17RemovedPacketsToClient() uint32 {
	if m != nil {
		return m.Option_17RemovedPacketsToClient
	}
	return 0
}

func (m *GetOffloadedAppsStatisticsResponse_DHCPv6RAStats) GetOption_18InsertedPacketsToServer() uint32 {
	if m != nil {
		return m.Option_18InsertedPacketsToServer
	}
	return 0
}

func (m *GetOffloadedAppsStatisticsResponse_DHCPv6RAStats) GetOption_18RemovedPacketsToClient() uint32 {
	if m != nil {
		return m.Option_18RemovedPacketsToClient
	}
	return 0
}

func (m *GetOffloadedAppsStatisticsResponse_DHCPv6RAStats) GetOption_37InsertedPacketsToServer() uint32 {
	if m != nil {
		return m.Option_37InsertedPacketsToServer
	}
	return 0
}

func (m *GetOffloadedAppsStatisticsResponse_DHCPv6RAStats) GetOption_37RemovedPacketsToClient() uint32 {
	if m != nil {
		return m.Option_37RemovedPacketsToClient
	}
	return 0
}

func (m *GetOffloadedAppsStatisticsResponse_DHCPv6RAStats) GetOutgoingMtuExceededPacketsFromClient() uint32 {
	if m != nil {
		return m.OutgoingMtuExceededPacketsFromClient
	}
	return 0
}

func (m *GetOffloadedAppsStatisticsResponse_DHCPv6RAStats) GetAdditionalStats() map[string]string {
	if m != nil {
		return m.AdditionalStats
	}
	return nil
}

type GetOffloadedAppsStatisticsResponse_PPPoeIAStats struct {
	// From https://github.com/BroadbandForum/yang/blob/master/standard/networking/bbf-pppoe-intermediate-agent.yang
	InErrorPacketsFromClient                 uint32 `protobuf:"varint,1,opt,name=in_error_packets_from_client,json=inErrorPacketsFromClient,proto3" json:"in_error_packets_from_client,omitempty"`
	InErrorPacketsFromServer                 uint32 `protobuf:"varint,2,opt,name=in_error_packets_from_server,json=inErrorPacketsFromServer,proto3" json:"in_error_packets_from_server,omitempty"`
	InPacketsFromClient                      uint32 `protobuf:"varint,3,opt,name=in_packets_from_client,json=inPacketsFromClient,proto3" json:"in_packets_from_client,omitempty"`
	InPacketsFromServer                      uint32 `protobuf:"varint,4,opt,name=in_packets_from_server,json=inPacketsFromServer,proto3" json:"in_packets_from_server,omitempty"`
	OutPacketsToServer                       uint32 `protobuf:"varint,5,opt,name=out_packets_to_server,json=outPacketsToServer,proto3" json:"out_packets_to_server,omitempty"`
	OutPacketsToClient                       uint32 `protobuf:"varint,6,opt,name=out_packets_to_client,json=outPacketsToClient,proto3" json:"out_packets_to_client,omitempty"`
	VendorSpecificTagInsertedPacketsToServer uint32 `protobuf:"varint,7,opt,name=vendor_specific_tag_inserted_packets_to_server,json=vendorSpecificTagInsertedPacketsToServer,proto3" json:"vendor_specific_tag_inserted_packets_to_server,omitempty"`
	VendorSpecificTagRemovedPacketsToClient  uint32 `protobuf:"varint,8,opt,name=vendor_specific_tag_removed_packets_to_client,json=vendorSpecificTagRemovedPacketsToClient,proto3" json:"vendor_specific_tag_removed_packets_to_client,omitempty"`
	OutgoingMtuExceededPacketsFromClient     uint32 `protobuf:"varint,9,opt,name=outgoing_mtu_exceeded_packets_from_client,json=outgoingMtuExceededPacketsFromClient,proto3" json:"outgoing_mtu_exceeded_packets_from_client,omitempty"`
	// Name value pairs that gives the flexibility to report different statistics that implementations may choose
	AdditionalStats      map[string]string `protobuf:"bytes,10,rep,name=additional_stats,json=additionalStats,proto3" json:"additional_stats,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

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

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

var xxx_messageInfo_GetOffloadedAppsStatisticsResponse_PPPoeIAStats proto.InternalMessageInfo

func (m *GetOffloadedAppsStatisticsResponse_PPPoeIAStats) GetInErrorPacketsFromClient() uint32 {
	if m != nil {
		return m.InErrorPacketsFromClient
	}
	return 0
}

func (m *GetOffloadedAppsStatisticsResponse_PPPoeIAStats) GetInErrorPacketsFromServer() uint32 {
	if m != nil {
		return m.InErrorPacketsFromServer
	}
	return 0
}

func (m *GetOffloadedAppsStatisticsResponse_PPPoeIAStats) GetInPacketsFromClient() uint32 {
	if m != nil {
		return m.InPacketsFromClient
	}
	return 0
}

func (m *GetOffloadedAppsStatisticsResponse_PPPoeIAStats) GetInPacketsFromServer() uint32 {
	if m != nil {
		return m.InPacketsFromServer
	}
	return 0
}

func (m *GetOffloadedAppsStatisticsResponse_PPPoeIAStats) GetOutPacketsToServer() uint32 {
	if m != nil {
		return m.OutPacketsToServer
	}
	return 0
}

func (m *GetOffloadedAppsStatisticsResponse_PPPoeIAStats) GetOutPacketsToClient() uint32 {
	if m != nil {
		return m.OutPacketsToClient
	}
	return 0
}

func (m *GetOffloadedAppsStatisticsResponse_PPPoeIAStats) GetVendorSpecificTagInsertedPacketsToServer() uint32 {
	if m != nil {
		return m.VendorSpecificTagInsertedPacketsToServer
	}
	return 0
}

func (m *GetOffloadedAppsStatisticsResponse_PPPoeIAStats) GetVendorSpecificTagRemovedPacketsToClient() uint32 {
	if m != nil {
		return m.VendorSpecificTagRemovedPacketsToClient
	}
	return 0
}

func (m *GetOffloadedAppsStatisticsResponse_PPPoeIAStats) GetOutgoingMtuExceededPacketsFromClient() uint32 {
	if m != nil {
		return m.OutgoingMtuExceededPacketsFromClient
	}
	return 0
}

func (m *GetOffloadedAppsStatisticsResponse_PPPoeIAStats) GetAdditionalStats() map[string]string {
	if m != nil {
		return m.AdditionalStats
	}
	return nil
}

type GetValueRequest struct {
	// Types that are valid to be assigned to Request:
	//	*GetValueRequest_Distance
	//	*GetValueRequest_UniInfo
	//	*GetValueRequest_OltPortInfo
	//	*GetValueRequest_OnuOpticalInfo
	//	*GetValueRequest_EthBridgePort
	//	*GetValueRequest_FecHistory
	//	*GetValueRequest_OnuPonInfo
	//	*GetValueRequest_OnuInfo
	//	*GetValueRequest_RxPower
	//	*GetValueRequest_OnuOmciStats
	//	*GetValueRequest_OltRxPower
	//	*GetValueRequest_OnuActiveAlarms
	//	*GetValueRequest_OffloadedAppsStats
	Request              isGetValueRequest_Request `protobuf_oneof:"request"`
	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
	XXX_unrecognized     []byte                    `json:"-"`
	XXX_sizecache        int32                     `json:"-"`
}

func (m *GetValueRequest) Reset()         { *m = GetValueRequest{} }
func (m *GetValueRequest) String() string { return proto.CompactTextString(m) }
func (*GetValueRequest) ProtoMessage()    {}
func (*GetValueRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{33}
}

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

var xxx_messageInfo_GetValueRequest proto.InternalMessageInfo

type isGetValueRequest_Request interface {
	isGetValueRequest_Request()
}

type GetValueRequest_Distance struct {
	Distance *GetDistanceRequest `protobuf:"bytes,1,opt,name=distance,proto3,oneof"`
}

type GetValueRequest_UniInfo struct {
	UniInfo *GetOnuUniInfoRequest `protobuf:"bytes,2,opt,name=uniInfo,proto3,oneof"`
}

type GetValueRequest_OltPortInfo struct {
	OltPortInfo *GetOltPortCounters `protobuf:"bytes,3,opt,name=oltPortInfo,proto3,oneof"`
}

type GetValueRequest_OnuOpticalInfo struct {
	OnuOpticalInfo *GetOnuPonOpticalInfo `protobuf:"bytes,4,opt,name=onuOpticalInfo,proto3,oneof"`
}

type GetValueRequest_EthBridgePort struct {
	EthBridgePort *GetOnuEthernetBridgePortHistory `protobuf:"bytes,5,opt,name=ethBridgePort,proto3,oneof"`
}

type GetValueRequest_FecHistory struct {
	FecHistory *GetOnuFecHistory `protobuf:"bytes,6,opt,name=fecHistory,proto3,oneof"`
}

type GetValueRequest_OnuPonInfo struct {
	OnuPonInfo *GetOnuCountersRequest `protobuf:"bytes,7,opt,name=onuPonInfo,proto3,oneof"`
}

type GetValueRequest_OnuInfo struct {
	OnuInfo *GetOmciEthernetFrameExtendedPmRequest `protobuf:"bytes,8,opt,name=onuInfo,proto3,oneof"`
}

type GetValueRequest_RxPower struct {
	RxPower *GetRxPowerRequest `protobuf:"bytes,9,opt,name=rxPower,proto3,oneof"`
}

type GetValueRequest_OnuOmciStats struct {
	OnuOmciStats *GetOnuOmciTxRxStatsRequest `protobuf:"bytes,10,opt,name=onuOmciStats,proto3,oneof"`
}

type GetValueRequest_OltRxPower struct {
	OltRxPower *GetOltRxPowerRequest `protobuf:"bytes,11,opt,name=oltRxPower,proto3,oneof"`
}

type GetValueRequest_OnuActiveAlarms struct {
	OnuActiveAlarms *GetOnuOmciActiveAlarmsRequest `protobuf:"bytes,12,opt,name=onuActiveAlarms,proto3,oneof"`
}

type GetValueRequest_OffloadedAppsStats struct {
	OffloadedAppsStats *GetOffloadedAppsStatisticsRequest `protobuf:"bytes,13,opt,name=offloadedAppsStats,proto3,oneof"`
}

func (*GetValueRequest_Distance) isGetValueRequest_Request() {}

func (*GetValueRequest_UniInfo) isGetValueRequest_Request() {}

func (*GetValueRequest_OltPortInfo) isGetValueRequest_Request() {}

func (*GetValueRequest_OnuOpticalInfo) isGetValueRequest_Request() {}

func (*GetValueRequest_EthBridgePort) isGetValueRequest_Request() {}

func (*GetValueRequest_FecHistory) isGetValueRequest_Request() {}

func (*GetValueRequest_OnuPonInfo) isGetValueRequest_Request() {}

func (*GetValueRequest_OnuInfo) isGetValueRequest_Request() {}

func (*GetValueRequest_RxPower) isGetValueRequest_Request() {}

func (*GetValueRequest_OnuOmciStats) isGetValueRequest_Request() {}

func (*GetValueRequest_OltRxPower) isGetValueRequest_Request() {}

func (*GetValueRequest_OnuActiveAlarms) isGetValueRequest_Request() {}

func (*GetValueRequest_OffloadedAppsStats) isGetValueRequest_Request() {}

func (m *GetValueRequest) GetRequest() isGetValueRequest_Request {
	if m != nil {
		return m.Request
	}
	return nil
}

func (m *GetValueRequest) GetDistance() *GetDistanceRequest {
	if x, ok := m.GetRequest().(*GetValueRequest_Distance); ok {
		return x.Distance
	}
	return nil
}

func (m *GetValueRequest) GetUniInfo() *GetOnuUniInfoRequest {
	if x, ok := m.GetRequest().(*GetValueRequest_UniInfo); ok {
		return x.UniInfo
	}
	return nil
}

func (m *GetValueRequest) GetOltPortInfo() *GetOltPortCounters {
	if x, ok := m.GetRequest().(*GetValueRequest_OltPortInfo); ok {
		return x.OltPortInfo
	}
	return nil
}

func (m *GetValueRequest) GetOnuOpticalInfo() *GetOnuPonOpticalInfo {
	if x, ok := m.GetRequest().(*GetValueRequest_OnuOpticalInfo); ok {
		return x.OnuOpticalInfo
	}
	return nil
}

func (m *GetValueRequest) GetEthBridgePort() *GetOnuEthernetBridgePortHistory {
	if x, ok := m.GetRequest().(*GetValueRequest_EthBridgePort); ok {
		return x.EthBridgePort
	}
	return nil
}

func (m *GetValueRequest) GetFecHistory() *GetOnuFecHistory {
	if x, ok := m.GetRequest().(*GetValueRequest_FecHistory); ok {
		return x.FecHistory
	}
	return nil
}

func (m *GetValueRequest) GetOnuPonInfo() *GetOnuCountersRequest {
	if x, ok := m.GetRequest().(*GetValueRequest_OnuPonInfo); ok {
		return x.OnuPonInfo
	}
	return nil
}

func (m *GetValueRequest) GetOnuInfo() *GetOmciEthernetFrameExtendedPmRequest {
	if x, ok := m.GetRequest().(*GetValueRequest_OnuInfo); ok {
		return x.OnuInfo
	}
	return nil
}

func (m *GetValueRequest) GetRxPower() *GetRxPowerRequest {
	if x, ok := m.GetRequest().(*GetValueRequest_RxPower); ok {
		return x.RxPower
	}
	return nil
}

func (m *GetValueRequest) GetOnuOmciStats() *GetOnuOmciTxRxStatsRequest {
	if x, ok := m.GetRequest().(*GetValueRequest_OnuOmciStats); ok {
		return x.OnuOmciStats
	}
	return nil
}

func (m *GetValueRequest) GetOltRxPower() *GetOltRxPowerRequest {
	if x, ok := m.GetRequest().(*GetValueRequest_OltRxPower); ok {
		return x.OltRxPower
	}
	return nil
}

func (m *GetValueRequest) GetOnuActiveAlarms() *GetOnuOmciActiveAlarmsRequest {
	if x, ok := m.GetRequest().(*GetValueRequest_OnuActiveAlarms); ok {
		return x.OnuActiveAlarms
	}
	return nil
}

func (m *GetValueRequest) GetOffloadedAppsStats() *GetOffloadedAppsStatisticsRequest {
	if x, ok := m.GetRequest().(*GetValueRequest_OffloadedAppsStats); ok {
		return x.OffloadedAppsStats
	}
	return nil
}

// XXX_OneofWrappers is for the internal use of the proto package.
func (*GetValueRequest) XXX_OneofWrappers() []interface{} {
	return []interface{}{
		(*GetValueRequest_Distance)(nil),
		(*GetValueRequest_UniInfo)(nil),
		(*GetValueRequest_OltPortInfo)(nil),
		(*GetValueRequest_OnuOpticalInfo)(nil),
		(*GetValueRequest_EthBridgePort)(nil),
		(*GetValueRequest_FecHistory)(nil),
		(*GetValueRequest_OnuPonInfo)(nil),
		(*GetValueRequest_OnuInfo)(nil),
		(*GetValueRequest_RxPower)(nil),
		(*GetValueRequest_OnuOmciStats)(nil),
		(*GetValueRequest_OltRxPower)(nil),
		(*GetValueRequest_OnuActiveAlarms)(nil),
		(*GetValueRequest_OffloadedAppsStats)(nil),
	}
}

type GetValueResponse struct {
	Status    GetValueResponse_Status      `protobuf:"varint,1,opt,name=status,proto3,enum=extension.GetValueResponse_Status" json:"status,omitempty"`
	ErrReason GetValueResponse_ErrorReason `protobuf:"varint,2,opt,name=errReason,proto3,enum=extension.GetValueResponse_ErrorReason" json:"errReason,omitempty"`
	// Types that are valid to be assigned to Response:
	//	*GetValueResponse_Distance
	//	*GetValueResponse_UniInfo
	//	*GetValueResponse_PortCoutners
	//	*GetValueResponse_OnuOpticalInfo
	//	*GetValueResponse_EthBridgePortInfo
	//	*GetValueResponse_FecHistory
	//	*GetValueResponse_OnuPonCounters
	//	*GetValueResponse_OnuCounters
	//	*GetValueResponse_RxPower
	//	*GetValueResponse_OnuOmciStats
	//	*GetValueResponse_OltRxPower
	//	*GetValueResponse_OnuActiveAlarms
	//	*GetValueResponse_OffloadedAppsStats
	Response             isGetValueResponse_Response `protobuf_oneof:"response"`
	XXX_NoUnkeyedLiteral struct{}                    `json:"-"`
	XXX_unrecognized     []byte                      `json:"-"`
	XXX_sizecache        int32                       `json:"-"`
}

func (m *GetValueResponse) Reset()         { *m = GetValueResponse{} }
func (m *GetValueResponse) String() string { return proto.CompactTextString(m) }
func (*GetValueResponse) ProtoMessage()    {}
func (*GetValueResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{34}
}

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

var xxx_messageInfo_GetValueResponse proto.InternalMessageInfo

func (m *GetValueResponse) GetStatus() GetValueResponse_Status {
	if m != nil {
		return m.Status
	}
	return GetValueResponse_STATUS_UNDEFINED
}

func (m *GetValueResponse) GetErrReason() GetValueResponse_ErrorReason {
	if m != nil {
		return m.ErrReason
	}
	return GetValueResponse_REASON_UNDEFINED
}

type isGetValueResponse_Response interface {
	isGetValueResponse_Response()
}

type GetValueResponse_Distance struct {
	Distance *GetDistanceResponse `protobuf:"bytes,3,opt,name=distance,proto3,oneof"`
}

type GetValueResponse_UniInfo struct {
	UniInfo *GetOnuUniInfoResponse `protobuf:"bytes,4,opt,name=uniInfo,proto3,oneof"`
}

type GetValueResponse_PortCoutners struct {
	PortCoutners *GetOltPortCountersResponse `protobuf:"bytes,5,opt,name=portCoutners,proto3,oneof"`
}

type GetValueResponse_OnuOpticalInfo struct {
	OnuOpticalInfo *GetOnuPonOpticalInfoResponse `protobuf:"bytes,6,opt,name=onuOpticalInfo,proto3,oneof"`
}

type GetValueResponse_EthBridgePortInfo struct {
	EthBridgePortInfo *GetOnuEthernetBridgePortHistoryResponse `protobuf:"bytes,7,opt,name=ethBridgePortInfo,proto3,oneof"`
}

type GetValueResponse_FecHistory struct {
	FecHistory *GetOnuFecHistoryResponse `protobuf:"bytes,8,opt,name=fecHistory,proto3,oneof"`
}

type GetValueResponse_OnuPonCounters struct {
	OnuPonCounters *GetOnuCountersResponse `protobuf:"bytes,9,opt,name=onuPonCounters,proto3,oneof"`
}

type GetValueResponse_OnuCounters struct {
	OnuCounters *GetOmciEthernetFrameExtendedPmResponse `protobuf:"bytes,10,opt,name=onuCounters,proto3,oneof"`
}

type GetValueResponse_RxPower struct {
	RxPower *GetRxPowerResponse `protobuf:"bytes,11,opt,name=rxPower,proto3,oneof"`
}

type GetValueResponse_OnuOmciStats struct {
	OnuOmciStats *GetOnuOmciTxRxStatsResponse `protobuf:"bytes,12,opt,name=onuOmciStats,proto3,oneof"`
}

type GetValueResponse_OltRxPower struct {
	OltRxPower *GetOltRxPowerResponse `protobuf:"bytes,13,opt,name=oltRxPower,proto3,oneof"`
}

type GetValueResponse_OnuActiveAlarms struct {
	OnuActiveAlarms *GetOnuOmciActiveAlarmsResponse `protobuf:"bytes,14,opt,name=onuActiveAlarms,proto3,oneof"`
}

type GetValueResponse_OffloadedAppsStats struct {
	OffloadedAppsStats *GetOffloadedAppsStatisticsResponse `protobuf:"bytes,15,opt,name=offloadedAppsStats,proto3,oneof"`
}

func (*GetValueResponse_Distance) isGetValueResponse_Response() {}

func (*GetValueResponse_UniInfo) isGetValueResponse_Response() {}

func (*GetValueResponse_PortCoutners) isGetValueResponse_Response() {}

func (*GetValueResponse_OnuOpticalInfo) isGetValueResponse_Response() {}

func (*GetValueResponse_EthBridgePortInfo) isGetValueResponse_Response() {}

func (*GetValueResponse_FecHistory) isGetValueResponse_Response() {}

func (*GetValueResponse_OnuPonCounters) isGetValueResponse_Response() {}

func (*GetValueResponse_OnuCounters) isGetValueResponse_Response() {}

func (*GetValueResponse_RxPower) isGetValueResponse_Response() {}

func (*GetValueResponse_OnuOmciStats) isGetValueResponse_Response() {}

func (*GetValueResponse_OltRxPower) isGetValueResponse_Response() {}

func (*GetValueResponse_OnuActiveAlarms) isGetValueResponse_Response() {}

func (*GetValueResponse_OffloadedAppsStats) isGetValueResponse_Response() {}

func (m *GetValueResponse) GetResponse() isGetValueResponse_Response {
	if m != nil {
		return m.Response
	}
	return nil
}

func (m *GetValueResponse) GetDistance() *GetDistanceResponse {
	if x, ok := m.GetResponse().(*GetValueResponse_Distance); ok {
		return x.Distance
	}
	return nil
}

func (m *GetValueResponse) GetUniInfo() *GetOnuUniInfoResponse {
	if x, ok := m.GetResponse().(*GetValueResponse_UniInfo); ok {
		return x.UniInfo
	}
	return nil
}

func (m *GetValueResponse) GetPortCoutners() *GetOltPortCountersResponse {
	if x, ok := m.GetResponse().(*GetValueResponse_PortCoutners); ok {
		return x.PortCoutners
	}
	return nil
}

func (m *GetValueResponse) GetOnuOpticalInfo() *GetOnuPonOpticalInfoResponse {
	if x, ok := m.GetResponse().(*GetValueResponse_OnuOpticalInfo); ok {
		return x.OnuOpticalInfo
	}
	return nil
}

func (m *GetValueResponse) GetEthBridgePortInfo() *GetOnuEthernetBridgePortHistoryResponse {
	if x, ok := m.GetResponse().(*GetValueResponse_EthBridgePortInfo); ok {
		return x.EthBridgePortInfo
	}
	return nil
}

func (m *GetValueResponse) GetFecHistory() *GetOnuFecHistoryResponse {
	if x, ok := m.GetResponse().(*GetValueResponse_FecHistory); ok {
		return x.FecHistory
	}
	return nil
}

func (m *GetValueResponse) GetOnuPonCounters() *GetOnuCountersResponse {
	if x, ok := m.GetResponse().(*GetValueResponse_OnuPonCounters); ok {
		return x.OnuPonCounters
	}
	return nil
}

func (m *GetValueResponse) GetOnuCounters() *GetOmciEthernetFrameExtendedPmResponse {
	if x, ok := m.GetResponse().(*GetValueResponse_OnuCounters); ok {
		return x.OnuCounters
	}
	return nil
}

func (m *GetValueResponse) GetRxPower() *GetRxPowerResponse {
	if x, ok := m.GetResponse().(*GetValueResponse_RxPower); ok {
		return x.RxPower
	}
	return nil
}

func (m *GetValueResponse) GetOnuOmciStats() *GetOnuOmciTxRxStatsResponse {
	if x, ok := m.GetResponse().(*GetValueResponse_OnuOmciStats); ok {
		return x.OnuOmciStats
	}
	return nil
}

func (m *GetValueResponse) GetOltRxPower() *GetOltRxPowerResponse {
	if x, ok := m.GetResponse().(*GetValueResponse_OltRxPower); ok {
		return x.OltRxPower
	}
	return nil
}

func (m *GetValueResponse) GetOnuActiveAlarms() *GetOnuOmciActiveAlarmsResponse {
	if x, ok := m.GetResponse().(*GetValueResponse_OnuActiveAlarms); ok {
		return x.OnuActiveAlarms
	}
	return nil
}

func (m *GetValueResponse) GetOffloadedAppsStats() *GetOffloadedAppsStatisticsResponse {
	if x, ok := m.GetResponse().(*GetValueResponse_OffloadedAppsStats); ok {
		return x.OffloadedAppsStats
	}
	return nil
}

// XXX_OneofWrappers is for the internal use of the proto package.
func (*GetValueResponse) XXX_OneofWrappers() []interface{} {
	return []interface{}{
		(*GetValueResponse_Distance)(nil),
		(*GetValueResponse_UniInfo)(nil),
		(*GetValueResponse_PortCoutners)(nil),
		(*GetValueResponse_OnuOpticalInfo)(nil),
		(*GetValueResponse_EthBridgePortInfo)(nil),
		(*GetValueResponse_FecHistory)(nil),
		(*GetValueResponse_OnuPonCounters)(nil),
		(*GetValueResponse_OnuCounters)(nil),
		(*GetValueResponse_RxPower)(nil),
		(*GetValueResponse_OnuOmciStats)(nil),
		(*GetValueResponse_OltRxPower)(nil),
		(*GetValueResponse_OnuActiveAlarms)(nil),
		(*GetValueResponse_OffloadedAppsStats)(nil),
	}
}

// AppOffloadConfig is the configuration for offloading applications to the OLT and has OLT wide configuration.
type AppOffloadConfig struct {
	EnableDHCPv4RA bool `protobuf:"varint,1,opt,name=enableDHCPv4RA,proto3" json:"enableDHCPv4RA,omitempty"`
	EnableDHCPv6RA bool `protobuf:"varint,2,opt,name=enableDHCPv6RA,proto3" json:"enableDHCPv6RA,omitempty"`
	EnablePPPoEIA  bool `protobuf:"varint,3,opt,name=enablePPPoEIA,proto3" json:"enablePPPoEIA,omitempty"`
	// Follows the same as the BBF Access Node Id defined in https://github.com/BroadbandForum/yang/blob/master/standard/networking/bbf-subscriber-profiles.yang
	AccessNodeID         string   `protobuf:"bytes,4,opt,name=accessNodeID,proto3" json:"accessNodeID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *AppOffloadConfig) Reset()         { *m = AppOffloadConfig{} }
func (m *AppOffloadConfig) String() string { return proto.CompactTextString(m) }
func (*AppOffloadConfig) ProtoMessage()    {}
func (*AppOffloadConfig) Descriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{35}
}

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

var xxx_messageInfo_AppOffloadConfig proto.InternalMessageInfo

func (m *AppOffloadConfig) GetEnableDHCPv4RA() bool {
	if m != nil {
		return m.EnableDHCPv4RA
	}
	return false
}

func (m *AppOffloadConfig) GetEnableDHCPv6RA() bool {
	if m != nil {
		return m.EnableDHCPv6RA
	}
	return false
}

func (m *AppOffloadConfig) GetEnablePPPoEIA() bool {
	if m != nil {
		return m.EnablePPPoEIA
	}
	return false
}

func (m *AppOffloadConfig) GetAccessNodeID() string {
	if m != nil {
		return m.AccessNodeID
	}
	return ""
}

// AppOffloadOnuConfig has Onu specfic configuration which the OLT runs applications which have been offloaded.
type AppOffloadOnuConfig struct {
	OnuDeviceId          string                              `protobuf:"bytes,1,opt,name=onuDeviceId,proto3" json:"onuDeviceId,omitempty"`
	PerUniInfo           []*AppOffloadOnuConfig_PerUniConfig `protobuf:"bytes,5,rep,name=perUniInfo,proto3" json:"perUniInfo,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                            `json:"-"`
	XXX_unrecognized     []byte                              `json:"-"`
	XXX_sizecache        int32                               `json:"-"`
}

func (m *AppOffloadOnuConfig) Reset()         { *m = AppOffloadOnuConfig{} }
func (m *AppOffloadOnuConfig) String() string { return proto.CompactTextString(m) }
func (*AppOffloadOnuConfig) ProtoMessage()    {}
func (*AppOffloadOnuConfig) Descriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{36}
}

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

var xxx_messageInfo_AppOffloadOnuConfig proto.InternalMessageInfo

func (m *AppOffloadOnuConfig) GetOnuDeviceId() string {
	if m != nil {
		return m.OnuDeviceId
	}
	return ""
}

func (m *AppOffloadOnuConfig) GetPerUniInfo() []*AppOffloadOnuConfig_PerUniConfig {
	if m != nil {
		return m.PerUniInfo
	}
	return nil
}

type AppOffloadOnuConfig_PerUniConfig struct {
	// As per the BBF Agent Remote Id defined in https://github.com/BroadbandForum/yang/blob/master/standard/networking/bbf-pppoe-intermediate-agent-profile-common.yang
	AgentRemoteID string `protobuf:"bytes,2,opt,name=agentRemoteID,proto3" json:"agentRemoteID,omitempty"`
	// As per the BBF Agent Circuit Id defined in https://github.com/BroadbandForum/yang/blob/master/standard/networking/bbf-pppoe-intermediate-agent-profile-common.yang
	AgentCircuitID string `protobuf:"bytes,3,opt,name=agentCircuitID,proto3" json:"agentCircuitID,omitempty"`
	// The id of the UNI on the Onu for which this configuration is relevant. The UNI ids are numbered from 0 to n depending on the number of UNI ports on the ONU.
	OnuUniId             uint32   `protobuf:"varint,4,opt,name=onuUniId,proto3" json:"onuUniId,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_AppOffloadOnuConfig_PerUniConfig proto.InternalMessageInfo

func (m *AppOffloadOnuConfig_PerUniConfig) GetAgentRemoteID() string {
	if m != nil {
		return m.AgentRemoteID
	}
	return ""
}

func (m *AppOffloadOnuConfig_PerUniConfig) GetAgentCircuitID() string {
	if m != nil {
		return m.AgentCircuitID
	}
	return ""
}

func (m *AppOffloadOnuConfig_PerUniConfig) GetOnuUniId() uint32 {
	if m != nil {
		return m.OnuUniId
	}
	return 0
}

type SetValueRequest struct {
	// Types that are valid to be assigned to Request:
	//	*SetValueRequest_AlarmConfig
	//	*SetValueRequest_AppOffloadConfig
	//	*SetValueRequest_AppOffloadOnuConfig
	Request              isSetValueRequest_Request `protobuf_oneof:"request"`
	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
	XXX_unrecognized     []byte                    `json:"-"`
	XXX_sizecache        int32                     `json:"-"`
}

func (m *SetValueRequest) Reset()         { *m = SetValueRequest{} }
func (m *SetValueRequest) String() string { return proto.CompactTextString(m) }
func (*SetValueRequest) ProtoMessage()    {}
func (*SetValueRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{37}
}

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

var xxx_messageInfo_SetValueRequest proto.InternalMessageInfo

type isSetValueRequest_Request interface {
	isSetValueRequest_Request()
}

type SetValueRequest_AlarmConfig struct {
	AlarmConfig *config.AlarmConfig `protobuf:"bytes,1,opt,name=alarm_config,json=alarmConfig,proto3,oneof"`
}

type SetValueRequest_AppOffloadConfig struct {
	AppOffloadConfig *AppOffloadConfig `protobuf:"bytes,2,opt,name=app_offload_config,json=appOffloadConfig,proto3,oneof"`
}

type SetValueRequest_AppOffloadOnuConfig struct {
	AppOffloadOnuConfig *AppOffloadOnuConfig `protobuf:"bytes,3,opt,name=app_offload_onu_config,json=appOffloadOnuConfig,proto3,oneof"`
}

func (*SetValueRequest_AlarmConfig) isSetValueRequest_Request() {}

func (*SetValueRequest_AppOffloadConfig) isSetValueRequest_Request() {}

func (*SetValueRequest_AppOffloadOnuConfig) isSetValueRequest_Request() {}

func (m *SetValueRequest) GetRequest() isSetValueRequest_Request {
	if m != nil {
		return m.Request
	}
	return nil
}

func (m *SetValueRequest) GetAlarmConfig() *config.AlarmConfig {
	if x, ok := m.GetRequest().(*SetValueRequest_AlarmConfig); ok {
		return x.AlarmConfig
	}
	return nil
}

func (m *SetValueRequest) GetAppOffloadConfig() *AppOffloadConfig {
	if x, ok := m.GetRequest().(*SetValueRequest_AppOffloadConfig); ok {
		return x.AppOffloadConfig
	}
	return nil
}

func (m *SetValueRequest) GetAppOffloadOnuConfig() *AppOffloadOnuConfig {
	if x, ok := m.GetRequest().(*SetValueRequest_AppOffloadOnuConfig); ok {
		return x.AppOffloadOnuConfig
	}
	return nil
}

// XXX_OneofWrappers is for the internal use of the proto package.
func (*SetValueRequest) XXX_OneofWrappers() []interface{} {
	return []interface{}{
		(*SetValueRequest_AlarmConfig)(nil),
		(*SetValueRequest_AppOffloadConfig)(nil),
		(*SetValueRequest_AppOffloadOnuConfig)(nil),
	}
}

type SetValueResponse struct {
	Status               SetValueResponse_Status      `protobuf:"varint,1,opt,name=status,proto3,enum=extension.SetValueResponse_Status" json:"status,omitempty"`
	ErrReason            SetValueResponse_ErrorReason `protobuf:"varint,2,opt,name=errReason,proto3,enum=extension.SetValueResponse_ErrorReason" json:"errReason,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                     `json:"-"`
	XXX_unrecognized     []byte                       `json:"-"`
	XXX_sizecache        int32                        `json:"-"`
}

func (m *SetValueResponse) Reset()         { *m = SetValueResponse{} }
func (m *SetValueResponse) String() string { return proto.CompactTextString(m) }
func (*SetValueResponse) ProtoMessage()    {}
func (*SetValueResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{38}
}

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

var xxx_messageInfo_SetValueResponse proto.InternalMessageInfo

func (m *SetValueResponse) GetStatus() SetValueResponse_Status {
	if m != nil {
		return m.Status
	}
	return SetValueResponse_STATUS_UNDEFINED
}

func (m *SetValueResponse) GetErrReason() SetValueResponse_ErrorReason {
	if m != nil {
		return m.ErrReason
	}
	return SetValueResponse_REASON_UNDEFINED
}

type SingleGetValueRequest struct {
	TargetId             string           `protobuf:"bytes,1,opt,name=targetId,proto3" json:"targetId,omitempty"`
	Request              *GetValueRequest `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func (m *SingleGetValueRequest) Reset()         { *m = SingleGetValueRequest{} }
func (m *SingleGetValueRequest) String() string { return proto.CompactTextString(m) }
func (*SingleGetValueRequest) ProtoMessage()    {}
func (*SingleGetValueRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{39}
}

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

var xxx_messageInfo_SingleGetValueRequest proto.InternalMessageInfo

func (m *SingleGetValueRequest) GetTargetId() string {
	if m != nil {
		return m.TargetId
	}
	return ""
}

func (m *SingleGetValueRequest) GetRequest() *GetValueRequest {
	if m != nil {
		return m.Request
	}
	return nil
}

type SingleGetValueResponse struct {
	Response             *GetValueResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (m *SingleGetValueResponse) Reset()         { *m = SingleGetValueResponse{} }
func (m *SingleGetValueResponse) String() string { return proto.CompactTextString(m) }
func (*SingleGetValueResponse) ProtoMessage()    {}
func (*SingleGetValueResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{40}
}

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

var xxx_messageInfo_SingleGetValueResponse proto.InternalMessageInfo

func (m *SingleGetValueResponse) GetResponse() *GetValueResponse {
	if m != nil {
		return m.Response
	}
	return nil
}

type SingleSetValueRequest struct {
	TargetId             string           `protobuf:"bytes,1,opt,name=targetId,proto3" json:"targetId,omitempty"`
	Request              *SetValueRequest `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func (m *SingleSetValueRequest) Reset()         { *m = SingleSetValueRequest{} }
func (m *SingleSetValueRequest) String() string { return proto.CompactTextString(m) }
func (*SingleSetValueRequest) ProtoMessage()    {}
func (*SingleSetValueRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{41}
}

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

var xxx_messageInfo_SingleSetValueRequest proto.InternalMessageInfo

func (m *SingleSetValueRequest) GetTargetId() string {
	if m != nil {
		return m.TargetId
	}
	return ""
}

func (m *SingleSetValueRequest) GetRequest() *SetValueRequest {
	if m != nil {
		return m.Request
	}
	return nil
}

type SingleSetValueResponse struct {
	Response             *SetValueResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (m *SingleSetValueResponse) Reset()         { *m = SingleSetValueResponse{} }
func (m *SingleSetValueResponse) String() string { return proto.CompactTextString(m) }
func (*SingleSetValueResponse) ProtoMessage()    {}
func (*SingleSetValueResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_7ecf6e9799a9202d, []int{42}
}

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

var xxx_messageInfo_SingleSetValueResponse proto.InternalMessageInfo

func (m *SingleSetValueResponse) GetResponse() *SetValueResponse {
	if m != nil {
		return m.Response
	}
	return nil
}

func init() {
	proto.RegisterEnum("extension.ValueType_Type", ValueType_Type_name, ValueType_Type_value)
	proto.RegisterEnum("extension.GetOnuUniInfoResponse_ConfigurationInd", GetOnuUniInfoResponse_ConfigurationInd_name, GetOnuUniInfoResponse_ConfigurationInd_value)
	proto.RegisterEnum("extension.GetOnuUniInfoResponse_AdministrativeState", GetOnuUniInfoResponse_AdministrativeState_name, GetOnuUniInfoResponse_AdministrativeState_value)
	proto.RegisterEnum("extension.GetOnuUniInfoResponse_OperationalState", GetOnuUniInfoResponse_OperationalState_name, GetOnuUniInfoResponse_OperationalState_value)
	proto.RegisterEnum("extension.GetOltPortCounters_PortType", GetOltPortCounters_PortType_name, GetOltPortCounters_PortType_value)
	proto.RegisterEnum("extension.GetOnuEthernetBridgePortHistory_Direction", GetOnuEthernetBridgePortHistory_Direction_name, GetOnuEthernetBridgePortHistory_Direction_value)
	proto.RegisterEnum("extension.GetOmciEthernetFrameExtendedPmResponse_Format", GetOmciEthernetFrameExtendedPmResponse_Format_name, GetOmciEthernetFrameExtendedPmResponse_Format_value)
	proto.RegisterEnum("extension.GetOffloadedAppsStatisticsRequest_OffloadedApp", GetOffloadedAppsStatisticsRequest_OffloadedApp_name, GetOffloadedAppsStatisticsRequest_OffloadedApp_value)
	proto.RegisterEnum("extension.GetValueResponse_Status", GetValueResponse_Status_name, GetValueResponse_Status_value)
	proto.RegisterEnum("extension.GetValueResponse_ErrorReason", GetValueResponse_ErrorReason_name, GetValueResponse_ErrorReason_value)
	proto.RegisterEnum("extension.SetValueResponse_Status", SetValueResponse_Status_name, SetValueResponse_Status_value)
	proto.RegisterEnum("extension.SetValueResponse_ErrorReason", SetValueResponse_ErrorReason_name, SetValueResponse_ErrorReason_value)
	proto.RegisterType((*ValueSet)(nil), "extension.ValueSet")
	proto.RegisterType((*ValueType)(nil), "extension.ValueType")
	proto.RegisterType((*ValueSpecifier)(nil), "extension.ValueSpecifier")
	proto.RegisterType((*ReturnValues)(nil), "extension.ReturnValues")
	proto.RegisterType((*GetDistanceRequest)(nil), "extension.GetDistanceRequest")
	proto.RegisterType((*GetDistanceResponse)(nil), "extension.GetDistanceResponse")
	proto.RegisterType((*GetOnuUniInfoRequest)(nil), "extension.GetOnuUniInfoRequest")
	proto.RegisterType((*GetOnuUniInfoResponse)(nil), "extension.GetOnuUniInfoResponse")
	proto.RegisterType((*GetOltPortCounters)(nil), "extension.GetOltPortCounters")
	proto.RegisterType((*GetOltPortCountersResponse)(nil), "extension.GetOltPortCountersResponse")
	proto.RegisterType((*GetOnuPonOpticalInfo)(nil), "extension.GetOnuPonOpticalInfo")
	proto.RegisterType((*GetOnuPonOpticalInfoResponse)(nil), "extension.GetOnuPonOpticalInfoResponse")
	proto.RegisterType((*GetOnuEthernetBridgePortHistory)(nil), "extension.GetOnuEthernetBridgePortHistory")
	proto.RegisterType((*GetOnuEthernetBridgePortHistoryResponse)(nil), "extension.GetOnuEthernetBridgePortHistoryResponse")
	proto.RegisterType((*GetOnuFecHistory)(nil), "extension.GetOnuFecHistory")
	proto.RegisterType((*GetOnuFecHistoryResponse)(nil), "extension.GetOnuFecHistoryResponse")
	proto.RegisterType((*GetOnuCountersRequest)(nil), "extension.GetOnuCountersRequest")
	proto.RegisterType((*GetOmciEthernetFrameExtendedPmRequest)(nil), "extension.GetOmciEthernetFrameExtendedPmRequest")
	proto.RegisterType((*GetRxPowerRequest)(nil), "extension.GetRxPowerRequest")
	proto.RegisterType((*GetOltRxPowerRequest)(nil), "extension.GetOltRxPowerRequest")
	proto.RegisterType((*GetOnuCountersResponse)(nil), "extension.GetOnuCountersResponse")
	proto.RegisterType((*OmciEthernetFrameExtendedPm)(nil), "extension.OmciEthernetFrameExtendedPm")
	proto.RegisterType((*GetOmciEthernetFrameExtendedPmResponse)(nil), "extension.GetOmciEthernetFrameExtendedPmResponse")
	proto.RegisterType((*RxPower)(nil), "extension.RxPower")
	proto.RegisterType((*GetOltRxPowerResponse)(nil), "extension.GetOltRxPowerResponse")
	proto.RegisterType((*GetRxPowerResponse)(nil), "extension.GetRxPowerResponse")
	proto.RegisterType((*GetOnuOmciTxRxStatsRequest)(nil), "extension.GetOnuOmciTxRxStatsRequest")
	proto.RegisterType((*GetOnuOmciTxRxStatsResponse)(nil), "extension.GetOnuOmciTxRxStatsResponse")
	proto.RegisterType((*GetOnuOmciActiveAlarmsRequest)(nil), "extension.GetOnuOmciActiveAlarmsRequest")
	proto.RegisterType((*AlarmData)(nil), "extension.AlarmData")
	proto.RegisterType((*GetOnuOmciActiveAlarmsResponse)(nil), "extension.GetOnuOmciActiveAlarmsResponse")
	proto.RegisterType((*GetOffloadedAppsStatisticsRequest)(nil), "extension.GetOffloadedAppsStatisticsRequest")
	proto.RegisterType((*GetOffloadedAppsStatisticsResponse)(nil), "extension.GetOffloadedAppsStatisticsResponse")
	proto.RegisterType((*GetOffloadedAppsStatisticsResponse_DHCPv4RAStats)(nil), "extension.GetOffloadedAppsStatisticsResponse.DHCPv4RAStats")
	proto.RegisterMapType((map[string]string)(nil), "extension.GetOffloadedAppsStatisticsResponse.DHCPv4RAStats.AdditionalStatsEntry")
	proto.RegisterType((*GetOffloadedAppsStatisticsResponse_DHCPv6RAStats)(nil), "extension.GetOffloadedAppsStatisticsResponse.DHCPv6RAStats")
	proto.RegisterMapType((map[string]string)(nil), "extension.GetOffloadedAppsStatisticsResponse.DHCPv6RAStats.AdditionalStatsEntry")
	proto.RegisterType((*GetOffloadedAppsStatisticsResponse_PPPoeIAStats)(nil), "extension.GetOffloadedAppsStatisticsResponse.PPPoeIAStats")
	proto.RegisterMapType((map[string]string)(nil), "extension.GetOffloadedAppsStatisticsResponse.PPPoeIAStats.AdditionalStatsEntry")
	proto.RegisterType((*GetValueRequest)(nil), "extension.GetValueRequest")
	proto.RegisterType((*GetValueResponse)(nil), "extension.GetValueResponse")
	proto.RegisterType((*AppOffloadConfig)(nil), "extension.AppOffloadConfig")
	proto.RegisterType((*AppOffloadOnuConfig)(nil), "extension.AppOffloadOnuConfig")
	proto.RegisterType((*AppOffloadOnuConfig_PerUniConfig)(nil), "extension.AppOffloadOnuConfig.PerUniConfig")
	proto.RegisterType((*SetValueRequest)(nil), "extension.SetValueRequest")
	proto.RegisterType((*SetValueResponse)(nil), "extension.SetValueResponse")
	proto.RegisterType((*SingleGetValueRequest)(nil), "extension.SingleGetValueRequest")
	proto.RegisterType((*SingleGetValueResponse)(nil), "extension.SingleGetValueResponse")
	proto.RegisterType((*SingleSetValueRequest)(nil), "extension.SingleSetValueRequest")
	proto.RegisterType((*SingleSetValueResponse)(nil), "extension.SingleSetValueResponse")
}

func init() { proto.RegisterFile("voltha_protos/extensions.proto", fileDescriptor_7ecf6e9799a9202d) }

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

// ExtensionClient is the client API for Extension service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ExtensionClient interface {
	// Get a single attribute
	GetExtValue(ctx context.Context, in *SingleGetValueRequest, opts ...grpc.CallOption) (*SingleGetValueResponse, error)
	// Set a single attribute
	SetExtValue(ctx context.Context, in *SingleSetValueRequest, opts ...grpc.CallOption) (*SingleSetValueResponse, error)
}

type extensionClient struct {
	cc *grpc.ClientConn
}

func NewExtensionClient(cc *grpc.ClientConn) ExtensionClient {
	return &extensionClient{cc}
}

func (c *extensionClient) GetExtValue(ctx context.Context, in *SingleGetValueRequest, opts ...grpc.CallOption) (*SingleGetValueResponse, error) {
	out := new(SingleGetValueResponse)
	err := c.cc.Invoke(ctx, "/extension.Extension/GetExtValue", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *extensionClient) SetExtValue(ctx context.Context, in *SingleSetValueRequest, opts ...grpc.CallOption) (*SingleSetValueResponse, error) {
	out := new(SingleSetValueResponse)
	err := c.cc.Invoke(ctx, "/extension.Extension/SetExtValue", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ExtensionServer is the server API for Extension service.
type ExtensionServer interface {
	// Get a single attribute
	GetExtValue(context.Context, *SingleGetValueRequest) (*SingleGetValueResponse, error)
	// Set a single attribute
	SetExtValue(context.Context, *SingleSetValueRequest) (*SingleSetValueResponse, error)
}

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

func (*UnimplementedExtensionServer) GetExtValue(ctx context.Context, req *SingleGetValueRequest) (*SingleGetValueResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetExtValue not implemented")
}
func (*UnimplementedExtensionServer) SetExtValue(ctx context.Context, req *SingleSetValueRequest) (*SingleSetValueResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SetExtValue not implemented")
}

func RegisterExtensionServer(s *grpc.Server, srv ExtensionServer) {
	s.RegisterService(&_Extension_serviceDesc, srv)
}

func _Extension_GetExtValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SingleGetValueRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ExtensionServer).GetExtValue(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/extension.Extension/GetExtValue",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ExtensionServer).GetExtValue(ctx, req.(*SingleGetValueRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Extension_SetExtValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SingleSetValueRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ExtensionServer).SetExtValue(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/extension.Extension/SetExtValue",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ExtensionServer).SetExtValue(ctx, req.(*SingleSetValueRequest))
	}
	return interceptor(ctx, in, info, handler)
}

var _Extension_serviceDesc = grpc.ServiceDesc{
	ServiceName: "extension.Extension",
	HandlerType: (*ExtensionServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetExtValue",
			Handler:    _Extension_GetExtValue_Handler,
		},
		{
			MethodName: "SetExtValue",
			Handler:    _Extension_SetExtValue_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "voltha_protos/extensions.proto",
}
