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

package openolt

import (
	context "context"
	fmt "fmt"
	proto "github.com/golang/protobuf/proto"
	common "github.com/opencord/voltha-protos/v4/go/common"
	config "github.com/opencord/voltha-protos/v4/go/ext/config"
	tech_profile "github.com/opencord/voltha-protos/v4/go/tech_profile"
	_ "google.golang.org/genproto/googleapis/api/annotations"
	grpc "google.golang.org/grpc"
	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

// SchedulerConfig from public import voltha_protos/tech_profile.proto
type SchedulerConfig = tech_profile.SchedulerConfig

// TrafficShapingInfo from public import voltha_protos/tech_profile.proto
type TrafficShapingInfo = tech_profile.TrafficShapingInfo

// TrafficScheduler from public import voltha_protos/tech_profile.proto
type TrafficScheduler = tech_profile.TrafficScheduler

// TrafficSchedulers from public import voltha_protos/tech_profile.proto
type TrafficSchedulers = tech_profile.TrafficSchedulers

// TailDropDiscardConfig from public import voltha_protos/tech_profile.proto
type TailDropDiscardConfig = tech_profile.TailDropDiscardConfig

// RedDiscardConfig from public import voltha_protos/tech_profile.proto
type RedDiscardConfig = tech_profile.RedDiscardConfig

// WRedDiscardConfig from public import voltha_protos/tech_profile.proto
type WRedDiscardConfig = tech_profile.WRedDiscardConfig

// DiscardConfig from public import voltha_protos/tech_profile.proto
type DiscardConfig = tech_profile.DiscardConfig
type DiscardConfig_TailDropDiscardConfig = tech_profile.DiscardConfig_TailDropDiscardConfig
type DiscardConfig_RedDiscardConfig = tech_profile.DiscardConfig_RedDiscardConfig
type DiscardConfig_WredDiscardConfig = tech_profile.DiscardConfig_WredDiscardConfig

// TrafficQueue from public import voltha_protos/tech_profile.proto
type TrafficQueue = tech_profile.TrafficQueue

// TrafficQueues from public import voltha_protos/tech_profile.proto
type TrafficQueues = tech_profile.TrafficQueues

// Direction from public import voltha_protos/tech_profile.proto
type Direction = tech_profile.Direction

var Direction_name = tech_profile.Direction_name
var Direction_value = tech_profile.Direction_value

const Direction_UPSTREAM = Direction(tech_profile.Direction_UPSTREAM)
const Direction_DOWNSTREAM = Direction(tech_profile.Direction_DOWNSTREAM)
const Direction_BIDIRECTIONAL = Direction(tech_profile.Direction_BIDIRECTIONAL)

// SchedulingPolicy from public import voltha_protos/tech_profile.proto
type SchedulingPolicy = tech_profile.SchedulingPolicy

var SchedulingPolicy_name = tech_profile.SchedulingPolicy_name
var SchedulingPolicy_value = tech_profile.SchedulingPolicy_value

const SchedulingPolicy_WRR = SchedulingPolicy(tech_profile.SchedulingPolicy_WRR)
const SchedulingPolicy_StrictPriority = SchedulingPolicy(tech_profile.SchedulingPolicy_StrictPriority)
const SchedulingPolicy_Hybrid = SchedulingPolicy(tech_profile.SchedulingPolicy_Hybrid)

// AdditionalBW from public import voltha_protos/tech_profile.proto
type AdditionalBW = tech_profile.AdditionalBW

var AdditionalBW_name = tech_profile.AdditionalBW_name
var AdditionalBW_value = tech_profile.AdditionalBW_value

const AdditionalBW_AdditionalBW_None = AdditionalBW(tech_profile.AdditionalBW_AdditionalBW_None)
const AdditionalBW_AdditionalBW_NA = AdditionalBW(tech_profile.AdditionalBW_AdditionalBW_NA)
const AdditionalBW_AdditionalBW_BestEffort = AdditionalBW(tech_profile.AdditionalBW_AdditionalBW_BestEffort)
const AdditionalBW_AdditionalBW_Auto = AdditionalBW(tech_profile.AdditionalBW_AdditionalBW_Auto)

// DiscardPolicy from public import voltha_protos/tech_profile.proto
type DiscardPolicy = tech_profile.DiscardPolicy

var DiscardPolicy_name = tech_profile.DiscardPolicy_name
var DiscardPolicy_value = tech_profile.DiscardPolicy_value

const DiscardPolicy_TailDrop = DiscardPolicy(tech_profile.DiscardPolicy_TailDrop)
const DiscardPolicy_WTailDrop = DiscardPolicy(tech_profile.DiscardPolicy_WTailDrop)
const DiscardPolicy_Red = DiscardPolicy(tech_profile.DiscardPolicy_Red)
const DiscardPolicy_WRed = DiscardPolicy(tech_profile.DiscardPolicy_WRed)

// InferredAdditionBWIndication from public import voltha_protos/tech_profile.proto
type InferredAdditionBWIndication = tech_profile.InferredAdditionBWIndication

var InferredAdditionBWIndication_name = tech_profile.InferredAdditionBWIndication_name
var InferredAdditionBWIndication_value = tech_profile.InferredAdditionBWIndication_value

const InferredAdditionBWIndication_InferredAdditionBWIndication_None = InferredAdditionBWIndication(tech_profile.InferredAdditionBWIndication_InferredAdditionBWIndication_None)
const InferredAdditionBWIndication_InferredAdditionBWIndication_Assured = InferredAdditionBWIndication(tech_profile.InferredAdditionBWIndication_InferredAdditionBWIndication_Assured)
const InferredAdditionBWIndication_InferredAdditionBWIndication_BestEffort = InferredAdditionBWIndication(tech_profile.InferredAdditionBWIndication_InferredAdditionBWIndication_BestEffort)

// ID from public import voltha_protos/common.proto
type ID = common.ID

// IDs from public import voltha_protos/common.proto
type IDs = common.IDs

// AdminState from public import voltha_protos/common.proto
type AdminState = common.AdminState

// OperStatus from public import voltha_protos/common.proto
type OperStatus = common.OperStatus

// ConnectStatus from public import voltha_protos/common.proto
type ConnectStatus = common.ConnectStatus

// OperationResp from public import voltha_protos/common.proto
type OperationResp = common.OperationResp

// ValueType from public import voltha_protos/common.proto
type ValueType = common.ValueType

// ValueSpecifier from public import voltha_protos/common.proto
type ValueSpecifier = common.ValueSpecifier

// ReturnValues from public import voltha_protos/common.proto
type ReturnValues = common.ReturnValues

// TestModeKeys from public import voltha_protos/common.proto
type TestModeKeys = common.TestModeKeys

var TestModeKeys_name = common.TestModeKeys_name
var TestModeKeys_value = common.TestModeKeys_value

const TestModeKeys_api_test = TestModeKeys(common.TestModeKeys_api_test)

// AdminState_Types from public import voltha_protos/common.proto
type AdminState_Types = common.AdminState_Types

var AdminState_Types_name = common.AdminState_Types_name
var AdminState_Types_value = common.AdminState_Types_value

const AdminState_UNKNOWN = AdminState_Types(common.AdminState_UNKNOWN)
const AdminState_PREPROVISIONED = AdminState_Types(common.AdminState_PREPROVISIONED)
const AdminState_ENABLED = AdminState_Types(common.AdminState_ENABLED)
const AdminState_DISABLED = AdminState_Types(common.AdminState_DISABLED)
const AdminState_DOWNLOADING_IMAGE = AdminState_Types(common.AdminState_DOWNLOADING_IMAGE)

// OperStatus_Types from public import voltha_protos/common.proto
type OperStatus_Types = common.OperStatus_Types

var OperStatus_Types_name = common.OperStatus_Types_name
var OperStatus_Types_value = common.OperStatus_Types_value

const OperStatus_UNKNOWN = OperStatus_Types(common.OperStatus_UNKNOWN)
const OperStatus_DISCOVERED = OperStatus_Types(common.OperStatus_DISCOVERED)
const OperStatus_ACTIVATING = OperStatus_Types(common.OperStatus_ACTIVATING)
const OperStatus_TESTING = OperStatus_Types(common.OperStatus_TESTING)
const OperStatus_ACTIVE = OperStatus_Types(common.OperStatus_ACTIVE)
const OperStatus_FAILED = OperStatus_Types(common.OperStatus_FAILED)

// ConnectStatus_Types from public import voltha_protos/common.proto
type ConnectStatus_Types = common.ConnectStatus_Types

var ConnectStatus_Types_name = common.ConnectStatus_Types_name
var ConnectStatus_Types_value = common.ConnectStatus_Types_value

const ConnectStatus_UNKNOWN = ConnectStatus_Types(common.ConnectStatus_UNKNOWN)
const ConnectStatus_UNREACHABLE = ConnectStatus_Types(common.ConnectStatus_UNREACHABLE)
const ConnectStatus_REACHABLE = ConnectStatus_Types(common.ConnectStatus_REACHABLE)

// OperationResp_OperationReturnCode from public import voltha_protos/common.proto
type OperationResp_OperationReturnCode = common.OperationResp_OperationReturnCode

var OperationResp_OperationReturnCode_name = common.OperationResp_OperationReturnCode_name
var OperationResp_OperationReturnCode_value = common.OperationResp_OperationReturnCode_value

const OperationResp_OPERATION_SUCCESS = OperationResp_OperationReturnCode(common.OperationResp_OPERATION_SUCCESS)
const OperationResp_OPERATION_FAILURE = OperationResp_OperationReturnCode(common.OperationResp_OPERATION_FAILURE)
const OperationResp_OPERATION_UNSUPPORTED = OperationResp_OperationReturnCode(common.OperationResp_OPERATION_UNSUPPORTED)

// ValueType_Type from public import voltha_protos/common.proto
type ValueType_Type = common.ValueType_Type

var ValueType_Type_name = common.ValueType_Type_name
var ValueType_Type_value = common.ValueType_Type_value

const ValueType_EMPTY = ValueType_Type(common.ValueType_EMPTY)
const ValueType_DISTANCE = ValueType_Type(common.ValueType_DISTANCE)

//* activation fail reason.
type OnuIndication_ActivationFailReason int32

const (
	OnuIndication_ONU_ACTIVATION_FAIL_REASON_NONE                    OnuIndication_ActivationFailReason = 0
	OnuIndication_ONU_ACTIVATION_FAIL_REASON_RANGING                 OnuIndication_ActivationFailReason = 1
	OnuIndication_ONU_ACTIVATION_FAIL_REASON_PASSWORD_AUTHENTICATION OnuIndication_ActivationFailReason = 2
	OnuIndication_ONU_ACTIVATION_FAIL_REASON_LOS                     OnuIndication_ActivationFailReason = 3
	OnuIndication_ONU_ACTIVATION_FAIL_ONU_ALARM                      OnuIndication_ActivationFailReason = 4
	OnuIndication_ONU_ACTIVATION_FAIL_SWITCH_OVER                    OnuIndication_ActivationFailReason = 5
)

var OnuIndication_ActivationFailReason_name = map[int32]string{
	0: "ONU_ACTIVATION_FAIL_REASON_NONE",
	1: "ONU_ACTIVATION_FAIL_REASON_RANGING",
	2: "ONU_ACTIVATION_FAIL_REASON_PASSWORD_AUTHENTICATION",
	3: "ONU_ACTIVATION_FAIL_REASON_LOS",
	4: "ONU_ACTIVATION_FAIL_ONU_ALARM",
	5: "ONU_ACTIVATION_FAIL_SWITCH_OVER",
}

var OnuIndication_ActivationFailReason_value = map[string]int32{
	"ONU_ACTIVATION_FAIL_REASON_NONE":                    0,
	"ONU_ACTIVATION_FAIL_REASON_RANGING":                 1,
	"ONU_ACTIVATION_FAIL_REASON_PASSWORD_AUTHENTICATION": 2,
	"ONU_ACTIVATION_FAIL_REASON_LOS":                     3,
	"ONU_ACTIVATION_FAIL_ONU_ALARM":                      4,
	"ONU_ACTIVATION_FAIL_SWITCH_OVER":                    5,
}

func (x OnuIndication_ActivationFailReason) String() string {
	return proto.EnumName(OnuIndication_ActivationFailReason_name, int32(x))
}

func (OnuIndication_ActivationFailReason) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_c072e7aa0dfd74d5, []int{5, 0}
}

type DeviceInfo_DeviceResourceRanges_Pool_PoolType int32

const (
	DeviceInfo_DeviceResourceRanges_Pool_ONU_ID     DeviceInfo_DeviceResourceRanges_Pool_PoolType = 0
	DeviceInfo_DeviceResourceRanges_Pool_ALLOC_ID   DeviceInfo_DeviceResourceRanges_Pool_PoolType = 1
	DeviceInfo_DeviceResourceRanges_Pool_GEMPORT_ID DeviceInfo_DeviceResourceRanges_Pool_PoolType = 2
	DeviceInfo_DeviceResourceRanges_Pool_FLOW_ID    DeviceInfo_DeviceResourceRanges_Pool_PoolType = 3
)

var DeviceInfo_DeviceResourceRanges_Pool_PoolType_name = map[int32]string{
	0: "ONU_ID",
	1: "ALLOC_ID",
	2: "GEMPORT_ID",
	3: "FLOW_ID",
}

var DeviceInfo_DeviceResourceRanges_Pool_PoolType_value = map[string]int32{
	"ONU_ID":     0,
	"ALLOC_ID":   1,
	"GEMPORT_ID": 2,
	"FLOW_ID":    3,
}

func (x DeviceInfo_DeviceResourceRanges_Pool_PoolType) String() string {
	return proto.EnumName(DeviceInfo_DeviceResourceRanges_Pool_PoolType_name, int32(x))
}

func (DeviceInfo_DeviceResourceRanges_Pool_PoolType) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_c072e7aa0dfd74d5, []int{16, 0, 0, 0}
}

type DeviceInfo_DeviceResourceRanges_Pool_SharingType int32

const (
	DeviceInfo_DeviceResourceRanges_Pool_DEDICATED_PER_INTF           DeviceInfo_DeviceResourceRanges_Pool_SharingType = 0
	DeviceInfo_DeviceResourceRanges_Pool_SHARED_BY_ALL_INTF_ALL_TECH  DeviceInfo_DeviceResourceRanges_Pool_SharingType = 1
	DeviceInfo_DeviceResourceRanges_Pool_SHARED_BY_ALL_INTF_SAME_TECH DeviceInfo_DeviceResourceRanges_Pool_SharingType = 2
)

var DeviceInfo_DeviceResourceRanges_Pool_SharingType_name = map[int32]string{
	0: "DEDICATED_PER_INTF",
	1: "SHARED_BY_ALL_INTF_ALL_TECH",
	2: "SHARED_BY_ALL_INTF_SAME_TECH",
}

var DeviceInfo_DeviceResourceRanges_Pool_SharingType_value = map[string]int32{
	"DEDICATED_PER_INTF":           0,
	"SHARED_BY_ALL_INTF_ALL_TECH":  1,
	"SHARED_BY_ALL_INTF_SAME_TECH": 2,
}

func (x DeviceInfo_DeviceResourceRanges_Pool_SharingType) String() string {
	return proto.EnumName(DeviceInfo_DeviceResourceRanges_Pool_SharingType_name, int32(x))
}

func (DeviceInfo_DeviceResourceRanges_Pool_SharingType) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_c072e7aa0dfd74d5, []int{16, 0, 0, 1}
}

type GroupMember_InterfaceType int32

const (
	GroupMember_PON           GroupMember_InterfaceType = 0
	GroupMember_EPON_1G_PATH  GroupMember_InterfaceType = 1
	GroupMember_EPON_10G_PATH GroupMember_InterfaceType = 2
)

var GroupMember_InterfaceType_name = map[int32]string{
	0: "PON",
	1: "EPON_1G_PATH",
	2: "EPON_10G_PATH",
}

var GroupMember_InterfaceType_value = map[string]int32{
	"PON":           0,
	"EPON_1G_PATH":  1,
	"EPON_10G_PATH": 2,
}

func (x GroupMember_InterfaceType) String() string {
	return proto.EnumName(GroupMember_InterfaceType_name, int32(x))
}

func (GroupMember_InterfaceType) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_c072e7aa0dfd74d5, []int{46, 0}
}

type Group_GroupMembersCommand int32

const (
	Group_ADD_MEMBERS    Group_GroupMembersCommand = 0
	Group_REMOVE_MEMBERS Group_GroupMembersCommand = 1
	Group_SET_MEMBERS    Group_GroupMembersCommand = 2
)

var Group_GroupMembersCommand_name = map[int32]string{
	0: "ADD_MEMBERS",
	1: "REMOVE_MEMBERS",
	2: "SET_MEMBERS",
}

var Group_GroupMembersCommand_value = map[string]int32{
	"ADD_MEMBERS":    0,
	"REMOVE_MEMBERS": 1,
	"SET_MEMBERS":    2,
}

func (x Group_GroupMembersCommand) String() string {
	return proto.EnumName(Group_GroupMembersCommand_name, int32(x))
}

func (Group_GroupMembersCommand) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_c072e7aa0dfd74d5, []int{47, 0}
}

type Indication struct {
	// Types that are valid to be assigned to Data:
	//	*Indication_OltInd
	//	*Indication_IntfInd
	//	*Indication_IntfOperInd
	//	*Indication_OnuDiscInd
	//	*Indication_OnuInd
	//	*Indication_OmciInd
	//	*Indication_PktInd
	//	*Indication_PortStats
	//	*Indication_FlowStats
	//	*Indication_AlarmInd
	Data                 isIndication_Data `protobuf_oneof:"data"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

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

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

var xxx_messageInfo_Indication proto.InternalMessageInfo

type isIndication_Data interface {
	isIndication_Data()
}

type Indication_OltInd struct {
	OltInd *OltIndication `protobuf:"bytes,1,opt,name=olt_ind,json=oltInd,proto3,oneof"`
}

type Indication_IntfInd struct {
	IntfInd *IntfIndication `protobuf:"bytes,2,opt,name=intf_ind,json=intfInd,proto3,oneof"`
}

type Indication_IntfOperInd struct {
	IntfOperInd *IntfOperIndication `protobuf:"bytes,3,opt,name=intf_oper_ind,json=intfOperInd,proto3,oneof"`
}

type Indication_OnuDiscInd struct {
	OnuDiscInd *OnuDiscIndication `protobuf:"bytes,4,opt,name=onu_disc_ind,json=onuDiscInd,proto3,oneof"`
}

type Indication_OnuInd struct {
	OnuInd *OnuIndication `protobuf:"bytes,5,opt,name=onu_ind,json=onuInd,proto3,oneof"`
}

type Indication_OmciInd struct {
	OmciInd *OmciIndication `protobuf:"bytes,6,opt,name=omci_ind,json=omciInd,proto3,oneof"`
}

type Indication_PktInd struct {
	PktInd *PacketIndication `protobuf:"bytes,7,opt,name=pkt_ind,json=pktInd,proto3,oneof"`
}

type Indication_PortStats struct {
	PortStats *PortStatistics `protobuf:"bytes,8,opt,name=port_stats,json=portStats,proto3,oneof"`
}

type Indication_FlowStats struct {
	FlowStats *FlowStatistics `protobuf:"bytes,9,opt,name=flow_stats,json=flowStats,proto3,oneof"`
}

type Indication_AlarmInd struct {
	AlarmInd *AlarmIndication `protobuf:"bytes,10,opt,name=alarm_ind,json=alarmInd,proto3,oneof"`
}

func (*Indication_OltInd) isIndication_Data() {}

func (*Indication_IntfInd) isIndication_Data() {}

func (*Indication_IntfOperInd) isIndication_Data() {}

func (*Indication_OnuDiscInd) isIndication_Data() {}

func (*Indication_OnuInd) isIndication_Data() {}

func (*Indication_OmciInd) isIndication_Data() {}

func (*Indication_PktInd) isIndication_Data() {}

func (*Indication_PortStats) isIndication_Data() {}

func (*Indication_FlowStats) isIndication_Data() {}

func (*Indication_AlarmInd) isIndication_Data() {}

func (m *Indication) GetData() isIndication_Data {
	if m != nil {
		return m.Data
	}
	return nil
}

func (m *Indication) GetOltInd() *OltIndication {
	if x, ok := m.GetData().(*Indication_OltInd); ok {
		return x.OltInd
	}
	return nil
}

func (m *Indication) GetIntfInd() *IntfIndication {
	if x, ok := m.GetData().(*Indication_IntfInd); ok {
		return x.IntfInd
	}
	return nil
}

func (m *Indication) GetIntfOperInd() *IntfOperIndication {
	if x, ok := m.GetData().(*Indication_IntfOperInd); ok {
		return x.IntfOperInd
	}
	return nil
}

func (m *Indication) GetOnuDiscInd() *OnuDiscIndication {
	if x, ok := m.GetData().(*Indication_OnuDiscInd); ok {
		return x.OnuDiscInd
	}
	return nil
}

func (m *Indication) GetOnuInd() *OnuIndication {
	if x, ok := m.GetData().(*Indication_OnuInd); ok {
		return x.OnuInd
	}
	return nil
}

func (m *Indication) GetOmciInd() *OmciIndication {
	if x, ok := m.GetData().(*Indication_OmciInd); ok {
		return x.OmciInd
	}
	return nil
}

func (m *Indication) GetPktInd() *PacketIndication {
	if x, ok := m.GetData().(*Indication_PktInd); ok {
		return x.PktInd
	}
	return nil
}

func (m *Indication) GetPortStats() *PortStatistics {
	if x, ok := m.GetData().(*Indication_PortStats); ok {
		return x.PortStats
	}
	return nil
}

func (m *Indication) GetFlowStats() *FlowStatistics {
	if x, ok := m.GetData().(*Indication_FlowStats); ok {
		return x.FlowStats
	}
	return nil
}

func (m *Indication) GetAlarmInd() *AlarmIndication {
	if x, ok := m.GetData().(*Indication_AlarmInd); ok {
		return x.AlarmInd
	}
	return nil
}

// XXX_OneofWrappers is for the internal use of the proto package.
func (*Indication) XXX_OneofWrappers() []interface{} {
	return []interface{}{
		(*Indication_OltInd)(nil),
		(*Indication_IntfInd)(nil),
		(*Indication_IntfOperInd)(nil),
		(*Indication_OnuDiscInd)(nil),
		(*Indication_OnuInd)(nil),
		(*Indication_OmciInd)(nil),
		(*Indication_PktInd)(nil),
		(*Indication_PortStats)(nil),
		(*Indication_FlowStats)(nil),
		(*Indication_AlarmInd)(nil),
	}
}

type AlarmIndication struct {
	// Types that are valid to be assigned to Data:
	//	*AlarmIndication_LosInd
	//	*AlarmIndication_DyingGaspInd
	//	*AlarmIndication_OnuAlarmInd
	//	*AlarmIndication_OnuStartupFailInd
	//	*AlarmIndication_OnuSignalDegradeInd
	//	*AlarmIndication_OnuDriftOfWindowInd
	//	*AlarmIndication_OnuLossOmciInd
	//	*AlarmIndication_OnuSignalsFailInd
	//	*AlarmIndication_OnuTiwiInd
	//	*AlarmIndication_OnuActivationFailInd
	//	*AlarmIndication_OnuProcessingErrorInd
	//	*AlarmIndication_OnuLossOfSyncFailInd
	//	*AlarmIndication_OnuItuPonStatsInd
	//	*AlarmIndication_OnuDeactivationFailureInd
	//	*AlarmIndication_OnuRemoteDefectInd
	//	*AlarmIndication_OnuLossGemDelineationInd
	//	*AlarmIndication_OnuPhysicalEquipmentErrorInd
	//	*AlarmIndication_OnuLossOfAckInd
	//	*AlarmIndication_OnuDiffReachExceededInd
	Data                 isAlarmIndication_Data `protobuf_oneof:"data"`
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

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

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

var xxx_messageInfo_AlarmIndication proto.InternalMessageInfo

type isAlarmIndication_Data interface {
	isAlarmIndication_Data()
}

type AlarmIndication_LosInd struct {
	LosInd *LosIndication `protobuf:"bytes,1,opt,name=los_ind,json=losInd,proto3,oneof"`
}

type AlarmIndication_DyingGaspInd struct {
	DyingGaspInd *DyingGaspIndication `protobuf:"bytes,2,opt,name=dying_gasp_ind,json=dyingGaspInd,proto3,oneof"`
}

type AlarmIndication_OnuAlarmInd struct {
	OnuAlarmInd *OnuAlarmIndication `protobuf:"bytes,3,opt,name=onu_alarm_ind,json=onuAlarmInd,proto3,oneof"`
}

type AlarmIndication_OnuStartupFailInd struct {
	OnuStartupFailInd *OnuStartupFailureIndication `protobuf:"bytes,4,opt,name=onu_startup_fail_ind,json=onuStartupFailInd,proto3,oneof"`
}

type AlarmIndication_OnuSignalDegradeInd struct {
	OnuSignalDegradeInd *OnuSignalDegradeIndication `protobuf:"bytes,5,opt,name=onu_signal_degrade_ind,json=onuSignalDegradeInd,proto3,oneof"`
}

type AlarmIndication_OnuDriftOfWindowInd struct {
	OnuDriftOfWindowInd *OnuDriftOfWindowIndication `protobuf:"bytes,6,opt,name=onu_drift_of_window_ind,json=onuDriftOfWindowInd,proto3,oneof"`
}

type AlarmIndication_OnuLossOmciInd struct {
	OnuLossOmciInd *OnuLossOfOmciChannelIndication `protobuf:"bytes,7,opt,name=onu_loss_omci_ind,json=onuLossOmciInd,proto3,oneof"`
}

type AlarmIndication_OnuSignalsFailInd struct {
	OnuSignalsFailInd *OnuSignalsFailureIndication `protobuf:"bytes,8,opt,name=onu_signals_fail_ind,json=onuSignalsFailInd,proto3,oneof"`
}

type AlarmIndication_OnuTiwiInd struct {
	OnuTiwiInd *OnuTransmissionInterferenceWarning `protobuf:"bytes,9,opt,name=onu_tiwi_ind,json=onuTiwiInd,proto3,oneof"`
}

type AlarmIndication_OnuActivationFailInd struct {
	OnuActivationFailInd *OnuActivationFailureIndication `protobuf:"bytes,10,opt,name=onu_activation_fail_ind,json=onuActivationFailInd,proto3,oneof"`
}

type AlarmIndication_OnuProcessingErrorInd struct {
	OnuProcessingErrorInd *OnuProcessingErrorIndication `protobuf:"bytes,11,opt,name=onu_processing_error_ind,json=onuProcessingErrorInd,proto3,oneof"`
}

type AlarmIndication_OnuLossOfSyncFailInd struct {
	OnuLossOfSyncFailInd *OnuLossOfKeySyncFailureIndication `protobuf:"bytes,12,opt,name=onu_loss_of_sync_fail_ind,json=onuLossOfSyncFailInd,proto3,oneof"`
}

type AlarmIndication_OnuItuPonStatsInd struct {
	OnuItuPonStatsInd *OnuItuPonStatsIndication `protobuf:"bytes,13,opt,name=onu_itu_pon_stats_ind,json=onuItuPonStatsInd,proto3,oneof"`
}

type AlarmIndication_OnuDeactivationFailureInd struct {
	OnuDeactivationFailureInd *OnuDeactivationFailureIndication `protobuf:"bytes,14,opt,name=onu_deactivation_failure_ind,json=onuDeactivationFailureInd,proto3,oneof"`
}

type AlarmIndication_OnuRemoteDefectInd struct {
	OnuRemoteDefectInd *OnuRemoteDefectIndication `protobuf:"bytes,15,opt,name=onu_remote_defect_ind,json=onuRemoteDefectInd,proto3,oneof"`
}

type AlarmIndication_OnuLossGemDelineationInd struct {
	OnuLossGemDelineationInd *OnuLossOfGEMChannelDelineationIndication `protobuf:"bytes,16,opt,name=onu_loss_gem_delineation_ind,json=onuLossGemDelineationInd,proto3,oneof"`
}

type AlarmIndication_OnuPhysicalEquipmentErrorInd struct {
	OnuPhysicalEquipmentErrorInd *OnuPhysicalEquipmentErrorIndication `protobuf:"bytes,17,opt,name=onu_physical_equipment_error_ind,json=onuPhysicalEquipmentErrorInd,proto3,oneof"`
}

type AlarmIndication_OnuLossOfAckInd struct {
	OnuLossOfAckInd *OnuLossOfAcknowledgementIndication `protobuf:"bytes,18,opt,name=onu_loss_of_ack_ind,json=onuLossOfAckInd,proto3,oneof"`
}

type AlarmIndication_OnuDiffReachExceededInd struct {
	OnuDiffReachExceededInd *OnuDifferentialReachExceededIndication `protobuf:"bytes,19,opt,name=onu_diff_reach_exceeded_ind,json=onuDiffReachExceededInd,proto3,oneof"`
}

func (*AlarmIndication_LosInd) isAlarmIndication_Data() {}

func (*AlarmIndication_DyingGaspInd) isAlarmIndication_Data() {}

func (*AlarmIndication_OnuAlarmInd) isAlarmIndication_Data() {}

func (*AlarmIndication_OnuStartupFailInd) isAlarmIndication_Data() {}

func (*AlarmIndication_OnuSignalDegradeInd) isAlarmIndication_Data() {}

func (*AlarmIndication_OnuDriftOfWindowInd) isAlarmIndication_Data() {}

func (*AlarmIndication_OnuLossOmciInd) isAlarmIndication_Data() {}

func (*AlarmIndication_OnuSignalsFailInd) isAlarmIndication_Data() {}

func (*AlarmIndication_OnuTiwiInd) isAlarmIndication_Data() {}

func (*AlarmIndication_OnuActivationFailInd) isAlarmIndication_Data() {}

func (*AlarmIndication_OnuProcessingErrorInd) isAlarmIndication_Data() {}

func (*AlarmIndication_OnuLossOfSyncFailInd) isAlarmIndication_Data() {}

func (*AlarmIndication_OnuItuPonStatsInd) isAlarmIndication_Data() {}

func (*AlarmIndication_OnuDeactivationFailureInd) isAlarmIndication_Data() {}

func (*AlarmIndication_OnuRemoteDefectInd) isAlarmIndication_Data() {}

func (*AlarmIndication_OnuLossGemDelineationInd) isAlarmIndication_Data() {}

func (*AlarmIndication_OnuPhysicalEquipmentErrorInd) isAlarmIndication_Data() {}

func (*AlarmIndication_OnuLossOfAckInd) isAlarmIndication_Data() {}

func (*AlarmIndication_OnuDiffReachExceededInd) isAlarmIndication_Data() {}

func (m *AlarmIndication) GetData() isAlarmIndication_Data {
	if m != nil {
		return m.Data
	}
	return nil
}

func (m *AlarmIndication) GetLosInd() *LosIndication {
	if x, ok := m.GetData().(*AlarmIndication_LosInd); ok {
		return x.LosInd
	}
	return nil
}

func (m *AlarmIndication) GetDyingGaspInd() *DyingGaspIndication {
	if x, ok := m.GetData().(*AlarmIndication_DyingGaspInd); ok {
		return x.DyingGaspInd
	}
	return nil
}

func (m *AlarmIndication) GetOnuAlarmInd() *OnuAlarmIndication {
	if x, ok := m.GetData().(*AlarmIndication_OnuAlarmInd); ok {
		return x.OnuAlarmInd
	}
	return nil
}

func (m *AlarmIndication) GetOnuStartupFailInd() *OnuStartupFailureIndication {
	if x, ok := m.GetData().(*AlarmIndication_OnuStartupFailInd); ok {
		return x.OnuStartupFailInd
	}
	return nil
}

func (m *AlarmIndication) GetOnuSignalDegradeInd() *OnuSignalDegradeIndication {
	if x, ok := m.GetData().(*AlarmIndication_OnuSignalDegradeInd); ok {
		return x.OnuSignalDegradeInd
	}
	return nil
}

func (m *AlarmIndication) GetOnuDriftOfWindowInd() *OnuDriftOfWindowIndication {
	if x, ok := m.GetData().(*AlarmIndication_OnuDriftOfWindowInd); ok {
		return x.OnuDriftOfWindowInd
	}
	return nil
}

func (m *AlarmIndication) GetOnuLossOmciInd() *OnuLossOfOmciChannelIndication {
	if x, ok := m.GetData().(*AlarmIndication_OnuLossOmciInd); ok {
		return x.OnuLossOmciInd
	}
	return nil
}

func (m *AlarmIndication) GetOnuSignalsFailInd() *OnuSignalsFailureIndication {
	if x, ok := m.GetData().(*AlarmIndication_OnuSignalsFailInd); ok {
		return x.OnuSignalsFailInd
	}
	return nil
}

func (m *AlarmIndication) GetOnuTiwiInd() *OnuTransmissionInterferenceWarning {
	if x, ok := m.GetData().(*AlarmIndication_OnuTiwiInd); ok {
		return x.OnuTiwiInd
	}
	return nil
}

func (m *AlarmIndication) GetOnuActivationFailInd() *OnuActivationFailureIndication {
	if x, ok := m.GetData().(*AlarmIndication_OnuActivationFailInd); ok {
		return x.OnuActivationFailInd
	}
	return nil
}

func (m *AlarmIndication) GetOnuProcessingErrorInd() *OnuProcessingErrorIndication {
	if x, ok := m.GetData().(*AlarmIndication_OnuProcessingErrorInd); ok {
		return x.OnuProcessingErrorInd
	}
	return nil
}

func (m *AlarmIndication) GetOnuLossOfSyncFailInd() *OnuLossOfKeySyncFailureIndication {
	if x, ok := m.GetData().(*AlarmIndication_OnuLossOfSyncFailInd); ok {
		return x.OnuLossOfSyncFailInd
	}
	return nil
}

func (m *AlarmIndication) GetOnuItuPonStatsInd() *OnuItuPonStatsIndication {
	if x, ok := m.GetData().(*AlarmIndication_OnuItuPonStatsInd); ok {
		return x.OnuItuPonStatsInd
	}
	return nil
}

func (m *AlarmIndication) GetOnuDeactivationFailureInd() *OnuDeactivationFailureIndication {
	if x, ok := m.GetData().(*AlarmIndication_OnuDeactivationFailureInd); ok {
		return x.OnuDeactivationFailureInd
	}
	return nil
}

func (m *AlarmIndication) GetOnuRemoteDefectInd() *OnuRemoteDefectIndication {
	if x, ok := m.GetData().(*AlarmIndication_OnuRemoteDefectInd); ok {
		return x.OnuRemoteDefectInd
	}
	return nil
}

func (m *AlarmIndication) GetOnuLossGemDelineationInd() *OnuLossOfGEMChannelDelineationIndication {
	if x, ok := m.GetData().(*AlarmIndication_OnuLossGemDelineationInd); ok {
		return x.OnuLossGemDelineationInd
	}
	return nil
}

func (m *AlarmIndication) GetOnuPhysicalEquipmentErrorInd() *OnuPhysicalEquipmentErrorIndication {
	if x, ok := m.GetData().(*AlarmIndication_OnuPhysicalEquipmentErrorInd); ok {
		return x.OnuPhysicalEquipmentErrorInd
	}
	return nil
}

func (m *AlarmIndication) GetOnuLossOfAckInd() *OnuLossOfAcknowledgementIndication {
	if x, ok := m.GetData().(*AlarmIndication_OnuLossOfAckInd); ok {
		return x.OnuLossOfAckInd
	}
	return nil
}

func (m *AlarmIndication) GetOnuDiffReachExceededInd() *OnuDifferentialReachExceededIndication {
	if x, ok := m.GetData().(*AlarmIndication_OnuDiffReachExceededInd); ok {
		return x.OnuDiffReachExceededInd
	}
	return nil
}

// XXX_OneofWrappers is for the internal use of the proto package.
func (*AlarmIndication) XXX_OneofWrappers() []interface{} {
	return []interface{}{
		(*AlarmIndication_LosInd)(nil),
		(*AlarmIndication_DyingGaspInd)(nil),
		(*AlarmIndication_OnuAlarmInd)(nil),
		(*AlarmIndication_OnuStartupFailInd)(nil),
		(*AlarmIndication_OnuSignalDegradeInd)(nil),
		(*AlarmIndication_OnuDriftOfWindowInd)(nil),
		(*AlarmIndication_OnuLossOmciInd)(nil),
		(*AlarmIndication_OnuSignalsFailInd)(nil),
		(*AlarmIndication_OnuTiwiInd)(nil),
		(*AlarmIndication_OnuActivationFailInd)(nil),
		(*AlarmIndication_OnuProcessingErrorInd)(nil),
		(*AlarmIndication_OnuLossOfSyncFailInd)(nil),
		(*AlarmIndication_OnuItuPonStatsInd)(nil),
		(*AlarmIndication_OnuDeactivationFailureInd)(nil),
		(*AlarmIndication_OnuRemoteDefectInd)(nil),
		(*AlarmIndication_OnuLossGemDelineationInd)(nil),
		(*AlarmIndication_OnuPhysicalEquipmentErrorInd)(nil),
		(*AlarmIndication_OnuLossOfAckInd)(nil),
		(*AlarmIndication_OnuDiffReachExceededInd)(nil),
	}
}

type OltIndication struct {
	OperState            string   `protobuf:"bytes,1,opt,name=oper_state,json=operState,proto3" json:"oper_state,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_OltIndication proto.InternalMessageInfo

func (m *OltIndication) GetOperState() string {
	if m != nil {
		return m.OperState
	}
	return ""
}

type IntfIndication struct {
	IntfId               uint32   `protobuf:"fixed32,1,opt,name=intf_id,json=intfId,proto3" json:"intf_id,omitempty"`
	OperState            string   `protobuf:"bytes,2,opt,name=oper_state,json=operState,proto3" json:"oper_state,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_IntfIndication proto.InternalMessageInfo

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

func (m *IntfIndication) GetOperState() string {
	if m != nil {
		return m.OperState
	}
	return ""
}

type OnuDiscIndication struct {
	IntfId               uint32        `protobuf:"fixed32,1,opt,name=intf_id,json=intfId,proto3" json:"intf_id,omitempty"`
	SerialNumber         *SerialNumber `protobuf:"bytes,2,opt,name=serial_number,json=serialNumber,proto3" json:"serial_number,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

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

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

var xxx_messageInfo_OnuDiscIndication proto.InternalMessageInfo

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

func (m *OnuDiscIndication) GetSerialNumber() *SerialNumber {
	if m != nil {
		return m.SerialNumber
	}
	return nil
}

type OnuIndication 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"`
	OperState            string                             `protobuf:"bytes,3,opt,name=oper_state,json=operState,proto3" json:"oper_state,omitempty"`
	AdminState           string                             `protobuf:"bytes,5,opt,name=admin_state,json=adminState,proto3" json:"admin_state,omitempty"`
	SerialNumber         *SerialNumber                      `protobuf:"bytes,4,opt,name=serial_number,json=serialNumber,proto3" json:"serial_number,omitempty"`
	FailReason           OnuIndication_ActivationFailReason `protobuf:"varint,6,opt,name=fail_reason,json=failReason,proto3,enum=openolt.OnuIndication_ActivationFailReason" json:"fail_reason,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                           `json:"-"`
	XXX_unrecognized     []byte                             `json:"-"`
	XXX_sizecache        int32                              `json:"-"`
}

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

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

var xxx_messageInfo_OnuIndication proto.InternalMessageInfo

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

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

func (m *OnuIndication) GetOperState() string {
	if m != nil {
		return m.OperState
	}
	return ""
}

func (m *OnuIndication) GetAdminState() string {
	if m != nil {
		return m.AdminState
	}
	return ""
}

func (m *OnuIndication) GetSerialNumber() *SerialNumber {
	if m != nil {
		return m.SerialNumber
	}
	return nil
}

func (m *OnuIndication) GetFailReason() OnuIndication_ActivationFailReason {
	if m != nil {
		return m.FailReason
	}
	return OnuIndication_ONU_ACTIVATION_FAIL_REASON_NONE
}

type IntfOperIndication struct {
	Type                 string   `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	IntfId               uint32   `protobuf:"fixed32,2,opt,name=intf_id,json=intfId,proto3" json:"intf_id,omitempty"`
	OperState            string   `protobuf:"bytes,3,opt,name=oper_state,json=operState,proto3" json:"oper_state,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_IntfOperIndication proto.InternalMessageInfo

func (m *IntfOperIndication) GetType() string {
	if m != nil {
		return m.Type
	}
	return ""
}

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

func (m *IntfOperIndication) GetOperState() string {
	if m != nil {
		return m.OperState
	}
	return ""
}

type OmciIndication 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"`
	Pkt                  []byte   `protobuf:"bytes,3,opt,name=pkt,proto3" json:"pkt,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_OmciIndication proto.InternalMessageInfo

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

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

func (m *OmciIndication) GetPkt() []byte {
	if m != nil {
		return m.Pkt
	}
	return nil
}

type PacketIndication struct {
	IntfType             string   `protobuf:"bytes,5,opt,name=intf_type,json=intfType,proto3" json:"intf_type,omitempty"`
	IntfId               uint32   `protobuf:"fixed32,1,opt,name=intf_id,json=intfId,proto3" json:"intf_id,omitempty"`
	GemportId            uint32   `protobuf:"fixed32,2,opt,name=gemport_id,json=gemportId,proto3" json:"gemport_id,omitempty"`
	FlowId               uint32   `protobuf:"fixed32,3,opt,name=flow_id,json=flowId,proto3" json:"flow_id,omitempty"`
	PortNo               uint32   `protobuf:"fixed32,6,opt,name=port_no,json=portNo,proto3" json:"port_no,omitempty"`
	Cookie               uint64   `protobuf:"fixed64,7,opt,name=cookie,proto3" json:"cookie,omitempty"`
	Pkt                  []byte   `protobuf:"bytes,4,opt,name=pkt,proto3" json:"pkt,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_PacketIndication proto.InternalMessageInfo

func (m *PacketIndication) GetIntfType() string {
	if m != nil {
		return m.IntfType
	}
	return ""
}

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

func (m *PacketIndication) GetGemportId() uint32 {
	if m != nil {
		return m.GemportId
	}
	return 0
}

func (m *PacketIndication) GetFlowId() uint32 {
	if m != nil {
		return m.FlowId
	}
	return 0
}

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

func (m *PacketIndication) GetCookie() uint64 {
	if m != nil {
		return m.Cookie
	}
	return 0
}

func (m *PacketIndication) GetPkt() []byte {
	if m != nil {
		return m.Pkt
	}
	return nil
}

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

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

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

var xxx_messageInfo_Interface proto.InternalMessageInfo

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

type Heartbeat struct {
	HeartbeatSignature   uint32   `protobuf:"fixed32,1,opt,name=heartbeat_signature,json=heartbeatSignature,proto3" json:"heartbeat_signature,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_Heartbeat proto.InternalMessageInfo

func (m *Heartbeat) GetHeartbeatSignature() uint32 {
	if m != nil {
		return m.HeartbeatSignature
	}
	return 0
}

type Onu 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"`
	SerialNumber         *SerialNumber `protobuf:"bytes,3,opt,name=serial_number,json=serialNumber,proto3" json:"serial_number,omitempty"`
	Pir                  uint32        `protobuf:"fixed32,4,opt,name=pir,proto3" json:"pir,omitempty"`
	OmccEncryption       bool          `protobuf:"varint,5,opt,name=omcc_encryption,json=omccEncryption,proto3" json:"omcc_encryption,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

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

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

var xxx_messageInfo_Onu proto.InternalMessageInfo

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

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

func (m *Onu) GetSerialNumber() *SerialNumber {
	if m != nil {
		return m.SerialNumber
	}
	return nil
}

func (m *Onu) GetPir() uint32 {
	if m != nil {
		return m.Pir
	}
	return 0
}

func (m *Onu) GetOmccEncryption() bool {
	if m != nil {
		return m.OmccEncryption
	}
	return false
}

type OnuLogicalDistance 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"`
	LogicalOnuDistanceZero uint32   `protobuf:"fixed32,3,opt,name=logical_onu_distance_zero,json=logicalOnuDistanceZero,proto3" json:"logical_onu_distance_zero,omitempty"`
	LogicalOnuDistance     uint32   `protobuf:"fixed32,4,opt,name=logical_onu_distance,json=logicalOnuDistance,proto3" json:"logical_onu_distance,omitempty"`
	XXX_NoUnkeyedLiteral   struct{} `json:"-"`
	XXX_unrecognized       []byte   `json:"-"`
	XXX_sizecache          int32    `json:"-"`
}

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

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

var xxx_messageInfo_OnuLogicalDistance proto.InternalMessageInfo

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

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

func (m *OnuLogicalDistance) GetLogicalOnuDistanceZero() uint32 {
	if m != nil {
		return m.LogicalOnuDistanceZero
	}
	return 0
}

func (m *OnuLogicalDistance) GetLogicalOnuDistance() uint32 {
	if m != nil {
		return m.LogicalOnuDistance
	}
	return 0
}

type OmciMsg 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"`
	Pkt                  []byte   `protobuf:"bytes,3,opt,name=pkt,proto3" json:"pkt,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_OmciMsg proto.InternalMessageInfo

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

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

func (m *OmciMsg) GetPkt() []byte {
	if m != nil {
		return m.Pkt
	}
	return nil
}

type OnuPacket 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"`
	PortNo               uint32   `protobuf:"fixed32,4,opt,name=port_no,json=portNo,proto3" json:"port_no,omitempty"`
	GemportId            uint32   `protobuf:"fixed32,5,opt,name=gemport_id,json=gemportId,proto3" json:"gemport_id,omitempty"`
	Pkt                  []byte   `protobuf:"bytes,3,opt,name=pkt,proto3" json:"pkt,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_OnuPacket proto.InternalMessageInfo

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

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

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

func (m *OnuPacket) GetGemportId() uint32 {
	if m != nil {
		return m.GemportId
	}
	return 0
}

func (m *OnuPacket) GetPkt() []byte {
	if m != nil {
		return m.Pkt
	}
	return nil
}

type UplinkPacket struct {
	IntfId               uint32   `protobuf:"fixed32,1,opt,name=intf_id,json=intfId,proto3" json:"intf_id,omitempty"`
	Pkt                  []byte   `protobuf:"bytes,2,opt,name=pkt,proto3" json:"pkt,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_UplinkPacket proto.InternalMessageInfo

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

func (m *UplinkPacket) GetPkt() []byte {
	if m != nil {
		return m.Pkt
	}
	return nil
}

type DeviceInfo struct {
	Vendor             string `protobuf:"bytes,1,opt,name=vendor,proto3" json:"vendor,omitempty"`
	Model              string `protobuf:"bytes,2,opt,name=model,proto3" json:"model,omitempty"`
	HardwareVersion    string `protobuf:"bytes,3,opt,name=hardware_version,json=hardwareVersion,proto3" json:"hardware_version,omitempty"`
	FirmwareVersion    string `protobuf:"bytes,4,opt,name=firmware_version,json=firmwareVersion,proto3" json:"firmware_version,omitempty"`
	DeviceId           string `protobuf:"bytes,16,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
	DeviceSerialNumber string `protobuf:"bytes,17,opt,name=device_serial_number,json=deviceSerialNumber,proto3" json:"device_serial_number,omitempty"`
	// Total number of pon intf ports on the device
	PonPorts uint32 `protobuf:"fixed32,12,opt,name=pon_ports,json=ponPorts,proto3" json:"pon_ports,omitempty"`
	// If using global per-device technology profile. To be deprecated
	Technology           string                             `protobuf:"bytes,5,opt,name=technology,proto3" json:"technology,omitempty"`
	OnuIdStart           uint32                             `protobuf:"fixed32,6,opt,name=onu_id_start,json=onuIdStart,proto3" json:"onu_id_start,omitempty"`
	OnuIdEnd             uint32                             `protobuf:"fixed32,7,opt,name=onu_id_end,json=onuIdEnd,proto3" json:"onu_id_end,omitempty"`
	AllocIdStart         uint32                             `protobuf:"fixed32,8,opt,name=alloc_id_start,json=allocIdStart,proto3" json:"alloc_id_start,omitempty"`
	AllocIdEnd           uint32                             `protobuf:"fixed32,9,opt,name=alloc_id_end,json=allocIdEnd,proto3" json:"alloc_id_end,omitempty"`
	GemportIdStart       uint32                             `protobuf:"fixed32,10,opt,name=gemport_id_start,json=gemportIdStart,proto3" json:"gemport_id_start,omitempty"`
	GemportIdEnd         uint32                             `protobuf:"fixed32,11,opt,name=gemport_id_end,json=gemportIdEnd,proto3" json:"gemport_id_end,omitempty"`
	FlowIdStart          uint32                             `protobuf:"fixed32,13,opt,name=flow_id_start,json=flowIdStart,proto3" json:"flow_id_start,omitempty"`
	FlowIdEnd            uint32                             `protobuf:"fixed32,14,opt,name=flow_id_end,json=flowIdEnd,proto3" json:"flow_id_end,omitempty"`
	Ranges               []*DeviceInfo_DeviceResourceRanges `protobuf:"bytes,15,rep,name=ranges,proto3" json:"ranges,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                           `json:"-"`
	XXX_unrecognized     []byte                             `json:"-"`
	XXX_sizecache        int32                              `json:"-"`
}

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

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

var xxx_messageInfo_DeviceInfo proto.InternalMessageInfo

func (m *DeviceInfo) GetVendor() string {
	if m != nil {
		return m.Vendor
	}
	return ""
}

func (m *DeviceInfo) GetModel() string {
	if m != nil {
		return m.Model
	}
	return ""
}

func (m *DeviceInfo) GetHardwareVersion() string {
	if m != nil {
		return m.HardwareVersion
	}
	return ""
}

func (m *DeviceInfo) GetFirmwareVersion() string {
	if m != nil {
		return m.FirmwareVersion
	}
	return ""
}

func (m *DeviceInfo) GetDeviceId() string {
	if m != nil {
		return m.DeviceId
	}
	return ""
}

func (m *DeviceInfo) GetDeviceSerialNumber() string {
	if m != nil {
		return m.DeviceSerialNumber
	}
	return ""
}

func (m *DeviceInfo) GetPonPorts() uint32 {
	if m != nil {
		return m.PonPorts
	}
	return 0
}

func (m *DeviceInfo) GetTechnology() string {
	if m != nil {
		return m.Technology
	}
	return ""
}

func (m *DeviceInfo) GetOnuIdStart() uint32 {
	if m != nil {
		return m.OnuIdStart
	}
	return 0
}

func (m *DeviceInfo) GetOnuIdEnd() uint32 {
	if m != nil {
		return m.OnuIdEnd
	}
	return 0
}

func (m *DeviceInfo) GetAllocIdStart() uint32 {
	if m != nil {
		return m.AllocIdStart
	}
	return 0
}

func (m *DeviceInfo) GetAllocIdEnd() uint32 {
	if m != nil {
		return m.AllocIdEnd
	}
	return 0
}

func (m *DeviceInfo) GetGemportIdStart() uint32 {
	if m != nil {
		return m.GemportIdStart
	}
	return 0
}

func (m *DeviceInfo) GetGemportIdEnd() uint32 {
	if m != nil {
		return m.GemportIdEnd
	}
	return 0
}

func (m *DeviceInfo) GetFlowIdStart() uint32 {
	if m != nil {
		return m.FlowIdStart
	}
	return 0
}

func (m *DeviceInfo) GetFlowIdEnd() uint32 {
	if m != nil {
		return m.FlowIdEnd
	}
	return 0
}

func (m *DeviceInfo) GetRanges() []*DeviceInfo_DeviceResourceRanges {
	if m != nil {
		return m.Ranges
	}
	return nil
}

type DeviceInfo_DeviceResourceRanges struct {
	// List of 0 or more intf_ids that use the same technology and pools.
	// If 0 intf_ids supplied, it implies ALL interfaces
	IntfIds []uint32 `protobuf:"fixed32,1,rep,packed,name=intf_ids,json=intfIds,proto3" json:"intf_ids,omitempty"`
	// Technology profile for this pool
	Technology           string                                  `protobuf:"bytes,2,opt,name=technology,proto3" json:"technology,omitempty"`
	Pools                []*DeviceInfo_DeviceResourceRanges_Pool `protobuf:"bytes,3,rep,name=pools,proto3" json:"pools,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                                `json:"-"`
	XXX_unrecognized     []byte                                  `json:"-"`
	XXX_sizecache        int32                                   `json:"-"`
}

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

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

var xxx_messageInfo_DeviceInfo_DeviceResourceRanges proto.InternalMessageInfo

func (m *DeviceInfo_DeviceResourceRanges) GetIntfIds() []uint32 {
	if m != nil {
		return m.IntfIds
	}
	return nil
}

func (m *DeviceInfo_DeviceResourceRanges) GetTechnology() string {
	if m != nil {
		return m.Technology
	}
	return ""
}

func (m *DeviceInfo_DeviceResourceRanges) GetPools() []*DeviceInfo_DeviceResourceRanges_Pool {
	if m != nil {
		return m.Pools
	}
	return nil
}

type DeviceInfo_DeviceResourceRanges_Pool struct {
	Type                 DeviceInfo_DeviceResourceRanges_Pool_PoolType    `protobuf:"varint,1,opt,name=type,proto3,enum=openolt.DeviceInfo_DeviceResourceRanges_Pool_PoolType" json:"type,omitempty"`
	Sharing              DeviceInfo_DeviceResourceRanges_Pool_SharingType `protobuf:"varint,2,opt,name=sharing,proto3,enum=openolt.DeviceInfo_DeviceResourceRanges_Pool_SharingType" json:"sharing,omitempty"`
	Start                uint32                                           `protobuf:"fixed32,3,opt,name=start,proto3" json:"start,omitempty"`
	End                  uint32                                           `protobuf:"fixed32,4,opt,name=end,proto3" json:"end,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                                         `json:"-"`
	XXX_unrecognized     []byte                                           `json:"-"`
	XXX_sizecache        int32                                            `json:"-"`
}

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

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

var xxx_messageInfo_DeviceInfo_DeviceResourceRanges_Pool proto.InternalMessageInfo

func (m *DeviceInfo_DeviceResourceRanges_Pool) GetType() DeviceInfo_DeviceResourceRanges_Pool_PoolType {
	if m != nil {
		return m.Type
	}
	return DeviceInfo_DeviceResourceRanges_Pool_ONU_ID
}

func (m *DeviceInfo_DeviceResourceRanges_Pool) GetSharing() DeviceInfo_DeviceResourceRanges_Pool_SharingType {
	if m != nil {
		return m.Sharing
	}
	return DeviceInfo_DeviceResourceRanges_Pool_DEDICATED_PER_INTF
}

func (m *DeviceInfo_DeviceResourceRanges_Pool) GetStart() uint32 {
	if m != nil {
		return m.Start
	}
	return 0
}

func (m *DeviceInfo_DeviceResourceRanges_Pool) GetEnd() uint32 {
	if m != nil {
		return m.End
	}
	return 0
}

type Classifier struct {
	OTpid                uint32   `protobuf:"fixed32,1,opt,name=o_tpid,json=oTpid,proto3" json:"o_tpid,omitempty"`
	OVid                 uint32   `protobuf:"fixed32,2,opt,name=o_vid,json=oVid,proto3" json:"o_vid,omitempty"`
	ITpid                uint32   `protobuf:"fixed32,3,opt,name=i_tpid,json=iTpid,proto3" json:"i_tpid,omitempty"`
	IVid                 uint32   `protobuf:"fixed32,4,opt,name=i_vid,json=iVid,proto3" json:"i_vid,omitempty"`
	OPbits               uint32   `protobuf:"fixed32,5,opt,name=o_pbits,json=oPbits,proto3" json:"o_pbits,omitempty"`
	IPbits               uint32   `protobuf:"fixed32,6,opt,name=i_pbits,json=iPbits,proto3" json:"i_pbits,omitempty"`
	EthType              uint32   `protobuf:"fixed32,7,opt,name=eth_type,json=ethType,proto3" json:"eth_type,omitempty"`
	DstMac               []byte   `protobuf:"bytes,8,opt,name=dst_mac,json=dstMac,proto3" json:"dst_mac,omitempty"`
	SrcMac               []byte   `protobuf:"bytes,9,opt,name=src_mac,json=srcMac,proto3" json:"src_mac,omitempty"`
	IpProto              uint32   `protobuf:"fixed32,10,opt,name=ip_proto,json=ipProto,proto3" json:"ip_proto,omitempty"`
	DstIp                uint32   `protobuf:"fixed32,11,opt,name=dst_ip,json=dstIp,proto3" json:"dst_ip,omitempty"`
	SrcIp                uint32   `protobuf:"fixed32,12,opt,name=src_ip,json=srcIp,proto3" json:"src_ip,omitempty"`
	SrcPort              uint32   `protobuf:"fixed32,13,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"`
	DstPort              uint32   `protobuf:"fixed32,14,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"`
	PktTagType           string   `protobuf:"bytes,15,opt,name=pkt_tag_type,json=pktTagType,proto3" json:"pkt_tag_type,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_Classifier proto.InternalMessageInfo

func (m *Classifier) GetOTpid() uint32 {
	if m != nil {
		return m.OTpid
	}
	return 0
}

func (m *Classifier) GetOVid() uint32 {
	if m != nil {
		return m.OVid
	}
	return 0
}

func (m *Classifier) GetITpid() uint32 {
	if m != nil {
		return m.ITpid
	}
	return 0
}

func (m *Classifier) GetIVid() uint32 {
	if m != nil {
		return m.IVid
	}
	return 0
}

func (m *Classifier) GetOPbits() uint32 {
	if m != nil {
		return m.OPbits
	}
	return 0
}

func (m *Classifier) GetIPbits() uint32 {
	if m != nil {
		return m.IPbits
	}
	return 0
}

func (m *Classifier) GetEthType() uint32 {
	if m != nil {
		return m.EthType
	}
	return 0
}

func (m *Classifier) GetDstMac() []byte {
	if m != nil {
		return m.DstMac
	}
	return nil
}

func (m *Classifier) GetSrcMac() []byte {
	if m != nil {
		return m.SrcMac
	}
	return nil
}

func (m *Classifier) GetIpProto() uint32 {
	if m != nil {
		return m.IpProto
	}
	return 0
}

func (m *Classifier) GetDstIp() uint32 {
	if m != nil {
		return m.DstIp
	}
	return 0
}

func (m *Classifier) GetSrcIp() uint32 {
	if m != nil {
		return m.SrcIp
	}
	return 0
}

func (m *Classifier) GetSrcPort() uint32 {
	if m != nil {
		return m.SrcPort
	}
	return 0
}

func (m *Classifier) GetDstPort() uint32 {
	if m != nil {
		return m.DstPort
	}
	return 0
}

func (m *Classifier) GetPktTagType() string {
	if m != nil {
		return m.PktTagType
	}
	return ""
}

type ActionCmd struct {
	AddOuterTag          bool     `protobuf:"varint,1,opt,name=add_outer_tag,json=addOuterTag,proto3" json:"add_outer_tag,omitempty"`
	RemoveOuterTag       bool     `protobuf:"varint,2,opt,name=remove_outer_tag,json=removeOuterTag,proto3" json:"remove_outer_tag,omitempty"`
	TrapToHost           bool     `protobuf:"varint,3,opt,name=trap_to_host,json=trapToHost,proto3" json:"trap_to_host,omitempty"`
	RemarkOuterPbits     bool     `protobuf:"varint,4,opt,name=remark_outer_pbits,json=remarkOuterPbits,proto3" json:"remark_outer_pbits,omitempty"`
	RemarkInnerPbits     bool     `protobuf:"varint,5,opt,name=remark_inner_pbits,json=remarkInnerPbits,proto3" json:"remark_inner_pbits,omitempty"`
	AddInnerTag          bool     `protobuf:"varint,6,opt,name=add_inner_tag,json=addInnerTag,proto3" json:"add_inner_tag,omitempty"`
	RemoveInnerTag       bool     `protobuf:"varint,7,opt,name=remove_inner_tag,json=removeInnerTag,proto3" json:"remove_inner_tag,omitempty"`
	TranslateInnerTag    bool     `protobuf:"varint,8,opt,name=translate_inner_tag,json=translateInnerTag,proto3" json:"translate_inner_tag,omitempty"`
	TranslateOuterTag    bool     `protobuf:"varint,9,opt,name=translate_outer_tag,json=translateOuterTag,proto3" json:"translate_outer_tag,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_ActionCmd proto.InternalMessageInfo

func (m *ActionCmd) GetAddOuterTag() bool {
	if m != nil {
		return m.AddOuterTag
	}
	return false
}

func (m *ActionCmd) GetRemoveOuterTag() bool {
	if m != nil {
		return m.RemoveOuterTag
	}
	return false
}

func (m *ActionCmd) GetTrapToHost() bool {
	if m != nil {
		return m.TrapToHost
	}
	return false
}

func (m *ActionCmd) GetRemarkOuterPbits() bool {
	if m != nil {
		return m.RemarkOuterPbits
	}
	return false
}

func (m *ActionCmd) GetRemarkInnerPbits() bool {
	if m != nil {
		return m.RemarkInnerPbits
	}
	return false
}

func (m *ActionCmd) GetAddInnerTag() bool {
	if m != nil {
		return m.AddInnerTag
	}
	return false
}

func (m *ActionCmd) GetRemoveInnerTag() bool {
	if m != nil {
		return m.RemoveInnerTag
	}
	return false
}

func (m *ActionCmd) GetTranslateInnerTag() bool {
	if m != nil {
		return m.TranslateInnerTag
	}
	return false
}

func (m *ActionCmd) GetTranslateOuterTag() bool {
	if m != nil {
		return m.TranslateOuterTag
	}
	return false
}

type Action struct {
	Cmd                  *ActionCmd `protobuf:"bytes,1,opt,name=cmd,proto3" json:"cmd,omitempty"`
	OVid                 uint32     `protobuf:"fixed32,2,opt,name=o_vid,json=oVid,proto3" json:"o_vid,omitempty"`
	OPbits               uint32     `protobuf:"fixed32,3,opt,name=o_pbits,json=oPbits,proto3" json:"o_pbits,omitempty"`
	OTpid                uint32     `protobuf:"fixed32,4,opt,name=o_tpid,json=oTpid,proto3" json:"o_tpid,omitempty"`
	IVid                 uint32     `protobuf:"fixed32,5,opt,name=i_vid,json=iVid,proto3" json:"i_vid,omitempty"`
	IPbits               uint32     `protobuf:"fixed32,6,opt,name=i_pbits,json=iPbits,proto3" json:"i_pbits,omitempty"`
	ITpid                uint32     `protobuf:"fixed32,7,opt,name=i_tpid,json=iTpid,proto3" json:"i_tpid,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

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

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

var xxx_messageInfo_Action proto.InternalMessageInfo

func (m *Action) GetCmd() *ActionCmd {
	if m != nil {
		return m.Cmd
	}
	return nil
}

func (m *Action) GetOVid() uint32 {
	if m != nil {
		return m.OVid
	}
	return 0
}

func (m *Action) GetOPbits() uint32 {
	if m != nil {
		return m.OPbits
	}
	return 0
}

func (m *Action) GetOTpid() uint32 {
	if m != nil {
		return m.OTpid
	}
	return 0
}

func (m *Action) GetIVid() uint32 {
	if m != nil {
		return m.IVid
	}
	return 0
}

func (m *Action) GetIPbits() uint32 {
	if m != nil {
		return m.IPbits
	}
	return 0
}

func (m *Action) GetITpid() uint32 {
	if m != nil {
		return m.ITpid
	}
	return 0
}

type Flow struct {
	AccessIntfId         int32             `protobuf:"fixed32,1,opt,name=access_intf_id,json=accessIntfId,proto3" json:"access_intf_id,omitempty"`
	OnuId                int32             `protobuf:"fixed32,2,opt,name=onu_id,json=onuId,proto3" json:"onu_id,omitempty"`
	UniId                int32             `protobuf:"fixed32,11,opt,name=uni_id,json=uniId,proto3" json:"uni_id,omitempty"`
	FlowId               uint64            `protobuf:"fixed64,3,opt,name=flow_id,json=flowId,proto3" json:"flow_id,omitempty"`
	SymmetricFlowId      uint64            `protobuf:"fixed64,18,opt,name=symmetric_flow_id,json=symmetricFlowId,proto3" json:"symmetric_flow_id,omitempty"`
	FlowType             string            `protobuf:"bytes,4,opt,name=flow_type,json=flowType,proto3" json:"flow_type,omitempty"`
	AllocId              int32             `protobuf:"fixed32,10,opt,name=alloc_id,json=allocId,proto3" json:"alloc_id,omitempty"`
	NetworkIntfId        int32             `protobuf:"fixed32,5,opt,name=network_intf_id,json=networkIntfId,proto3" json:"network_intf_id,omitempty"`
	GemportId            int32             `protobuf:"fixed32,6,opt,name=gemport_id,json=gemportId,proto3" json:"gemport_id,omitempty"`
	Classifier           *Classifier       `protobuf:"bytes,7,opt,name=classifier,proto3" json:"classifier,omitempty"`
	Action               *Action           `protobuf:"bytes,8,opt,name=action,proto3" json:"action,omitempty"`
	Priority             int32             `protobuf:"fixed32,9,opt,name=priority,proto3" json:"priority,omitempty"`
	Cookie               uint64            `protobuf:"fixed64,12,opt,name=cookie,proto3" json:"cookie,omitempty"`
	PortNo               uint32            `protobuf:"fixed32,13,opt,name=port_no,json=portNo,proto3" json:"port_no,omitempty"`
	GroupId              uint32            `protobuf:"fixed32,14,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	TechProfileId        uint32            `protobuf:"fixed32,15,opt,name=tech_profile_id,json=techProfileId,proto3" json:"tech_profile_id,omitempty"`
	ReplicateFlow        bool              `protobuf:"varint,16,opt,name=replicate_flow,json=replicateFlow,proto3" json:"replicate_flow,omitempty"`
	PbitToGemport        map[uint32]uint32 `protobuf:"bytes,17,rep,name=pbit_to_gemport,json=pbitToGemport,proto3" json:"pbit_to_gemport,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

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

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

var xxx_messageInfo_Flow proto.InternalMessageInfo

func (m *Flow) GetAccessIntfId() int32 {
	if m != nil {
		return m.AccessIntfId
	}
	return 0
}

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

func (m *Flow) GetUniId() int32 {
	if m != nil {
		return m.UniId
	}
	return 0
}

func (m *Flow) GetFlowId() uint64 {
	if m != nil {
		return m.FlowId
	}
	return 0
}

func (m *Flow) GetSymmetricFlowId() uint64 {
	if m != nil {
		return m.SymmetricFlowId
	}
	return 0
}

func (m *Flow) GetFlowType() string {
	if m != nil {
		return m.FlowType
	}
	return ""
}

func (m *Flow) GetAllocId() int32 {
	if m != nil {
		return m.AllocId
	}
	return 0
}

func (m *Flow) GetNetworkIntfId() int32 {
	if m != nil {
		return m.NetworkIntfId
	}
	return 0
}

func (m *Flow) GetGemportId() int32 {
	if m != nil {
		return m.GemportId
	}
	return 0
}

func (m *Flow) GetClassifier() *Classifier {
	if m != nil {
		return m.Classifier
	}
	return nil
}

func (m *Flow) GetAction() *Action {
	if m != nil {
		return m.Action
	}
	return nil
}

func (m *Flow) GetPriority() int32 {
	if m != nil {
		return m.Priority
	}
	return 0
}

func (m *Flow) GetCookie() uint64 {
	if m != nil {
		return m.Cookie
	}
	return 0
}

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

func (m *Flow) GetGroupId() uint32 {
	if m != nil {
		return m.GroupId
	}
	return 0
}

func (m *Flow) GetTechProfileId() uint32 {
	if m != nil {
		return m.TechProfileId
	}
	return 0
}

func (m *Flow) GetReplicateFlow() bool {
	if m != nil {
		return m.ReplicateFlow
	}
	return false
}

func (m *Flow) GetPbitToGemport() map[uint32]uint32 {
	if m != nil {
		return m.PbitToGemport
	}
	return nil
}

type SerialNumber struct {
	VendorId             []byte   `protobuf:"bytes,1,opt,name=vendor_id,json=vendorId,proto3" json:"vendor_id,omitempty"`
	VendorSpecific       []byte   `protobuf:"bytes,2,opt,name=vendor_specific,json=vendorSpecific,proto3" json:"vendor_specific,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_SerialNumber proto.InternalMessageInfo

func (m *SerialNumber) GetVendorId() []byte {
	if m != nil {
		return m.VendorId
	}
	return nil
}

func (m *SerialNumber) GetVendorSpecific() []byte {
	if m != nil {
		return m.VendorSpecific
	}
	return nil
}

type PortStatistics struct {
	IntfId               uint32   `protobuf:"fixed32,1,opt,name=intf_id,json=intfId,proto3" json:"intf_id,omitempty"`
	RxBytes              uint64   `protobuf:"fixed64,2,opt,name=rx_bytes,json=rxBytes,proto3" json:"rx_bytes,omitempty"`
	RxPackets            uint64   `protobuf:"fixed64,3,opt,name=rx_packets,json=rxPackets,proto3" json:"rx_packets,omitempty"`
	RxUcastPackets       uint64   `protobuf:"fixed64,4,opt,name=rx_ucast_packets,json=rxUcastPackets,proto3" json:"rx_ucast_packets,omitempty"`
	RxMcastPackets       uint64   `protobuf:"fixed64,5,opt,name=rx_mcast_packets,json=rxMcastPackets,proto3" json:"rx_mcast_packets,omitempty"`
	RxBcastPackets       uint64   `protobuf:"fixed64,6,opt,name=rx_bcast_packets,json=rxBcastPackets,proto3" json:"rx_bcast_packets,omitempty"`
	RxErrorPackets       uint64   `protobuf:"fixed64,7,opt,name=rx_error_packets,json=rxErrorPackets,proto3" json:"rx_error_packets,omitempty"`
	RxFrames             uint64   `protobuf:"fixed64,17,opt,name=rx_frames,json=rxFrames,proto3" json:"rx_frames,omitempty"`
	RxFrames_64          uint64   `protobuf:"fixed64,18,opt,name=rx_frames_64,json=rxFrames64,proto3" json:"rx_frames_64,omitempty"`
	RxFrames_65_127      uint64   `protobuf:"fixed64,19,opt,name=rx_frames_65_127,json=rxFrames65127,proto3" json:"rx_frames_65_127,omitempty"`
	RxFrames_128_255     uint64   `protobuf:"fixed64,20,opt,name=rx_frames_128_255,json=rxFrames128255,proto3" json:"rx_frames_128_255,omitempty"`
	RxFrames_256_511     uint64   `protobuf:"fixed64,21,opt,name=rx_frames_256_511,json=rxFrames256511,proto3" json:"rx_frames_256_511,omitempty"`
	RxFrames_512_1023    uint64   `protobuf:"fixed64,22,opt,name=rx_frames_512_1023,json=rxFrames5121023,proto3" json:"rx_frames_512_1023,omitempty"`
	RxFrames_1024_1518   uint64   `protobuf:"fixed64,23,opt,name=rx_frames_1024_1518,json=rxFrames10241518,proto3" json:"rx_frames_1024_1518,omitempty"`
	RxFrames_1519_2047   uint64   `protobuf:"fixed64,24,opt,name=rx_frames_1519_2047,json=rxFrames15192047,proto3" json:"rx_frames_1519_2047,omitempty"`
	RxFrames_2048_4095   uint64   `protobuf:"fixed64,25,opt,name=rx_frames_2048_4095,json=rxFrames20484095,proto3" json:"rx_frames_2048_4095,omitempty"`
	RxFrames_4096_9216   uint64   `protobuf:"fixed64,26,opt,name=rx_frames_4096_9216,json=rxFrames40969216,proto3" json:"rx_frames_4096_9216,omitempty"`
	RxFrames_9217_16383  uint64   `protobuf:"fixed64,27,opt,name=rx_frames_9217_16383,json=rxFrames921716383,proto3" json:"rx_frames_9217_16383,omitempty"`
	RxCrcErrors          uint64   `protobuf:"fixed64,14,opt,name=rx_crc_errors,json=rxCrcErrors,proto3" json:"rx_crc_errors,omitempty"`
	TxBytes              uint64   `protobuf:"fixed64,8,opt,name=tx_bytes,json=txBytes,proto3" json:"tx_bytes,omitempty"`
	TxPackets            uint64   `protobuf:"fixed64,9,opt,name=tx_packets,json=txPackets,proto3" json:"tx_packets,omitempty"`
	TxUcastPackets       uint64   `protobuf:"fixed64,10,opt,name=tx_ucast_packets,json=txUcastPackets,proto3" json:"tx_ucast_packets,omitempty"`
	TxMcastPackets       uint64   `protobuf:"fixed64,11,opt,name=tx_mcast_packets,json=txMcastPackets,proto3" json:"tx_mcast_packets,omitempty"`
	TxBcastPackets       uint64   `protobuf:"fixed64,12,opt,name=tx_bcast_packets,json=txBcastPackets,proto3" json:"tx_bcast_packets,omitempty"`
	TxErrorPackets       uint64   `protobuf:"fixed64,13,opt,name=tx_error_packets,json=txErrorPackets,proto3" json:"tx_error_packets,omitempty"`
	TxFrames             uint64   `protobuf:"fixed64,28,opt,name=tx_frames,json=txFrames,proto3" json:"tx_frames,omitempty"`
	TxFrames_64          uint64   `protobuf:"fixed64,29,opt,name=tx_frames_64,json=txFrames64,proto3" json:"tx_frames_64,omitempty"`
	TxFrames_65_127      uint64   `protobuf:"fixed64,30,opt,name=tx_frames_65_127,json=txFrames65127,proto3" json:"tx_frames_65_127,omitempty"`
	TxFrames_128_255     uint64   `protobuf:"fixed64,31,opt,name=tx_frames_128_255,json=txFrames128255,proto3" json:"tx_frames_128_255,omitempty"`
	TxFrames_256_511     uint64   `protobuf:"fixed64,32,opt,name=tx_frames_256_511,json=txFrames256511,proto3" json:"tx_frames_256_511,omitempty"`
	TxFrames_512_1023    uint64   `protobuf:"fixed64,33,opt,name=tx_frames_512_1023,json=txFrames5121023,proto3" json:"tx_frames_512_1023,omitempty"`
	TxFrames_1024_1518   uint64   `protobuf:"fixed64,34,opt,name=tx_frames_1024_1518,json=txFrames10241518,proto3" json:"tx_frames_1024_1518,omitempty"`
	TxFrames_1519_2047   uint64   `protobuf:"fixed64,35,opt,name=tx_frames_1519_2047,json=txFrames15192047,proto3" json:"tx_frames_1519_2047,omitempty"`
	TxFrames_2048_4095   uint64   `protobuf:"fixed64,36,opt,name=tx_frames_2048_4095,json=txFrames20484095,proto3" json:"tx_frames_2048_4095,omitempty"`
	TxFrames_4096_9216   uint64   `protobuf:"fixed64,37,opt,name=tx_frames_4096_9216,json=txFrames40969216,proto3" json:"tx_frames_4096_9216,omitempty"`
	TxFrames_9217_16383  uint64   `protobuf:"fixed64,38,opt,name=tx_frames_9217_16383,json=txFrames921716383,proto3" json:"tx_frames_9217_16383,omitempty"`
	BipErrors            uint64   `protobuf:"fixed64,15,opt,name=bip_errors,json=bipErrors,proto3" json:"bip_errors,omitempty"`
	Timestamp            uint32   `protobuf:"fixed32,16,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_PortStatistics proto.InternalMessageInfo

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

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

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

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

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

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

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

func (m *PortStatistics) GetRxFrames() uint64 {
	if m != nil {
		return m.RxFrames
	}
	return 0
}

func (m *PortStatistics) GetRxFrames_64() uint64 {
	if m != nil {
		return m.RxFrames_64
	}
	return 0
}

func (m *PortStatistics) GetRxFrames_65_127() uint64 {
	if m != nil {
		return m.RxFrames_65_127
	}
	return 0
}

func (m *PortStatistics) GetRxFrames_128_255() uint64 {
	if m != nil {
		return m.RxFrames_128_255
	}
	return 0
}

func (m *PortStatistics) GetRxFrames_256_511() uint64 {
	if m != nil {
		return m.RxFrames_256_511
	}
	return 0
}

func (m *PortStatistics) GetRxFrames_512_1023() uint64 {
	if m != nil {
		return m.RxFrames_512_1023
	}
	return 0
}

func (m *PortStatistics) GetRxFrames_1024_1518() uint64 {
	if m != nil {
		return m.RxFrames_1024_1518
	}
	return 0
}

func (m *PortStatistics) GetRxFrames_1519_2047() uint64 {
	if m != nil {
		return m.RxFrames_1519_2047
	}
	return 0
}

func (m *PortStatistics) GetRxFrames_2048_4095() uint64 {
	if m != nil {
		return m.RxFrames_2048_4095
	}
	return 0
}

func (m *PortStatistics) GetRxFrames_4096_9216() uint64 {
	if m != nil {
		return m.RxFrames_4096_9216
	}
	return 0
}

func (m *PortStatistics) GetRxFrames_9217_16383() uint64 {
	if m != nil {
		return m.RxFrames_9217_16383
	}
	return 0
}

func (m *PortStatistics) GetRxCrcErrors() uint64 {
	if m != nil {
		return m.RxCrcErrors
	}
	return 0
}

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

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

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

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

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

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

func (m *PortStatistics) GetTxFrames() uint64 {
	if m != nil {
		return m.TxFrames
	}
	return 0
}

func (m *PortStatistics) GetTxFrames_64() uint64 {
	if m != nil {
		return m.TxFrames_64
	}
	return 0
}

func (m *PortStatistics) GetTxFrames_65_127() uint64 {
	if m != nil {
		return m.TxFrames_65_127
	}
	return 0
}

func (m *PortStatistics) GetTxFrames_128_255() uint64 {
	if m != nil {
		return m.TxFrames_128_255
	}
	return 0
}

func (m *PortStatistics) GetTxFrames_256_511() uint64 {
	if m != nil {
		return m.TxFrames_256_511
	}
	return 0
}

func (m *PortStatistics) GetTxFrames_512_1023() uint64 {
	if m != nil {
		return m.TxFrames_512_1023
	}
	return 0
}

func (m *PortStatistics) GetTxFrames_1024_1518() uint64 {
	if m != nil {
		return m.TxFrames_1024_1518
	}
	return 0
}

func (m *PortStatistics) GetTxFrames_1519_2047() uint64 {
	if m != nil {
		return m.TxFrames_1519_2047
	}
	return 0
}

func (m *PortStatistics) GetTxFrames_2048_4095() uint64 {
	if m != nil {
		return m.TxFrames_2048_4095
	}
	return 0
}

func (m *PortStatistics) GetTxFrames_4096_9216() uint64 {
	if m != nil {
		return m.TxFrames_4096_9216
	}
	return 0
}

func (m *PortStatistics) GetTxFrames_9217_16383() uint64 {
	if m != nil {
		return m.TxFrames_9217_16383
	}
	return 0
}

func (m *PortStatistics) GetBipErrors() uint64 {
	if m != nil {
		return m.BipErrors
	}
	return 0
}

func (m *PortStatistics) GetTimestamp() uint32 {
	if m != nil {
		return m.Timestamp
	}
	return 0
}

type OnuStatistics 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"`
	PositiveDrift             uint64   `protobuf:"fixed64,3,opt,name=positive_drift,json=positiveDrift,proto3" json:"positive_drift,omitempty"`
	NegativeDrift             uint64   `protobuf:"fixed64,4,opt,name=negative_drift,json=negativeDrift,proto3" json:"negative_drift,omitempty"`
	DelimiterMissDetection    uint64   `protobuf:"fixed64,5,opt,name=delimiter_miss_detection,json=delimiterMissDetection,proto3" json:"delimiter_miss_detection,omitempty"`
	BipErrors                 uint64   `protobuf:"fixed64,6,opt,name=bip_errors,json=bipErrors,proto3" json:"bip_errors,omitempty"`
	BipUnits                  uint64   `protobuf:"fixed64,7,opt,name=bip_units,json=bipUnits,proto3" json:"bip_units,omitempty"`
	FecCorrectedSymbols       uint64   `protobuf:"fixed64,8,opt,name=fec_corrected_symbols,json=fecCorrectedSymbols,proto3" json:"fec_corrected_symbols,omitempty"`
	FecCodewordsCorrected     uint64   `protobuf:"fixed64,9,opt,name=fec_codewords_corrected,json=fecCodewordsCorrected,proto3" json:"fec_codewords_corrected,omitempty"`
	FecCodewordsUncorrectable uint64   `protobuf:"fixed64,10,opt,name=fec_codewords_uncorrectable,json=fecCodewordsUncorrectable,proto3" json:"fec_codewords_uncorrectable,omitempty"`
	FecCodewords              uint64   `protobuf:"fixed64,11,opt,name=fec_codewords,json=fecCodewords,proto3" json:"fec_codewords,omitempty"`
	FecCorrectedUnits         uint64   `protobuf:"fixed64,12,opt,name=fec_corrected_units,json=fecCorrectedUnits,proto3" json:"fec_corrected_units,omitempty"`
	XgemKeyErrors             uint64   `protobuf:"fixed64,13,opt,name=xgem_key_errors,json=xgemKeyErrors,proto3" json:"xgem_key_errors,omitempty"`
	XgemLoss                  uint64   `protobuf:"fixed64,14,opt,name=xgem_loss,json=xgemLoss,proto3" json:"xgem_loss,omitempty"`
	RxPloamsError             uint64   `protobuf:"fixed64,15,opt,name=rx_ploams_error,json=rxPloamsError,proto3" json:"rx_ploams_error,omitempty"`
	RxPloamsNonIdle           uint64   `protobuf:"fixed64,16,opt,name=rx_ploams_non_idle,json=rxPloamsNonIdle,proto3" json:"rx_ploams_non_idle,omitempty"`
	RxOmci                    uint64   `protobuf:"fixed64,17,opt,name=rx_omci,json=rxOmci,proto3" json:"rx_omci,omitempty"`
	RxOmciPacketsCrcError     uint64   `protobuf:"fixed64,18,opt,name=rx_omci_packets_crc_error,json=rxOmciPacketsCrcError,proto3" json:"rx_omci_packets_crc_error,omitempty"`
	RxBytes                   uint64   `protobuf:"fixed64,19,opt,name=rx_bytes,json=rxBytes,proto3" json:"rx_bytes,omitempty"`
	RxPackets                 uint64   `protobuf:"fixed64,20,opt,name=rx_packets,json=rxPackets,proto3" json:"rx_packets,omitempty"`
	TxBytes                   uint64   `protobuf:"fixed64,21,opt,name=tx_bytes,json=txBytes,proto3" json:"tx_bytes,omitempty"`
	TxPackets                 uint64   `protobuf:"fixed64,22,opt,name=tx_packets,json=txPackets,proto3" json:"tx_packets,omitempty"`
	BerReported               uint64   `protobuf:"fixed64,23,opt,name=ber_reported,json=berReported,proto3" json:"ber_reported,omitempty"`
	LcdgErrors                uint64   `protobuf:"fixed64,24,opt,name=lcdg_errors,json=lcdgErrors,proto3" json:"lcdg_errors,omitempty"`
	RdiErrors                 uint64   `protobuf:"fixed64,25,opt,name=rdi_errors,json=rdiErrors,proto3" json:"rdi_errors,omitempty"`
	Timestamp                 uint32   `protobuf:"fixed32,26,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	XXX_NoUnkeyedLiteral      struct{} `json:"-"`
	XXX_unrecognized          []byte   `json:"-"`
	XXX_sizecache             int32    `json:"-"`
}

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

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

var xxx_messageInfo_OnuStatistics proto.InternalMessageInfo

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

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

func (m *OnuStatistics) GetPositiveDrift() uint64 {
	if m != nil {
		return m.PositiveDrift
	}
	return 0
}

func (m *OnuStatistics) GetNegativeDrift() uint64 {
	if m != nil {
		return m.NegativeDrift
	}
	return 0
}

func (m *OnuStatistics) GetDelimiterMissDetection() uint64 {
	if m != nil {
		return m.DelimiterMissDetection
	}
	return 0
}

func (m *OnuStatistics) GetBipErrors() uint64 {
	if m != nil {
		return m.BipErrors
	}
	return 0
}

func (m *OnuStatistics) GetBipUnits() uint64 {
	if m != nil {
		return m.BipUnits
	}
	return 0
}

func (m *OnuStatistics) GetFecCorrectedSymbols() uint64 {
	if m != nil {
		return m.FecCorrectedSymbols
	}
	return 0
}

func (m *OnuStatistics) GetFecCodewordsCorrected() uint64 {
	if m != nil {
		return m.FecCodewordsCorrected
	}
	return 0
}

func (m *OnuStatistics) GetFecCodewordsUncorrectable() uint64 {
	if m != nil {
		return m.FecCodewordsUncorrectable
	}
	return 0
}

func (m *OnuStatistics) GetFecCodewords() uint64 {
	if m != nil {
		return m.FecCodewords
	}
	return 0
}

func (m *OnuStatistics) GetFecCorrectedUnits() uint64 {
	if m != nil {
		return m.FecCorrectedUnits
	}
	return 0
}

func (m *OnuStatistics) GetXgemKeyErrors() uint64 {
	if m != nil {
		return m.XgemKeyErrors
	}
	return 0
}

func (m *OnuStatistics) GetXgemLoss() uint64 {
	if m != nil {
		return m.XgemLoss
	}
	return 0
}

func (m *OnuStatistics) GetRxPloamsError() uint64 {
	if m != nil {
		return m.RxPloamsError
	}
	return 0
}

func (m *OnuStatistics) GetRxPloamsNonIdle() uint64 {
	if m != nil {
		return m.RxPloamsNonIdle
	}
	return 0
}

func (m *OnuStatistics) GetRxOmci() uint64 {
	if m != nil {
		return m.RxOmci
	}
	return 0
}

func (m *OnuStatistics) GetRxOmciPacketsCrcError() uint64 {
	if m != nil {
		return m.RxOmciPacketsCrcError
	}
	return 0
}

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

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

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

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

func (m *OnuStatistics) GetBerReported() uint64 {
	if m != nil {
		return m.BerReported
	}
	return 0
}

func (m *OnuStatistics) GetLcdgErrors() uint64 {
	if m != nil {
		return m.LcdgErrors
	}
	return 0
}

func (m *OnuStatistics) GetRdiErrors() uint64 {
	if m != nil {
		return m.RdiErrors
	}
	return 0
}

func (m *OnuStatistics) GetTimestamp() uint32 {
	if m != nil {
		return m.Timestamp
	}
	return 0
}

type GemPortStatistics struct {
	IntfId               uint32   `protobuf:"fixed32,1,opt,name=intf_id,json=intfId,proto3" json:"intf_id,omitempty"`
	GemportId            uint32   `protobuf:"fixed32,2,opt,name=gemport_id,json=gemportId,proto3" json:"gemport_id,omitempty"`
	RxPackets            uint64   `protobuf:"fixed64,3,opt,name=rx_packets,json=rxPackets,proto3" json:"rx_packets,omitempty"`
	RxBytes              uint64   `protobuf:"fixed64,4,opt,name=rx_bytes,json=rxBytes,proto3" json:"rx_bytes,omitempty"`
	TxPackets            uint64   `protobuf:"fixed64,5,opt,name=tx_packets,json=txPackets,proto3" json:"tx_packets,omitempty"`
	TxBytes              uint64   `protobuf:"fixed64,6,opt,name=tx_bytes,json=txBytes,proto3" json:"tx_bytes,omitempty"`
	Timestamp            uint32   `protobuf:"fixed32,26,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_GemPortStatistics proto.InternalMessageInfo

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

func (m *GemPortStatistics) GetGemportId() uint32 {
	if m != nil {
		return m.GemportId
	}
	return 0
}

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

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

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

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

func (m *GemPortStatistics) GetTimestamp() uint32 {
	if m != nil {
		return m.Timestamp
	}
	return 0
}

type FlowStatistics struct {
	FlowId               uint32   `protobuf:"fixed32,1,opt,name=flow_id,json=flowId,proto3" json:"flow_id,omitempty"`
	RxBytes              uint64   `protobuf:"fixed64,2,opt,name=rx_bytes,json=rxBytes,proto3" json:"rx_bytes,omitempty"`
	RxPackets            uint64   `protobuf:"fixed64,3,opt,name=rx_packets,json=rxPackets,proto3" json:"rx_packets,omitempty"`
	TxBytes              uint64   `protobuf:"fixed64,8,opt,name=tx_bytes,json=txBytes,proto3" json:"tx_bytes,omitempty"`
	TxPackets            uint64   `protobuf:"fixed64,9,opt,name=tx_packets,json=txPackets,proto3" json:"tx_packets,omitempty"`
	Timestamp            uint32   `protobuf:"fixed32,16,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_FlowStatistics proto.InternalMessageInfo

func (m *FlowStatistics) GetFlowId() uint32 {
	if m != nil {
		return m.FlowId
	}
	return 0
}

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

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

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

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

func (m *FlowStatistics) GetTimestamp() uint32 {
	if m != nil {
		return m.Timestamp
	}
	return 0
}

type LosIndication struct {
	IntfId               uint32   `protobuf:"fixed32,1,opt,name=intf_id,json=intfId,proto3" json:"intf_id,omitempty"`
	Status               string   `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_LosIndication proto.InternalMessageInfo

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

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

type DyingGaspIndication 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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_DyingGaspIndication proto.InternalMessageInfo

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

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

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

type OnuAlarmIndication 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"`
	LosStatus            string   `protobuf:"bytes,3,opt,name=los_status,json=losStatus,proto3" json:"los_status,omitempty"`
	LobStatus            string   `protobuf:"bytes,4,opt,name=lob_status,json=lobStatus,proto3" json:"lob_status,omitempty"`
	LopcMissStatus       string   `protobuf:"bytes,5,opt,name=lopc_miss_status,json=lopcMissStatus,proto3" json:"lopc_miss_status,omitempty"`
	LopcMicErrorStatus   string   `protobuf:"bytes,6,opt,name=lopc_mic_error_status,json=lopcMicErrorStatus,proto3" json:"lopc_mic_error_status,omitempty"`
	LofiStatus           string   `protobuf:"bytes,7,opt,name=lofi_status,json=lofiStatus,proto3" json:"lofi_status,omitempty"`
	LoamiStatus          string   `protobuf:"bytes,8,opt,name=loami_status,json=loamiStatus,proto3" json:"loami_status,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_OnuAlarmIndication proto.InternalMessageInfo

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

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

func (m *OnuAlarmIndication) GetLosStatus() string {
	if m != nil {
		return m.LosStatus
	}
	return ""
}

func (m *OnuAlarmIndication) GetLobStatus() string {
	if m != nil {
		return m.LobStatus
	}
	return ""
}

func (m *OnuAlarmIndication) GetLopcMissStatus() string {
	if m != nil {
		return m.LopcMissStatus
	}
	return ""
}

func (m *OnuAlarmIndication) GetLopcMicErrorStatus() string {
	if m != nil {
		return m.LopcMicErrorStatus
	}
	return ""
}

func (m *OnuAlarmIndication) GetLofiStatus() string {
	if m != nil {
		return m.LofiStatus
	}
	return ""
}

func (m *OnuAlarmIndication) GetLoamiStatus() string {
	if m != nil {
		return m.LoamiStatus
	}
	return ""
}

type OnuStartupFailureIndication 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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_OnuStartupFailureIndication proto.InternalMessageInfo

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

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

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

type OnuSignalDegradeIndication 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"`
	InverseBitErrorRate  uint32   `protobuf:"fixed32,4,opt,name=inverse_bit_error_rate,json=inverseBitErrorRate,proto3" json:"inverse_bit_error_rate,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_OnuSignalDegradeIndication proto.InternalMessageInfo

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

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

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

func (m *OnuSignalDegradeIndication) GetInverseBitErrorRate() uint32 {
	if m != nil {
		return m.InverseBitErrorRate
	}
	return 0
}

type OnuDriftOfWindowIndication 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"`
	Drift                uint32   `protobuf:"fixed32,4,opt,name=drift,proto3" json:"drift,omitempty"`
	NewEqd               uint32   `protobuf:"fixed32,5,opt,name=new_eqd,json=newEqd,proto3" json:"new_eqd,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_OnuDriftOfWindowIndication proto.InternalMessageInfo

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

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

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

func (m *OnuDriftOfWindowIndication) GetDrift() uint32 {
	if m != nil {
		return m.Drift
	}
	return 0
}

func (m *OnuDriftOfWindowIndication) GetNewEqd() uint32 {
	if m != nil {
		return m.NewEqd
	}
	return 0
}

type OnuLossOfOmciChannelIndication 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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_OnuLossOfOmciChannelIndication proto.InternalMessageInfo

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

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

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

type OnuSignalsFailureIndication 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"`
	InverseBitErrorRate  uint32   `protobuf:"fixed32,4,opt,name=inverse_bit_error_rate,json=inverseBitErrorRate,proto3" json:"inverse_bit_error_rate,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_OnuSignalsFailureIndication proto.InternalMessageInfo

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

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

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

func (m *OnuSignalsFailureIndication) GetInverseBitErrorRate() uint32 {
	if m != nil {
		return m.InverseBitErrorRate
	}
	return 0
}

type OnuTransmissionInterferenceWarning 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"`
	Drift                uint32   `protobuf:"fixed32,4,opt,name=drift,proto3" json:"drift,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_OnuTransmissionInterferenceWarning proto.InternalMessageInfo

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

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

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

func (m *OnuTransmissionInterferenceWarning) GetDrift() uint32 {
	if m != nil {
		return m.Drift
	}
	return 0
}

type OnuActivationFailureIndication 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"`
	FailReason           uint32   `protobuf:"fixed32,3,opt,name=fail_reason,json=failReason,proto3" json:"fail_reason,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_OnuActivationFailureIndication proto.InternalMessageInfo

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

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

func (m *OnuActivationFailureIndication) GetFailReason() uint32 {
	if m != nil {
		return m.FailReason
	}
	return 0
}

type OnuLossOfKeySyncFailureIndication 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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_OnuLossOfKeySyncFailureIndication proto.InternalMessageInfo

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

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

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

type RdiErrorIndication struct {
	RdiErrorCount        uint64   `protobuf:"fixed64,1,opt,name=rdi_error_count,json=rdiErrorCount,proto3" json:"rdi_error_count,omitempty"`
	Status               string   `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_RdiErrorIndication proto.InternalMessageInfo

func (m *RdiErrorIndication) GetRdiErrorCount() uint64 {
	if m != nil {
		return m.RdiErrorCount
	}
	return 0
}

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

type OnuItuPonStatsIndication 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"`
	// Types that are valid to be assigned to Stats:
	//	*OnuItuPonStatsIndication_RdiErrorInd
	Stats                isOnuItuPonStatsIndication_Stats `protobuf_oneof:"stats"`
	XXX_NoUnkeyedLiteral struct{}                         `json:"-"`
	XXX_unrecognized     []byte                           `json:"-"`
	XXX_sizecache        int32                            `json:"-"`
}

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

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

var xxx_messageInfo_OnuItuPonStatsIndication proto.InternalMessageInfo

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

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

type isOnuItuPonStatsIndication_Stats interface {
	isOnuItuPonStatsIndication_Stats()
}

type OnuItuPonStatsIndication_RdiErrorInd struct {
	RdiErrorInd *RdiErrorIndication `protobuf:"bytes,3,opt,name=rdi_error_ind,json=rdiErrorInd,proto3,oneof"`
}

func (*OnuItuPonStatsIndication_RdiErrorInd) isOnuItuPonStatsIndication_Stats() {}

func (m *OnuItuPonStatsIndication) GetStats() isOnuItuPonStatsIndication_Stats {
	if m != nil {
		return m.Stats
	}
	return nil
}

func (m *OnuItuPonStatsIndication) GetRdiErrorInd() *RdiErrorIndication {
	if x, ok := m.GetStats().(*OnuItuPonStatsIndication_RdiErrorInd); ok {
		return x.RdiErrorInd
	}
	return nil
}

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

type OnuProcessingErrorIndication 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 *OnuProcessingErrorIndication) Reset()         { *m = OnuProcessingErrorIndication{} }
func (m *OnuProcessingErrorIndication) String() string { return proto.CompactTextString(m) }
func (*OnuProcessingErrorIndication) ProtoMessage()    {}
func (*OnuProcessingErrorIndication) Descriptor() ([]byte, []int) {
	return fileDescriptor_c072e7aa0dfd74d5, []int{39}
}

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

var xxx_messageInfo_OnuProcessingErrorIndication proto.InternalMessageInfo

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

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

type OnuDeactivationFailureIndication 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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_OnuDeactivationFailureIndication proto.InternalMessageInfo

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

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

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

type OnuRemoteDefectIndication 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"`
	RdiErrors            uint64   `protobuf:"fixed64,3,opt,name=rdi_errors,json=rdiErrors,proto3" json:"rdi_errors,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_OnuRemoteDefectIndication proto.InternalMessageInfo

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

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

func (m *OnuRemoteDefectIndication) GetRdiErrors() uint64 {
	if m != nil {
		return m.RdiErrors
	}
	return 0
}

type OnuLossOfGEMChannelDelineationIndication 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"`
	DelineationErrors    uint32   `protobuf:"fixed32,4,opt,name=delineation_errors,json=delineationErrors,proto3" json:"delineation_errors,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_OnuLossOfGEMChannelDelineationIndication proto.InternalMessageInfo

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

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

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

func (m *OnuLossOfGEMChannelDelineationIndication) GetDelineationErrors() uint32 {
	if m != nil {
		return m.DelineationErrors
	}
	return 0
}

type OnuPhysicalEquipmentErrorIndication 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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *OnuPhysicalEquipmentErrorIndication) Reset()         { *m = OnuPhysicalEquipmentErrorIndication{} }
func (m *OnuPhysicalEquipmentErrorIndication) String() string { return proto.CompactTextString(m) }
func (*OnuPhysicalEquipmentErrorIndication) ProtoMessage()    {}
func (*OnuPhysicalEquipmentErrorIndication) Descriptor() ([]byte, []int) {
	return fileDescriptor_c072e7aa0dfd74d5, []int{43}
}

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

var xxx_messageInfo_OnuPhysicalEquipmentErrorIndication proto.InternalMessageInfo

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

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

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

type OnuLossOfAcknowledgementIndication 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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *OnuLossOfAcknowledgementIndication) Reset()         { *m = OnuLossOfAcknowledgementIndication{} }
func (m *OnuLossOfAcknowledgementIndication) String() string { return proto.CompactTextString(m) }
func (*OnuLossOfAcknowledgementIndication) ProtoMessage()    {}
func (*OnuLossOfAcknowledgementIndication) Descriptor() ([]byte, []int) {
	return fileDescriptor_c072e7aa0dfd74d5, []int{44}
}

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

var xxx_messageInfo_OnuLossOfAcknowledgementIndication proto.InternalMessageInfo

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

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

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

type OnuDifferentialReachExceededIndication 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"`
	Distance             uint32   `protobuf:"fixed32,4,opt,name=distance,proto3" json:"distance,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *OnuDifferentialReachExceededIndication) Reset() {
	*m = OnuDifferentialReachExceededIndication{}
}
func (m *OnuDifferentialReachExceededIndication) String() string { return proto.CompactTextString(m) }
func (*OnuDifferentialReachExceededIndication) ProtoMessage()    {}
func (*OnuDifferentialReachExceededIndication) Descriptor() ([]byte, []int) {
	return fileDescriptor_c072e7aa0dfd74d5, []int{45}
}

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

var xxx_messageInfo_OnuDifferentialReachExceededIndication proto.InternalMessageInfo

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

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

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

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

type GroupMember struct {
	InterfaceId          uint32                    `protobuf:"varint,1,opt,name=interface_id,json=interfaceId,proto3" json:"interface_id,omitempty"`
	InterfaceType        GroupMember_InterfaceType `protobuf:"varint,2,opt,name=interface_type,json=interfaceType,proto3,enum=openolt.GroupMember_InterfaceType" json:"interface_type,omitempty"`
	GemPortId            uint32                    `protobuf:"varint,3,opt,name=gem_port_id,json=gemPortId,proto3" json:"gem_port_id,omitempty"`
	Priority             uint32                    `protobuf:"varint,4,opt,name=priority,proto3" json:"priority,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
	XXX_unrecognized     []byte                    `json:"-"`
	XXX_sizecache        int32                     `json:"-"`
}

func (m *GroupMember) Reset()         { *m = GroupMember{} }
func (m *GroupMember) String() string { return proto.CompactTextString(m) }
func (*GroupMember) ProtoMessage()    {}
func (*GroupMember) Descriptor() ([]byte, []int) {
	return fileDescriptor_c072e7aa0dfd74d5, []int{46}
}

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

var xxx_messageInfo_GroupMember proto.InternalMessageInfo

func (m *GroupMember) GetInterfaceId() uint32 {
	if m != nil {
		return m.InterfaceId
	}
	return 0
}

func (m *GroupMember) GetInterfaceType() GroupMember_InterfaceType {
	if m != nil {
		return m.InterfaceType
	}
	return GroupMember_PON
}

func (m *GroupMember) GetGemPortId() uint32 {
	if m != nil {
		return m.GemPortId
	}
	return 0
}

func (m *GroupMember) GetPriority() uint32 {
	if m != nil {
		return m.Priority
	}
	return 0
}

type Group struct {
	GroupId              uint32                    `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	Command              Group_GroupMembersCommand `protobuf:"varint,2,opt,name=command,proto3,enum=openolt.Group_GroupMembersCommand" json:"command,omitempty"`
	Members              []*GroupMember            `protobuf:"bytes,3,rep,name=members,proto3" json:"members,omitempty"`
	Action               *Action                   `protobuf:"bytes,4,opt,name=action,proto3" json:"action,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
	XXX_unrecognized     []byte                    `json:"-"`
	XXX_sizecache        int32                     `json:"-"`
}

func (m *Group) Reset()         { *m = Group{} }
func (m *Group) String() string { return proto.CompactTextString(m) }
func (*Group) ProtoMessage()    {}
func (*Group) Descriptor() ([]byte, []int) {
	return fileDescriptor_c072e7aa0dfd74d5, []int{47}
}

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

var xxx_messageInfo_Group proto.InternalMessageInfo

func (m *Group) GetGroupId() uint32 {
	if m != nil {
		return m.GroupId
	}
	return 0
}

func (m *Group) GetCommand() Group_GroupMembersCommand {
	if m != nil {
		return m.Command
	}
	return Group_ADD_MEMBERS
}

func (m *Group) GetMembers() []*GroupMember {
	if m != nil {
		return m.Members
	}
	return nil
}

func (m *Group) GetAction() *Action {
	if m != nil {
		return m.Action
	}
	return nil
}

type ValueParam struct {
	Onu                  *Onu                  `protobuf:"bytes,1,opt,name=onu,proto3" json:"onu,omitempty"`
	Value                common.ValueType_Type `protobuf:"varint,2,opt,name=value,proto3,enum=common.ValueType_Type" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

func (m *ValueParam) Reset()         { *m = ValueParam{} }
func (m *ValueParam) String() string { return proto.CompactTextString(m) }
func (*ValueParam) ProtoMessage()    {}
func (*ValueParam) Descriptor() ([]byte, []int) {
	return fileDescriptor_c072e7aa0dfd74d5, []int{48}
}

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

var xxx_messageInfo_ValueParam proto.InternalMessageInfo

func (m *ValueParam) GetOnu() *Onu {
	if m != nil {
		return m.Onu
	}
	return nil
}

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

type Empty struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *Empty) Reset()         { *m = Empty{} }
func (m *Empty) String() string { return proto.CompactTextString(m) }
func (*Empty) ProtoMessage()    {}
func (*Empty) Descriptor() ([]byte, []int) {
	return fileDescriptor_c072e7aa0dfd74d5, []int{49}
}

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

var xxx_messageInfo_Empty proto.InternalMessageInfo

func init() {
	proto.RegisterEnum("openolt.OnuIndication_ActivationFailReason", OnuIndication_ActivationFailReason_name, OnuIndication_ActivationFailReason_value)
	proto.RegisterEnum("openolt.DeviceInfo_DeviceResourceRanges_Pool_PoolType", DeviceInfo_DeviceResourceRanges_Pool_PoolType_name, DeviceInfo_DeviceResourceRanges_Pool_PoolType_value)
	proto.RegisterEnum("openolt.DeviceInfo_DeviceResourceRanges_Pool_SharingType", DeviceInfo_DeviceResourceRanges_Pool_SharingType_name, DeviceInfo_DeviceResourceRanges_Pool_SharingType_value)
	proto.RegisterEnum("openolt.GroupMember_InterfaceType", GroupMember_InterfaceType_name, GroupMember_InterfaceType_value)
	proto.RegisterEnum("openolt.Group_GroupMembersCommand", Group_GroupMembersCommand_name, Group_GroupMembersCommand_value)
	proto.RegisterType((*Indication)(nil), "openolt.Indication")
	proto.RegisterType((*AlarmIndication)(nil), "openolt.AlarmIndication")
	proto.RegisterType((*OltIndication)(nil), "openolt.OltIndication")
	proto.RegisterType((*IntfIndication)(nil), "openolt.IntfIndication")
	proto.RegisterType((*OnuDiscIndication)(nil), "openolt.OnuDiscIndication")
	proto.RegisterType((*OnuIndication)(nil), "openolt.OnuIndication")
	proto.RegisterType((*IntfOperIndication)(nil), "openolt.IntfOperIndication")
	proto.RegisterType((*OmciIndication)(nil), "openolt.OmciIndication")
	proto.RegisterType((*PacketIndication)(nil), "openolt.PacketIndication")
	proto.RegisterType((*Interface)(nil), "openolt.Interface")
	proto.RegisterType((*Heartbeat)(nil), "openolt.Heartbeat")
	proto.RegisterType((*Onu)(nil), "openolt.Onu")
	proto.RegisterType((*OnuLogicalDistance)(nil), "openolt.OnuLogicalDistance")
	proto.RegisterType((*OmciMsg)(nil), "openolt.OmciMsg")
	proto.RegisterType((*OnuPacket)(nil), "openolt.OnuPacket")
	proto.RegisterType((*UplinkPacket)(nil), "openolt.UplinkPacket")
	proto.RegisterType((*DeviceInfo)(nil), "openolt.DeviceInfo")
	proto.RegisterType((*DeviceInfo_DeviceResourceRanges)(nil), "openolt.DeviceInfo.DeviceResourceRanges")
	proto.RegisterType((*DeviceInfo_DeviceResourceRanges_Pool)(nil), "openolt.DeviceInfo.DeviceResourceRanges.Pool")
	proto.RegisterType((*Classifier)(nil), "openolt.Classifier")
	proto.RegisterType((*ActionCmd)(nil), "openolt.ActionCmd")
	proto.RegisterType((*Action)(nil), "openolt.Action")
	proto.RegisterType((*Flow)(nil), "openolt.Flow")
	proto.RegisterMapType((map[uint32]uint32)(nil), "openolt.Flow.PbitToGemportEntry")
	proto.RegisterType((*SerialNumber)(nil), "openolt.SerialNumber")
	proto.RegisterType((*PortStatistics)(nil), "openolt.PortStatistics")
	proto.RegisterType((*OnuStatistics)(nil), "openolt.OnuStatistics")
	proto.RegisterType((*GemPortStatistics)(nil), "openolt.GemPortStatistics")
	proto.RegisterType((*FlowStatistics)(nil), "openolt.FlowStatistics")
	proto.RegisterType((*LosIndication)(nil), "openolt.LosIndication")
	proto.RegisterType((*DyingGaspIndication)(nil), "openolt.DyingGaspIndication")
	proto.RegisterType((*OnuAlarmIndication)(nil), "openolt.OnuAlarmIndication")
	proto.RegisterType((*OnuStartupFailureIndication)(nil), "openolt.OnuStartupFailureIndication")
	proto.RegisterType((*OnuSignalDegradeIndication)(nil), "openolt.OnuSignalDegradeIndication")
	proto.RegisterType((*OnuDriftOfWindowIndication)(nil), "openolt.OnuDriftOfWindowIndication")
	proto.RegisterType((*OnuLossOfOmciChannelIndication)(nil), "openolt.OnuLossOfOmciChannelIndication")
	proto.RegisterType((*OnuSignalsFailureIndication)(nil), "openolt.OnuSignalsFailureIndication")
	proto.RegisterType((*OnuTransmissionInterferenceWarning)(nil), "openolt.OnuTransmissionInterferenceWarning")
	proto.RegisterType((*OnuActivationFailureIndication)(nil), "openolt.OnuActivationFailureIndication")
	proto.RegisterType((*OnuLossOfKeySyncFailureIndication)(nil), "openolt.OnuLossOfKeySyncFailureIndication")
	proto.RegisterType((*RdiErrorIndication)(nil), "openolt.RdiErrorIndication")
	proto.RegisterType((*OnuItuPonStatsIndication)(nil), "openolt.OnuItuPonStatsIndication")
	proto.RegisterType((*OnuProcessingErrorIndication)(nil), "openolt.OnuProcessingErrorIndication")
	proto.RegisterType((*OnuDeactivationFailureIndication)(nil), "openolt.OnuDeactivationFailureIndication")
	proto.RegisterType((*OnuRemoteDefectIndication)(nil), "openolt.OnuRemoteDefectIndication")
	proto.RegisterType((*OnuLossOfGEMChannelDelineationIndication)(nil), "openolt.OnuLossOfGEMChannelDelineationIndication")
	proto.RegisterType((*OnuPhysicalEquipmentErrorIndication)(nil), "openolt.OnuPhysicalEquipmentErrorIndication")
	proto.RegisterType((*OnuLossOfAcknowledgementIndication)(nil), "openolt.OnuLossOfAcknowledgementIndication")
	proto.RegisterType((*OnuDifferentialReachExceededIndication)(nil), "openolt.OnuDifferentialReachExceededIndication")
	proto.RegisterType((*GroupMember)(nil), "openolt.GroupMember")
	proto.RegisterType((*Group)(nil), "openolt.Group")
	proto.RegisterType((*ValueParam)(nil), "openolt.ValueParam")
	proto.RegisterType((*Empty)(nil), "openolt.Empty")
}

func init() { proto.RegisterFile("voltha_protos/openolt.proto", fileDescriptor_c072e7aa0dfd74d5) }

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

// OpenoltClient is the client API for Openolt service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type OpenoltClient interface {
	DisableOlt(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
	ReenableOlt(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
	ActivateOnu(ctx context.Context, in *Onu, opts ...grpc.CallOption) (*Empty, error)
	DeactivateOnu(ctx context.Context, in *Onu, opts ...grpc.CallOption) (*Empty, error)
	DeleteOnu(ctx context.Context, in *Onu, opts ...grpc.CallOption) (*Empty, error)
	OmciMsgOut(ctx context.Context, in *OmciMsg, opts ...grpc.CallOption) (*Empty, error)
	OnuPacketOut(ctx context.Context, in *OnuPacket, opts ...grpc.CallOption) (*Empty, error)
	UplinkPacketOut(ctx context.Context, in *UplinkPacket, opts ...grpc.CallOption) (*Empty, error)
	FlowAdd(ctx context.Context, in *Flow, opts ...grpc.CallOption) (*Empty, error)
	FlowRemove(ctx context.Context, in *Flow, opts ...grpc.CallOption) (*Empty, error)
	HeartbeatCheck(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Heartbeat, error)
	EnablePonIf(ctx context.Context, in *Interface, opts ...grpc.CallOption) (*Empty, error)
	DisablePonIf(ctx context.Context, in *Interface, opts ...grpc.CallOption) (*Empty, error)
	GetDeviceInfo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*DeviceInfo, error)
	Reboot(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
	CollectStatistics(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
	GetOnuStatistics(ctx context.Context, in *Onu, opts ...grpc.CallOption) (*OnuStatistics, error)
	GetGemPortStatistics(ctx context.Context, in *OnuPacket, opts ...grpc.CallOption) (*GemPortStatistics, error)
	CreateTrafficSchedulers(ctx context.Context, in *tech_profile.TrafficSchedulers, opts ...grpc.CallOption) (*Empty, error)
	RemoveTrafficSchedulers(ctx context.Context, in *tech_profile.TrafficSchedulers, opts ...grpc.CallOption) (*Empty, error)
	CreateTrafficQueues(ctx context.Context, in *tech_profile.TrafficQueues, opts ...grpc.CallOption) (*Empty, error)
	RemoveTrafficQueues(ctx context.Context, in *tech_profile.TrafficQueues, opts ...grpc.CallOption) (*Empty, error)
	EnableIndication(ctx context.Context, in *Empty, opts ...grpc.CallOption) (Openolt_EnableIndicationClient, error)
	PerformGroupOperation(ctx context.Context, in *Group, opts ...grpc.CallOption) (*Empty, error)
	DeleteGroup(ctx context.Context, in *Group, opts ...grpc.CallOption) (*Empty, error)
	GetExtValue(ctx context.Context, in *ValueParam, opts ...grpc.CallOption) (*common.ReturnValues, error)
	OnuItuPonAlarmSet(ctx context.Context, in *config.OnuItuPonAlarm, opts ...grpc.CallOption) (*Empty, error)
	GetLogicalOnuDistanceZero(ctx context.Context, in *Onu, opts ...grpc.CallOption) (*OnuLogicalDistance, error)
	GetLogicalOnuDistance(ctx context.Context, in *Onu, opts ...grpc.CallOption) (*OnuLogicalDistance, error)
}

type openoltClient struct {
	cc *grpc.ClientConn
}

func NewOpenoltClient(cc *grpc.ClientConn) OpenoltClient {
	return &openoltClient{cc}
}

func (c *openoltClient) DisableOlt(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
	out := new(Empty)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/DisableOlt", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *openoltClient) ReenableOlt(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
	out := new(Empty)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/ReenableOlt", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *openoltClient) ActivateOnu(ctx context.Context, in *Onu, opts ...grpc.CallOption) (*Empty, error) {
	out := new(Empty)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/ActivateOnu", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *openoltClient) DeactivateOnu(ctx context.Context, in *Onu, opts ...grpc.CallOption) (*Empty, error) {
	out := new(Empty)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/DeactivateOnu", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *openoltClient) DeleteOnu(ctx context.Context, in *Onu, opts ...grpc.CallOption) (*Empty, error) {
	out := new(Empty)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/DeleteOnu", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *openoltClient) OmciMsgOut(ctx context.Context, in *OmciMsg, opts ...grpc.CallOption) (*Empty, error) {
	out := new(Empty)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/OmciMsgOut", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *openoltClient) OnuPacketOut(ctx context.Context, in *OnuPacket, opts ...grpc.CallOption) (*Empty, error) {
	out := new(Empty)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/OnuPacketOut", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *openoltClient) UplinkPacketOut(ctx context.Context, in *UplinkPacket, opts ...grpc.CallOption) (*Empty, error) {
	out := new(Empty)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/UplinkPacketOut", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *openoltClient) FlowAdd(ctx context.Context, in *Flow, opts ...grpc.CallOption) (*Empty, error) {
	out := new(Empty)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/FlowAdd", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *openoltClient) FlowRemove(ctx context.Context, in *Flow, opts ...grpc.CallOption) (*Empty, error) {
	out := new(Empty)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/FlowRemove", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *openoltClient) HeartbeatCheck(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Heartbeat, error) {
	out := new(Heartbeat)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/HeartbeatCheck", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *openoltClient) EnablePonIf(ctx context.Context, in *Interface, opts ...grpc.CallOption) (*Empty, error) {
	out := new(Empty)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/EnablePonIf", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *openoltClient) DisablePonIf(ctx context.Context, in *Interface, opts ...grpc.CallOption) (*Empty, error) {
	out := new(Empty)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/DisablePonIf", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *openoltClient) GetDeviceInfo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*DeviceInfo, error) {
	out := new(DeviceInfo)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/GetDeviceInfo", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *openoltClient) Reboot(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
	out := new(Empty)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/Reboot", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *openoltClient) CollectStatistics(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
	out := new(Empty)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/CollectStatistics", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *openoltClient) GetOnuStatistics(ctx context.Context, in *Onu, opts ...grpc.CallOption) (*OnuStatistics, error) {
	out := new(OnuStatistics)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/GetOnuStatistics", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *openoltClient) GetGemPortStatistics(ctx context.Context, in *OnuPacket, opts ...grpc.CallOption) (*GemPortStatistics, error) {
	out := new(GemPortStatistics)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/GetGemPortStatistics", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *openoltClient) CreateTrafficSchedulers(ctx context.Context, in *tech_profile.TrafficSchedulers, opts ...grpc.CallOption) (*Empty, error) {
	out := new(Empty)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/CreateTrafficSchedulers", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *openoltClient) RemoveTrafficSchedulers(ctx context.Context, in *tech_profile.TrafficSchedulers, opts ...grpc.CallOption) (*Empty, error) {
	out := new(Empty)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/RemoveTrafficSchedulers", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *openoltClient) CreateTrafficQueues(ctx context.Context, in *tech_profile.TrafficQueues, opts ...grpc.CallOption) (*Empty, error) {
	out := new(Empty)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/CreateTrafficQueues", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *openoltClient) RemoveTrafficQueues(ctx context.Context, in *tech_profile.TrafficQueues, opts ...grpc.CallOption) (*Empty, error) {
	out := new(Empty)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/RemoveTrafficQueues", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *openoltClient) EnableIndication(ctx context.Context, in *Empty, opts ...grpc.CallOption) (Openolt_EnableIndicationClient, error) {
	stream, err := c.cc.NewStream(ctx, &_Openolt_serviceDesc.Streams[0], "/openolt.Openolt/EnableIndication", opts...)
	if err != nil {
		return nil, err
	}
	x := &openoltEnableIndicationClient{stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

type Openolt_EnableIndicationClient interface {
	Recv() (*Indication, error)
	grpc.ClientStream
}

type openoltEnableIndicationClient struct {
	grpc.ClientStream
}

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

func (c *openoltClient) PerformGroupOperation(ctx context.Context, in *Group, opts ...grpc.CallOption) (*Empty, error) {
	out := new(Empty)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/PerformGroupOperation", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *openoltClient) DeleteGroup(ctx context.Context, in *Group, opts ...grpc.CallOption) (*Empty, error) {
	out := new(Empty)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/DeleteGroup", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *openoltClient) GetExtValue(ctx context.Context, in *ValueParam, opts ...grpc.CallOption) (*common.ReturnValues, error) {
	out := new(common.ReturnValues)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/GetExtValue", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *openoltClient) OnuItuPonAlarmSet(ctx context.Context, in *config.OnuItuPonAlarm, opts ...grpc.CallOption) (*Empty, error) {
	out := new(Empty)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/OnuItuPonAlarmSet", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *openoltClient) GetLogicalOnuDistanceZero(ctx context.Context, in *Onu, opts ...grpc.CallOption) (*OnuLogicalDistance, error) {
	out := new(OnuLogicalDistance)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/GetLogicalOnuDistanceZero", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *openoltClient) GetLogicalOnuDistance(ctx context.Context, in *Onu, opts ...grpc.CallOption) (*OnuLogicalDistance, error) {
	out := new(OnuLogicalDistance)
	err := c.cc.Invoke(ctx, "/openolt.Openolt/GetLogicalOnuDistance", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// OpenoltServer is the server API for Openolt service.
type OpenoltServer interface {
	DisableOlt(context.Context, *Empty) (*Empty, error)
	ReenableOlt(context.Context, *Empty) (*Empty, error)
	ActivateOnu(context.Context, *Onu) (*Empty, error)
	DeactivateOnu(context.Context, *Onu) (*Empty, error)
	DeleteOnu(context.Context, *Onu) (*Empty, error)
	OmciMsgOut(context.Context, *OmciMsg) (*Empty, error)
	OnuPacketOut(context.Context, *OnuPacket) (*Empty, error)
	UplinkPacketOut(context.Context, *UplinkPacket) (*Empty, error)
	FlowAdd(context.Context, *Flow) (*Empty, error)
	FlowRemove(context.Context, *Flow) (*Empty, error)
	HeartbeatCheck(context.Context, *Empty) (*Heartbeat, error)
	EnablePonIf(context.Context, *Interface) (*Empty, error)
	DisablePonIf(context.Context, *Interface) (*Empty, error)
	GetDeviceInfo(context.Context, *Empty) (*DeviceInfo, error)
	Reboot(context.Context, *Empty) (*Empty, error)
	CollectStatistics(context.Context, *Empty) (*Empty, error)
	GetOnuStatistics(context.Context, *Onu) (*OnuStatistics, error)
	GetGemPortStatistics(context.Context, *OnuPacket) (*GemPortStatistics, error)
	CreateTrafficSchedulers(context.Context, *tech_profile.TrafficSchedulers) (*Empty, error)
	RemoveTrafficSchedulers(context.Context, *tech_profile.TrafficSchedulers) (*Empty, error)
	CreateTrafficQueues(context.Context, *tech_profile.TrafficQueues) (*Empty, error)
	RemoveTrafficQueues(context.Context, *tech_profile.TrafficQueues) (*Empty, error)
	EnableIndication(*Empty, Openolt_EnableIndicationServer) error
	PerformGroupOperation(context.Context, *Group) (*Empty, error)
	DeleteGroup(context.Context, *Group) (*Empty, error)
	GetExtValue(context.Context, *ValueParam) (*common.ReturnValues, error)
	OnuItuPonAlarmSet(context.Context, *config.OnuItuPonAlarm) (*Empty, error)
	GetLogicalOnuDistanceZero(context.Context, *Onu) (*OnuLogicalDistance, error)
	GetLogicalOnuDistance(context.Context, *Onu) (*OnuLogicalDistance, error)
}

func RegisterOpenoltServer(s *grpc.Server, srv OpenoltServer) {
	s.RegisterService(&_Openolt_serviceDesc, srv)
}

func _Openolt_DisableOlt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).DisableOlt(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/DisableOlt",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).DisableOlt(ctx, req.(*Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _Openolt_ReenableOlt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).ReenableOlt(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/ReenableOlt",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).ReenableOlt(ctx, req.(*Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _Openolt_ActivateOnu_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Onu)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).ActivateOnu(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/ActivateOnu",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).ActivateOnu(ctx, req.(*Onu))
	}
	return interceptor(ctx, in, info, handler)
}

func _Openolt_DeactivateOnu_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Onu)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).DeactivateOnu(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/DeactivateOnu",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).DeactivateOnu(ctx, req.(*Onu))
	}
	return interceptor(ctx, in, info, handler)
}

func _Openolt_DeleteOnu_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Onu)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).DeleteOnu(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/DeleteOnu",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).DeleteOnu(ctx, req.(*Onu))
	}
	return interceptor(ctx, in, info, handler)
}

func _Openolt_OmciMsgOut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(OmciMsg)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).OmciMsgOut(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/OmciMsgOut",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).OmciMsgOut(ctx, req.(*OmciMsg))
	}
	return interceptor(ctx, in, info, handler)
}

func _Openolt_OnuPacketOut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(OnuPacket)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).OnuPacketOut(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/OnuPacketOut",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).OnuPacketOut(ctx, req.(*OnuPacket))
	}
	return interceptor(ctx, in, info, handler)
}

func _Openolt_UplinkPacketOut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UplinkPacket)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).UplinkPacketOut(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/UplinkPacketOut",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).UplinkPacketOut(ctx, req.(*UplinkPacket))
	}
	return interceptor(ctx, in, info, handler)
}

func _Openolt_FlowAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Flow)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).FlowAdd(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/FlowAdd",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).FlowAdd(ctx, req.(*Flow))
	}
	return interceptor(ctx, in, info, handler)
}

func _Openolt_FlowRemove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Flow)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).FlowRemove(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/FlowRemove",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).FlowRemove(ctx, req.(*Flow))
	}
	return interceptor(ctx, in, info, handler)
}

func _Openolt_HeartbeatCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).HeartbeatCheck(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/HeartbeatCheck",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).HeartbeatCheck(ctx, req.(*Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _Openolt_EnablePonIf_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Interface)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).EnablePonIf(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/EnablePonIf",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).EnablePonIf(ctx, req.(*Interface))
	}
	return interceptor(ctx, in, info, handler)
}

func _Openolt_DisablePonIf_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Interface)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).DisablePonIf(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/DisablePonIf",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).DisablePonIf(ctx, req.(*Interface))
	}
	return interceptor(ctx, in, info, handler)
}

func _Openolt_GetDeviceInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).GetDeviceInfo(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/GetDeviceInfo",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).GetDeviceInfo(ctx, req.(*Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _Openolt_Reboot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).Reboot(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/Reboot",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).Reboot(ctx, req.(*Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _Openolt_CollectStatistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).CollectStatistics(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/CollectStatistics",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).CollectStatistics(ctx, req.(*Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _Openolt_GetOnuStatistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Onu)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).GetOnuStatistics(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/GetOnuStatistics",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).GetOnuStatistics(ctx, req.(*Onu))
	}
	return interceptor(ctx, in, info, handler)
}

func _Openolt_GetGemPortStatistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(OnuPacket)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).GetGemPortStatistics(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/GetGemPortStatistics",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).GetGemPortStatistics(ctx, req.(*OnuPacket))
	}
	return interceptor(ctx, in, info, handler)
}

func _Openolt_CreateTrafficSchedulers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tech_profile.TrafficSchedulers)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).CreateTrafficSchedulers(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/CreateTrafficSchedulers",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).CreateTrafficSchedulers(ctx, req.(*tech_profile.TrafficSchedulers))
	}
	return interceptor(ctx, in, info, handler)
}

func _Openolt_RemoveTrafficSchedulers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tech_profile.TrafficSchedulers)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).RemoveTrafficSchedulers(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/RemoveTrafficSchedulers",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).RemoveTrafficSchedulers(ctx, req.(*tech_profile.TrafficSchedulers))
	}
	return interceptor(ctx, in, info, handler)
}

func _Openolt_CreateTrafficQueues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tech_profile.TrafficQueues)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).CreateTrafficQueues(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/CreateTrafficQueues",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).CreateTrafficQueues(ctx, req.(*tech_profile.TrafficQueues))
	}
	return interceptor(ctx, in, info, handler)
}

func _Openolt_RemoveTrafficQueues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tech_profile.TrafficQueues)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).RemoveTrafficQueues(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/RemoveTrafficQueues",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).RemoveTrafficQueues(ctx, req.(*tech_profile.TrafficQueues))
	}
	return interceptor(ctx, in, info, handler)
}

func _Openolt_EnableIndication_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(Empty)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(OpenoltServer).EnableIndication(m, &openoltEnableIndicationServer{stream})
}

type Openolt_EnableIndicationServer interface {
	Send(*Indication) error
	grpc.ServerStream
}

type openoltEnableIndicationServer struct {
	grpc.ServerStream
}

func (x *openoltEnableIndicationServer) Send(m *Indication) error {
	return x.ServerStream.SendMsg(m)
}

func _Openolt_PerformGroupOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Group)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).PerformGroupOperation(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/PerformGroupOperation",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).PerformGroupOperation(ctx, req.(*Group))
	}
	return interceptor(ctx, in, info, handler)
}

func _Openolt_DeleteGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Group)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).DeleteGroup(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/DeleteGroup",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).DeleteGroup(ctx, req.(*Group))
	}
	return interceptor(ctx, in, info, handler)
}

func _Openolt_GetExtValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ValueParam)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).GetExtValue(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/GetExtValue",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).GetExtValue(ctx, req.(*ValueParam))
	}
	return interceptor(ctx, in, info, handler)
}

func _Openolt_OnuItuPonAlarmSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(config.OnuItuPonAlarm)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).OnuItuPonAlarmSet(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/OnuItuPonAlarmSet",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).OnuItuPonAlarmSet(ctx, req.(*config.OnuItuPonAlarm))
	}
	return interceptor(ctx, in, info, handler)
}

func _Openolt_GetLogicalOnuDistanceZero_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Onu)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).GetLogicalOnuDistanceZero(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/GetLogicalOnuDistanceZero",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).GetLogicalOnuDistanceZero(ctx, req.(*Onu))
	}
	return interceptor(ctx, in, info, handler)
}

func _Openolt_GetLogicalOnuDistance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Onu)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OpenoltServer).GetLogicalOnuDistance(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openolt.Openolt/GetLogicalOnuDistance",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OpenoltServer).GetLogicalOnuDistance(ctx, req.(*Onu))
	}
	return interceptor(ctx, in, info, handler)
}

var _Openolt_serviceDesc = grpc.ServiceDesc{
	ServiceName: "openolt.Openolt",
	HandlerType: (*OpenoltServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "DisableOlt",
			Handler:    _Openolt_DisableOlt_Handler,
		},
		{
			MethodName: "ReenableOlt",
			Handler:    _Openolt_ReenableOlt_Handler,
		},
		{
			MethodName: "ActivateOnu",
			Handler:    _Openolt_ActivateOnu_Handler,
		},
		{
			MethodName: "DeactivateOnu",
			Handler:    _Openolt_DeactivateOnu_Handler,
		},
		{
			MethodName: "DeleteOnu",
			Handler:    _Openolt_DeleteOnu_Handler,
		},
		{
			MethodName: "OmciMsgOut",
			Handler:    _Openolt_OmciMsgOut_Handler,
		},
		{
			MethodName: "OnuPacketOut",
			Handler:    _Openolt_OnuPacketOut_Handler,
		},
		{
			MethodName: "UplinkPacketOut",
			Handler:    _Openolt_UplinkPacketOut_Handler,
		},
		{
			MethodName: "FlowAdd",
			Handler:    _Openolt_FlowAdd_Handler,
		},
		{
			MethodName: "FlowRemove",
			Handler:    _Openolt_FlowRemove_Handler,
		},
		{
			MethodName: "HeartbeatCheck",
			Handler:    _Openolt_HeartbeatCheck_Handler,
		},
		{
			MethodName: "EnablePonIf",
			Handler:    _Openolt_EnablePonIf_Handler,
		},
		{
			MethodName: "DisablePonIf",
			Handler:    _Openolt_DisablePonIf_Handler,
		},
		{
			MethodName: "GetDeviceInfo",
			Handler:    _Openolt_GetDeviceInfo_Handler,
		},
		{
			MethodName: "Reboot",
			Handler:    _Openolt_Reboot_Handler,
		},
		{
			MethodName: "CollectStatistics",
			Handler:    _Openolt_CollectStatistics_Handler,
		},
		{
			MethodName: "GetOnuStatistics",
			Handler:    _Openolt_GetOnuStatistics_Handler,
		},
		{
			MethodName: "GetGemPortStatistics",
			Handler:    _Openolt_GetGemPortStatistics_Handler,
		},
		{
			MethodName: "CreateTrafficSchedulers",
			Handler:    _Openolt_CreateTrafficSchedulers_Handler,
		},
		{
			MethodName: "RemoveTrafficSchedulers",
			Handler:    _Openolt_RemoveTrafficSchedulers_Handler,
		},
		{
			MethodName: "CreateTrafficQueues",
			Handler:    _Openolt_CreateTrafficQueues_Handler,
		},
		{
			MethodName: "RemoveTrafficQueues",
			Handler:    _Openolt_RemoveTrafficQueues_Handler,
		},
		{
			MethodName: "PerformGroupOperation",
			Handler:    _Openolt_PerformGroupOperation_Handler,
		},
		{
			MethodName: "DeleteGroup",
			Handler:    _Openolt_DeleteGroup_Handler,
		},
		{
			MethodName: "GetExtValue",
			Handler:    _Openolt_GetExtValue_Handler,
		},
		{
			MethodName: "OnuItuPonAlarmSet",
			Handler:    _Openolt_OnuItuPonAlarmSet_Handler,
		},
		{
			MethodName: "GetLogicalOnuDistanceZero",
			Handler:    _Openolt_GetLogicalOnuDistanceZero_Handler,
		},
		{
			MethodName: "GetLogicalOnuDistance",
			Handler:    _Openolt_GetLogicalOnuDistance_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "EnableIndication",
			Handler:       _Openolt_EnableIndication_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "voltha_protos/openolt.proto",
}
